diff --git a/src/Microsoft.Graph/Generated/AccessReviewDecisions/AccessReviewDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviewDecisions/AccessReviewDecisionsRequestBuilder.cs index eca2e2f30c8..666ddf886fa 100644 --- a/src/Microsoft.Graph/Generated/AccessReviewDecisions/AccessReviewDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviewDecisions/AccessReviewDecisionsRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessReviewDecisionsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviewDecisions/Item/AccessReviewDecisionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviewDecisions/Item/AccessReviewDecisionItemRequestBuilder.cs index a54f5a10a2d..b57ef1dd1c0 100644 --- a/src/Microsoft.Graph/Generated/AccessReviewDecisions/Item/AccessReviewDecisionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviewDecisions/Item/AccessReviewDecisionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/AccessReviewsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/AccessReviewsRequestBuilder.cs index 1b117381d28..74d7a3d0853 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/AccessReviewsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/AccessReviewsRequestBuilder.cs @@ -95,7 +95,7 @@ public AccessReviewsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReview body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReview body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/AccessReviewItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/AccessReviewItemRequestBuilder.cs index 1e8cb251d2f..7b0a7f630c0 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/AccessReviewItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/AccessReviewItemRequestBuilder.cs @@ -147,7 +147,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReview body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -208,7 +208,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReview body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/Decisions/DecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/Decisions/DecisionsRequestBuilder.cs index 1c63c7cd90a..39770ae4c23 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/Decisions/DecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/Decisions/DecisionsRequestBuilder.cs @@ -94,7 +94,7 @@ public DecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/Decisions/Item/AccessReviewDecisionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/Decisions/Item/AccessReviewDecisionItemRequestBuilder.cs index 7441faa38bb..312f1d1c889 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/Decisions/Item/AccessReviewDecisionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/Decisions/Item/AccessReviewDecisionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/InstancesRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/InstancesRequestBuilder.cs index f29ce63040b..10e41ab5a4c 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/InstancesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/InstancesRequestBuilder.cs @@ -93,7 +93,7 @@ public InstancesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReview body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReview body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/AccessReviewItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/AccessReviewItemRequestBuilder.cs index 3dfb50241ac..f9cadefddb4 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/AccessReviewItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/AccessReviewItemRequestBuilder.cs @@ -138,7 +138,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReview body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -199,7 +199,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReview body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Decisions/DecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Decisions/DecisionsRequestBuilder.cs index 0c654cbd457..488b5b72b70 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Decisions/DecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Decisions/DecisionsRequestBuilder.cs @@ -93,7 +93,7 @@ public DecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Decisions/Item/AccessReviewDecisionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Decisions/Item/AccessReviewDecisionItemRequestBuilder.cs index a883e9d5fb3..a8c5eb9c7b5 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Decisions/Item/AccessReviewDecisionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Decisions/Item/AccessReviewDecisionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/MyDecisions/Item/AccessReviewDecisionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/MyDecisions/Item/AccessReviewDecisionItemRequestBuilder.cs index 8aa5f89bc0c..e02dbd03773 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/MyDecisions/Item/AccessReviewDecisionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/MyDecisions/Item/AccessReviewDecisionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/MyDecisions/MyDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/MyDecisions/MyDecisionsRequestBuilder.cs index 80ba62aa5cb..833d48d6897 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/MyDecisions/MyDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/MyDecisions/MyDecisionsRequestBuilder.cs @@ -93,7 +93,7 @@ public MyDecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Reviewers/Item/AccessReviewReviewerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Reviewers/Item/AccessReviewReviewerItemRequestBuilder.cs index 558a31bbb34..9c277ebb85f 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Reviewers/Item/AccessReviewReviewerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Reviewers/Item/AccessReviewReviewerItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Reviewers/ReviewersRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Reviewers/ReviewersRequestBuilder.cs index f5ad40043f1..8fcb0897c2b 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Reviewers/ReviewersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/Instances/Item/Reviewers/ReviewersRequestBuilder.cs @@ -93,7 +93,7 @@ public ReviewersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/MyDecisions/Item/AccessReviewDecisionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/MyDecisions/Item/AccessReviewDecisionItemRequestBuilder.cs index ca49a716324..6edb2286829 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/MyDecisions/Item/AccessReviewDecisionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/MyDecisions/Item/AccessReviewDecisionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/MyDecisions/MyDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/MyDecisions/MyDecisionsRequestBuilder.cs index 1036ba32b7d..24c4b3eed45 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/MyDecisions/MyDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/MyDecisions/MyDecisionsRequestBuilder.cs @@ -94,7 +94,7 @@ public MyDecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewDecision body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/Reviewers/Item/AccessReviewReviewerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/Reviewers/Item/AccessReviewReviewerItemRequestBuilder.cs index 07ab8801e3f..6b3865b83f8 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/Reviewers/Item/AccessReviewReviewerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/Reviewers/Item/AccessReviewReviewerItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AccessReviews/Item/Reviewers/ReviewersRequestBuilder.cs b/src/Microsoft.Graph/Generated/AccessReviews/Item/Reviewers/ReviewersRequestBuilder.cs index e67c469b9ad..57dd05930fd 100644 --- a/src/Microsoft.Graph/Generated/AccessReviews/Item/Reviewers/ReviewersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AccessReviews/Item/Reviewers/ReviewersRequestBuilder.cs @@ -95,7 +95,7 @@ public ReviewersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Activitystatistics/ActivitystatisticsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Activitystatistics/ActivitystatisticsRequestBuilder.cs index 7f76c952358..2bead56bbfd 100644 --- a/src/Microsoft.Graph/Generated/Activitystatistics/ActivitystatisticsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Activitystatistics/ActivitystatisticsRequestBuilder.cs @@ -93,7 +93,7 @@ public ActivitystatisticsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ActivityStatistics body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ActivityStatistics body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Activitystatistics/Item/ActivityStatisticsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Activitystatistics/Item/ActivityStatisticsItemRequestBuilder.cs index 0d0c49646de..660607baab7 100644 --- a/src/Microsoft.Graph/Generated/Activitystatistics/Item/ActivityStatisticsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Activitystatistics/Item/ActivityStatisticsItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ActivityStatistics body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ActivityStatistics body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/AdminRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/AdminRequestBuilder.cs index 1832d520213..a22f958c760 100644 --- a/src/Microsoft.Graph/Generated/Admin/AdminRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/AdminRequestBuilder.cs @@ -164,7 +164,7 @@ public AdminRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.Admin body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -206,7 +206,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Admin body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/AppsAndServices/AppsAndServicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/AppsAndServices/AppsAndServicesRequestBuilder.cs index f4e345c2c1d..d51baaf6de9 100644 --- a/src/Microsoft.Graph/Generated/Admin/AppsAndServices/AppsAndServicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/AppsAndServices/AppsAndServicesRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AdminAppsAndServices body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AdminAppsAndServices body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationApplications/ConfigurationApplicationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationApplications/ConfigurationApplicationsRequestBuilder.cs index f7576e55df4..c4aba5d2c60 100644 --- a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationApplications/ConfigurationApplicationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationApplications/ConfigurationApplicationsRequestBuilder.cs @@ -93,7 +93,7 @@ public ConfigurationApplicationsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConfigurationApplication body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigurationApplication body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationApplications/Item/ConfigurationApplicationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationApplications/Item/ConfigurationApplicationItemRequestBuilder.cs index df06a7149db..b7ae8587ea5 100644 --- a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationApplications/Item/ConfigurationApplicationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationApplications/Item/ConfigurationApplicationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConfigurationApplication body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigurationApplication body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationDrifts/ConfigurationDriftsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationDrifts/ConfigurationDriftsRequestBuilder.cs index 34e45ab9ee9..9ef380b6ba8 100644 --- a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationDrifts/ConfigurationDriftsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationDrifts/ConfigurationDriftsRequestBuilder.cs @@ -93,7 +93,7 @@ public ConfigurationDriftsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConfigurationDrift body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigurationDrift body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationDrifts/Item/ConfigurationDriftItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationDrifts/Item/ConfigurationDriftItemRequestBuilder.cs index 629031e3972..8e501bdeab4 100644 --- a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationDrifts/Item/ConfigurationDriftItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationDrifts/Item/ConfigurationDriftItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConfigurationDrift body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigurationDrift body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationManagementRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationManagementRequestBuilder.cs index 06475b00594..e1b5c870994 100644 --- a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationManagementRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationManagementRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConfigurationManagement body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigurationManagement body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitoringResults/ConfigurationMonitoringResultsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitoringResults/ConfigurationMonitoringResultsRequestBuilder.cs index f75a140eef3..62e8aadd438 100644 --- a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitoringResults/ConfigurationMonitoringResultsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitoringResults/ConfigurationMonitoringResultsRequestBuilder.cs @@ -93,7 +93,7 @@ public ConfigurationMonitoringResultsRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConfigurationMonitoringResult body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigurationMonitoringResult body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitoringResults/Item/ConfigurationMonitoringResultItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitoringResults/Item/ConfigurationMonitoringResultItemRequestBuilder.cs index 53418880882..7f75d562168 100644 --- a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitoringResults/Item/ConfigurationMonitoringResultItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitoringResults/Item/ConfigurationMonitoringResultItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConfigurationMonitoringResult body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigurationMonitoringResult body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitors/ConfigurationMonitorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitors/ConfigurationMonitorsRequestBuilder.cs index 35513e80107..44761197e4b 100644 --- a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitors/ConfigurationMonitorsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitors/ConfigurationMonitorsRequestBuilder.cs @@ -93,7 +93,7 @@ public ConfigurationMonitorsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConfigurationMonitor body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigurationMonitor body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitors/Item/Baseline/BaselineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitors/Item/Baseline/BaselineRequestBuilder.cs index 5db1ca53401..a20d5ff7ef2 100644 --- a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitors/Item/Baseline/BaselineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitors/Item/Baseline/BaselineRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConfigurationBaseline body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigurationBaseline body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitors/Item/ConfigurationMonitorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitors/Item/ConfigurationMonitorItemRequestBuilder.cs index 0bd0f6f338f..c7a95c44dc4 100644 --- a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitors/Item/ConfigurationMonitorItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationMonitors/Item/ConfigurationMonitorItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConfigurationMonitor body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigurationMonitor body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshotJobs/ConfigurationSnapshotJobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshotJobs/ConfigurationSnapshotJobsRequestBuilder.cs index 22f080d8477..59eee4a0a63 100644 --- a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshotJobs/ConfigurationSnapshotJobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshotJobs/ConfigurationSnapshotJobsRequestBuilder.cs @@ -93,7 +93,7 @@ public ConfigurationSnapshotJobsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConfigurationSnapshotJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigurationSnapshotJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshotJobs/Item/ConfigurationSnapshotJobItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshotJobs/Item/ConfigurationSnapshotJobItemRequestBuilder.cs index fe4e631c797..deebf8c42dc 100644 --- a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshotJobs/Item/ConfigurationSnapshotJobItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshotJobs/Item/ConfigurationSnapshotJobItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConfigurationSnapshotJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigurationSnapshotJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/ConfigurationSnapshotsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/ConfigurationSnapshotsRequestBuilder.cs index a5e7071d784..6bc9f5f2d1c 100644 --- a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/ConfigurationSnapshotsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/ConfigurationSnapshotsRequestBuilder.cs @@ -93,7 +93,7 @@ public ConfigurationSnapshotsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConfigurationBaseline body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigurationBaseline body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/Item/ConfigurationBaselineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/Item/ConfigurationBaselineItemRequestBuilder.cs index 19133452fe3..af42b0db5c3 100644 --- a/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/Item/ConfigurationBaselineItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ConfigurationManagement/ConfigurationSnapshots/Item/ConfigurationBaselineItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConfigurationBaseline body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigurationBaseline body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Dynamics/DynamicsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Dynamics/DynamicsRequestBuilder.cs index d74057adfc8..072b6c6a1f8 100644 --- a/src/Microsoft.Graph/Generated/Admin/Dynamics/DynamicsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Dynamics/DynamicsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AdminDynamics body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AdminDynamics body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Edge/EdgeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Edge/EdgeRequestBuilder.cs index 5752770fb77..80296875d47 100644 --- a/src/Microsoft.Graph/Generated/Admin/Edge/EdgeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Edge/EdgeRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Edge body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Edge body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/InternetExplorerModeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/InternetExplorerModeRequestBuilder.cs index 3230b6579a0..d02ea472a4c 100644 --- a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/InternetExplorerModeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/InternetExplorerModeRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InternetExplorerMode body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InternetExplorerMode body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/BrowserSiteListItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/BrowserSiteListItemRequestBuilder.cs index 61f35f3106c..75e175c04f5 100644 --- a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/BrowserSiteListItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/BrowserSiteListItemRequestBuilder.cs @@ -117,7 +117,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BrowserSiteList body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -178,7 +178,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BrowserSiteList body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Publish/PublishPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Publish/PublishPostRequestBody.cs index f702819cfe1..a15a809f542 100644 --- a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Publish/PublishPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Publish/PublishPostRequestBody.cs @@ -85,7 +85,7 @@ public PublishPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Edge.InternetExplorerMode.SiteLists.Item.Publish.PublishPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Edge.InternetExplorerMode.SiteLists.Item.Publish.PublishPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("revision", Revision); writer.WriteCollectionOfObjectValues("sharedCookies", SharedCookies); writer.WriteCollectionOfObjectValues("sites", Sites); diff --git a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Publish/PublishRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Publish/PublishRequestBuilder.cs index bd7a583e6d9..8369058556b 100644 --- a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Publish/PublishRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Publish/PublishRequestBuilder.cs @@ -52,7 +52,7 @@ public PublishRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Edge.InternetExplorerMode.SiteLists.Item.Publish.PublishPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Edge.InternetExplorerMode.SiteLists.Item.Publish.PublishPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/SharedCookies/Item/BrowserSharedCookieItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/SharedCookies/Item/BrowserSharedCookieItemRequestBuilder.cs index 69eca29e998..1891d614e46 100644 --- a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/SharedCookies/Item/BrowserSharedCookieItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/SharedCookies/Item/BrowserSharedCookieItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BrowserSharedCookie body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BrowserSharedCookie body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/SharedCookies/SharedCookiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/SharedCookies/SharedCookiesRequestBuilder.cs index 9e32d24ff08..f11ae73a345 100644 --- a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/SharedCookies/SharedCookiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/SharedCookies/SharedCookiesRequestBuilder.cs @@ -95,7 +95,7 @@ public SharedCookiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BrowserSharedCookie body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BrowserSharedCookie body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Sites/Item/BrowserSiteItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Sites/Item/BrowserSiteItemRequestBuilder.cs index 52f66c307e6..dac3c1b87b1 100644 --- a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Sites/Item/BrowserSiteItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Sites/Item/BrowserSiteItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BrowserSite body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BrowserSite body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Sites/SitesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Sites/SitesRequestBuilder.cs index 4fb935e3cee..e78c1f32e48 100644 --- a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Sites/SitesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/Item/Sites/SitesRequestBuilder.cs @@ -95,7 +95,7 @@ public SitesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BrowserSite body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BrowserSite body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/SiteListsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/SiteListsRequestBuilder.cs index 014f8fb3eac..5af95a52e5f 100644 --- a/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/SiteListsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Edge/InternetExplorerMode/SiteLists/SiteListsRequestBuilder.cs @@ -95,7 +95,7 @@ public SiteListsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BrowserSiteList body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BrowserSiteList body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Entra/EntraRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Entra/EntraRequestBuilder.cs index 9b94f9b12d8..e0074134830 100644 --- a/src/Microsoft.Graph/Generated/Admin/Entra/EntraRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Entra/EntraRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Entra body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Entra body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Entra/UxSetting/UxSettingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Entra/UxSetting/UxSettingRequestBuilder.cs index 8aca0eb1714..7901e277427 100644 --- a/src/Microsoft.Graph/Generated/Admin/Entra/UxSetting/UxSettingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Entra/UxSetting/UxSettingRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UxSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UxSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/ExchangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/ExchangeRequestBuilder.cs index 9fd91f7e6b2..f8245657703 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/ExchangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/ExchangeRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExchangeAdmin body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExchangeAdmin body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsPostRequestBody.cs index 3f797c2636e..766d483fcdc 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsPostRequestBody.cs @@ -52,7 +52,7 @@ public ExportItemsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.ExportItems.ExportItemsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.ExportItems.ExportItemsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ItemIds", ItemIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsPostResponse.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsPostResponse.cs index 73d98f8c8f4..8dda893f48f 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsPostResponse.cs @@ -36,7 +36,7 @@ public partial class ExportItemsPostResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.ExportItems.ExportItemsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.ExportItems.ExportItemsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsRequestBuilder.cs index 097b0364cf6..72abe7713c6 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsRequestBuilder.cs @@ -52,7 +52,7 @@ public ExportItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsExportItemsPostResponseAsync(global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.ExportItems.ExportItemsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -79,7 +79,7 @@ public ExportItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.ExportItems.ExportItemsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -103,7 +103,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.ExportItems.ExportItemsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsResponse.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsResponse.cs index 33f939be741..0fe2b55d66d 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/ExportItems/ExportItemsResponse.cs @@ -20,7 +20,7 @@ public partial class ExportItemsResponse : global::Microsoft.Graph.Beta.Admin.Ex /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.ExportItems.ExportItemsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.ExportItems.ExportItemsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Delta/DeltaGetResponse.cs index f0ce37b6c83..af61ae311ca 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Delta/DeltaResponse.cs index 105a07f504e..a8bd54314e9 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Admin.Exchange /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Delta/DeltaGetResponse.cs index d768d3f848e..f7fd1175013 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Item.ChildFolders.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Item.ChildFolders.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Delta/DeltaResponse.cs index 8ab551b9b52..7159174236d 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Admin.Exchange /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Item.ChildFolders.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Item.ChildFolders.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Item/Items/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Item/Items/Delta/DeltaGetResponse.cs index 9df7da9b71d..d3dd1b9a919 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Item/Items/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Item/Items/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Item.ChildFolders.Item.Items.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Item.ChildFolders.Item.Items.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Item/Items/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Item/Items/Delta/DeltaResponse.cs index 2bec976e2e7..0559bfe7e26 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Item/Items/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/ChildFolders/Item/Items/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Admin.Exchange /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Item.ChildFolders.Item.Items.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Item.ChildFolders.Item.Items.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/Items/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/Items/Delta/DeltaGetResponse.cs index 2a16d9d01b8..cb4966ba730 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/Items/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/Items/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Item.Items.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Item.Items.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/Items/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/Items/Delta/DeltaResponse.cs index 43d2d94b2c3..49ad0beedc0 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/Items/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/Folders/Item/Items/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Admin.Exchange /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Item.Items.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Exchange.Mailboxes.Item.Folders.Item.Items.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/MailboxItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/MailboxItemRequestBuilder.cs index 91869ddd158..4d06fe2ee51 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/MailboxItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/Item/MailboxItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Mailbox body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -184,7 +184,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Mailbox body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/MailboxesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/MailboxesRequestBuilder.cs index 873d6ab1a9a..6d242c69ebc 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/MailboxesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/Mailboxes/MailboxesRequestBuilder.cs @@ -97,7 +97,7 @@ public MailboxesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Mailbox body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Mailbox body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/MessageTraceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/MessageTraceItemRequestBuilder.cs index be3a620573e..e1274ac605d 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/MessageTraceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/MessageTraceItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MessageTrace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MessageTrace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/Item/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/Item/Events/EventsRequestBuilder.cs index e814227f740..5be148456cf 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/Item/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/Item/Events/EventsRequestBuilder.cs @@ -97,7 +97,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/Item/Events/Item/MessageEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/Item/Events/Item/MessageEventItemRequestBuilder.cs index cf842302e25..2228dd3b27d 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/Item/Events/Item/MessageEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/Item/Events/Item/MessageEventItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/Item/MessageRecipientItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/Item/MessageRecipientItemRequestBuilder.cs index d928949c8c0..7a0b4498e32 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/Item/MessageRecipientItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/Item/MessageRecipientItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MessageRecipient body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MessageRecipient body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/RecipientsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/RecipientsRequestBuilder.cs index 51c9398353a..3461ef6cde2 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/RecipientsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/Item/Recipients/RecipientsRequestBuilder.cs @@ -97,7 +97,7 @@ public RecipientsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MessageRecipient body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MessageRecipient body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/MessageTracesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/MessageTracesRequestBuilder.cs index c5e547f650d..f362b3cfa81 100644 --- a/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/MessageTracesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Exchange/MessageTraces/MessageTracesRequestBuilder.cs @@ -97,7 +97,7 @@ public MessageTracesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MessageTrace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MessageTrace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Forms/FormsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Forms/FormsRequestBuilder.cs index 5d3ebec749f..28454b52d0f 100644 --- a/src/Microsoft.Graph/Generated/Admin/Forms/FormsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Forms/FormsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AdminForms body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AdminForms body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Microsoft365Apps/InstallationOptions/InstallationOptionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Microsoft365Apps/InstallationOptions/InstallationOptionsRequestBuilder.cs index 7f4e2f2678d..3b21498327a 100644 --- a/src/Microsoft.Graph/Generated/Admin/Microsoft365Apps/InstallationOptions/InstallationOptionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Microsoft365Apps/InstallationOptions/InstallationOptionsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.M365AppsInstallationOptions body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.M365AppsInstallationOptions body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Microsoft365Apps/Microsoft365AppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Microsoft365Apps/Microsoft365AppsRequestBuilder.cs index f20ec2c435c..baa6a3803c4 100644 --- a/src/Microsoft.Graph/Generated/Admin/Microsoft365Apps/Microsoft365AppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Microsoft365Apps/Microsoft365AppsRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AdminMicrosoft365Apps body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AdminMicrosoft365Apps body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/People/ItemInsights/ItemInsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/People/ItemInsights/ItemInsightsRequestBuilder.cs index 632302216cd..c99482fed9f 100644 --- a/src/Microsoft.Graph/Generated/Admin/People/ItemInsights/ItemInsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/People/ItemInsights/ItemInsightsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InsightsSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InsightsSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/People/NamePronunciation/NamePronunciationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/People/NamePronunciation/NamePronunciationRequestBuilder.cs index 66f6338cf48..eb1d8116572 100644 --- a/src/Microsoft.Graph/Generated/Admin/People/NamePronunciation/NamePronunciationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/People/NamePronunciation/NamePronunciationRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.NamePronunciationSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.NamePronunciationSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/People/PeopleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/People/PeopleRequestBuilder.cs index 16d772279be..23c23ba2118 100644 --- a/src/Microsoft.Graph/Generated/Admin/People/PeopleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/People/PeopleRequestBuilder.cs @@ -140,7 +140,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PeopleAdminSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -211,7 +211,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PeopleAdminSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/People/PhotoUpdateSettings/PhotoUpdateSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/People/PhotoUpdateSettings/PhotoUpdateSettingsRequestBuilder.cs index e2815aff4a1..99389348960 100644 --- a/src/Microsoft.Graph/Generated/Admin/People/PhotoUpdateSettings/PhotoUpdateSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/People/PhotoUpdateSettings/PhotoUpdateSettingsRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PhotoUpdateSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PhotoUpdateSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/People/ProfileCardProperties/Item/ProfileCardPropertyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/People/ProfileCardProperties/Item/ProfileCardPropertyItemRequestBuilder.cs index 953b4bf0f96..67bdbd93b92 100644 --- a/src/Microsoft.Graph/Generated/Admin/People/ProfileCardProperties/Item/ProfileCardPropertyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/People/ProfileCardProperties/Item/ProfileCardPropertyItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ProfileCardProperty body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProfileCardProperty body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/People/ProfileCardProperties/ProfileCardPropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/People/ProfileCardProperties/ProfileCardPropertiesRequestBuilder.cs index d15e22d93af..b7679177c92 100644 --- a/src/Microsoft.Graph/Generated/Admin/People/ProfileCardProperties/ProfileCardPropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/People/ProfileCardProperties/ProfileCardPropertiesRequestBuilder.cs @@ -95,7 +95,7 @@ public ProfileCardPropertiesRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ProfileCardProperty body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ProfileCardProperty body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/People/ProfilePropertySettings/Item/ProfilePropertySettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/People/ProfilePropertySettings/Item/ProfilePropertySettingItemRequestBuilder.cs index fe2d980aa8a..7ee3a04d61b 100644 --- a/src/Microsoft.Graph/Generated/Admin/People/ProfilePropertySettings/Item/ProfilePropertySettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/People/ProfilePropertySettings/Item/ProfilePropertySettingItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ProfilePropertySetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProfilePropertySetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/People/ProfilePropertySettings/ProfilePropertySettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/People/ProfilePropertySettings/ProfilePropertySettingsRequestBuilder.cs index 4715a9bda92..185fb1687b1 100644 --- a/src/Microsoft.Graph/Generated/Admin/People/ProfilePropertySettings/ProfilePropertySettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/People/ProfilePropertySettings/ProfilePropertySettingsRequestBuilder.cs @@ -95,7 +95,7 @@ public ProfilePropertySettingsRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ProfilePropertySetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ProfilePropertySetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/People/ProfileSources/Item/ProfileSourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/People/ProfileSources/Item/ProfileSourceItemRequestBuilder.cs index 88c9eb38c30..2977af0d26d 100644 --- a/src/Microsoft.Graph/Generated/Admin/People/ProfileSources/Item/ProfileSourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/People/ProfileSources/Item/ProfileSourceItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ProfileSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProfileSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/People/ProfileSources/ProfileSourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/People/ProfileSources/ProfileSourcesRequestBuilder.cs index d36e4aa80dc..a90f9db15c1 100644 --- a/src/Microsoft.Graph/Generated/Admin/People/ProfileSources/ProfileSourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/People/ProfileSources/ProfileSourcesRequestBuilder.cs @@ -95,7 +95,7 @@ public ProfileSourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ProfileSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ProfileSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/People/ProfileSourcesWithSourceId/ProfileSourcesWithSourceIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/People/ProfileSourcesWithSourceId/ProfileSourcesWithSourceIdRequestBuilder.cs index 91da67a5b46..57a9368fbb8 100644 --- a/src/Microsoft.Graph/Generated/Admin/People/ProfileSourcesWithSourceId/ProfileSourcesWithSourceIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/People/ProfileSourcesWithSourceId/ProfileSourcesWithSourceIdRequestBuilder.cs @@ -100,7 +100,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ProfileSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -161,7 +161,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProfileSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/People/Pronouns/PronounsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/People/Pronouns/PronounsRequestBuilder.cs index f0a1aa50fcd..00b5aa72f49 100644 --- a/src/Microsoft.Graph/Generated/Admin/People/Pronouns/PronounsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/People/Pronouns/PronounsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PronounsSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PronounsSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ReportSettings/ReportSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ReportSettings/ReportSettingsRequestBuilder.cs index e309650e4cd..b0c00a3835d 100644 --- a/src/Microsoft.Graph/Generated/Admin/ReportSettings/ReportSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ReportSettings/ReportSettingsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AdminReportSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AdminReportSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/HealthOverviewsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/HealthOverviewsRequestBuilder.cs index 10ee2c9f0ea..6c1822476f7 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/HealthOverviewsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/HealthOverviewsRequestBuilder.cs @@ -94,7 +94,7 @@ public HealthOverviewsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ServiceHealth body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceHealth body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Item/Issues/IssuesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Item/Issues/IssuesRequestBuilder.cs index 69530df3f0d..90633207418 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Item/Issues/IssuesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Item/Issues/IssuesRequestBuilder.cs @@ -93,7 +93,7 @@ public IssuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ServiceHealthIssue body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceHealthIssue body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Item/Issues/Item/ServiceHealthIssueItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Item/Issues/Item/ServiceHealthIssueItemRequestBuilder.cs index 7d2029ffbd8..f1bd26f5bb9 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Item/Issues/Item/ServiceHealthIssueItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Item/Issues/Item/ServiceHealthIssueItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServiceHealthIssue body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceHealthIssue body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Item/ServiceHealthItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Item/ServiceHealthItemRequestBuilder.cs index b931ba06063..d885c780385 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Item/ServiceHealthItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/HealthOverviews/Item/ServiceHealthItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServiceHealth body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceHealth body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Issues/IssuesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Issues/IssuesRequestBuilder.cs index c93efaa8e7b..a6ebe59fc2b 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Issues/IssuesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Issues/IssuesRequestBuilder.cs @@ -94,7 +94,7 @@ public IssuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ServiceHealthIssue body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceHealthIssue body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Issues/Item/ServiceHealthIssueItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Issues/Item/ServiceHealthIssueItemRequestBuilder.cs index f87e39fd64e..5e307619868 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Issues/Item/ServiceHealthIssueItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Issues/Item/ServiceHealthIssueItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServiceHealthIssue body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceHealthIssue body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchivePostRequestBody.cs index ad60378b608..4b36475d005 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchivePostRequestBody.cs @@ -52,7 +52,7 @@ public ArchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Archive.ArchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Archive.ArchivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchivePostResponse.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchivePostResponse.cs index ed69b86e39f..e9668d781c3 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchivePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchivePostResponse.cs @@ -42,7 +42,7 @@ public ArchivePostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Archive.ArchivePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Archive.ArchivePostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchiveRequestBuilder.cs index 48ccde39827..bc1f3d21944 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchiveRequestBuilder.cs @@ -51,7 +51,7 @@ public ArchiveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsArchivePostResponseAsync(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public ArchiveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchiveResponse.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchiveResponse.cs index 41daf881bee..50cc76c868b 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchiveResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Archive/ArchiveResponse.cs @@ -20,7 +20,7 @@ public partial class ArchiveResponse : global::Microsoft.Graph.Beta.Admin.Servic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Archive.ArchiveResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Archive.ArchiveResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoritePostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoritePostRequestBody.cs index cb715035e93..f3698669344 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoritePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoritePostRequestBody.cs @@ -52,7 +52,7 @@ public FavoritePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Favorite.FavoritePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Favorite.FavoritePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoritePostResponse.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoritePostResponse.cs index 3117f9e2084..f0d08b23feb 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoritePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoritePostResponse.cs @@ -42,7 +42,7 @@ public FavoritePostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Favorite.FavoritePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Favorite.FavoritePostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoriteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoriteRequestBuilder.cs index 762d214fd14..3006a0e3b57 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoriteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoriteRequestBuilder.cs @@ -51,7 +51,7 @@ public FavoriteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsFavoritePostResponseAsync(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Favorite.FavoritePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public FavoriteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Favorite.FavoritePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Favorite.FavoritePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoriteResponse.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoriteResponse.cs index 7e96082d4a8..8e41461b437 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoriteResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Favorite/FavoriteResponse.cs @@ -20,7 +20,7 @@ public partial class FavoriteResponse : global::Microsoft.Graph.Beta.Admin.Servi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Favorite.FavoriteResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Favorite.FavoriteResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index c791f765554..b1759798300 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -94,7 +94,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ServiceAnnouncementAttachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceAnnouncementAttachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/Attachments/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/Attachments/Item/Content/ContentRequestBuilder.cs index 8bbdfc7ae7b..13f9e0245a4 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/Attachments/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/Attachments/Item/Content/ContentRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/Attachments/Item/ServiceAnnouncementAttachmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/Attachments/Item/ServiceAnnouncementAttachmentItemRequestBuilder.cs index 0a8f1a7be90..6f87e886b0b 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/Attachments/Item/ServiceAnnouncementAttachmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/Attachments/Item/ServiceAnnouncementAttachmentItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServiceAnnouncementAttachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceAnnouncementAttachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/AttachmentsArchive/AttachmentsArchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/AttachmentsArchive/AttachmentsArchiveRequestBuilder.cs index 24231e426e9..d36f637c263 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/AttachmentsArchive/AttachmentsArchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/AttachmentsArchive/AttachmentsArchiveRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/ServiceUpdateMessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/ServiceUpdateMessageItemRequestBuilder.cs index 3dff01d8d28..465f4573c05 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/ServiceUpdateMessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Item/ServiceUpdateMessageItemRequestBuilder.cs @@ -109,7 +109,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServiceUpdateMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceUpdateMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadPostRequestBody.cs index 6f67331fce9..46d7def69f1 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadPostRequestBody.cs @@ -52,7 +52,7 @@ public MarkReadPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkRead.MarkReadPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkRead.MarkReadPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadPostResponse.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadPostResponse.cs index 910aae31dd1..2dea7608427 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadPostResponse.cs @@ -42,7 +42,7 @@ public MarkReadPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkRead.MarkReadPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkRead.MarkReadPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadRequestBuilder.cs index 283f3fb8f93..acf1b77c464 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadRequestBuilder.cs @@ -51,7 +51,7 @@ public MarkReadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsMarkReadPostResponseAsync(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkRead.MarkReadPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public MarkReadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkRead.MarkReadPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkRead.MarkReadPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadResponse.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadResponse.cs index 69641752e1a..6ef759468f3 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkRead/MarkReadResponse.cs @@ -20,7 +20,7 @@ public partial class MarkReadResponse : global::Microsoft.Graph.Beta.Admin.Servi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkRead.MarkReadResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkRead.MarkReadResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadPostRequestBody.cs index 7f8bb663efd..43fcc7a2b01 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadPostRequestBody.cs @@ -52,7 +52,7 @@ public MarkUnreadPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkUnread.MarkUnreadPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkUnread.MarkUnreadPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadPostResponse.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadPostResponse.cs index 262a6d5c219..6c8b7e2b888 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadPostResponse.cs @@ -42,7 +42,7 @@ public MarkUnreadPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkUnread.MarkUnreadPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkUnread.MarkUnreadPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadRequestBuilder.cs index 33166d77e3e..a255cd3df1a 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadRequestBuilder.cs @@ -51,7 +51,7 @@ public MarkUnreadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsMarkUnreadPostResponseAsync(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkUnread.MarkUnreadPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public MarkUnreadRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkUnread.MarkUnreadPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkUnread.MarkUnreadPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadResponse.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadResponse.cs index d31ab2f710e..bda4b347998 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MarkUnread/MarkUnreadResponse.cs @@ -20,7 +20,7 @@ public partial class MarkUnreadResponse : global::Microsoft.Graph.Beta.Admin.Ser /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkUnread.MarkUnreadResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.MarkUnread.MarkUnreadResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MessagesRequestBuilder.cs index 0b510ba9a07..ceea5a47d43 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/MessagesRequestBuilder.cs @@ -130,7 +130,7 @@ public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ServiceUpdateMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceUpdateMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchivePostRequestBody.cs index f14decb5793..5cb6c9886cf 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchivePostRequestBody.cs @@ -52,7 +52,7 @@ public UnarchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unarchive.UnarchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unarchive.UnarchivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchivePostResponse.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchivePostResponse.cs index 19b2f18c01c..7260e914431 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchivePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchivePostResponse.cs @@ -42,7 +42,7 @@ public UnarchivePostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unarchive.UnarchivePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unarchive.UnarchivePostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchiveRequestBuilder.cs index 595cfd695ce..5d6fee60031 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchiveRequestBuilder.cs @@ -51,7 +51,7 @@ public UnarchiveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsUnarchivePostResponseAsync(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unarchive.UnarchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public UnarchiveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unarchive.UnarchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unarchive.UnarchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchiveResponse.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchiveResponse.cs index ebd46532dff..682dbffde14 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchiveResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unarchive/UnarchiveResponse.cs @@ -20,7 +20,7 @@ public partial class UnarchiveResponse : global::Microsoft.Graph.Beta.Admin.Serv /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unarchive.UnarchiveResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unarchive.UnarchiveResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoritePostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoritePostRequestBody.cs index fd225e12ce9..eec4816be21 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoritePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoritePostRequestBody.cs @@ -52,7 +52,7 @@ public UnfavoritePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unfavorite.UnfavoritePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unfavorite.UnfavoritePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoritePostResponse.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoritePostResponse.cs index 7392f04eaed..39cd2de5e34 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoritePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoritePostResponse.cs @@ -42,7 +42,7 @@ public UnfavoritePostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unfavorite.UnfavoritePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unfavorite.UnfavoritePostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoriteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoriteRequestBuilder.cs index c56dbf99a26..22aceea2623 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoriteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoriteRequestBuilder.cs @@ -51,7 +51,7 @@ public UnfavoriteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsUnfavoritePostResponseAsync(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unfavorite.UnfavoritePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public UnfavoriteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unfavorite.UnfavoritePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unfavorite.UnfavoritePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoriteResponse.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoriteResponse.cs index 97f6e193231..03dc6beeeac 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoriteResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/Messages/Unfavorite/UnfavoriteResponse.cs @@ -20,7 +20,7 @@ public partial class UnfavoriteResponse : global::Microsoft.Graph.Beta.Admin.Ser /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unfavorite.UnfavoriteResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.ServiceAnnouncement.Messages.Unfavorite.UnfavoriteResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/ServiceAnnouncementRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/ServiceAnnouncementRequestBuilder.cs index 9e4cbedb1a7..42bc1c5909d 100644 --- a/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/ServiceAnnouncementRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/ServiceAnnouncement/ServiceAnnouncementRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServiceAnnouncement body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceAnnouncement body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Sharepoint/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Sharepoint/Settings/SettingsRequestBuilder.cs index 01b4cf5cdba..6177499861d 100644 --- a/src/Microsoft.Graph/Generated/Admin/Sharepoint/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Sharepoint/Settings/SettingsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SharepointSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SharepointSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Sharepoint/SharepointRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Sharepoint/SharepointRequestBuilder.cs index 28b752a664e..b5340ad7e9d 100644 --- a/src/Microsoft.Graph/Generated/Admin/Sharepoint/SharepointRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Sharepoint/SharepointRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Sharepoint body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Sharepoint body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Teams/Policy/PolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Teams/Policy/PolicyRequestBuilder.cs index fa44db99ae4..614f935ff5a 100644 --- a/src/Microsoft.Graph/Generated/Admin/Teams/Policy/PolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Teams/Policy/PolicyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Teams/TeamsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Teams/TeamsRequestBuilder.cs index ae41a880b29..91764c90e62 100644 --- a/src/Microsoft.Graph/Generated/Admin/Teams/TeamsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Teams/TeamsRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsAdminRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsAdminRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Teams/UserConfigurations/Item/TeamsUserConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Teams/UserConfigurations/Item/TeamsUserConfigurationItemRequestBuilder.cs index 16c834c0054..2dd655e1c7d 100644 --- a/src/Microsoft.Graph/Generated/Admin/Teams/UserConfigurations/Item/TeamsUserConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Teams/UserConfigurations/Item/TeamsUserConfigurationItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsUserConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsUserConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Teams/UserConfigurations/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Teams/UserConfigurations/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs index 7766a811583..d4b320136e9 100644 --- a/src/Microsoft.Graph/Generated/Admin/Teams/UserConfigurations/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Teams/UserConfigurations/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Teams/UserConfigurations/UserConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Teams/UserConfigurations/UserConfigurationsRequestBuilder.cs index 79d041f0a01..efad8ae9cc6 100644 --- a/src/Microsoft.Graph/Generated/Admin/Teams/UserConfigurations/UserConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Teams/UserConfigurations/UserConfigurationsRequestBuilder.cs @@ -94,7 +94,7 @@ public UserConfigurationsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsUserConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsUserConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Todo/TodoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Todo/TodoRequestBuilder.cs index 2a8a3175ed9..58b1266a446 100644 --- a/src/Microsoft.Graph/Generated/Admin/Todo/TodoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Todo/TodoRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AdminTodo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AdminTodo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Catalog/CatalogRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Catalog/CatalogRequestBuilder.cs index 1be1cab6d24..280fbefeedf 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Catalog/CatalogRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Catalog/CatalogRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.Catalog body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.Catalog body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Catalog/Entries/EntriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Catalog/Entries/EntriesRequestBuilder.cs index b563c39bd9b..f45065e00d3 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Catalog/Entries/EntriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Catalog/Entries/EntriesRequestBuilder.cs @@ -94,7 +94,7 @@ public EntriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.CatalogEntry body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.CatalogEntry body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Catalog/Entries/Item/CatalogEntryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Catalog/Entries/Item/CatalogEntryItemRequestBuilder.cs index 1cdcaba357b..2a6cd521217 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Catalog/Entries/Item/CatalogEntryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Catalog/Entries/Item/CatalogEntryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.CatalogEntry body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.CatalogEntry body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/DeploymentAudiencesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/DeploymentAudiencesRequestBuilder.cs index f48a2b0e69c..3236d5165f9 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/DeploymentAudiencesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/DeploymentAudiencesRequestBuilder.cs @@ -95,7 +95,7 @@ public DeploymentAudiencesRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentAudience body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentAudience body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/ApplicableContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/ApplicableContentRequestBuilder.cs index 7707e6a35ae..7b84f890ff8 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/ApplicableContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/ApplicableContentRequestBuilder.cs @@ -93,7 +93,7 @@ public ApplicableContentRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/Item/ApplicableContentCatalogEntryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/Item/ApplicableContentCatalogEntryItemRequestBuilder.cs index 7ee5d79e30c..54fc8f31f39 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/Item/ApplicableContentCatalogEntryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/Item/ApplicableContentCatalogEntryItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/Item/MatchedDevices/Item/ApplicableContentDeviceMatchDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/Item/MatchedDevices/Item/ApplicableContentDeviceMatchDeviceItemRequestBuilder.cs index fb5af765973..5c4dc8c9e3e 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/Item/MatchedDevices/Item/ApplicableContentDeviceMatchDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/Item/MatchedDevices/Item/ApplicableContentDeviceMatchDeviceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatch body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatch body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/Item/MatchedDevices/MatchedDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/Item/MatchedDevices/MatchedDevicesRequestBuilder.cs index aee20375a8a..97fbf6bf3f1 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/Item/MatchedDevices/MatchedDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/ApplicableContent/Item/MatchedDevices/MatchedDevicesRequestBuilder.cs @@ -93,7 +93,7 @@ public MatchedDevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatch body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatch body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/DeploymentAudienceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/DeploymentAudienceItemRequestBuilder.cs index 07af1e581d5..d176ae800db 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/DeploymentAudienceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/DeploymentAudienceItemRequestBuilder.cs @@ -128,7 +128,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentAudience body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -189,7 +189,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentAudience body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/ExclusionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/ExclusionsRequestBuilder.cs index c1657529311..8a00f915e73 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/ExclusionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/ExclusionsRequestBuilder.cs @@ -118,7 +118,7 @@ public ExclusionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs index 64e4acbe331..83b741c78e5 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs @@ -53,7 +53,7 @@ public AddMembersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs index 0564ae108bb..0561c673bff 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs index 51960d387e7..8605e0391ec 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs @@ -68,7 +68,7 @@ public AddMembersByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs index 504cf3aac86..09edb764140 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs index 7153b1c4346..7e12c89ba91 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs index c4f0a3136f9..0de592a68fb 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs @@ -53,7 +53,7 @@ public RemoveMembersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs index 5a4fb61fa28..f919004269a 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs index 2996803d77d..c692fa079a8 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs @@ -68,7 +68,7 @@ public RemoveMembersByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/UpdatableAssetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/UpdatableAssetItemRequestBuilder.cs index 45ff45226c0..08db17fef9d 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/UpdatableAssetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/Item/UpdatableAssetItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs index 9806ef66e8a..9bc232f4ddf 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs @@ -59,7 +59,7 @@ public EnrollAssetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteEnumValue("updateCategory", UpdateCategory); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs index 91b35387e6d..855f4c12a26 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs index 3afe65f37bc..d4698c7dd75 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs @@ -75,7 +75,7 @@ public EnrollAssetsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteEnumValue("updateCategory", UpdateCategory); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs index 3d0df0cb683..e0da08e521f 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs index ce6eb961b23..bcbf8f10061 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs index 7de4566dc6e..01ed62d2b72 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs @@ -59,7 +59,7 @@ public UnenrollAssetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteEnumValue("updateCategory", UpdateCategory); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs index 1f17e9ccfc0..6300e0bbd45 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs index 60bbba601bb..c4ae15feddd 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs @@ -75,7 +75,7 @@ public UnenrollAssetsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteEnumValue("updateCategory", UpdateCategory); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs index eaaf2ae710e..e379775ddf0 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs @@ -53,7 +53,7 @@ public AddMembersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs index f7b6cc8850f..4e5c0394528 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs index 95c8b6c706f..323233421b3 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs @@ -68,7 +68,7 @@ public AddMembersByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs index dcc29535501..24d6ab12b9e 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs index 4465b8e33af..7fc6dcc3c72 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs index d0fceed3a08..6f2acee8508 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs @@ -53,7 +53,7 @@ public RemoveMembersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs index 0bd664ae937..0a1d8dcd805 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs index 0d05f7c80aa..ca580adeea6 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs @@ -68,7 +68,7 @@ public RemoveMembersByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/UpdatableAssetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/UpdatableAssetItemRequestBuilder.cs index 5cb51b41318..7451701f7e8 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/UpdatableAssetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/Item/UpdatableAssetItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MembersRequestBuilder.cs index a7975c1830d..fdae990b25b 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MembersRequestBuilder.cs @@ -118,7 +118,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs index a2da3365d3e..3f283983b9b 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs @@ -59,7 +59,7 @@ public EnrollAssetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteEnumValue("updateCategory", UpdateCategory); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs index f4e31c82099..fed21b25337 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs index 4bb03d8a56f..480f7d035c6 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs @@ -75,7 +75,7 @@ public EnrollAssetsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteEnumValue("updateCategory", UpdateCategory); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs index 313b5aa3591..3ae475e8cf5 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs index de35b5c81d6..0603ac7c283 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs index 58e06eca731..26e6c64c6d4 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs @@ -59,7 +59,7 @@ public UnenrollAssetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteEnumValue("updateCategory", UpdateCategory); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs index 95c1d28cd0b..fda1be95231 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs index 02a619ef7b4..0612ad1cb3a 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs @@ -75,7 +75,7 @@ public UnenrollAssetsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.Members.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteEnumValue("updateCategory", UpdateCategory); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudience/MicrosoftGraphWindowsUpdatesUpdateAudienceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudience/MicrosoftGraphWindowsUpdatesUpdateAudienceRequestBuilder.cs index eac57f00b3b..5d8a7d297d4 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudience/MicrosoftGraphWindowsUpdatesUpdateAudienceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudience/MicrosoftGraphWindowsUpdatesUpdateAudienceRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.MicrosoftGraphWindowsUpdatesUpdateAudience.UpdateAudiencePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.MicrosoftGraphWindowsUpdatesUpdateAudience.UpdateAudiencePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudience/UpdateAudiencePostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudience/UpdateAudiencePostRequestBody.cs index 8963bb61312..b1aa66f2b8d 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudience/UpdateAudiencePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudience/UpdateAudiencePostRequestBody.cs @@ -101,7 +101,7 @@ public UpdateAudiencePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.MicrosoftGraphWindowsUpdatesUpdateAudience.UpdateAudiencePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.MicrosoftGraphWindowsUpdatesUpdateAudience.UpdateAudiencePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("addExclusions", AddExclusions); writer.WriteCollectionOfObjectValues("addMembers", AddMembers); writer.WriteCollectionOfObjectValues("removeExclusions", RemoveExclusions); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudienceById/MicrosoftGraphWindowsUpdatesUpdateAudienceByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudienceById/MicrosoftGraphWindowsUpdatesUpdateAudienceByIdRequestBuilder.cs index e73fab8b03f..a20ccac8a37 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudienceById/MicrosoftGraphWindowsUpdatesUpdateAudienceByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudienceById/MicrosoftGraphWindowsUpdatesUpdateAudienceByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.MicrosoftGraphWindowsUpdatesUpdateAudienceById.UpdateAudienceByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.MicrosoftGraphWindowsUpdatesUpdateAudienceById.UpdateAudienceByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudienceById/UpdateAudienceByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudienceById/UpdateAudienceByIdPostRequestBody.cs index 563c3ef0758..25f877538d5 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudienceById/UpdateAudienceByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/DeploymentAudiences/Item/MicrosoftGraphWindowsUpdatesUpdateAudienceById/UpdateAudienceByIdPostRequestBody.cs @@ -116,7 +116,7 @@ public UpdateAudienceByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.MicrosoftGraphWindowsUpdatesUpdateAudienceById.UpdateAudienceByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.DeploymentAudiences.Item.MicrosoftGraphWindowsUpdatesUpdateAudienceById.UpdateAudienceByIdPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("addExclusions", AddExclusions); writer.WriteCollectionOfPrimitiveValues("addMembers", AddMembers); writer.WriteStringValue("memberEntityType", MemberEntityType); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/DeploymentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/DeploymentsRequestBuilder.cs index a9e79822b8c..9de11acd295 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/DeploymentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/DeploymentsRequestBuilder.cs @@ -95,7 +95,7 @@ public DeploymentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.Deployment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.Deployment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/ApplicableContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/ApplicableContentRequestBuilder.cs index c291314286c..07490863c53 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/ApplicableContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/ApplicableContentRequestBuilder.cs @@ -93,7 +93,7 @@ public ApplicableContentRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/Item/ApplicableContentCatalogEntryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/Item/ApplicableContentCatalogEntryItemRequestBuilder.cs index d3b9de61abb..9cb5ae26f98 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/Item/ApplicableContentCatalogEntryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/Item/ApplicableContentCatalogEntryItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/Item/MatchedDevices/Item/ApplicableContentDeviceMatchDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/Item/MatchedDevices/Item/ApplicableContentDeviceMatchDeviceItemRequestBuilder.cs index 8d1e49f9421..60e384878a3 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/Item/MatchedDevices/Item/ApplicableContentDeviceMatchDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/Item/MatchedDevices/Item/ApplicableContentDeviceMatchDeviceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatch body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatch body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/Item/MatchedDevices/MatchedDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/Item/MatchedDevices/MatchedDevicesRequestBuilder.cs index 0d5b00d1845..46d97e9839a 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/Item/MatchedDevices/MatchedDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/ApplicableContent/Item/MatchedDevices/MatchedDevicesRequestBuilder.cs @@ -93,7 +93,7 @@ public MatchedDevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatch body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatch body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/AudienceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/AudienceRequestBuilder.cs index 68bb0076f9a..0c7138e41d6 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/AudienceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/AudienceRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentAudience body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentAudience body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/ExclusionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/ExclusionsRequestBuilder.cs index 1591df12492..5d722e559b2 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/ExclusionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/ExclusionsRequestBuilder.cs @@ -117,7 +117,7 @@ public ExclusionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs index d8b31a48711..c8d1c9fdcaf 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs @@ -53,7 +53,7 @@ public AddMembersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs index c70cdaf5796..b1e7a388b0c 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs index 34aec42898c..2d944a6b909 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs @@ -68,7 +68,7 @@ public AddMembersByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs index 81f7b6d258e..7160112840f 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs index 4fbadf3a29e..5304a556806 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs index 197f8760055..b8ef4dce666 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs @@ -53,7 +53,7 @@ public RemoveMembersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs index 5cfc8153dbb..c150b512c5d 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs index e4bd3d9f96f..2c4c0f1f5b4 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs @@ -68,7 +68,7 @@ public RemoveMembersByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/UpdatableAssetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/UpdatableAssetItemRequestBuilder.cs index d0319e81d8d..284d9667c04 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/UpdatableAssetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/Item/UpdatableAssetItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs index aa1dc94e30b..9f4dc7973af 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs @@ -59,7 +59,7 @@ public EnrollAssetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteEnumValue("updateCategory", UpdateCategory); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs index c15dacdd32d..39a854935bb 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs index b6e57245395..d8bd9a7a830 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs @@ -75,7 +75,7 @@ public EnrollAssetsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteEnumValue("updateCategory", UpdateCategory); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs index ee28b1fce38..6ba862f9c75 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs index 76ca7707646..fa359163f9a 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs index 5ea6eac4dc2..a8e14361edf 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs @@ -59,7 +59,7 @@ public UnenrollAssetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteEnumValue("updateCategory", UpdateCategory); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs index fea1dc981ab..1ec9ec613bf 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs index 35d7eee401c..234f255ef10 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs @@ -75,7 +75,7 @@ public UnenrollAssetsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteEnumValue("updateCategory", UpdateCategory); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs index e097ae9eb07..2dd102fb872 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs @@ -53,7 +53,7 @@ public AddMembersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs index 7fec7bc32df..4416d12b228 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs index 87016f9161e..71af417129a 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs @@ -68,7 +68,7 @@ public AddMembersByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs index c8fe0e45eab..2946a0d8373 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs index 50dc02371a0..e9b454b0717 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs index 96be51f3f16..931d40fa8f1 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs @@ -53,7 +53,7 @@ public RemoveMembersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs index d2a6f064b1d..f7984caf713 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs index ca141cfc97b..a5596cca337 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs @@ -68,7 +68,7 @@ public RemoveMembersByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/UpdatableAssetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/UpdatableAssetItemRequestBuilder.cs index 25999a3d49e..960beb9fecc 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/UpdatableAssetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/Item/UpdatableAssetItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MembersRequestBuilder.cs index 11183044f09..91af4ee661f 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MembersRequestBuilder.cs @@ -117,7 +117,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs index 1ec5a368c24..62ff3ff33d6 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs @@ -59,7 +59,7 @@ public EnrollAssetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteEnumValue("updateCategory", UpdateCategory); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs index 6711f8d2005..c498e6dcff2 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs index 16e25bf2a77..94c63f0ce11 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs @@ -75,7 +75,7 @@ public EnrollAssetsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteEnumValue("updateCategory", UpdateCategory); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs index aaa6d0cd618..b951ab489c6 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs index 447ae1f1daf..896beeea4a5 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs index be3fd233bd5..fc3b669e0f7 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs @@ -59,7 +59,7 @@ public UnenrollAssetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteEnumValue("updateCategory", UpdateCategory); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs index 6fa6ce6945e..705f50b624b 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs index b166757790e..f52611a034c 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs @@ -75,7 +75,7 @@ public UnenrollAssetsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteEnumValue("updateCategory", UpdateCategory); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/MicrosoftGraphWindowsUpdatesUpdateAudienceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/MicrosoftGraphWindowsUpdatesUpdateAudienceRequestBuilder.cs index 574c10bfb74..fd321dd20c4 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/MicrosoftGraphWindowsUpdatesUpdateAudienceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/MicrosoftGraphWindowsUpdatesUpdateAudienceRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudience.UpdateAudiencePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudience.UpdateAudiencePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/UpdateAudiencePostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/UpdateAudiencePostRequestBody.cs index c84133ee2bd..c4d4bb67410 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/UpdateAudiencePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/UpdateAudiencePostRequestBody.cs @@ -101,7 +101,7 @@ public UpdateAudiencePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudience.UpdateAudiencePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudience.UpdateAudiencePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("addExclusions", AddExclusions); writer.WriteCollectionOfObjectValues("addMembers", AddMembers); writer.WriteCollectionOfObjectValues("removeExclusions", RemoveExclusions); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/MicrosoftGraphWindowsUpdatesUpdateAudienceByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/MicrosoftGraphWindowsUpdatesUpdateAudienceByIdRequestBuilder.cs index 759bfd0d3f0..bf59c2ec70d 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/MicrosoftGraphWindowsUpdatesUpdateAudienceByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/MicrosoftGraphWindowsUpdatesUpdateAudienceByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.D public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudienceById.UpdateAudienceByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudienceById.UpdateAudienceByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/UpdateAudienceByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/UpdateAudienceByIdPostRequestBody.cs index 5cd2eb04851..f8b2a64307f 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/UpdateAudienceByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/UpdateAudienceByIdPostRequestBody.cs @@ -116,7 +116,7 @@ public UpdateAudienceByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudienceById.UpdateAudienceByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Deployments.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudienceById.UpdateAudienceByIdPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("addExclusions", AddExclusions); writer.WriteCollectionOfPrimitiveValues("addMembers", AddMembers); writer.WriteStringValue("memberEntityType", MemberEntityType); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/DeploymentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/DeploymentItemRequestBuilder.cs index 32dc6185cee..b0d4720eb34 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/DeploymentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Deployments/Item/DeploymentItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.Deployment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.Deployment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Editions/EditionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Editions/EditionsRequestBuilder.cs index 1e3f3cde971..ee9860ed295 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Editions/EditionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Editions/EditionsRequestBuilder.cs @@ -93,7 +93,7 @@ public EditionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.Edition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.Edition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Editions/Item/EditionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Editions/Item/EditionItemRequestBuilder.cs index 693c6206671..3fa70aae79e 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Editions/Item/EditionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Editions/Item/EditionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.Edition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.Edition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/Item/KnownIssueItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/Item/KnownIssueItemRequestBuilder.cs index 0365e6d79a8..c04b9c523e8 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/Item/KnownIssueItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/Item/KnownIssueItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnownIssue body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnownIssue body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/Item/OriginatingKnowledgeBaseArticle/OriginatingKnowledgeBaseArticleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/Item/OriginatingKnowledgeBaseArticle/OriginatingKnowledgeBaseArticleRequestBuilder.cs index c4bb14bad6d..9a32528ae48 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/Item/OriginatingKnowledgeBaseArticle/OriginatingKnowledgeBaseArticleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/Item/OriginatingKnowledgeBaseArticle/OriginatingKnowledgeBaseArticleRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnowledgeBaseArticle body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnowledgeBaseArticle body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/Item/ResolvingKnowledgeBaseArticle/ResolvingKnowledgeBaseArticleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/Item/ResolvingKnowledgeBaseArticle/ResolvingKnowledgeBaseArticleRequestBuilder.cs index 662dc543df6..eedf0bc9bc4 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/Item/ResolvingKnowledgeBaseArticle/ResolvingKnowledgeBaseArticleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/Item/ResolvingKnowledgeBaseArticle/ResolvingKnowledgeBaseArticleRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnowledgeBaseArticle body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnowledgeBaseArticle body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/KnownIssuesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/KnownIssuesRequestBuilder.cs index e5e453a1f50..cc26a074204 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/KnownIssuesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/KnownIssues/KnownIssuesRequestBuilder.cs @@ -93,7 +93,7 @@ public KnownIssuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnownIssue body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnownIssue body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive/GetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActiveGetResponse.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive/GetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActiveGetResponse.cs index f61752364bf..58612974612 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive/GetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActiveGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive/GetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActiveGetResponse.cs @@ -37,7 +37,7 @@ public partial class GetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.Item.MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive.GetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActiveGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.Item.MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive.GetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActiveGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive/GetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActiveResponse.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive/GetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActiveResponse.cs index 460483dca9a..a8c3de85960 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive/GetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActiveResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive/GetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActiveResponse.cs @@ -20,7 +20,7 @@ public partial class GetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.Item.MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive.GetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActiveResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.Item.MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive.GetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActiveResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/ProductItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/ProductItemRequestBuilder.cs index 68577edc138..c91128ecf5b 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/ProductItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/ProductItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(ActionUsage: daysInPast={daysInPast} public global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.Item.MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive.MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActiveRequestBuilder MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive(int? daysInPast) { - _ = daysInPast ?? throw new ArgumentNullException(nameof(daysInPast)); + if(ReferenceEquals(daysInPast, null)) throw new ArgumentNullException(nameof(daysInPast)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.Item.MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActive.MicrosoftGraphWindowsUpdatesGetKnownIssuesByTimeRangeWithDaysInPastWithIncludeAllActiveRequestBuilder(PathParameters, RequestAdapter, daysInPast); } /// @@ -125,7 +125,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.Product body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -186,7 +186,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.Product body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/Item/CatalogEntry/CatalogEntryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/Item/CatalogEntry/CatalogEntryRequestBuilder.cs index de3a73725e3..79068697e6c 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/Item/CatalogEntry/CatalogEntryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/Item/CatalogEntry/CatalogEntryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.CatalogEntry body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.CatalogEntry body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/Item/KnowledgeBaseArticle/KnowledgeBaseArticleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/Item/KnowledgeBaseArticle/KnowledgeBaseArticleRequestBuilder.cs index 54224edc3ef..76ed871c2ae 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/Item/KnowledgeBaseArticle/KnowledgeBaseArticleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/Item/KnowledgeBaseArticle/KnowledgeBaseArticleRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnowledgeBaseArticle body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnowledgeBaseArticle body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/Item/ProductRevisionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/Item/ProductRevisionItemRequestBuilder.cs index 7949859e266..62c4ced7b0e 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/Item/ProductRevisionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/Item/ProductRevisionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ProductRevision body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ProductRevision body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/RevisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/RevisionsRequestBuilder.cs index 2bcc233be3a..b4d8a9a8a3b 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/RevisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/Item/Revisions/RevisionsRequestBuilder.cs @@ -93,7 +93,7 @@ public RevisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ProductRevision body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ProductRevision body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByCatalogIdWithCatalogID/FindByCatalogIdWithCatalogIDGetResponse.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByCatalogIdWithCatalogID/FindByCatalogIdWithCatalogIDGetResponse.cs index 346ba19dc1b..8c1501d1e73 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByCatalogIdWithCatalogID/FindByCatalogIdWithCatalogIDGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByCatalogIdWithCatalogID/FindByCatalogIdWithCatalogIDGetResponse.cs @@ -37,7 +37,7 @@ public partial class FindByCatalogIdWithCatalogIDGetResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.MicrosoftGraphWindowsUpdatesFindByCatalogIdWithCatalogID.FindByCatalogIdWithCatalogIDGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.MicrosoftGraphWindowsUpdatesFindByCatalogIdWithCatalogID.FindByCatalogIdWithCatalogIDGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByCatalogIdWithCatalogID/FindByCatalogIdWithCatalogIDResponse.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByCatalogIdWithCatalogID/FindByCatalogIdWithCatalogIDResponse.cs index b222b5ba392..1d9eb3a3e89 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByCatalogIdWithCatalogID/FindByCatalogIdWithCatalogIDResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByCatalogIdWithCatalogID/FindByCatalogIdWithCatalogIDResponse.cs @@ -20,7 +20,7 @@ public partial class FindByCatalogIdWithCatalogIDResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.MicrosoftGraphWindowsUpdatesFindByCatalogIdWithCatalogID.FindByCatalogIdWithCatalogIDResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.MicrosoftGraphWindowsUpdatesFindByCatalogIdWithCatalogID.FindByCatalogIdWithCatalogIDResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber/FindByKbNumberWithKbNumberGetResponse.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber/FindByKbNumberWithKbNumberGetResponse.cs index c3907a446c9..c926b368ae9 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber/FindByKbNumberWithKbNumberGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber/FindByKbNumberWithKbNumberGetResponse.cs @@ -37,7 +37,7 @@ public partial class FindByKbNumberWithKbNumberGetResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber.FindByKbNumberWithKbNumberGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber.FindByKbNumberWithKbNumberGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber/FindByKbNumberWithKbNumberResponse.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber/FindByKbNumberWithKbNumberResponse.cs index ed7062d1de4..6a17cffd188 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber/FindByKbNumberWithKbNumberResponse.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber/FindByKbNumberWithKbNumberResponse.cs @@ -20,7 +20,7 @@ public partial class FindByKbNumberWithKbNumberResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber.FindByKbNumberWithKbNumberResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber.FindByKbNumberWithKbNumberResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/ProductsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/ProductsRequestBuilder.cs index efe05b24b12..b6cdc0c2d59 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/ProductsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/Products/ProductsRequestBuilder.cs @@ -95,7 +95,7 @@ public ProductsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b /// Usage: kbNumber={kbNumber} public global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber.MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumberRequestBuilder MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber(int? kbNumber) { - _ = kbNumber ?? throw new ArgumentNullException(nameof(kbNumber)); + if(ReferenceEquals(kbNumber, null)) throw new ArgumentNullException(nameof(kbNumber)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.Products.MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumber.MicrosoftGraphWindowsUpdatesFindByKbNumberWithKbNumberRequestBuilder(PathParameters, RequestAdapter, kbNumber); } /// @@ -115,7 +115,7 @@ public ProductsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.Product body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.Product body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/ResourceConnections/Item/ResourceConnectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/ResourceConnections/Item/ResourceConnectionItemRequestBuilder.cs index 5a914d8079a..ad06712c27d 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/ResourceConnections/Item/ResourceConnectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/ResourceConnections/Item/ResourceConnectionItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ResourceConnection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ResourceConnection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/ResourceConnections/ResourceConnectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/ResourceConnections/ResourceConnectionsRequestBuilder.cs index 12fa94a01ec..9f01044cc8b 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/ResourceConnections/ResourceConnectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/ResourceConnections/ResourceConnectionsRequestBuilder.cs @@ -95,7 +95,7 @@ public ResourceConnectionsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ResourceConnection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ResourceConnection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs index 54738db40f2..767de8daa30 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs @@ -53,7 +53,7 @@ public AddMembersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs index 452b7127db7..6738a5c9111 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs index eaab8b3f3bc..fece9d88980 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs @@ -68,7 +68,7 @@ public AddMembersByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs index 75a3ae42d74..e46b5ba78f4 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs index b4d3c64f860..7035b997042 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs index 636f57ebbdd..34b26a37a12 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs @@ -53,7 +53,7 @@ public RemoveMembersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs index af1d97b462c..a14660f6ab1 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs index f517ac0b67b..1699fdc340a 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs @@ -68,7 +68,7 @@ public RemoveMembersByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/UpdatableAssetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/UpdatableAssetItemRequestBuilder.cs index 57da5b8f70b..73298f22467 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/UpdatableAssetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/Item/UpdatableAssetItemRequestBuilder.cs @@ -59,8 +59,8 @@ public UpdatableAssetItemRequestBuilder(string rawUrl, IRequestAdapter requestAd { } /// - /// Delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted. - /// Find more info here + /// Delete an updatableAsset object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -82,8 +82,8 @@ public async Task DeleteAsync(Action - /// Read the properties and relationships of an updatableAssetGroup object. - /// Find more info here + /// Read the properties and relationships of an updatableAsset object. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -122,7 +122,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -131,7 +131,7 @@ public async Task DeleteAsync(Action(requestInfo, global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Delete an updatableAssetGroup object. When an updatableAssetGroup object, its member updatableAsset objects are not deleted. + /// Delete an updatableAsset object. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -150,7 +150,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read the properties and relationships of an updatableAssetGroup object. + /// Read the properties and relationships of an updatableAsset object. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -183,7 +183,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -208,7 +208,7 @@ public partial class UpdatableAssetItemRequestBuilderDeleteRequestConfiguration { } /// - /// Read the properties and relationships of an updatableAssetGroup object. + /// Read the properties and relationships of an updatableAsset object. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class UpdatableAssetItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs index 802084c4b4a..5cd754c3ef1 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs @@ -59,7 +59,7 @@ public EnrollAssetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteEnumValue("updateCategory", UpdateCategory); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs index 73ae6991e3e..0a389fa6422 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs index d012dfab9c4..44c42d27c50 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs @@ -75,7 +75,7 @@ public EnrollAssetsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteEnumValue("updateCategory", UpdateCategory); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs index bc31332675b..d767140d74a 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs index eebff6be496..72a880c3217 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs index 31efdfe1509..ba00373643a 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs @@ -59,7 +59,7 @@ public UnenrollAssetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteEnumValue("updateCategory", UpdateCategory); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs index ffa5f972588..942b4ed2514 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs index 0aa5431f2df..11cbe23f318 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs @@ -75,7 +75,7 @@ public UnenrollAssetsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatableAssets.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteEnumValue("updateCategory", UpdateCategory); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/UpdatableAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/UpdatableAssetsRequestBuilder.cs index 4afbbd034c2..f64032ab684 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/UpdatableAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatableAssets/UpdatableAssetsRequestBuilder.cs @@ -119,7 +119,7 @@ public UpdatableAssetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -161,7 +161,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/ApplicableContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/ApplicableContentRequestBuilder.cs index 50edfe0b281..d7b8bec8733 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/ApplicableContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/ApplicableContentRequestBuilder.cs @@ -93,7 +93,7 @@ public ApplicableContentRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/Item/ApplicableContentCatalogEntryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/Item/ApplicableContentCatalogEntryItemRequestBuilder.cs index 893153b3922..f347edef7c2 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/Item/ApplicableContentCatalogEntryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/Item/ApplicableContentCatalogEntryItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/Item/MatchedDevices/Item/ApplicableContentDeviceMatchDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/Item/MatchedDevices/Item/ApplicableContentDeviceMatchDeviceItemRequestBuilder.cs index ea851cdd7a0..f4e9317d4a1 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/Item/MatchedDevices/Item/ApplicableContentDeviceMatchDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/Item/MatchedDevices/Item/ApplicableContentDeviceMatchDeviceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatch body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatch body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/Item/MatchedDevices/MatchedDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/Item/MatchedDevices/MatchedDevicesRequestBuilder.cs index d3b792fab2d..3495233587c 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/Item/MatchedDevices/MatchedDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/ApplicableContent/Item/MatchedDevices/MatchedDevicesRequestBuilder.cs @@ -93,7 +93,7 @@ public MatchedDevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatch body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatch body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/AudienceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/AudienceRequestBuilder.cs index e702855ab57..27da33128c3 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/AudienceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/AudienceRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentAudience body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentAudience body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/ExclusionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/ExclusionsRequestBuilder.cs index 1b8a0585b45..c9fc213f473 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/ExclusionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/ExclusionsRequestBuilder.cs @@ -117,7 +117,7 @@ public ExclusionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs index 8d21b1a075a..8dbcb310d3c 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs @@ -53,7 +53,7 @@ public AddMembersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs index 95202ed4175..2478ec92d47 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs index 5fd218b5dbc..03a5cd80a6a 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs @@ -68,7 +68,7 @@ public AddMembersByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs index 35037e730a6..9f39a025df6 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs index 23eb37a85db..1031501b47b 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs index 7196d1491f3..b8f593e392c 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs @@ -53,7 +53,7 @@ public RemoveMembersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs index e606dbe7ee5..304b7d66afb 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs index 17a7d055a29..41430d1504a 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs @@ -68,7 +68,7 @@ public RemoveMembersByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/UpdatableAssetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/UpdatableAssetItemRequestBuilder.cs index b5696976c9a..1e66462b26c 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/UpdatableAssetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/Item/UpdatableAssetItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs index b6dffd0f87b..718991ce21d 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs @@ -59,7 +59,7 @@ public EnrollAssetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteEnumValue("updateCategory", UpdateCategory); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs index 04e33b25d92..1c074466818 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs index 8f4e42768b3..a82578c92a9 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs @@ -75,7 +75,7 @@ public EnrollAssetsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteEnumValue("updateCategory", UpdateCategory); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs index a65efe44192..22efaaf1aa0 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs index 84cae189d05..a103c549f3d 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs index e31838b7bd9..613da4d75a3 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs @@ -59,7 +59,7 @@ public UnenrollAssetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteEnumValue("updateCategory", UpdateCategory); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs index 3e5e5cb8efa..f9925e0b051 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs index e512e6854ff..965096399b4 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Exclusions/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs @@ -75,7 +75,7 @@ public UnenrollAssetsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Exclusions.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteEnumValue("updateCategory", UpdateCategory); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs index 542a847dd4f..7a5e8606d41 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/AddMembersPostRequestBody.cs @@ -53,7 +53,7 @@ public AddMembersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs index bdcb5853d7c..aae79d7641a 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembers/MicrosoftGraphWindowsUpdatesAddMembersRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembers.AddMembersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs index e1b01c3d28e..cae13d8179f 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/AddMembersByIdPostRequestBody.cs @@ -68,7 +68,7 @@ public AddMembersByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs index 622f77b8931..a5ef670f5cc 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesAddMembersById/MicrosoftGraphWindowsUpdatesAddMembersByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesAddMembersById.AddMembersByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs index c4e895aea73..51cd11a59b0 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/MicrosoftGraphWindowsUpdatesRemoveMembersRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs index f7b6301edf1..7be8f1125d0 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembers/RemoveMembersPostRequestBody.cs @@ -53,7 +53,7 @@ public RemoveMembersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembers.RemoveMembersPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs index 235ed62f663..ae66e8367db 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/MicrosoftGraphWindowsUpdatesRemoveMembersByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs index 6a9449798a5..8d3450b7906 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/MicrosoftGraphWindowsUpdatesRemoveMembersById/RemoveMembersByIdPostRequestBody.cs @@ -68,7 +68,7 @@ public RemoveMembersByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.Item.MicrosoftGraphWindowsUpdatesRemoveMembersById.RemoveMembersByIdPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/UpdatableAssetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/UpdatableAssetItemRequestBuilder.cs index f828207c883..1e3478e50c5 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/UpdatableAssetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/Item/UpdatableAssetItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MembersRequestBuilder.cs index f37a6cce228..49a6ee6c180 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MembersRequestBuilder.cs @@ -117,7 +117,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs index 53706ff76a9..f1e6be00711 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/EnrollAssetsPostRequestBody.cs @@ -59,7 +59,7 @@ public EnrollAssetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteEnumValue("updateCategory", UpdateCategory); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs index 0df350a97e0..08035e94cce 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssets/MicrosoftGraphWindowsUpdatesEnrollAssetsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssets.EnrollAssetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs index b68ff8e5087..27aeaa5f584 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/EnrollAssetsByIdPostRequestBody.cs @@ -75,7 +75,7 @@ public EnrollAssetsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteEnumValue("updateCategory", UpdateCategory); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs index 1dcf720087c..8419bf12da4 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesEnrollAssetsById/MicrosoftGraphWindowsUpdatesEnrollAssetsByIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesEnrollAssetsById.EnrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs index 3f6b752e49a..5968f74901f 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/MicrosoftGraphWindowsUpdatesUnenrollAssetsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs index 95750c61d3d..46bb757efef 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssets/UnenrollAssetsPostRequestBody.cs @@ -59,7 +59,7 @@ public UnenrollAssetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssets.UnenrollAssetsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assets", Assets); writer.WriteEnumValue("updateCategory", UpdateCategory); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs index 0bd2ada2e9b..571186503ec 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/MicrosoftGraphWindowsUpdatesUnenrollAssetsByIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs index 69f08ed01a5..e8ce3279063 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/Members/MicrosoftGraphWindowsUpdatesUnenrollAssetsById/UnenrollAssetsByIdPostRequestBody.cs @@ -75,7 +75,7 @@ public UnenrollAssetsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.Members.MicrosoftGraphWindowsUpdatesUnenrollAssetsById.UnenrollAssetsByIdPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteStringValue("memberEntityType", MemberEntityType); writer.WriteEnumValue("updateCategory", UpdateCategory); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/MicrosoftGraphWindowsUpdatesUpdateAudienceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/MicrosoftGraphWindowsUpdatesUpdateAudienceRequestBuilder.cs index 7d29d8a1eef..b4e362f69bf 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/MicrosoftGraphWindowsUpdatesUpdateAudienceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/MicrosoftGraphWindowsUpdatesUpdateAudienceRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudience.UpdateAudiencePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudience.UpdateAudiencePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/UpdateAudiencePostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/UpdateAudiencePostRequestBody.cs index 4f48c41d534..fec40276ff5 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/UpdateAudiencePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudience/UpdateAudiencePostRequestBody.cs @@ -101,7 +101,7 @@ public UpdateAudiencePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudience.UpdateAudiencePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudience.UpdateAudiencePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("addExclusions", AddExclusions); writer.WriteCollectionOfObjectValues("addMembers", AddMembers); writer.WriteCollectionOfObjectValues("removeExclusions", RemoveExclusions); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/MicrosoftGraphWindowsUpdatesUpdateAudienceByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/MicrosoftGraphWindowsUpdatesUpdateAudienceByIdRequestBuilder.cs index 24cad6a0b1e..0ca82bd7080 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/MicrosoftGraphWindowsUpdatesUpdateAudienceByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/MicrosoftGraphWindowsUpdatesUpdateAudienceByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.U public async Task PostAsync(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudienceById.UpdateAudienceByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudienceById.UpdateAudienceByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/UpdateAudienceByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/UpdateAudienceByIdPostRequestBody.cs index 357aeb3a1c1..2e171572146 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/UpdateAudienceByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/Audience/MicrosoftGraphWindowsUpdatesUpdateAudienceById/UpdateAudienceByIdPostRequestBody.cs @@ -116,7 +116,7 @@ public UpdateAudienceByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudienceById.UpdateAudienceByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Admin.Windows.Updates.UpdatePolicies.Item.Audience.MicrosoftGraphWindowsUpdatesUpdateAudienceById.UpdateAudienceByIdPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("addExclusions", AddExclusions); writer.WriteCollectionOfPrimitiveValues("addMembers", AddMembers); writer.WriteStringValue("memberEntityType", MemberEntityType); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/ComplianceChanges/ComplianceChangesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/ComplianceChanges/ComplianceChangesRequestBuilder.cs index cfa11721a03..e1c57ab9bf0 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/ComplianceChanges/ComplianceChangesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/ComplianceChanges/ComplianceChangesRequestBuilder.cs @@ -95,7 +95,7 @@ public ComplianceChangesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ComplianceChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ComplianceChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/ComplianceChanges/Item/ComplianceChangeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/ComplianceChanges/Item/ComplianceChangeItemRequestBuilder.cs index c103bc7f3ea..1ace4f326ea 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/ComplianceChanges/Item/ComplianceChangeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/ComplianceChanges/Item/ComplianceChangeItemRequestBuilder.cs @@ -64,8 +64,8 @@ public async Task DeleteAsync(Action - /// Read the properties and relationships of a complianceChange object. - /// Find more info here + /// Read the properties and relationships of a contentApproval object. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ComplianceChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -133,7 +133,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read the properties and relationships of a complianceChange object. + /// Read the properties and relationships of a contentApproval object. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.ComplianceChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -191,7 +191,7 @@ public partial class ComplianceChangeItemRequestBuilderDeleteRequestConfiguratio { } /// - /// Read the properties and relationships of a complianceChange object. + /// Read the properties and relationships of a contentApproval object. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class ComplianceChangeItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/UpdatePolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/UpdatePolicyItemRequestBuilder.cs index 25e3df47b15..6c834edb825 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/UpdatePolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/Item/UpdatePolicyItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/UpdatePoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/UpdatePoliciesRequestBuilder.cs index dab361243f1..9249e9a0809 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/UpdatePoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatePolicies/UpdatePoliciesRequestBuilder.cs @@ -95,7 +95,7 @@ public UpdatePoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatesRequestBuilder.cs index 37e2a23c979..0250b3fdce1 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/Updates/UpdatesRequestBuilder.cs @@ -138,7 +138,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AdminWindowsUpdates body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -199,7 +199,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AdminWindowsUpdates body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Admin/Windows/WindowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Admin/Windows/WindowsRequestBuilder.cs index dc03fcf99fe..a01ca52f4b7 100644 --- a/src/Microsoft.Graph/Generated/Admin/Windows/WindowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Admin/Windows/WindowsRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AdminWindows body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AdminWindows body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/AdministrativeUnitsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/AdministrativeUnitsRequestBuilder.cs index ea9ee92c126..633ce88f612 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/AdministrativeUnitsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/AdministrativeUnitsRequestBuilder.cs @@ -119,7 +119,7 @@ public AdministrativeUnitsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AdministrativeUnit body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -161,7 +161,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AdministrativeUnit body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Delta/DeltaGetResponse.cs index 1a4b1f9e6da..7f92afadc9e 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.AdministrativeUnits.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Delta/DeltaResponse.cs index b335bf13fdb..c22e6708e32 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Administrative /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.AdministrativeUnits.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsPostRequestBody.cs index 1ce3fd209cb..5506606621e 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetByIdsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.AdministrativeUnits.GetByIds.GetByIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.GetByIds.GetByIdsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteCollectionOfPrimitiveValues("types", Types); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsPostResponse.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsPostResponse.cs index dce38c47223..0f84ff82d2e 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetByIdsPostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.AdministrativeUnits.GetByIds.GetByIdsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.GetByIds.GetByIdsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsRequestBuilder.cs index 523bdb31553..94c234ca537 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsGetByIdsPostResponseAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.AdministrativeUnits.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsResponse.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsResponse.cs index 90121e0c98c..cc3a5372119 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/GetByIds/GetByIdsResponse.cs @@ -20,7 +20,7 @@ public partial class GetByIdsResponse : global::Microsoft.Graph.Beta.Administrat /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.AdministrativeUnits.GetByIds.GetByIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.GetByIds.GetByIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs index e3946460fc2..6fb8ff5dadb 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetUserOwnedObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.AdministrativeUnits.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("type", Type); writer.WriteStringValue("userId", UserId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs index ba11c63e5bb..1454d734116 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs @@ -52,7 +52,7 @@ public GetUserOwnedObjectsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.AdministrativeUnits.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/AdministrativeUnitItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/AdministrativeUnitItemRequestBuilder.cs index 2af555ae147..abeb2154782 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/AdministrativeUnitItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/AdministrativeUnitItemRequestBuilder.cs @@ -153,7 +153,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AdministrativeUnit body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -214,7 +214,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AdministrativeUnit body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs index e6d388dc722..82262a44ab4 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs index 93930aa9ed0..832334d8320 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberGroups.CheckMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberGroups.CheckMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs index a4bf6cf80ff..689048d1e2b 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsCheckMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs index 8dc30419b5b..462fe2c0974 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberGroupsResponse : global::Microsoft.Graph.Beta.Ad /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberGroups.CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberGroups.CheckMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs index 5a579d3e349..3e1bd4e3b07 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs index 23945ee2083..06cb2c90422 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberObjects.CheckMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberObjects.CheckMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs index c003aef758f..53ea345bca0 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsCheckMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs index 9f11305b3f1..1dcc33694a1 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberObjectsResponse : global::Microsoft.Graph.Beta.A /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberObjects.CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.CheckMemberObjects.CheckMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Extensions/ExtensionsRequestBuilder.cs index 3224adf44de..a42315aec9e 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index cabd2ce16f6..5f05b3a2211 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs index 566c3408e6e..8cbff623992 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberGroups.GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberGroups.GetMemberGroupsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs index bbc4e5d2307..8fc08918cbd 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberGroups.GetMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberGroups.GetMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs index 5ab744dc750..40af8007e5c 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsGetMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsResponse.cs index fdf591aba2a..717a3670398 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberGroups/GetMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberGroupsResponse : global::Microsoft.Graph.Beta.Admi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberGroups.GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberGroups.GetMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs index cf4f11170c6..f949826f67b 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberObjects.GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberObjects.GetMemberObjectsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs index a95ab139bea..8b5c172411c 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberObjects.GetMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberObjects.GetMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs index 81941b4ac3d..4e6f2127279 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsResponse.cs index 05cf800a6da..bcddf0396f9 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/GetMemberObjects/GetMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberObjectsResponse : global::Microsoft.Graph.Beta.Adm /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberObjects.GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.Item.GetMemberObjects.GetMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Members/MembersRequestBuilder.cs index e31a17e42d9..18422b61033 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Members/MembersRequestBuilder.cs @@ -136,7 +136,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DirectoryObject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -178,7 +178,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryObject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Members/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Members/Ref/RefRequestBuilder.cs index d19a68ccc51..ab562afaf99 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Members/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/Members/Ref/RefRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/administrativeUnits/{administrativeUnit%2Did}/members/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/ScopedRoleMembers/Item/ScopedRoleMembershipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/ScopedRoleMembers/Item/ScopedRoleMembershipItemRequestBuilder.cs index 88dc0273975..67294cc0e07 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/ScopedRoleMembers/Item/ScopedRoleMembershipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/ScopedRoleMembers/Item/ScopedRoleMembershipItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/ScopedRoleMembers/ScopedRoleMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/ScopedRoleMembers/ScopedRoleMembersRequestBuilder.cs index 926cb8be525..abf8a9b0200 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/ScopedRoleMembers/ScopedRoleMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/Item/ScopedRoleMembers/ScopedRoleMembersRequestBuilder.cs @@ -95,7 +95,7 @@ public ScopedRoleMembersRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/ValidateProperties/ValidatePropertiesPostRequestBody.cs index bf4080a6774..12b6b79de15 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/ValidateProperties/ValidatePropertiesPostRequestBody.cs @@ -90,7 +90,7 @@ public ValidatePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.AdministrativeUnits.ValidateProperties.ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AdministrativeUnits.ValidateProperties.ValidatePropertiesPostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("entityType", EntityType); writer.WriteStringValue("mailNickname", MailNickname); diff --git a/src/Microsoft.Graph/Generated/AdministrativeUnits/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/AdministrativeUnits/ValidateProperties/ValidatePropertiesRequestBuilder.cs index ae7cccea41a..7215ded5ec9 100644 --- a/src/Microsoft.Graph/Generated/AdministrativeUnits/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AdministrativeUnits/ValidateProperties/ValidatePropertiesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.Val public async Task PostAsync(global::Microsoft.Graph.Beta.AdministrativeUnits.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.AdministrativeUnits.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AgreementAcceptances/AgreementAcceptancesRequestBuilder.cs b/src/Microsoft.Graph/Generated/AgreementAcceptances/AgreementAcceptancesRequestBuilder.cs index e9eb32d1a2d..9397fd48963 100644 --- a/src/Microsoft.Graph/Generated/AgreementAcceptances/AgreementAcceptancesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AgreementAcceptances/AgreementAcceptancesRequestBuilder.cs @@ -87,7 +87,7 @@ public AgreementAcceptancesRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -129,7 +129,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AgreementAcceptances/Item/AgreementAcceptanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AgreementAcceptances/Item/AgreementAcceptanceItemRequestBuilder.cs index 4899dffae7b..156a6544e8d 100644 --- a/src/Microsoft.Graph/Generated/AgreementAcceptances/Item/AgreementAcceptanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AgreementAcceptances/Item/AgreementAcceptanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Agreements/AgreementsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Agreements/AgreementsRequestBuilder.cs index 20398ba3d32..e0660387c1b 100644 --- a/src/Microsoft.Graph/Generated/Agreements/AgreementsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Agreements/AgreementsRequestBuilder.cs @@ -87,7 +87,7 @@ public AgreementsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Agreement body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -129,7 +129,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Agreement body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Agreements/Item/Acceptances/AcceptancesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Agreements/Item/Acceptances/AcceptancesRequestBuilder.cs index b985bffea7f..d4b64c8b2f7 100644 --- a/src/Microsoft.Graph/Generated/Agreements/Item/Acceptances/AcceptancesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Agreements/Item/Acceptances/AcceptancesRequestBuilder.cs @@ -93,7 +93,7 @@ public AcceptancesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Agreements/Item/Acceptances/Item/AgreementAcceptanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Agreements/Item/Acceptances/Item/AgreementAcceptanceItemRequestBuilder.cs index ebfb282cb56..2adda70ee53 100644 --- a/src/Microsoft.Graph/Generated/Agreements/Item/Acceptances/Item/AgreementAcceptanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Agreements/Item/Acceptances/Item/AgreementAcceptanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Agreements/Item/AgreementItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Agreements/Item/AgreementItemRequestBuilder.cs index dcfcdbaf557..6d666bda919 100644 --- a/src/Microsoft.Graph/Generated/Agreements/Item/AgreementItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Agreements/Item/AgreementItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Agreement body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Agreement body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/FileRequestBuilder.cs b/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/FileRequestBuilder.cs index 2506a8cf85e..4d978de3b60 100644 --- a/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/FileRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/FileRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AgreementFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/Item/AgreementFileLocalizationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/Item/AgreementFileLocalizationItemRequestBuilder.cs index 8362be24e96..8d21f1c9f6a 100644 --- a/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/Item/AgreementFileLocalizationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/Item/AgreementFileLocalizationItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs index 5b541c8c7b4..8cab7da09ab 100644 --- a/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/Item/Versions/VersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/Item/Versions/VersionsRequestBuilder.cs index 78b2ef00dfb..ce41001f33b 100644 --- a/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/Item/Versions/VersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/Item/Versions/VersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public VersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/LocalizationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/LocalizationsRequestBuilder.cs index 5211a75ec08..6ab0c02f86b 100644 --- a/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/LocalizationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Agreements/Item/FileNamespace/Localizations/LocalizationsRequestBuilder.cs @@ -94,7 +94,7 @@ public LocalizationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Agreements/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Agreements/Item/Files/FilesRequestBuilder.cs index f4d4ec9eab6..96fd12d3f7e 100644 --- a/src/Microsoft.Graph/Generated/Agreements/Item/Files/FilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Agreements/Item/Files/FilesRequestBuilder.cs @@ -93,7 +93,7 @@ public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Agreements/Item/Files/Item/AgreementFileLocalizationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Agreements/Item/Files/Item/AgreementFileLocalizationItemRequestBuilder.cs index 70c2ea76dd0..9139b9e8667 100644 --- a/src/Microsoft.Graph/Generated/Agreements/Item/Files/Item/AgreementFileLocalizationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Agreements/Item/Files/Item/AgreementFileLocalizationItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Agreements/Item/Files/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Agreements/Item/Files/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs index feeb8e6a951..8d711c8bb75 100644 --- a/src/Microsoft.Graph/Generated/Agreements/Item/Files/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Agreements/Item/Files/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Agreements/Item/Files/Item/Versions/VersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Agreements/Item/Files/Item/Versions/VersionsRequestBuilder.cs index 8c1701d8183..f149284bb92 100644 --- a/src/Microsoft.Graph/Generated/Agreements/Item/Files/Item/Versions/VersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Agreements/Item/Files/Item/Versions/VersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public VersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AllowedDataLocations/AllowedDataLocationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AllowedDataLocations/AllowedDataLocationsRequestBuilder.cs index d38c96c47cc..d9e3707de08 100644 --- a/src/Microsoft.Graph/Generated/AllowedDataLocations/AllowedDataLocationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AllowedDataLocations/AllowedDataLocationsRequestBuilder.cs @@ -93,7 +93,7 @@ public AllowedDataLocationsRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AllowedDataLocation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AllowedDataLocation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AllowedDataLocations/Item/AllowedDataLocationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AllowedDataLocations/Item/AllowedDataLocationItemRequestBuilder.cs index 8fd0c763733..305b99c79aa 100644 --- a/src/Microsoft.Graph/Generated/AllowedDataLocations/Item/AllowedDataLocationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AllowedDataLocations/Item/AllowedDataLocationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AllowedDataLocation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AllowedDataLocation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/AppRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/AppRequestBuilder.cs index 5a6997db81a..a86e75e8d2c 100644 --- a/src/Microsoft.Graph/Generated/App/AppRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/AppRequestBuilder.cs @@ -97,7 +97,7 @@ public AppRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.CommsApplication body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -139,7 +139,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CommsApplication body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/CallsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/CallsRequestBuilder.cs index 4d4cd4dc884..347a9f3ea8c 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/CallsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/CallsRequestBuilder.cs @@ -99,7 +99,7 @@ public CallsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Call body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Call body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewPostRequestBody.cs index 44b2d1f4ded..9cb392d4fe8 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewPostRequestBody.cs @@ -52,7 +52,7 @@ public AddLargeGalleryViewPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.AddLargeGalleryView.AddLargeGalleryViewPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.AddLargeGalleryView.AddLargeGalleryViewPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewRequestBuilder.cs index 239e5e76b9d..71f8e3980cb 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewRequestBuilder.cs @@ -52,7 +52,7 @@ public AddLargeGalleryViewRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.AddLargeGalleryView.AddLargeGalleryViewPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.AddLargeGalleryView.AddLargeGalleryViewPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Answer/AnswerPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Answer/AnswerPostRequestBody.cs index f9da8875075..70b1f97328b 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Answer/AnswerPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Answer/AnswerPostRequestBody.cs @@ -107,7 +107,7 @@ public AnswerPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.Answer.AnswerPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.Answer.AnswerPostRequestBody(); } /// @@ -131,7 +131,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfEnumValues("acceptedModalities", AcceptedModalities); writer.WriteStringValue("callbackUri", CallbackUri); writer.WriteObjectValue("callOptions", CallOptions); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Answer/AnswerRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Answer/AnswerRequestBuilder.cs index 61a773fa295..1a3a7413832 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Answer/AnswerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Answer/AnswerRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Answer.A public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Answer.AnswerPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.Answer.AnswerPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/AudioRoutingGroups/AudioRoutingGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/AudioRoutingGroups/AudioRoutingGroupsRequestBuilder.cs index 36fded580b8..b9bc41c28c2 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/AudioRoutingGroups/AudioRoutingGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/AudioRoutingGroups/AudioRoutingGroupsRequestBuilder.cs @@ -93,7 +93,7 @@ public AudioRoutingGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AudioRoutingGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AudioRoutingGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/AudioRoutingGroups/Item/AudioRoutingGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/AudioRoutingGroups/Item/AudioRoutingGroupItemRequestBuilder.cs index 49284697757..a05f3c5621a 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/AudioRoutingGroups/Item/AudioRoutingGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/AudioRoutingGroups/Item/AudioRoutingGroupItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AudioRoutingGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AudioRoutingGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/CallItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/CallItemRequestBuilder.cs index 81445cd2896..6a6d8aa6287 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/CallItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/CallItemRequestBuilder.cs @@ -240,7 +240,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Call body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -301,7 +301,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Call body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/CancelMediaProcessing/CancelMediaProcessingPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/CancelMediaProcessing/CancelMediaProcessingPostRequestBody.cs index cfdb00827fc..7cb67b77012 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/CancelMediaProcessing/CancelMediaProcessingPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/CancelMediaProcessing/CancelMediaProcessingPostRequestBody.cs @@ -52,7 +52,7 @@ public CancelMediaProcessingPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.CancelMediaProcessing.CancelMediaProcessingPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.CancelMediaProcessing.CancelMediaProcessingPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/CancelMediaProcessing/CancelMediaProcessingRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/CancelMediaProcessing/CancelMediaProcessingRequestBuilder.cs index 39c897e2494..ea3a41c4906 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/CancelMediaProcessing/CancelMediaProcessingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/CancelMediaProcessing/CancelMediaProcessingRequestBuilder.cs @@ -52,7 +52,7 @@ public CancelMediaProcessingRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.CancelMediaProcessing.CancelMediaProcessingPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.CancelMediaProcessing.CancelMediaProcessingPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRolePostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRolePostRequestBody.cs index a306081c79b..1bedead7c7b 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRolePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRolePostRequestBody.cs @@ -43,7 +43,7 @@ public ChangeScreenSharingRolePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.ChangeScreenSharingRole.ChangeScreenSharingRolePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.ChangeScreenSharingRole.ChangeScreenSharingRolePostRequestBody(); } /// @@ -63,7 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("role", Role); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRoleRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRoleRequestBuilder.cs index 2125f714a97..c511632f778 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRoleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRoleRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.ChangeSc public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.ChangeScreenSharingRole.ChangeScreenSharingRolePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.ChangeScreenSharingRole.ChangeScreenSharingRolePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/ContentSharingSessions/ContentSharingSessionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/ContentSharingSessions/ContentSharingSessionsRequestBuilder.cs index de9d3e7daa2..14551d5b333 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/ContentSharingSessions/ContentSharingSessionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/ContentSharingSessions/ContentSharingSessionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContentSharingSessionsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ContentSharingSession body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ContentSharingSession body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/ContentSharingSessions/Item/ContentSharingSessionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/ContentSharingSessions/Item/ContentSharingSessionItemRequestBuilder.cs index a9c42ff8847..f2180808586 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/ContentSharingSessions/Item/ContentSharingSessionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/ContentSharingSessions/Item/ContentSharingSessionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ContentSharingSession body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ContentSharingSession body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/ContentSharingSessions/Item/PngOfCurrentSlide/PngOfCurrentSlideRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/ContentSharingSessions/Item/PngOfCurrentSlide/PngOfCurrentSlideRequestBuilder.cs index 2623868cf61..18939dbdf4c 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/ContentSharingSessions/Item/PngOfCurrentSlide/PngOfCurrentSlideRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/ContentSharingSessions/Item/PngOfCurrentSlide/PngOfCurrentSlideRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Mute/MutePostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Mute/MutePostRequestBody.cs index 60757fe2ba4..adbd3dee554 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Mute/MutePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Mute/MutePostRequestBody.cs @@ -52,7 +52,7 @@ public MutePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.Mute.MutePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.Mute.MutePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Mute/MuteRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Mute/MuteRequestBuilder.cs index 70d96c95f67..d472d321fea 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Mute/MuteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Mute/MuteRequestBuilder.cs @@ -52,7 +52,7 @@ public MuteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Mute.MutePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.Mute.MutePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Operations/Item/CommsOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Operations/Item/CommsOperationItemRequestBuilder.cs index da3b21b60a1..464b13e1ae5 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Operations/Item/CommsOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Operations/Item/CommsOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CommsOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CommsOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Operations/OperationsRequestBuilder.cs index 58c9fff3685..12d339591b4 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CommsOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CommsOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Invite/InvitePostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Invite/InvitePostRequestBody.cs index 728a5d627ad..c932df0c64b 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Invite/InvitePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Invite/InvitePostRequestBody.cs @@ -69,7 +69,7 @@ public InvitePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Invite.InvitePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Invite.InvitePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteCollectionOfObjectValues("participants", Participants); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Invite/InviteRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Invite/InviteRequestBuilder.cs index be33c4a0620..b2b5d2dcf02 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Invite/InviteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Invite/InviteRequestBuilder.cs @@ -35,8 +35,8 @@ public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas { } /// - /// Invite participants to the active call. For more information about how to handle operations, see commsOperation. - /// Find more info here + /// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. + /// Find more info here /// /// A /// The request body @@ -52,7 +52,7 @@ public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Invite.InvitePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -61,7 +61,7 @@ public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.InviteParticipantsOperation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Invite participants to the active call. For more information about how to handle operations, see commsOperation. + /// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. /// /// A /// The request body @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Invite.InvitePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/Mute/MutePostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/Mute/MutePostRequestBody.cs index 75a6df35e62..30eec140424 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/Mute/MutePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/Mute/MutePostRequestBody.cs @@ -52,7 +52,7 @@ public MutePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Item.Mute.MutePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Item.Mute.MutePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/Mute/MuteRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/Mute/MuteRequestBuilder.cs index 76b2751ccc8..e65a5d7fd3b 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/Mute/MuteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/Mute/MuteRequestBuilder.cs @@ -52,7 +52,7 @@ public MuteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Item.Mute.MutePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Item.Mute.MutePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/ParticipantItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/ParticipantItemRequestBuilder.cs index 6f63f00dce2..685316b4d08 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/ParticipantItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/ParticipantItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Participant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Participant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicPostRequestBody.cs index 89b2317a627..b9d577cafea 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicPostRequestBody.cs @@ -69,7 +69,7 @@ public StartHoldMusicPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Item.StartHoldMusic.StartHoldMusicPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Item.StartHoldMusic.StartHoldMusicPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteObjectValue("customPrompt", CustomPrompt); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicRequestBuilder.cs index d1617f69b3a..3c126cf6a8c 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicRequestBuilder.cs @@ -52,7 +52,7 @@ public StartHoldMusicRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Item.StartHoldMusic.StartHoldMusicPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Item.StartHoldMusic.StartHoldMusicPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicPostRequestBody.cs index 08c91ee9ec6..2cd84d65bb3 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicPostRequestBody.cs @@ -52,7 +52,7 @@ public StopHoldMusicPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Item.StopHoldMusic.StopHoldMusicPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Item.StopHoldMusic.StopHoldMusicPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicRequestBuilder.cs index ec29e3baf2c..21c7c6e2fb9 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicRequestBuilder.cs @@ -52,7 +52,7 @@ public StopHoldMusicRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Item.StopHoldMusic.StopHoldMusicPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.Participants.Item.StopHoldMusic.StopHoldMusicPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/MuteAll/MuteAllPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/MuteAll/MuteAllPostRequestBody.cs index c2d452d2a71..9727e660624 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/MuteAll/MuteAllPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/MuteAll/MuteAllPostRequestBody.cs @@ -68,7 +68,7 @@ public MuteAllPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.Participants.MuteAll.MuteAllPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.Participants.MuteAll.MuteAllPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteCollectionOfPrimitiveValues("participants", Participants); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/MuteAll/MuteAllRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/MuteAll/MuteAllRequestBuilder.cs index 141299f54da..97fd26987ce 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/MuteAll/MuteAllRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/MuteAll/MuteAllRequestBuilder.cs @@ -52,7 +52,7 @@ public MuteAllRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Participants.MuteAll.MuteAllPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.Participants.MuteAll.MuteAllPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/ParticipantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/ParticipantsRequestBuilder.cs index ba5606fc027..fff52c53759 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/ParticipantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Participants/ParticipantsRequestBuilder.cs @@ -105,7 +105,7 @@ public ParticipantsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Participant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Participant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/PlayPrompt/PlayPromptPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/PlayPrompt/PlayPromptPostRequestBody.cs index 7a138f7be67..650a5f78453 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/PlayPrompt/PlayPromptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/PlayPrompt/PlayPromptPostRequestBody.cs @@ -75,7 +75,7 @@ public PlayPromptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.PlayPrompt.PlayPromptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.PlayPrompt.PlayPromptPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteBoolValue("loop", Loop); writer.WriteCollectionOfObjectValues("prompts", Prompts); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/PlayPrompt/PlayPromptRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/PlayPrompt/PlayPromptRequestBuilder.cs index 63cda32619c..7b72b3fb87a 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/PlayPrompt/PlayPromptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/PlayPrompt/PlayPromptRequestBuilder.cs @@ -52,7 +52,7 @@ public PlayPromptRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.PlayPrompt.PlayPromptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.PlayPrompt.PlayPromptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Record/RecordPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Record/RecordPostRequestBody.cs index 277ef19cd2e..963c988c7e6 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Record/RecordPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Record/RecordPostRequestBody.cs @@ -121,7 +121,7 @@ public RecordPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.Record.RecordPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.Record.RecordPostRequestBody(); } /// @@ -149,7 +149,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("bargeInAllowed", BargeInAllowed); writer.WriteStringValue("clientContext", ClientContext); writer.WriteIntValue("initialSilenceTimeoutInSeconds", InitialSilenceTimeoutInSeconds); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Record/RecordRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Record/RecordRequestBuilder.cs index 3877caf4c7c..f32f572dd12 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Record/RecordRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Record/RecordRequestBuilder.cs @@ -51,7 +51,7 @@ public RecordRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Record.RecordPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.Record.RecordPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/RecordResponse/RecordResponsePostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/RecordResponse/RecordResponsePostRequestBody.cs index 3bcec83c598..936cd536424 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/RecordResponse/RecordResponsePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/RecordResponse/RecordResponsePostRequestBody.cs @@ -121,7 +121,7 @@ public RecordResponsePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.RecordResponse.RecordResponsePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.RecordResponse.RecordResponsePostRequestBody(); } /// @@ -149,7 +149,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("bargeInAllowed", BargeInAllowed); writer.WriteStringValue("clientContext", ClientContext); writer.WriteIntValue("initialSilenceTimeoutInSeconds", InitialSilenceTimeoutInSeconds); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/RecordResponse/RecordResponseRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/RecordResponse/RecordResponseRequestBuilder.cs index f1e742b09ff..cfabe70ef60 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/RecordResponse/RecordResponseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/RecordResponse/RecordResponseRequestBuilder.cs @@ -52,7 +52,7 @@ public RecordResponseRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.RecordResponse.RecordResponsePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.RecordResponse.RecordResponsePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Redirect/RedirectPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Redirect/RedirectPostRequestBody.cs index 0da1e53400d..5a53e721219 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Redirect/RedirectPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Redirect/RedirectPostRequestBody.cs @@ -93,7 +93,7 @@ public RedirectPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.Redirect.RedirectPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.Redirect.RedirectPostRequestBody(); } /// @@ -118,7 +118,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("callbackUri", CallbackUri); writer.WriteBoolValue("maskCallee", MaskCallee); writer.WriteBoolValue("maskCaller", MaskCaller); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Redirect/RedirectRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Redirect/RedirectRequestBuilder.cs index ca4ee7d80a0..c623d6bbd30 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Redirect/RedirectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Redirect/RedirectRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Redirect public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Redirect.RedirectPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.Redirect.RedirectPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Reject/RejectPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Reject/RejectPostRequestBody.cs index 5a9a63bff77..b8ae17bb578 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Reject/RejectPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Reject/RejectPostRequestBody.cs @@ -59,7 +59,7 @@ public RejectPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.Reject.RejectPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.Reject.RejectPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("callbackUri", CallbackUri); writer.WriteEnumValue("reason", Reason); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Reject/RejectRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Reject/RejectRequestBuilder.cs index fef9ac86458..e162fe237bf 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Reject/RejectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Reject/RejectRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Reject.R public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Reject.RejectPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.Reject.RejectPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/SendDtmfTones/SendDtmfTonesPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/SendDtmfTones/SendDtmfTonesPostRequestBody.cs index 4c167a47d1b..99ab8725081 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/SendDtmfTones/SendDtmfTonesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/SendDtmfTones/SendDtmfTonesPostRequestBody.cs @@ -75,7 +75,7 @@ public SendDtmfTonesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.SendDtmfTones.SendDtmfTonesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.SendDtmfTones.SendDtmfTonesPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteIntValue("delayBetweenTonesMs", DelayBetweenTonesMs); writer.WriteCollectionOfEnumValues("tones", Tones); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/SendDtmfTones/SendDtmfTonesRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/SendDtmfTones/SendDtmfTonesRequestBuilder.cs index 528b772de34..62c833ed952 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/SendDtmfTones/SendDtmfTonesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/SendDtmfTones/SendDtmfTonesRequestBuilder.cs @@ -51,7 +51,7 @@ public SendDtmfTonesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.SendDtmfTones.SendDtmfTonesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.SendDtmfTones.SendDtmfTonesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/StartRecording/StartRecordingPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/StartRecording/StartRecordingPostRequestBody.cs index a77eea0c4cb..e366ecbdf38 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/StartRecording/StartRecordingPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/StartRecording/StartRecordingPostRequestBody.cs @@ -52,7 +52,7 @@ public StartRecordingPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.StartRecording.StartRecordingPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.StartRecording.StartRecordingPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/StartRecording/StartRecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/StartRecording/StartRecordingRequestBuilder.cs index 8d0be609ef1..598f7eb5733 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/StartRecording/StartRecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/StartRecording/StartRecordingRequestBuilder.cs @@ -51,7 +51,7 @@ public StartRecordingRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.StartRecording.StartRecordingPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.StartRecording.StartRecordingPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/StartTranscription/StartTranscriptionPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/StartTranscription/StartTranscriptionPostRequestBody.cs index f22672974c9..1b93ad032a3 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/StartTranscription/StartTranscriptionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/StartTranscription/StartTranscriptionPostRequestBody.cs @@ -68,7 +68,7 @@ public StartTranscriptionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.StartTranscription.StartTranscriptionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.StartTranscription.StartTranscriptionPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteStringValue("language", Language); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/StartTranscription/StartTranscriptionRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/StartTranscription/StartTranscriptionRequestBuilder.cs index b99404c88e1..732f00f0d5d 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/StartTranscription/StartTranscriptionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/StartTranscription/StartTranscriptionRequestBuilder.cs @@ -51,7 +51,7 @@ public StartTranscriptionRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.StartTranscription.StartTranscriptionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.StartTranscription.StartTranscriptionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/StopRecording/StopRecordingPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/StopRecording/StopRecordingPostRequestBody.cs index f3f4396b452..db9b725c10f 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/StopRecording/StopRecordingPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/StopRecording/StopRecordingPostRequestBody.cs @@ -52,7 +52,7 @@ public StopRecordingPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.StopRecording.StopRecordingPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.StopRecording.StopRecordingPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/StopRecording/StopRecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/StopRecording/StopRecordingRequestBuilder.cs index 26c1b3ecea7..d391c9785b2 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/StopRecording/StopRecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/StopRecording/StopRecordingRequestBuilder.cs @@ -51,7 +51,7 @@ public StopRecordingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.StopRecording.StopRecordingPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.StopRecording.StopRecordingPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/StopTranscription/StopTranscriptionPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/StopTranscription/StopTranscriptionPostRequestBody.cs index d3aaeb7c334..eb7ead4a762 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/StopTranscription/StopTranscriptionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/StopTranscription/StopTranscriptionPostRequestBody.cs @@ -68,7 +68,7 @@ public StopTranscriptionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.StopTranscription.StopTranscriptionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.StopTranscription.StopTranscriptionPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteStringValue("language", Language); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/StopTranscription/StopTranscriptionRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/StopTranscription/StopTranscriptionRequestBuilder.cs index 2526d43eeca..2b6a4979941 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/StopTranscription/StopTranscriptionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/StopTranscription/StopTranscriptionRequestBuilder.cs @@ -51,7 +51,7 @@ public StopTranscriptionRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.StopTranscription.StopTranscriptionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.StopTranscription.StopTranscriptionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/SubscribeToTone/SubscribeToTonePostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/SubscribeToTone/SubscribeToTonePostRequestBody.cs index e5a2f99e5d0..5ceabba70d5 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/SubscribeToTone/SubscribeToTonePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/SubscribeToTone/SubscribeToTonePostRequestBody.cs @@ -52,7 +52,7 @@ public SubscribeToTonePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.SubscribeToTone.SubscribeToTonePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.SubscribeToTone.SubscribeToTonePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/SubscribeToTone/SubscribeToToneRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/SubscribeToTone/SubscribeToToneRequestBuilder.cs index 4ce40777568..a32b78f2189 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/SubscribeToTone/SubscribeToToneRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/SubscribeToTone/SubscribeToToneRequestBuilder.cs @@ -52,7 +52,7 @@ public SubscribeToToneRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.SubscribeToTone.SubscribeToTonePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.SubscribeToTone.SubscribeToTonePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Transfer/TransferPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Transfer/TransferPostRequestBody.cs index e459b9cb34e..a05849de2e1 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Transfer/TransferPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Transfer/TransferPostRequestBody.cs @@ -69,7 +69,7 @@ public TransferPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.Transfer.TransferPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.Transfer.TransferPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("transferee", Transferee); writer.WriteObjectValue("transferTarget", TransferTarget); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Transfer/TransferRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Transfer/TransferRequestBuilder.cs index f6625592ce0..4dac7412098 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Transfer/TransferRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Transfer/TransferRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Transfer public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Transfer.TransferPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.Transfer.TransferPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Unmute/UnmutePostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Unmute/UnmutePostRequestBody.cs index 96c61df71cd..2635ee9ca2f 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Unmute/UnmutePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Unmute/UnmutePostRequestBody.cs @@ -52,7 +52,7 @@ public UnmutePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.Unmute.UnmutePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.Unmute.UnmutePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/Unmute/UnmuteRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/Unmute/UnmuteRequestBuilder.cs index cc299bc2a7e..2982537e13e 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/Unmute/UnmuteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/Unmute/UnmuteRequestBuilder.cs @@ -52,7 +52,7 @@ public UnmuteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.Unmute.UnmutePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.Unmute.UnmutePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusPostRequestBody.cs index 3636283c97d..acd18e3f8de 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusPostRequestBody.cs @@ -59,7 +59,7 @@ public UpdateRecordingStatusPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.Item.UpdateRecordingStatus.UpdateRecordingStatusPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.Item.UpdateRecordingStatus.UpdateRecordingStatusPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteEnumValue("status", Status); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/App/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusRequestBuilder.cs index 5a6fae2d129..f9149f277a1 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusRequestBuilder.cs @@ -52,7 +52,7 @@ public UpdateRecordingStatusRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.Item.UpdateRecordingStatus.UpdateRecordingStatusPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.Item.UpdateRecordingStatus.UpdateRecordingStatusPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityPostRequestBody.cs index 052431434d3..0e7cf365b06 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityPostRequestBody.cs @@ -53,7 +53,7 @@ public LogTeleconferenceDeviceQualityPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.Calls.LogTeleconferenceDeviceQuality.LogTeleconferenceDeviceQualityPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.Calls.LogTeleconferenceDeviceQuality.LogTeleconferenceDeviceQualityPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("quality", Quality); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/App/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityRequestBuilder.cs index 131f8886ad2..e93a54aff24 100644 --- a/src/Microsoft.Graph/Generated/App/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.LogTeleconfer public async Task PostAsync(global::Microsoft.Graph.Beta.App.Calls.LogTeleconferenceDeviceQuality.LogTeleconferenceDeviceQualityPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.Calls.LogTeleconferenceDeviceQuality.LogTeleconferenceDeviceQualityPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/CreateOrGet/CreateOrGetPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/CreateOrGet/CreateOrGetPostRequestBody.cs index ff6abf66582..4d069cbe1d4 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/CreateOrGet/CreateOrGetPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/CreateOrGet/CreateOrGetPostRequestBody.cs @@ -113,7 +113,7 @@ public CreateOrGetPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.OnlineMeetings.CreateOrGet.CreateOrGetPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetings.CreateOrGet.CreateOrGetPostRequestBody(); } /// @@ -138,7 +138,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("chatInfo", ChatInfo); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("externalId", ExternalId); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/CreateOrGet/CreateOrGetRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/CreateOrGet/CreateOrGetRequestBuilder.cs index 176c4014154..c38fb12dbc5 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/CreateOrGet/CreateOrGetRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/CreateOrGet/CreateOrGetRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateOrGetRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.App.OnlineMeetings.CreateOrGet.CreateOrGetPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.OnlineMeetings.CreateOrGet.CreateOrGetPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs index b5c77c5c84c..9218acc395e 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserI /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.App.OnlineMeetings.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetings.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs index 05464445f1c..48bcb45bc93 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserI /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.App.OnlineMeetings.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetings.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs index f657f003695..e3b5a369f06 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUser /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.App.OnlineMeetings.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetings.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs index 8dd811e7b88..d8766193ffc 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUser /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.App.OnlineMeetings.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetings.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AiInsights/AiInsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AiInsights/AiInsightsRequestBuilder.cs index 8c103a0eef8..3d2d705f252 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AiInsights/AiInsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AiInsights/AiInsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public AiInsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CallAiInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CallAiInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AiInsights/Item/CallAiInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AiInsights/Item/CallAiInsightItemRequestBuilder.cs index 269eaee7e58..314b5ce453e 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AiInsights/Item/CallAiInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AiInsights/Item/CallAiInsightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallAiInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallAiInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AlternativeRecording/AlternativeRecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AlternativeRecording/AlternativeRecordingRequestBuilder.cs index f3db4978397..7961b745d51 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AlternativeRecording/AlternativeRecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AlternativeRecording/AlternativeRecordingRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/AttendanceReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/AttendanceReportsRequestBuilder.cs index e2ffddb5f45..ae55cf86b83 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/AttendanceReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/AttendanceReportsRequestBuilder.cs @@ -93,7 +93,7 @@ public AttendanceReportsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/AttendanceRecordsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/AttendanceRecordsRequestBuilder.cs index 889cd4ce6b7..c268de3949e 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/AttendanceRecordsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/AttendanceRecordsRequestBuilder.cs @@ -93,7 +93,7 @@ public AttendanceRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs index bb9bff7cf28..a8d9bcd48b4 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/Item/MeetingAttendanceReportItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/Item/MeetingAttendanceReportItemRequestBuilder.cs index a191c568c77..ae938511869 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/Item/MeetingAttendanceReportItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendanceReports/Item/MeetingAttendanceReportItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendeeReport/AttendeeReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendeeReport/AttendeeReportRequestBuilder.cs index 183dc6ba362..2619a62c6db 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendeeReport/AttendeeReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/AttendeeReport/AttendeeReportRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/BroadcastRecording/BroadcastRecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/BroadcastRecording/BroadcastRecordingRequestBuilder.cs index 233e28e4bf6..bf25d7c55e3 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/BroadcastRecording/BroadcastRecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/BroadcastRecording/BroadcastRecordingRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs index ad101b37fff..b90c8dd87b0 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs @@ -52,7 +52,7 @@ public GetVirtualAppointmentJoinWebUrlGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs index 438cecd663e..20c679db01b 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs @@ -20,7 +20,7 @@ public partial class GetVirtualAppointmentJoinWebUrlResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlResponse(); } } diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/AttendanceRecordsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/AttendanceRecordsRequestBuilder.cs index 0cc254f1526..9c736032b12 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/AttendanceRecordsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/AttendanceRecordsRequestBuilder.cs @@ -93,7 +93,7 @@ public AttendanceRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs index 6c69a056631..67504c9a0ab 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/MeetingAttendanceReport/MeetingAttendanceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/MeetingAttendanceReport/MeetingAttendanceReportRequestBuilder.cs index f88430b0d22..d65b424ae4b 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/MeetingAttendanceReport/MeetingAttendanceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/MeetingAttendanceReport/MeetingAttendanceReportRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/OnlineMeetingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/OnlineMeetingItemRequestBuilder.cs index 9248b983cd1..fc38484f20d 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/OnlineMeetingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/OnlineMeetingItemRequestBuilder.cs @@ -174,7 +174,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -235,7 +235,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recording/RecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recording/RecordingRequestBuilder.cs index e08d656a99c..bd44c4e8534 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recording/RecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recording/RecordingRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Delta/DeltaGetResponse.cs index bd0d55104bf..30c94b112dd 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.Recordings.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.Recordings.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Delta/DeltaResponse.cs index e6f115f39d6..b88514f30d5 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.App.OnlineMeet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.Recordings.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.Recordings.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Item/CallRecordingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Item/CallRecordingItemRequestBuilder.cs index a75bf4558e2..2a8472ca285 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Item/CallRecordingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Item/CallRecordingItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallRecording body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecording body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Item/Content/ContentRequestBuilder.cs index e7f94283419..1f3d46b676d 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/RecordingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/RecordingsRequestBuilder.cs index 24be6e051b6..38d5fa6acf7 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/RecordingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Recordings/RecordingsRequestBuilder.cs @@ -99,7 +99,7 @@ public RecordingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CallRecording body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecording body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/CustomQuestions/CustomQuestionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/CustomQuestions/CustomQuestionsRequestBuilder.cs index fb24be3f9d1..14046f715ef 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/CustomQuestions/CustomQuestionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/CustomQuestions/CustomQuestionsRequestBuilder.cs @@ -97,7 +97,7 @@ public CustomQuestionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/CustomQuestions/Item/MeetingRegistrationQuestionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/CustomQuestions/Item/MeetingRegistrationQuestionItemRequestBuilder.cs index 126e317a14b..554000d1c0a 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/CustomQuestions/Item/MeetingRegistrationQuestionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/CustomQuestions/Item/MeetingRegistrationQuestionItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/Registrants/Item/MeetingRegistrantBaseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/Registrants/Item/MeetingRegistrantBaseItemRequestBuilder.cs index 03a979332d4..819badc149d 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/Registrants/Item/MeetingRegistrantBaseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/Registrants/Item/MeetingRegistrantBaseItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistrantBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistrantBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/Registrants/RegistrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/Registrants/RegistrantsRequestBuilder.cs index cb1c8482a30..4004a4be535 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/Registrants/RegistrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/Registrants/RegistrantsRequestBuilder.cs @@ -97,7 +97,7 @@ public RegistrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistrantBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistrantBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs index f7050b06941..c31e44338f0 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs index e79c1f43c52..938cdcb2029 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs @@ -59,7 +59,7 @@ public SendVirtualAppointmentReminderSmsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendees", Attendees); writer.WriteEnumValue("remindBeforeTimeInMinutesType", RemindBeforeTimeInMinutesType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs index 47f5f88ca08..0713c0fe0a9 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.App.OnlineMeetings.Item public async Task PostAsync(global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs index 26c11657d50..52cf7ba535c 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs @@ -59,7 +59,7 @@ public SendVirtualAppointmentSmsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendees", Attendees); writer.WriteEnumValue("messageType", MessageType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs index b377d5688ce..51c97cd1086 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.App.OnlineMeetings.Item public async Task PostAsync(global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Delta/DeltaGetResponse.cs index bcbbc79f63b..2eb4d933df2 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.Transcripts.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.Transcripts.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Delta/DeltaResponse.cs index ea728dfd2c6..2c1fea0926c 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.App.OnlineMeet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.Transcripts.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetings.Item.Transcripts.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Item/CallTranscriptItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Item/CallTranscriptItemRequestBuilder.cs index 79447ece996..bf0d1ae2991 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Item/CallTranscriptItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Item/CallTranscriptItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallTranscript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallTranscript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Item/Content/ContentRequestBuilder.cs index 9f908b98a69..d3f5501e7f0 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Item/MetadataContent/MetadataContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Item/MetadataContent/MetadataContentRequestBuilder.cs index 2e031797a25..48ac4808db9 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Item/MetadataContent/MetadataContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/Item/MetadataContent/MetadataContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/TranscriptsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/TranscriptsRequestBuilder.cs index 38f9c7e0c59..584bb0866e2 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/TranscriptsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/Item/Transcripts/TranscriptsRequestBuilder.cs @@ -99,7 +99,7 @@ public TranscriptsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CallTranscript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CallTranscript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetings/OnlineMeetingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetings/OnlineMeetingsRequestBuilder.cs index acd1ea449bf..caf4b56ecaf 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetings/OnlineMeetingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetings/OnlineMeetingsRequestBuilder.cs @@ -111,7 +111,7 @@ public OnlineMeetingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs index 3632330704f..46cb5f0c6ec 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs @@ -52,7 +52,7 @@ public GetVirtualAppointmentJoinWebUrlGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.OnlineMeetingsWithJoinWebUrl.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetingsWithJoinWebUrl.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs index 6901fa4aece..9d571ab4f9b 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs @@ -20,7 +20,7 @@ public partial class GetVirtualAppointmentJoinWebUrlResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.App.OnlineMeetingsWithJoinWebUrl.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetingsWithJoinWebUrl.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlResponse(); } } diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/OnlineMeetingsWithJoinWebUrlRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/OnlineMeetingsWithJoinWebUrlRequestBuilder.cs index 2a5995698c3..e0e6abc0147 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/OnlineMeetingsWithJoinWebUrlRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/OnlineMeetingsWithJoinWebUrlRequestBuilder.cs @@ -116,7 +116,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs index 39241da1293..e4e6f7e97cc 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs @@ -59,7 +59,7 @@ public SendVirtualAppointmentReminderSmsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendees", Attendees); writer.WriteEnumValue("remindBeforeTimeInMinutesType", RemindBeforeTimeInMinutesType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs index 4f8f39a6a3e..9540ebd23eb 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.App.OnlineMeetingsWithJ public async Task PostAsync(global::Microsoft.Graph.Beta.App.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs index f605b21177b..2718e2f95f2 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs @@ -59,7 +59,7 @@ public SendVirtualAppointmentSmsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.App.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.App.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendees", Attendees); writer.WriteEnumValue("messageType", MessageType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs b/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs index b265d2f2f90..fac325a8c0b 100644 --- a/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/App/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.App.OnlineMeetingsWithJ public async Task PostAsync(global::Microsoft.Graph.Beta.App.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.App.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AppCatalogs/AppCatalogsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AppCatalogs/AppCatalogsRequestBuilder.cs index 7c71dbab4c7..9e480036244 100644 --- a/src/Microsoft.Graph/Generated/AppCatalogs/AppCatalogsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AppCatalogs/AppCatalogsRequestBuilder.cs @@ -80,7 +80,7 @@ public AppCatalogsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.AppCatalogs body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -122,7 +122,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppCatalogs body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/AppDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/AppDefinitionsRequestBuilder.cs index ae5afeb7df3..c6c18607b01 100644 --- a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/AppDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/AppDefinitionsRequestBuilder.cs @@ -94,7 +94,7 @@ public AppDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamsAppDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAppDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/Bot/BotRequestBuilder.cs b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/Bot/BotRequestBuilder.cs index 6e158d8e2e1..cb3f7935bbf 100644 --- a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/Bot/BotRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/Bot/BotRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamworkBot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamworkBot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/ColorIcon/ColorIconRequestBuilder.cs b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/ColorIcon/ColorIconRequestBuilder.cs index 34226eac182..8a4fc267e67 100644 --- a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/ColorIcon/ColorIconRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/ColorIcon/ColorIconRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsAppIcon body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAppIcon body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/ColorIcon/HostedContent/HostedContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/ColorIcon/HostedContent/HostedContentRequestBuilder.cs index 304a7a7f3ef..80c577b34c6 100644 --- a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/ColorIcon/HostedContent/HostedContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/ColorIcon/HostedContent/HostedContentRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamworkHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamworkHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/ColorIcon/HostedContent/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/ColorIcon/HostedContent/Value/ContentRequestBuilder.cs index 362dc94fd4b..f072e2873d4 100644 --- a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/ColorIcon/HostedContent/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/ColorIcon/HostedContent/Value/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/DashboardCards/DashboardCardsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/DashboardCards/DashboardCardsRequestBuilder.cs index 3e1828da424..223d5deebc3 100644 --- a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/DashboardCards/DashboardCardsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/DashboardCards/DashboardCardsRequestBuilder.cs @@ -93,7 +93,7 @@ public DashboardCardsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamsAppDashboardCardDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAppDashboardCardDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/DashboardCards/Item/TeamsAppDashboardCardDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/DashboardCards/Item/TeamsAppDashboardCardDefinitionItemRequestBuilder.cs index c9464d5f59a..cb245f839c4 100644 --- a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/DashboardCards/Item/TeamsAppDashboardCardDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/DashboardCards/Item/TeamsAppDashboardCardDefinitionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsAppDashboardCardDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAppDashboardCardDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/OutlineIcon/HostedContent/HostedContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/OutlineIcon/HostedContent/HostedContentRequestBuilder.cs index f387d2424bb..9811bb467bd 100644 --- a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/OutlineIcon/HostedContent/HostedContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/OutlineIcon/HostedContent/HostedContentRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamworkHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamworkHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/OutlineIcon/HostedContent/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/OutlineIcon/HostedContent/Value/ContentRequestBuilder.cs index 8240a00f126..091a0211b4a 100644 --- a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/OutlineIcon/HostedContent/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/OutlineIcon/HostedContent/Value/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/OutlineIcon/OutlineIconRequestBuilder.cs b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/OutlineIcon/OutlineIconRequestBuilder.cs index b7ba5541da6..c9ffe0f881c 100644 --- a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/OutlineIcon/OutlineIconRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/OutlineIcon/OutlineIconRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsAppIcon body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAppIcon body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/TeamsAppDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/TeamsAppDefinitionItemRequestBuilder.cs index 1a27fd18dd3..1c85224ac42 100644 --- a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/TeamsAppDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/AppDefinitions/Item/TeamsAppDefinitionItemRequestBuilder.cs @@ -121,7 +121,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsAppDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -182,7 +182,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAppDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/TeamsAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/TeamsAppItemRequestBuilder.cs index e8b5a3603e7..67fb14fa1c7 100644 --- a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/TeamsAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/Item/TeamsAppItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/TeamsAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/TeamsAppsRequestBuilder.cs index e04cd2aac0f..ac6bfd2099b 100644 --- a/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/TeamsAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AppCatalogs/TeamsApps/TeamsAppsRequestBuilder.cs @@ -95,7 +95,7 @@ public TeamsAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamsApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ApplicationTemplates/Item/Instantiate/InstantiatePostRequestBody.cs b/src/Microsoft.Graph/Generated/ApplicationTemplates/Item/Instantiate/InstantiatePostRequestBody.cs index 6c8c896e64d..c0c47d810cf 100644 --- a/src/Microsoft.Graph/Generated/ApplicationTemplates/Item/Instantiate/InstantiatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/ApplicationTemplates/Item/Instantiate/InstantiatePostRequestBody.cs @@ -68,7 +68,7 @@ public InstantiatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.ApplicationTemplates.Item.Instantiate.InstantiatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.ApplicationTemplates.Item.Instantiate.InstantiatePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("serviceManagementReference", ServiceManagementReference); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/ApplicationTemplates/Item/Instantiate/InstantiateRequestBuilder.cs b/src/Microsoft.Graph/Generated/ApplicationTemplates/Item/Instantiate/InstantiateRequestBuilder.cs index 3d2f18f995b..ab9488331d8 100644 --- a/src/Microsoft.Graph/Generated/ApplicationTemplates/Item/Instantiate/InstantiateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ApplicationTemplates/Item/Instantiate/InstantiateRequestBuilder.cs @@ -52,7 +52,7 @@ public InstantiateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.ApplicationTemplates.Item.Instantiate.InstantiatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.ApplicationTemplates.Item.Instantiate.InstantiatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/ApplicationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/ApplicationsRequestBuilder.cs index 80e573470af..de4a98b363b 100644 --- a/src/Microsoft.Graph/Generated/Applications/ApplicationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/ApplicationsRequestBuilder.cs @@ -119,7 +119,7 @@ public ApplicationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Application body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -161,7 +161,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Application body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Applications/Delta/DeltaGetResponse.cs index 323bb596655..75f1582427c 100644 --- a/src/Microsoft.Graph/Generated/Applications/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Applications/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Applications/Delta/DeltaResponse.cs index ad63ad0aa9e..3511814bb4e 100644 --- a/src/Microsoft.Graph/Generated/Applications/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Applications.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsPostRequestBody.cs index e5519f57690..c73a47e3d04 100644 --- a/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetByIdsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.GetByIds.GetByIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.GetByIds.GetByIdsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteCollectionOfPrimitiveValues("types", Types); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsPostResponse.cs b/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsPostResponse.cs index df269f0946d..5b5d62399dc 100644 --- a/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetByIdsPostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.GetByIds.GetByIdsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.GetByIds.GetByIdsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsRequestBuilder.cs index cbc4c71f1fe..604c1b0ae8d 100644 --- a/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsGetByIdsPostResponseAsync(global::Microsoft.Graph.Beta.Applications.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsResponse.cs b/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsResponse.cs index 731c08cb78d..04b9fce7772 100644 --- a/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/GetByIds/GetByIdsResponse.cs @@ -20,7 +20,7 @@ public partial class GetByIdsResponse : global::Microsoft.Graph.Beta.Application /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.GetByIds.GetByIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.GetByIds.GetByIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Applications/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs index 8159a72f539..f9f0881a1de 100644 --- a/src/Microsoft.Graph/Generated/Applications/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetUserOwnedObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("type", Type); writer.WriteStringValue("userId", UserId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Applications/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs index c8bee652ae9..d4f9537b1eb 100644 --- a/src/Microsoft.Graph/Generated/Applications/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs @@ -52,7 +52,7 @@ public GetUserOwnedObjectsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/AddKey/AddKeyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/AddKey/AddKeyPostRequestBody.cs index a9f4164196e..2f75bd244fa 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/AddKey/AddKeyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/AddKey/AddKeyPostRequestBody.cs @@ -85,7 +85,7 @@ public AddKeyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.AddKey.AddKeyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.AddKey.AddKeyPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("keyCredential", KeyCredential); writer.WriteObjectValue("passwordCredential", PasswordCredential); writer.WriteStringValue("proof", Proof); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/AddKey/AddKeyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/AddKey/AddKeyRequestBuilder.cs index 9f6100ffbff..1a9737069c2 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/AddKey/AddKeyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/AddKey/AddKeyRequestBuilder.cs @@ -52,7 +52,7 @@ public AddKeyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.AddKey.AddKeyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.AddKey.AddKeyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/AddPassword/AddPasswordPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/AddPassword/AddPasswordPostRequestBody.cs index b54fb7bb464..198f2860570 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/AddPassword/AddPasswordPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/AddPassword/AddPasswordPostRequestBody.cs @@ -53,7 +53,7 @@ public AddPasswordPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.AddPassword.AddPasswordPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.AddPassword.AddPasswordPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("passwordCredential", PasswordCredential); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/AddPassword/AddPasswordRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/AddPassword/AddPasswordRequestBuilder.cs index ca40f713a0e..42c0540dc2d 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/AddPassword/AddPasswordRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/AddPassword/AddPasswordRequestBuilder.cs @@ -52,7 +52,7 @@ public AddPasswordRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.AddPassword.AddPasswordPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.AddPassword.AddPasswordPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/AppManagementPolicies/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/AppManagementPolicies/Ref/RefRequestBuilder.cs index 1a835391655..5ed98419205 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/AppManagementPolicies/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/AppManagementPolicies/Ref/RefRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/applications/{application%2Did}/appManagementPolicies/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/ApplicationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/ApplicationItemRequestBuilder.cs index 04989a377f8..530c874aafd 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/ApplicationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/ApplicationItemRequestBuilder.cs @@ -242,7 +242,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Application body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -303,7 +303,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Application body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs index 03dcdb1a7eb..0c39b7e8561 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs index 3747d5c9378..e1e3764a4a7 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.CheckMemberGroups.CheckMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.CheckMemberGroups.CheckMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs index 861d864de12..44033f5fb4b 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsCheckMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.Applications.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs index 976f4cc13f9..5f6306f08da 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberGroupsResponse : global::Microsoft.Graph.Beta.Ap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.CheckMemberGroups.CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.CheckMemberGroups.CheckMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs index a9217c6f73b..5d93dd5068f 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs index fd7350d1b6f..8f5be4d8f9f 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.CheckMemberObjects.CheckMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.CheckMemberObjects.CheckMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs index e5a55e953f4..cdf286c7124 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsCheckMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.Applications.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs index b6d09149d8e..80a5e713fbc 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberObjectsResponse : global::Microsoft.Graph.Beta.A /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.CheckMemberObjects.CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.CheckMemberObjects.CheckMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/ConnectorGroup/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/ConnectorGroup/Ref/RefRequestBuilder.cs index 8f17aa7c71f..54bb8e10df1 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/ConnectorGroup/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/ConnectorGroup/Ref/RefRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate b public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/ExtensionProperties/ExtensionPropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/ExtensionProperties/ExtensionPropertiesRequestBuilder.cs index fbbac8df0fb..44a43720a07 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/ExtensionProperties/ExtensionPropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/ExtensionProperties/ExtensionPropertiesRequestBuilder.cs @@ -95,7 +95,7 @@ public ExtensionPropertiesRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExtensionProperty body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExtensionProperty body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/ExtensionProperties/Item/ExtensionPropertyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/ExtensionProperties/Item/ExtensionPropertyItemRequestBuilder.cs index 0977b9a8e24..b43c4fd404c 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/ExtensionProperties/Item/ExtensionPropertyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/ExtensionProperties/Item/ExtensionPropertyItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExtensionProperty body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExtensionProperty body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/FederatedIdentityCredentials/FederatedIdentityCredentialsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/FederatedIdentityCredentials/FederatedIdentityCredentialsRequestBuilder.cs index 487c49a20e0..2aa8e7d28b3 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/FederatedIdentityCredentials/FederatedIdentityCredentialsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/FederatedIdentityCredentials/FederatedIdentityCredentialsRequestBuilder.cs @@ -95,7 +95,7 @@ public FederatedIdentityCredentialsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.FederatedIdentityCredential body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.FederatedIdentityCredential body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/FederatedIdentityCredentials/Item/FederatedIdentityCredentialItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/FederatedIdentityCredentials/Item/FederatedIdentityCredentialItemRequestBuilder.cs index 088cd30b6e9..829c85d1243 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/FederatedIdentityCredentials/Item/FederatedIdentityCredentialItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/FederatedIdentityCredentials/Item/FederatedIdentityCredentialItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.FederatedIdentityCredential body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.FederatedIdentityCredential body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/FederatedIdentityCredentialsWithName/FederatedIdentityCredentialsWithNameRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/FederatedIdentityCredentialsWithName/FederatedIdentityCredentialsWithNameRequestBuilder.cs index 9ce03a5ec2d..a9ddbff3063 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/FederatedIdentityCredentialsWithName/FederatedIdentityCredentialsWithNameRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/FederatedIdentityCredentialsWithName/FederatedIdentityCredentialsWithNameRequestBuilder.cs @@ -101,7 +101,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.FederatedIdentityCredential body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.FederatedIdentityCredential body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs index aabca71a35d..3e2f25cdd02 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.GetMemberGroups.GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.GetMemberGroups.GetMemberGroupsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs index 2309eebb2b8..a32b2aa97c1 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.GetMemberGroups.GetMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.GetMemberGroups.GetMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs index dd685cf932b..cd89ab4b560 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsGetMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.Applications.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsResponse.cs index bb5dd7da415..2a6dd73f153 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberGroups/GetMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberGroupsResponse : global::Microsoft.Graph.Beta.Appl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.GetMemberGroups.GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.GetMemberGroups.GetMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs index 97a419ebb48..04a94d908de 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.GetMemberObjects.GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.GetMemberObjects.GetMemberObjectsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs index 548a3f68a40..649da399ba0 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.GetMemberObjects.GetMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.GetMemberObjects.GetMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs index 5fc50fdebb6..e2edb99c0ec 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.Applications.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsResponse.cs index 0eaf7b7699c..9f2963bf7a3 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/GetMemberObjects/GetMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberObjectsResponse : global::Microsoft.Graph.Beta.App /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.GetMemberObjects.GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.GetMemberObjects.GetMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Logo/LogoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Logo/LogoRequestBuilder.cs index da3ddce5f06..bbcfed380cb 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Logo/LogoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Logo/LogoRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Owners/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Owners/Ref/RefRequestBuilder.cs index f9ec11dbcfc..87148c884a2 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Owners/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Owners/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/applications/{application%2Did}/owners/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/RemoveKey/RemoveKeyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/RemoveKey/RemoveKeyPostRequestBody.cs index 424a1b52dca..624b2e40d02 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/RemoveKey/RemoveKeyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/RemoveKey/RemoveKeyPostRequestBody.cs @@ -58,7 +58,7 @@ public RemoveKeyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.RemoveKey.RemoveKeyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.RemoveKey.RemoveKeyPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteGuidValue("keyId", KeyId); writer.WriteStringValue("proof", Proof); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/RemoveKey/RemoveKeyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/RemoveKey/RemoveKeyRequestBuilder.cs index ce28c02316e..72ec329a492 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/RemoveKey/RemoveKeyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/RemoveKey/RemoveKeyRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.Remov public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.RemoveKey.RemoveKeyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.RemoveKey.RemoveKeyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/RemovePassword/RemovePasswordPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/RemovePassword/RemovePasswordPostRequestBody.cs index 0f1a59324b0..2c771789546 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/RemovePassword/RemovePasswordPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/RemovePassword/RemovePasswordPostRequestBody.cs @@ -42,7 +42,7 @@ public RemovePasswordPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.RemovePassword.RemovePasswordPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.RemovePassword.RemovePasswordPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteGuidValue("keyId", KeyId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/RemovePassword/RemovePasswordRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/RemovePassword/RemovePasswordRequestBuilder.cs index 38e2e6d018b..da9a771bd8c 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/RemovePassword/RemovePasswordRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/RemovePassword/RemovePasswordRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.Remov public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.RemovePassword.RemovePasswordPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.RemovePassword.RemovePasswordPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/SetVerifiedPublisher/SetVerifiedPublisherPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/SetVerifiedPublisher/SetVerifiedPublisherPostRequestBody.cs index 3fa33ace963..d4727efa083 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/SetVerifiedPublisher/SetVerifiedPublisherPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/SetVerifiedPublisher/SetVerifiedPublisherPostRequestBody.cs @@ -52,7 +52,7 @@ public SetVerifiedPublisherPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.SetVerifiedPublisher.SetVerifiedPublisherPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.SetVerifiedPublisher.SetVerifiedPublisherPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("verifiedPublisherId", VerifiedPublisherId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/SetVerifiedPublisher/SetVerifiedPublisherRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/SetVerifiedPublisher/SetVerifiedPublisherRequestBuilder.cs index 76c24e0e208..5885b38c622 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/SetVerifiedPublisher/SetVerifiedPublisherRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/SetVerifiedPublisher/SetVerifiedPublisherRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.SetVe public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.SetVerifiedPublisher.SetVerifiedPublisherPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.SetVerifiedPublisher.SetVerifiedPublisherPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenPostRequestBody.cs index 10b7205497c..96cad31c870 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenPostRequestBody.cs @@ -53,7 +53,7 @@ public AcquireAccessTokenPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.Synchronization.AcquireAccessToken.AcquireAccessTokenPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.AcquireAccessToken.AcquireAccessTokenPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("credentials", Credentials); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenRequestBuilder.cs index 15e62735001..e5256b90b81 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.Synch public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.AcquireAccessToken.AcquireAccessTokenPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.AcquireAccessToken.AcquireAccessTokenPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/BulkUpload/BulkUploadRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/BulkUpload/BulkUploadRequestBuilder.cs index d8cd37042f9..0ae9213133d 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/BulkUpload/BulkUploadRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/BulkUpload/BulkUploadRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BulkUpload body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BulkUpload body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/BulkUpload/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/BulkUpload/Value/ContentRequestBuilder.cs index 21a0872bf3d..588b5909ee5 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/BulkUpload/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/BulkUpload/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandPostRequestBody.cs index 71b3884610b..295e06d2c3a 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandPostRequestBody.cs @@ -53,7 +53,7 @@ public ProvisionOnDemandPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.ProvisionOnDemand.ProvisionOnDemandPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.ProvisionOnDemand.ProvisionOnDemandPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("parameters", Parameters); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandRequestBuilder.cs index fd37df234b1..610ead2ea83 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandRequestBuilder.cs @@ -52,7 +52,7 @@ public ProvisionOnDemandRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.ProvisionOnDemand.ProvisionOnDemandPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.ProvisionOnDemand.ProvisionOnDemandPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartPostRequestBody.cs index 7980b31a668..b412071bbeb 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartPostRequestBody.cs @@ -53,7 +53,7 @@ public RestartPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Restart.RestartPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Restart.RestartPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartRequestBuilder.cs index bd13892ee42..60cdc86b3c3 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.Synch public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Restart.RestartPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Restart.RestartPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/DirectoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/DirectoriesRequestBuilder.cs index aa34c317ffb..2e27fb4a339 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/DirectoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/DirectoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public DirectoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DirectoryDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs index ff6d36781bc..739f458c357 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DirectoryDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsGetResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsGetResponse.cs index 65870f73331..dc8f8e57248 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterOperatorsGetResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Schema.FilterOperators.FilterOperatorsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Schema.FilterOperators.FilterOperatorsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsResponse.cs index 175311c1ac9..7f61e2708c4 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsResponse.cs @@ -20,7 +20,7 @@ public partial class FilterOperatorsResponse : global::Microsoft.Graph.Beta.Appl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Schema.FilterOperators.FilterOperatorsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Schema.FilterOperators.FilterOperatorsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsGetResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsGetResponse.cs index d05447331dc..89601be6cf4 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsGetResponse.cs @@ -36,7 +36,7 @@ public partial class FunctionsGetResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Schema.Functions.FunctionsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Schema.Functions.FunctionsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsResponse.cs index 8df30201974..1f102d5ad3e 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsResponse.cs @@ -20,7 +20,7 @@ public partial class FunctionsResponse : global::Microsoft.Graph.Beta.Applicatio /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Schema.Functions.FunctionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Schema.Functions.FunctionsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs index 72de6e4c3b2..50bbc32c4d8 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs @@ -85,7 +85,7 @@ public ParseExpressionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Schema.ParseExpression.ParseExpressionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Schema.ParseExpression.ParseExpressionPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("expression", Expression); writer.WriteObjectValue("targetAttributeDefinition", TargetAttributeDefinition); writer.WriteObjectValue("testInputObject", TestInputObject); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs index 83e27de45cb..79c3feaed4d 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs @@ -52,7 +52,7 @@ public ParseExpressionRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Schema.ParseExpression.ParseExpressionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.Schema.ParseExpression.ParseExpressionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/SchemaRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/SchemaRequestBuilder.cs index e3dc295276d..e444dac06a7 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/SchemaRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/SchemaRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SynchronizationSchema body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SynchronizationSchema body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/SynchronizationJobItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/SynchronizationJobItemRequestBuilder.cs index cac95422bbf..b548c7e9103 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/SynchronizationJobItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/SynchronizationJobItemRequestBuilder.cs @@ -138,7 +138,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SynchronizationJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -199,7 +199,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SynchronizationJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsPostRequestBody.cs index e73266fc38d..e80f57ace83 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsPostRequestBody.cs @@ -91,7 +91,7 @@ public ValidateCredentialsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.ValidateCredentials.ValidateCredentialsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.ValidateCredentials.ValidateCredentialsPostRequestBody(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applicationIdentifier", ApplicationIdentifier); writer.WriteCollectionOfObjectValues("credentials", Credentials); writer.WriteStringValue("templateId", TemplateId); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsRequestBuilder.cs index 9fbd8805bf9..45a3d377500 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.Synch public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.ValidateCredentials.ValidateCredentialsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.Item.ValidateCredentials.ValidateCredentialsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/JobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/JobsRequestBuilder.cs index 4a345f3a59e..805349f7570 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/JobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/JobsRequestBuilder.cs @@ -99,7 +99,7 @@ public JobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SynchronizationJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SynchronizationJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsPostRequestBody.cs index 9b64083fa62..caa44669440 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsPostRequestBody.cs @@ -91,7 +91,7 @@ public ValidateCredentialsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.ValidateCredentials.ValidateCredentialsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.ValidateCredentials.ValidateCredentialsPostRequestBody(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applicationIdentifier", ApplicationIdentifier); writer.WriteCollectionOfObjectValues("credentials", Credentials); writer.WriteStringValue("templateId", TemplateId); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsRequestBuilder.cs index 05490de03af..be2aa7f16ef 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.Synch public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.ValidateCredentials.ValidateCredentialsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Jobs.ValidateCredentials.ValidateCredentialsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Ping/PingGetResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Ping/PingGetResponse.cs index b810d74d170..56d6ac34e0f 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Ping/PingGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Ping/PingGetResponse.cs @@ -52,7 +52,7 @@ public PingGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Ping.PingGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Ping.PingGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Ping/PingResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Ping/PingResponse.cs index 5f18da44bb2..5e1efbcdf22 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Ping/PingResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Ping/PingResponse.cs @@ -20,7 +20,7 @@ public partial class PingResponse : global::Microsoft.Graph.Beta.Applications.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Ping.PingResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Ping.PingResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsPutRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsPutRequestBody.cs index 947b9a6f9c3..48b0bf61b48 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsPutRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsPutRequestBody.cs @@ -53,7 +53,7 @@ public SecretsPutRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Secrets.SecretsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Secrets.SecretsPutRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsPutResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsPutResponse.cs index d82aad33596..927bf7ac87f 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsPutResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsPutResponse.cs @@ -53,7 +53,7 @@ public SecretsPutResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Secrets.SecretsPutResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Secrets.SecretsPutResponse(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsRequestBuilder.cs index 116bc28fad1..4ed395a58ef 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsRequestBuilder.cs @@ -56,7 +56,7 @@ public SecretsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PutAsSecretsPutResponseAsync(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Secrets.SecretsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -82,7 +82,7 @@ public SecretsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PutAsync(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Secrets.SecretsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -105,7 +105,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.A public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Secrets.SecretsPutRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsResponse.cs index 7920657ead4..719738560a8 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsResponse.cs @@ -20,7 +20,7 @@ public partial class SecretsResponse : global::Microsoft.Graph.Beta.Applications /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Secrets.SecretsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Secrets.SecretsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/SynchronizationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/SynchronizationRequestBuilder.cs index 2706ff98840..fe361f41cad 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/SynchronizationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/SynchronizationRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PutAsync(global::Microsoft.Graph.Beta.Models.Synchronization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.Synchronization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/DirectoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/DirectoriesRequestBuilder.cs index 2c42b6d5ccf..9affbf26305 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/DirectoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/DirectoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public DirectoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DirectoryDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs index 2222087d850..9f650dad33e 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DirectoryDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsGetResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsGetResponse.cs index fdd7b3b1c8d..0c0c35e68a8 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterOperatorsGetResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Templates.Item.Schema.FilterOperators.FilterOperatorsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Templates.Item.Schema.FilterOperators.FilterOperatorsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsResponse.cs index bb087fbdcaf..561ceee3c4c 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsResponse.cs @@ -20,7 +20,7 @@ public partial class FilterOperatorsResponse : global::Microsoft.Graph.Beta.Appl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Templates.Item.Schema.FilterOperators.FilterOperatorsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Templates.Item.Schema.FilterOperators.FilterOperatorsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsGetResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsGetResponse.cs index 849ec7a824e..66858f300ee 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsGetResponse.cs @@ -36,7 +36,7 @@ public partial class FunctionsGetResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Templates.Item.Schema.Functions.FunctionsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Templates.Item.Schema.Functions.FunctionsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsResponse.cs index 34398427dc5..dc71e84894f 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsResponse.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsResponse.cs @@ -20,7 +20,7 @@ public partial class FunctionsResponse : global::Microsoft.Graph.Beta.Applicatio /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Templates.Item.Schema.Functions.FunctionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Templates.Item.Schema.Functions.FunctionsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs index d9447550eff..3a758236bc0 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs @@ -85,7 +85,7 @@ public ParseExpressionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Templates.Item.Schema.ParseExpression.ParseExpressionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Templates.Item.Schema.ParseExpression.ParseExpressionPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("expression", Expression); writer.WriteObjectValue("targetAttributeDefinition", TargetAttributeDefinition); writer.WriteObjectValue("testInputObject", TestInputObject); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs index 98c7c8a0a94..939cdd1471e 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs @@ -52,7 +52,7 @@ public ParseExpressionRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Templates.Item.Schema.ParseExpression.ParseExpressionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.Item.Synchronization.Templates.Item.Schema.ParseExpression.ParseExpressionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/SchemaRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/SchemaRequestBuilder.cs index a4629f514ba..0da72601c69 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/SchemaRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/SchemaRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SynchronizationSchema body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SynchronizationSchema body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/SynchronizationTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/SynchronizationTemplateItemRequestBuilder.cs index 286e95e1d91..86cb924e6c9 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/SynchronizationTemplateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/SynchronizationTemplateItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SynchronizationTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SynchronizationTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/TemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/TemplatesRequestBuilder.cs index 2c15b17e506..1c9b8666dea 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/TemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/TemplatesRequestBuilder.cs @@ -93,7 +93,7 @@ public TemplatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SynchronizationTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SynchronizationTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/TokenIssuancePolicies/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/TokenIssuancePolicies/Ref/RefRequestBuilder.cs index 20747eb2893..85ef59cf705 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/TokenIssuancePolicies/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/TokenIssuancePolicies/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/applications/{application%2Did}/tokenIssuancePolicies/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/TokenLifetimePolicies/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/TokenLifetimePolicies/Ref/RefRequestBuilder.cs index 833417ed3ab..30adfa04b23 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/TokenLifetimePolicies/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/TokenLifetimePolicies/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/applications/{application%2Did}/tokenLifetimePolicies/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Applications/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/ValidateProperties/ValidatePropertiesPostRequestBody.cs index 4c581e8eae6..01940bb8117 100644 --- a/src/Microsoft.Graph/Generated/Applications/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Applications/ValidateProperties/ValidatePropertiesPostRequestBody.cs @@ -90,7 +90,7 @@ public ValidatePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Applications.ValidateProperties.ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Applications.ValidateProperties.ValidatePropertiesPostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("entityType", EntityType); writer.WriteStringValue("mailNickname", MailNickname); diff --git a/src/Microsoft.Graph/Generated/Applications/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/ValidateProperties/ValidatePropertiesRequestBuilder.cs index ad97623078b..0a888829c2b 100644 --- a/src/Microsoft.Graph/Generated/Applications/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/ValidateProperties/ValidatePropertiesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.ValidatePr public async Task PostAsync(global::Microsoft.Graph.Beta.Applications.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Applications.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ApplicationsWithAppId/ApplicationsWithAppIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/ApplicationsWithAppId/ApplicationsWithAppIdRequestBuilder.cs index d31ae847b4b..dcccc1a0123 100644 --- a/src/Microsoft.Graph/Generated/ApplicationsWithAppId/ApplicationsWithAppIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ApplicationsWithAppId/ApplicationsWithAppIdRequestBuilder.cs @@ -101,7 +101,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Application body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Application body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ApplicationsWithUniqueName/ApplicationsWithUniqueNameRequestBuilder.cs b/src/Microsoft.Graph/Generated/ApplicationsWithUniqueName/ApplicationsWithUniqueNameRequestBuilder.cs index ebab0918aa1..1986d6ea2b5 100644 --- a/src/Microsoft.Graph/Generated/ApplicationsWithUniqueName/ApplicationsWithUniqueNameRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ApplicationsWithUniqueName/ApplicationsWithUniqueNameRequestBuilder.cs @@ -101,7 +101,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Application body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Application body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/ApprovalWorkflowProvidersRequestBuilder.cs b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/ApprovalWorkflowProvidersRequestBuilder.cs index 6de8d65db17..cb441407e92 100644 --- a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/ApprovalWorkflowProvidersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/ApprovalWorkflowProvidersRequestBuilder.cs @@ -93,7 +93,7 @@ public ApprovalWorkflowProvidersRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ApprovalWorkflowProvider body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ApprovalWorkflowProvider body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/ApprovalWorkflowProviderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/ApprovalWorkflowProviderItemRequestBuilder.cs index b02bad826cf..f579d483ba0 100644 --- a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/ApprovalWorkflowProviderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/ApprovalWorkflowProviderItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ApprovalWorkflowProvider body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ApprovalWorkflowProvider body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/BusinessFlowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/BusinessFlowsRequestBuilder.cs index ac5a7d15463..afedb58b14a 100644 --- a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/BusinessFlowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/BusinessFlowsRequestBuilder.cs @@ -93,7 +93,7 @@ public BusinessFlowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BusinessFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BusinessFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/Item/BusinessFlowItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/Item/BusinessFlowItemRequestBuilder.cs index 6b0ddd08ad4..a831d0c3cfb 100644 --- a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/Item/BusinessFlowItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/Item/BusinessFlowItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BusinessFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BusinessFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/Item/RecordDecisions/RecordDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/Item/RecordDecisions/RecordDecisionsPostRequestBody.cs index b49241b07ad..99bfa936f53 100644 --- a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/Item/RecordDecisions/RecordDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/Item/RecordDecisions/RecordDecisionsPostRequestBody.cs @@ -68,7 +68,7 @@ public RecordDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.ApprovalWorkflowProviders.Item.BusinessFlows.Item.RecordDecisions.RecordDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.ApprovalWorkflowProviders.Item.BusinessFlows.Item.RecordDecisions.RecordDecisionsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("reviewResult", ReviewResult); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/Item/RecordDecisions/RecordDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/Item/RecordDecisions/RecordDecisionsRequestBuilder.cs index bf387ddcc49..a07b85ed436 100644 --- a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/Item/RecordDecisions/RecordDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlows/Item/RecordDecisions/RecordDecisionsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.ApprovalWorkflowProvide public async Task PostAsync(global::Microsoft.Graph.Beta.ApprovalWorkflowProviders.Item.BusinessFlows.Item.RecordDecisions.RecordDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.ApprovalWorkflowProviders.Item.BusinessFlows.Item.RecordDecisions.RecordDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/BusinessFlowsWithRequestsAwaitingMyDecisionRequestBuilder.cs b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/BusinessFlowsWithRequestsAwaitingMyDecisionRequestBuilder.cs index b1e82cd6977..d07092c0829 100644 --- a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/BusinessFlowsWithRequestsAwaitingMyDecisionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/BusinessFlowsWithRequestsAwaitingMyDecisionRequestBuilder.cs @@ -93,7 +93,7 @@ public BusinessFlowsWithRequestsAwaitingMyDecisionRequestBuilder(string rawUrl, public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BusinessFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BusinessFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/Item/BusinessFlowItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/Item/BusinessFlowItemRequestBuilder.cs index 776bd2fa208..3618ddb4fbc 100644 --- a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/Item/BusinessFlowItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/Item/BusinessFlowItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BusinessFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BusinessFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/Item/RecordDecisions/RecordDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/Item/RecordDecisions/RecordDecisionsPostRequestBody.cs index eb3d531471a..797d39a528f 100644 --- a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/Item/RecordDecisions/RecordDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/Item/RecordDecisions/RecordDecisionsPostRequestBody.cs @@ -68,7 +68,7 @@ public RecordDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.ApprovalWorkflowProviders.Item.BusinessFlowsWithRequestsAwaitingMyDecision.Item.RecordDecisions.RecordDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.ApprovalWorkflowProviders.Item.BusinessFlowsWithRequestsAwaitingMyDecision.Item.RecordDecisions.RecordDecisionsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("reviewResult", ReviewResult); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/Item/RecordDecisions/RecordDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/Item/RecordDecisions/RecordDecisionsRequestBuilder.cs index 4be57b14403..8f887fc9a8d 100644 --- a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/Item/RecordDecisions/RecordDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/BusinessFlowsWithRequestsAwaitingMyDecision/Item/RecordDecisions/RecordDecisionsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.ApprovalWorkflowProvide public async Task PostAsync(global::Microsoft.Graph.Beta.ApprovalWorkflowProviders.Item.BusinessFlowsWithRequestsAwaitingMyDecision.Item.RecordDecisions.RecordDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.ApprovalWorkflowProviders.Item.BusinessFlowsWithRequestsAwaitingMyDecision.Item.RecordDecisions.RecordDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/PolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/PolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilder.cs index e5e76702ad3..5ed38011444 100644 --- a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/PolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/PolicyTemplates/Item/GovernancePolicyTemplateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernancePolicyTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernancePolicyTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/PolicyTemplates/PolicyTemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/PolicyTemplates/PolicyTemplatesRequestBuilder.cs index 91c7ee8fcdb..8f11b678ce4 100644 --- a/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/PolicyTemplates/PolicyTemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ApprovalWorkflowProviders/Item/PolicyTemplates/PolicyTemplatesRequestBuilder.cs @@ -93,7 +93,7 @@ public PolicyTemplatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernancePolicyTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernancePolicyTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/AuditLogsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/AuditLogsRequestBuilder.cs index ff01db77503..46c29a148e5 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/AuditLogsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/AuditLogsRequestBuilder.cs @@ -110,7 +110,7 @@ public AuditLogsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.AuditLogRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuditLogRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/CustomSecurityAttributeAudits/CustomSecurityAttributeAuditsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/CustomSecurityAttributeAudits/CustomSecurityAttributeAuditsRequestBuilder.cs index a7733137055..77c3a827f01 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/CustomSecurityAttributeAudits/CustomSecurityAttributeAuditsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/CustomSecurityAttributeAudits/CustomSecurityAttributeAuditsRequestBuilder.cs @@ -94,7 +94,7 @@ public CustomSecurityAttributeAuditsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeAudit body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeAudit body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/CustomSecurityAttributeAudits/Item/CustomSecurityAttributeAuditItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/CustomSecurityAttributeAudits/Item/CustomSecurityAttributeAuditItemRequestBuilder.cs index bf8521d4261..502efd18894 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/CustomSecurityAttributeAudits/Item/CustomSecurityAttributeAuditItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/CustomSecurityAttributeAudits/Item/CustomSecurityAttributeAuditItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeAudit body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeAudit body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/DirectoryAudits/DirectoryAuditsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/DirectoryAudits/DirectoryAuditsRequestBuilder.cs index ee94536936c..28f1cb04f01 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/DirectoryAudits/DirectoryAuditsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/DirectoryAudits/DirectoryAuditsRequestBuilder.cs @@ -94,7 +94,7 @@ public DirectoryAuditsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DirectoryAudit body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryAudit body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/DirectoryAudits/Item/DirectoryAuditItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/DirectoryAudits/Item/DirectoryAuditItemRequestBuilder.cs index 0cd8dfb2528..7a0731c3e53 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/DirectoryAudits/Item/DirectoryAuditItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/DirectoryAudits/Item/DirectoryAuditItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DirectoryAudit body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryAudit body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/DirectoryProvisioning/DirectoryProvisioningRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/DirectoryProvisioning/DirectoryProvisioningRequestBuilder.cs index fdc7f2d09fa..c83c7bcb07b 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/DirectoryProvisioning/DirectoryProvisioningRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/DirectoryProvisioning/DirectoryProvisioningRequestBuilder.cs @@ -93,7 +93,7 @@ public DirectoryProvisioningRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ProvisioningObjectSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ProvisioningObjectSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/DirectoryProvisioning/Item/ProvisioningObjectSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/DirectoryProvisioning/Item/ProvisioningObjectSummaryItemRequestBuilder.cs index 5363f0b7365..32dae232177 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/DirectoryProvisioning/Item/ProvisioningObjectSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/DirectoryProvisioning/Item/ProvisioningObjectSummaryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ProvisioningObjectSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProvisioningObjectSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/Provisioning/Item/ProvisioningObjectSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/Provisioning/Item/ProvisioningObjectSummaryItemRequestBuilder.cs index 4bd76ec04f7..23714f6be40 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/Provisioning/Item/ProvisioningObjectSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/Provisioning/Item/ProvisioningObjectSummaryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ProvisioningObjectSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProvisioningObjectSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/Provisioning/ProvisioningRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/Provisioning/ProvisioningRequestBuilder.cs index 2810d8e61b5..c1a43162aaa 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/Provisioning/ProvisioningRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/Provisioning/ProvisioningRequestBuilder.cs @@ -94,7 +94,7 @@ public ProvisioningRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ProvisioningObjectSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ProvisioningObjectSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs index a0f644a49a8..07c8ebf6b81 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs @@ -52,7 +52,7 @@ public ConfirmCompromisedPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.AuditLogs.SignIns.ConfirmCompromised.ConfirmCompromisedPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AuditLogs.SignIns.ConfirmCompromised.ConfirmCompromisedPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("requestIds", RequestIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs index 819c8bb5133..d30249c0dc3 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.AuditLogs.SignIns.Confi public async Task PostAsync(global::Microsoft.Graph.Beta.AuditLogs.SignIns.ConfirmCompromised.ConfirmCompromisedPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.AuditLogs.SignIns.ConfirmCompromised.ConfirmCompromisedPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmSafe/ConfirmSafePostRequestBody.cs b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmSafe/ConfirmSafePostRequestBody.cs index a96f13bbf8e..8a9ba664366 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmSafe/ConfirmSafePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmSafe/ConfirmSafePostRequestBody.cs @@ -52,7 +52,7 @@ public ConfirmSafePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.AuditLogs.SignIns.ConfirmSafe.ConfirmSafePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AuditLogs.SignIns.ConfirmSafe.ConfirmSafePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("requestIds", RequestIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmSafe/ConfirmSafeRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmSafe/ConfirmSafeRequestBuilder.cs index fbee92f0624..3df467fea88 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmSafe/ConfirmSafeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/ConfirmSafe/ConfirmSafeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.AuditLogs.SignIns.Confi public async Task PostAsync(global::Microsoft.Graph.Beta.AuditLogs.SignIns.ConfirmSafe.ConfirmSafePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.AuditLogs.SignIns.ConfirmSafe.ConfirmSafePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/Dismiss/DismissPostRequestBody.cs b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/Dismiss/DismissPostRequestBody.cs index 122070de8cb..f35d1180879 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/Dismiss/DismissPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/Dismiss/DismissPostRequestBody.cs @@ -52,7 +52,7 @@ public DismissPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.AuditLogs.SignIns.Dismiss.DismissPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.AuditLogs.SignIns.Dismiss.DismissPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("requestIds", RequestIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/Dismiss/DismissRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/Dismiss/DismissRequestBuilder.cs index 9fea3719894..2be57e24444 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/Dismiss/DismissRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/Dismiss/DismissRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.AuditLogs.SignIns.Dismi public async Task PostAsync(global::Microsoft.Graph.Beta.AuditLogs.SignIns.Dismiss.DismissPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.AuditLogs.SignIns.Dismiss.DismissPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/Item/SignInItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/Item/SignInItemRequestBuilder.cs index 193529e130d..4757565be96 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/Item/SignInItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/Item/SignInItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SignIn body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SignIn body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/SignInsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/SignInsRequestBuilder.cs index d28c7b879fa..a6169502b30 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/SignIns/SignInsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/SignIns/SignInsRequestBuilder.cs @@ -112,7 +112,7 @@ public SignInsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SignIn body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -154,7 +154,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SignIn body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/SignUps/Item/SelfServiceSignUpItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/SignUps/Item/SelfServiceSignUpItemRequestBuilder.cs index 8eebac8f688..2636c8a26c3 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/SignUps/Item/SelfServiceSignUpItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/SignUps/Item/SelfServiceSignUpItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SelfServiceSignUp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SelfServiceSignUp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuditLogs/SignUps/SignUpsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuditLogs/SignUps/SignUpsRequestBuilder.cs index cbbb932a559..cca15714edf 100644 --- a/src/Microsoft.Graph/Generated/AuditLogs/SignUps/SignUpsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuditLogs/SignUps/SignUpsRequestBuilder.cs @@ -94,7 +94,7 @@ public SignUpsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SelfServiceSignUp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SelfServiceSignUp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuthenticationMethodConfigurations/AuthenticationMethodConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuthenticationMethodConfigurations/AuthenticationMethodConfigurationsRequestBuilder.cs index b1db7b4092e..e9a682f8ba9 100644 --- a/src/Microsoft.Graph/Generated/AuthenticationMethodConfigurations/AuthenticationMethodConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuthenticationMethodConfigurations/AuthenticationMethodConfigurationsRequestBuilder.cs @@ -93,7 +93,7 @@ public AuthenticationMethodConfigurationsRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuthenticationMethodConfigurations/Item/AuthenticationMethodConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuthenticationMethodConfigurations/Item/AuthenticationMethodConfigurationItemRequestBuilder.cs index af76ff7becb..d8f4c12701f 100644 --- a/src/Microsoft.Graph/Generated/AuthenticationMethodConfigurations/Item/AuthenticationMethodConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuthenticationMethodConfigurations/Item/AuthenticationMethodConfigurationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/AuthenticationMethodDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/AuthenticationMethodDevicesRequestBuilder.cs index cff80aad92f..798a879528d 100644 --- a/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/AuthenticationMethodDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/AuthenticationMethodDevicesRequestBuilder.cs @@ -93,7 +93,7 @@ public AuthenticationMethodDevicesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/AuthenticationMethodDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/AuthenticationMethodDeviceItemRequestBuilder.cs index e7045da0f9d..00cb1621660 100644 --- a/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/AuthenticationMethodDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/AuthenticationMethodDeviceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/HardwareOathDevices/HardwareOathDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/HardwareOathDevices/HardwareOathDevicesRequestBuilder.cs index 9bb63831f81..48c974934bf 100644 --- a/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/HardwareOathDevices/HardwareOathDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/HardwareOathDevices/HardwareOathDevicesRequestBuilder.cs @@ -93,7 +93,7 @@ public HardwareOathDevicesRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/HardwareOathDevices/Item/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/HardwareOathDevices/Item/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs index ee8134b7f4d..b7949766f1f 100644 --- a/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/HardwareOathDevices/Item/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/HardwareOathDevices/Item/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/HardwareOathDevices/Item/HardwareOathTokenAuthenticationMethodDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/HardwareOathDevices/Item/HardwareOathTokenAuthenticationMethodDeviceItemRequestBuilder.cs index cb994d66604..ec692eb7145 100644 --- a/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/HardwareOathDevices/Item/HardwareOathTokenAuthenticationMethodDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuthenticationMethodDevices/Item/HardwareOathDevices/Item/HardwareOathTokenAuthenticationMethodDeviceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/AuthenticationMethodConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/AuthenticationMethodConfigurationsRequestBuilder.cs index 96e4937b2cb..18b7c282517 100644 --- a/src/Microsoft.Graph/Generated/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/AuthenticationMethodConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/AuthenticationMethodConfigurationsRequestBuilder.cs @@ -93,7 +93,7 @@ public AuthenticationMethodConfigurationsRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/Item/AuthenticationMethodConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/Item/AuthenticationMethodConfigurationItemRequestBuilder.cs index 15cbad11d35..4ae5e65d3e5 100644 --- a/src/Microsoft.Graph/Generated/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/Item/AuthenticationMethodConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/Item/AuthenticationMethodConfigurationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/AuthenticationMethodsPolicy/AuthenticationMethodsPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/AuthenticationMethodsPolicy/AuthenticationMethodsPolicyRequestBuilder.cs index f30c4ab09e4..aeebb493d0c 100644 --- a/src/Microsoft.Graph/Generated/AuthenticationMethodsPolicy/AuthenticationMethodsPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/AuthenticationMethodsPolicy/AuthenticationMethodsPolicyRequestBuilder.cs @@ -80,7 +80,7 @@ public AuthenticationMethodsPolicyRequestBuilder(string rawUrl, IRequestAdapter public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodsPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -122,7 +122,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodsPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/BookingBusinessesRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/BookingBusinessesRequestBuilder.cs index 037ca3499f0..d94d1120dc7 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/BookingBusinessesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/BookingBusinessesRequestBuilder.cs @@ -93,7 +93,7 @@ public BookingBusinessesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BookingBusiness body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BookingBusiness body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/AppointmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/AppointmentsRequestBuilder.cs index 1f71882fadf..805b7860a95 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/AppointmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/AppointmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AppointmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BookingAppointment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BookingAppointment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/Item/BookingAppointmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/Item/BookingAppointmentItemRequestBuilder.cs index f06ebc789f8..3f5785ca157 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/Item/BookingAppointmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/Item/BookingAppointmentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BookingAppointment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BookingAppointment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/Item/Cancel/CancelPostRequestBody.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/Item/Cancel/CancelPostRequestBody.cs index 21cd8e9929a..4189aad7c5d 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/Item/Cancel/CancelPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/Item/Cancel/CancelPostRequestBody.cs @@ -52,7 +52,7 @@ public CancelPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.BookingBusinesses.Item.Appointments.Item.Cancel.CancelPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.BookingBusinesses.Item.Appointments.Item.Cancel.CancelPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("cancellationMessage", CancellationMessage); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/Item/Cancel/CancelRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/Item/Cancel/CancelRequestBuilder.cs index 505529b5edb..97a35370556 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/Item/Cancel/CancelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Appointments/Item/Cancel/CancelRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.BookingBusinesses.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.BookingBusinesses.Item.Appointments.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.BookingBusinesses.Item.Appointments.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/BookingBusinessItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/BookingBusinessItemRequestBuilder.cs index 2a1a7cb62c5..38221ea4737 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/BookingBusinessItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/BookingBusinessItemRequestBuilder.cs @@ -150,7 +150,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BookingBusiness body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -211,7 +211,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BookingBusiness body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/CalendarViewRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/CalendarViewRequestBuilder.cs index 2eb6a623080..fb1b9a5a835 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/CalendarViewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/CalendarViewRequestBuilder.cs @@ -93,7 +93,7 @@ public CalendarViewRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BookingAppointment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BookingAppointment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/bookingBusinesses/{bookingBusiness%2Did}/calendarView", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/Item/BookingAppointmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/Item/BookingAppointmentItemRequestBuilder.cs index a64c5a182af..4c6d9683836 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/Item/BookingAppointmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/Item/BookingAppointmentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BookingAppointment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BookingAppointment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, "{+baseurl}/bookingBusinesses/{bookingBusiness%2Did}/calendarView/{bookingAppointment%2Did}", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/Item/Cancel/CancelPostRequestBody.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/Item/Cancel/CancelPostRequestBody.cs index e5330909163..a97d2314074 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/Item/Cancel/CancelPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/Item/Cancel/CancelPostRequestBody.cs @@ -52,7 +52,7 @@ public CancelPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.BookingBusinesses.Item.CalendarView.Item.Cancel.CancelPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.BookingBusinesses.Item.CalendarView.Item.Cancel.CancelPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("cancellationMessage", CancellationMessage); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/Item/Cancel/CancelRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/Item/Cancel/CancelRequestBuilder.cs index bfd5798ab83..1a7f2717c1b 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/Item/Cancel/CancelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CalendarView/Item/Cancel/CancelRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.BookingBusinesses.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.BookingBusinesses.Item.CalendarView.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.BookingBusinesses.Item.CalendarView.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CustomQuestions/CustomQuestionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CustomQuestions/CustomQuestionsRequestBuilder.cs index dc997673470..5246d93d770 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CustomQuestions/CustomQuestionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CustomQuestions/CustomQuestionsRequestBuilder.cs @@ -93,7 +93,7 @@ public CustomQuestionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BookingCustomQuestion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BookingCustomQuestion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CustomQuestions/Item/BookingCustomQuestionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CustomQuestions/Item/BookingCustomQuestionItemRequestBuilder.cs index 27c61889b2d..2998f768505 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CustomQuestions/Item/BookingCustomQuestionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/CustomQuestions/Item/BookingCustomQuestionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BookingCustomQuestion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BookingCustomQuestion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Customers/CustomersRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Customers/CustomersRequestBuilder.cs index 4a7a870e4d7..700fce351f0 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Customers/CustomersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Customers/CustomersRequestBuilder.cs @@ -93,7 +93,7 @@ public CustomersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BookingCustomer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BookingCustomer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Customers/Item/BookingCustomerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Customers/Item/BookingCustomerItemRequestBuilder.cs index c14143a34cb..055cb30cf92 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Customers/Item/BookingCustomerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Customers/Item/BookingCustomerItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BookingCustomer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BookingCustomer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityPostRequestBody.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityPostRequestBody.cs index 0a904b45228..d58040fc5e9 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityPostRequestBody.cs @@ -85,7 +85,7 @@ public GetStaffAvailabilityPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.BookingBusinesses.Item.GetStaffAvailability.GetStaffAvailabilityPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.BookingBusinesses.Item.GetStaffAvailability.GetStaffAvailabilityPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("endDateTime", EndDateTime); writer.WriteCollectionOfPrimitiveValues("staffIds", StaffIds); writer.WriteObjectValue("startDateTime", StartDateTime); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityPostResponse.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityPostResponse.cs index fe365162a57..48fa15087e4 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityPostResponse.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetStaffAvailabilityPostResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.BookingBusinesses.Item.GetStaffAvailability.GetStaffAvailabilityPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.BookingBusinesses.Item.GetStaffAvailability.GetStaffAvailabilityPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityRequestBuilder.cs index 6afda0978a9..a1f5e4aaf51 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityRequestBuilder.cs @@ -51,7 +51,7 @@ public GetStaffAvailabilityRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsGetStaffAvailabilityPostResponseAsync(global::Microsoft.Graph.Beta.BookingBusinesses.Item.GetStaffAvailability.GetStaffAvailabilityPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetStaffAvailabilityRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.BookingBusinesses.Item.GetStaffAvailability.GetStaffAvailabilityPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.BookingBusinesses.Item.GetStaffAvailability.GetStaffAvailabilityPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityResponse.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityResponse.cs index 1c602e27cec..00f36c2b296 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityResponse.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/GetStaffAvailability/GetStaffAvailabilityResponse.cs @@ -20,7 +20,7 @@ public partial class GetStaffAvailabilityResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.BookingBusinesses.Item.GetStaffAvailability.GetStaffAvailabilityResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.BookingBusinesses.Item.GetStaffAvailability.GetStaffAvailabilityResponse(); } } diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Services/Item/BookingServiceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Services/Item/BookingServiceItemRequestBuilder.cs index 49aed2f5970..9dcacf66485 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Services/Item/BookingServiceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Services/Item/BookingServiceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BookingService body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BookingService body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Services/ServicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Services/ServicesRequestBuilder.cs index bd2bc957662..e6810362e8d 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Services/ServicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/Services/ServicesRequestBuilder.cs @@ -93,7 +93,7 @@ public ServicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BookingService body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BookingService body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/StaffMembers/Item/BookingStaffMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/StaffMembers/Item/BookingStaffMemberItemRequestBuilder.cs index ba087ef69ef..4972b5305b0 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/StaffMembers/Item/BookingStaffMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/StaffMembers/Item/BookingStaffMemberItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BookingStaffMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BookingStaffMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/StaffMembers/StaffMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/StaffMembers/StaffMembersRequestBuilder.cs index d3f77a4b2d0..12960e1d29b 100644 --- a/src/Microsoft.Graph/Generated/BookingBusinesses/Item/StaffMembers/StaffMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingBusinesses/Item/StaffMembers/StaffMembersRequestBuilder.cs @@ -93,7 +93,7 @@ public StaffMembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BookingStaffMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BookingStaffMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingCurrencies/BookingCurrenciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingCurrencies/BookingCurrenciesRequestBuilder.cs index bf07b680844..e85acf239f3 100644 --- a/src/Microsoft.Graph/Generated/BookingCurrencies/BookingCurrenciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingCurrencies/BookingCurrenciesRequestBuilder.cs @@ -93,7 +93,7 @@ public BookingCurrenciesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BookingCurrency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BookingCurrency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BookingCurrencies/Item/BookingCurrencyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/BookingCurrencies/Item/BookingCurrencyItemRequestBuilder.cs index 7d9dce50cb3..f34f6e15645 100644 --- a/src/Microsoft.Graph/Generated/BookingCurrencies/Item/BookingCurrencyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BookingCurrencies/Item/BookingCurrencyItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BookingCurrency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BookingCurrency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BusinessFlowTemplates/BusinessFlowTemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/BusinessFlowTemplates/BusinessFlowTemplatesRequestBuilder.cs index efa7715c861..5496df43998 100644 --- a/src/Microsoft.Graph/Generated/BusinessFlowTemplates/BusinessFlowTemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BusinessFlowTemplates/BusinessFlowTemplatesRequestBuilder.cs @@ -94,7 +94,7 @@ public BusinessFlowTemplatesRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BusinessFlowTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BusinessFlowTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/BusinessFlowTemplates/Item/BusinessFlowTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/BusinessFlowTemplates/Item/BusinessFlowTemplateItemRequestBuilder.cs index 1112e5b20ce..4212417f125 100644 --- a/src/Microsoft.Graph/Generated/BusinessFlowTemplates/Item/BusinessFlowTemplateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/BusinessFlowTemplates/Item/BusinessFlowTemplateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BusinessFlowTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BusinessFlowTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateAuthoritiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateAuthoritiesRequestBuilder.cs index 5098282df36..6ba2893f5f1 100644 --- a/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateAuthoritiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateAuthoritiesRequestBuilder.cs @@ -86,7 +86,7 @@ public CertificateAuthoritiesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.CertificateAuthorityPath body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -128,7 +128,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateAuthorityPath body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/CertificateBasedApplicationConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/CertificateBasedApplicationConfigurationsRequestBuilder.cs index e82afa84874..472f987d395 100644 --- a/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/CertificateBasedApplicationConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/CertificateBasedApplicationConfigurationsRequestBuilder.cs @@ -93,7 +93,7 @@ public CertificateBasedApplicationConfigurationsRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CertificateBasedApplicationConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateBasedApplicationConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/CertificateBasedApplicationConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/CertificateBasedApplicationConfigurationItemRequestBuilder.cs index a44d55411ee..f40862eb0a8 100644 --- a/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/CertificateBasedApplicationConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/CertificateBasedApplicationConfigurationItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CertificateBasedApplicationConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateBasedApplicationConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/Item/CertificateAuthorityAsEntityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/Item/CertificateAuthorityAsEntityItemRequestBuilder.cs index 78a59429d8f..8c1743f7185 100644 --- a/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/Item/CertificateAuthorityAsEntityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/Item/CertificateAuthorityAsEntityItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CertificateAuthorityAsEntity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateAuthorityAsEntity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/TrustedCertificateAuthoritiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/TrustedCertificateAuthoritiesRequestBuilder.cs index 7a8ccf9467e..e3f61cadfcf 100644 --- a/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/TrustedCertificateAuthoritiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/TrustedCertificateAuthoritiesRequestBuilder.cs @@ -93,7 +93,7 @@ public TrustedCertificateAuthoritiesRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CertificateAuthorityAsEntity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateAuthorityAsEntity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/CertificateAuthorities/MutualTlsOauthConfigurations/Item/MutualTlsOauthConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/CertificateAuthorities/MutualTlsOauthConfigurations/Item/MutualTlsOauthConfigurationItemRequestBuilder.cs index 18c02a18689..114b64af1fd 100644 --- a/src/Microsoft.Graph/Generated/CertificateAuthorities/MutualTlsOauthConfigurations/Item/MutualTlsOauthConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/CertificateAuthorities/MutualTlsOauthConfigurations/Item/MutualTlsOauthConfigurationItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MutualTlsOauthConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MutualTlsOauthConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/CertificateAuthorities/MutualTlsOauthConfigurations/MutualTlsOauthConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/CertificateAuthorities/MutualTlsOauthConfigurations/MutualTlsOauthConfigurationsRequestBuilder.cs index 60ed3746f28..8ef34b1628f 100644 --- a/src/Microsoft.Graph/Generated/CertificateAuthorities/MutualTlsOauthConfigurations/MutualTlsOauthConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/CertificateAuthorities/MutualTlsOauthConfigurations/MutualTlsOauthConfigurationsRequestBuilder.cs @@ -93,7 +93,7 @@ public MutualTlsOauthConfigurationsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MutualTlsOauthConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MutualTlsOauthConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/CertificateBasedAuthConfiguration/CertificateBasedAuthConfigurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/CertificateBasedAuthConfiguration/CertificateBasedAuthConfigurationRequestBuilder.cs index 544ec8e14f4..32dfd8d8dcb 100644 --- a/src/Microsoft.Graph/Generated/CertificateBasedAuthConfiguration/CertificateBasedAuthConfigurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/CertificateBasedAuthConfiguration/CertificateBasedAuthConfigurationRequestBuilder.cs @@ -93,7 +93,7 @@ public CertificateBasedAuthConfigurationRequestBuilder(string rawUrl, IRequestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CertificateBasedAuthConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateBasedAuthConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/CertificateBasedAuthConfiguration/Item/CertificateBasedAuthConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/CertificateBasedAuthConfiguration/Item/CertificateBasedAuthConfigurationItemRequestBuilder.cs index 4ee13259756..3817a132e8e 100644 --- a/src/Microsoft.Graph/Generated/CertificateBasedAuthConfiguration/Item/CertificateBasedAuthConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/CertificateBasedAuthConfiguration/Item/CertificateBasedAuthConfigurationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CertificateBasedAuthConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateBasedAuthConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/AllMessages/AllMessagesGetResponse.cs b/src/Microsoft.Graph/Generated/Chats/AllMessages/AllMessagesGetResponse.cs index 2945f83cc92..e0cbf93f2e2 100644 --- a/src/Microsoft.Graph/Generated/Chats/AllMessages/AllMessagesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/AllMessages/AllMessagesGetResponse.cs @@ -36,7 +36,7 @@ public partial class AllMessagesGetResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.AllMessages.AllMessagesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.AllMessages.AllMessagesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Chats/AllMessages/AllMessagesResponse.cs b/src/Microsoft.Graph/Generated/Chats/AllMessages/AllMessagesResponse.cs index 497b95e8dac..d933609ad3e 100644 --- a/src/Microsoft.Graph/Generated/Chats/AllMessages/AllMessagesResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/AllMessages/AllMessagesResponse.cs @@ -20,7 +20,7 @@ public partial class AllMessagesResponse : global::Microsoft.Graph.Beta.Chats.Al /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.AllMessages.AllMessagesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.AllMessages.AllMessagesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Chats/ChatsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/ChatsRequestBuilder.cs index 8b5f5101e34..fdcd0c111de 100644 --- a/src/Microsoft.Graph/Generated/Chats/ChatsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/ChatsRequestBuilder.cs @@ -113,7 +113,7 @@ public ChatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Chat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -155,7 +155,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Chat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/GetAllMessages/GetAllMessagesGetResponse.cs b/src/Microsoft.Graph/Generated/Chats/GetAllMessages/GetAllMessagesGetResponse.cs index 206565ce2eb..20fe9c72c26 100644 --- a/src/Microsoft.Graph/Generated/Chats/GetAllMessages/GetAllMessagesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/GetAllMessages/GetAllMessagesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllMessagesGetResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.GetAllMessages.GetAllMessagesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.GetAllMessages.GetAllMessagesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Chats/GetAllMessages/GetAllMessagesResponse.cs b/src/Microsoft.Graph/Generated/Chats/GetAllMessages/GetAllMessagesResponse.cs index 85963686afb..75cce171e40 100644 --- a/src/Microsoft.Graph/Generated/Chats/GetAllMessages/GetAllMessagesResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/GetAllMessages/GetAllMessagesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllMessagesResponse : global::Microsoft.Graph.Beta.Chats /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.GetAllMessages.GetAllMessagesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.GetAllMessages.GetAllMessagesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Chats/GetAllRetainedMessages/GetAllRetainedMessagesGetResponse.cs b/src/Microsoft.Graph/Generated/Chats/GetAllRetainedMessages/GetAllRetainedMessagesGetResponse.cs index 6ae10fef187..2dbb33ac8ff 100644 --- a/src/Microsoft.Graph/Generated/Chats/GetAllRetainedMessages/GetAllRetainedMessagesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/GetAllRetainedMessages/GetAllRetainedMessagesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllRetainedMessagesGetResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.GetAllRetainedMessages.GetAllRetainedMessagesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.GetAllRetainedMessages.GetAllRetainedMessagesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Chats/GetAllRetainedMessages/GetAllRetainedMessagesResponse.cs b/src/Microsoft.Graph/Generated/Chats/GetAllRetainedMessages/GetAllRetainedMessagesResponse.cs index e6dca7b4ee5..05fc867020a 100644 --- a/src/Microsoft.Graph/Generated/Chats/GetAllRetainedMessages/GetAllRetainedMessagesResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/GetAllRetainedMessages/GetAllRetainedMessagesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllRetainedMessagesResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.GetAllRetainedMessages.GetAllRetainedMessagesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.GetAllRetainedMessages.GetAllRetainedMessagesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/ChatItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/ChatItemRequestBuilder.cs index 9e8e78b2a1d..85049357bc0 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/ChatItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/ChatItemRequestBuilder.cs @@ -189,7 +189,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Chat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -250,7 +250,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Chat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/HideForUser/HideForUserPostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/HideForUser/HideForUserPostRequestBody.cs index e6b2088b4c4..29b5060155c 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/HideForUser/HideForUserPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/HideForUser/HideForUserPostRequestBody.cs @@ -69,7 +69,7 @@ public HideForUserPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.HideForUser.HideForUserPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.HideForUser.HideForUserPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("tenantId", TenantId); writer.WriteObjectValue("user", User); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/HideForUser/HideForUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/HideForUser/HideForUserRequestBuilder.cs index b5d0ac87d1b..9bd06f9682a 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/HideForUser/HideForUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/HideForUser/HideForUserRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.HideForUser. public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.HideForUser.HideForUserPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.HideForUser.HideForUserPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/InstalledAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/InstalledAppsRequestBuilder.cs index c8f5ad81341..bba65d3c3b2 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/InstalledAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/InstalledAppsRequestBuilder.cs @@ -95,7 +95,7 @@ public InstalledAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamsAppInstallation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAppInstallation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/TeamsAppInstallationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/TeamsAppInstallationItemRequestBuilder.cs index 25c8b6d1cae..31538087608 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/TeamsAppInstallationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/TeamsAppInstallationItemRequestBuilder.cs @@ -116,7 +116,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsAppInstallation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAppInstallation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs index 6a0d473e49c..72cd30f3e87 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs @@ -53,7 +53,7 @@ public UpgradePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.InstalledApps.Item.Upgrade.UpgradePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.InstalledApps.Item.Upgrade.UpgradePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("consentedPermissionSet", ConsentedPermissionSet); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs index 3fff3df44da..71b99da5938 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.InstalledApp public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.InstalledApps.Item.Upgrade.UpgradePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.InstalledApps.Item.Upgrade.UpgradePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/LastMessagePreview/LastMessagePreviewRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/LastMessagePreview/LastMessagePreviewRequestBuilder.cs index 6c562262c76..488f99e1878 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/LastMessagePreview/LastMessagePreviewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/LastMessagePreview/LastMessagePreviewRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessageInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/MarkChatReadForUser/MarkChatReadForUserPostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/MarkChatReadForUser/MarkChatReadForUserPostRequestBody.cs index 2b73af6b794..2ccfb10a3fb 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/MarkChatReadForUser/MarkChatReadForUserPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/MarkChatReadForUser/MarkChatReadForUserPostRequestBody.cs @@ -69,7 +69,7 @@ public MarkChatReadForUserPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.MarkChatReadForUser.MarkChatReadForUserPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.MarkChatReadForUser.MarkChatReadForUserPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("tenantId", TenantId); writer.WriteObjectValue("user", User); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/MarkChatReadForUser/MarkChatReadForUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/MarkChatReadForUser/MarkChatReadForUserRequestBuilder.cs index c1345bb0282..51fa37e322c 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/MarkChatReadForUser/MarkChatReadForUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/MarkChatReadForUser/MarkChatReadForUserRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.MarkChatRead public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.MarkChatReadForUser.MarkChatReadForUserPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.MarkChatReadForUser.MarkChatReadForUserPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserPostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserPostRequestBody.cs index ccbf18ed16c..f3eb4f3ba21 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserPostRequestBody.cs @@ -75,7 +75,7 @@ public MarkChatUnreadForUserPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.MarkChatUnreadForUser.MarkChatUnreadForUserPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.MarkChatUnreadForUser.MarkChatUnreadForUserPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastMessageReadDateTime", LastMessageReadDateTime); writer.WriteStringValue("tenantId", TenantId); writer.WriteObjectValue("user", User); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserRequestBuilder.cs index 34d4d001765..c9ad51e8c6f 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.MarkChatUnre public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.MarkChatUnreadForUser.MarkChatUnreadForUserPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.MarkChatUnreadForUser.MarkChatUnreadForUserPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddPostRequestBody.cs index c24508dade1..adf29318b8b 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddPostRequestBody.cs @@ -53,7 +53,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.Members.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Members.Add.AddPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddPostResponse.cs b/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddPostResponse.cs index ebe103e4dac..728c1a9b650 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddPostResponse.cs @@ -36,7 +36,7 @@ public partial class AddPostResponse : global::Microsoft.Graph.Beta.Models.BaseC /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.Item.Members.Add.AddPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Members.Add.AddPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddRequestBuilder.cs index 64435339aa3..c2a69ac61ca 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddRequestBuilder.cs @@ -51,7 +51,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsAddPostResponseAsync(global::Microsoft.Graph.Beta.Chats.Item.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddResponse.cs b/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddResponse.cs index 4c97e37827d..805a809165a 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Members/Add/AddResponse.cs @@ -20,7 +20,7 @@ public partial class AddResponse : global::Microsoft.Graph.Beta.Chats.Item.Membe /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.Item.Members.Add.AddResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Members.Add.AddResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs index 0bbc8313b07..bd31741b415 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Members/MembersRequestBuilder.cs index 0af1050481b..ac6a6f1c3fb 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Members/MembersRequestBuilder.cs @@ -106,7 +106,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemovePostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemovePostRequestBody.cs index aba25e18e56..7032d67f1f4 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemovePostRequestBody.cs @@ -53,7 +53,7 @@ public RemovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.Members.Remove.RemovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Members.Remove.RemovePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemovePostResponse.cs b/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemovePostResponse.cs index 1411bc0a92e..775a3c2ee69 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemovePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemovePostResponse.cs @@ -36,7 +36,7 @@ public partial class RemovePostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.Item.Members.Remove.RemovePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Members.Remove.RemovePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemoveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemoveRequestBuilder.cs index 3a4c5a7fbeb..b1e65bb7c99 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemoveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemoveRequestBuilder.cs @@ -51,7 +51,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsRemovePostResponseAsync(global::Microsoft.Graph.Beta.Chats.Item.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemoveResponse.cs b/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemoveResponse.cs index 9054950e5a9..afaa9a1f1df 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemoveResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Members/Remove/RemoveResponse.cs @@ -20,7 +20,7 @@ public partial class RemoveResponse : global::Microsoft.Graph.Beta.Chats.Item.Me /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.Item.Members.Remove.RemoveResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Members.Remove.RemoveResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Delta/DeltaGetResponse.cs index 38f8f9668a5..ec2ee3b833f 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.Item.Messages.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Delta/DeltaResponse.cs index b919df65107..52a45f4b2ab 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Chats.Item.Mes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.Item.Messages.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs index e0b4595901f..f99a5815a25 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs @@ -85,7 +85,7 @@ public ForwardToChatPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("additionalMessage", AdditionalMessage); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteCollectionOfPrimitiveValues("targetChatIds", TargetChatIds); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatPostResponse.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatPostResponse.cs index 9c4d856d426..1ce8a25b24d 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatPostResponse.cs @@ -36,7 +36,7 @@ public partial class ForwardToChatPostResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.Item.Messages.ForwardToChat.ForwardToChatPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.ForwardToChat.ForwardToChatPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs index e343fa03bef..8984f772dde 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs @@ -51,7 +51,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsForwardToChatPostResponseAsync(global::Microsoft.Graph.Beta.Chats.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatResponse.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatResponse.cs index a3a16ddec89..cfb7e2170a8 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/ForwardToChat/ForwardToChatResponse.cs @@ -20,7 +20,7 @@ public partial class ForwardToChatResponse : global::Microsoft.Graph.Beta.Chats. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.Item.Messages.ForwardToChat.ForwardToChatResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.ForwardToChat.ForwardToChatResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/ChatMessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/ChatMessageItemRequestBuilder.cs index e86ddd71708..fff77a44bf5 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/ChatMessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/ChatMessageItemRequestBuilder.cs @@ -133,7 +133,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -194,7 +194,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs index d3c5e2c4e12..c991eb03dd1 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs @@ -94,7 +94,7 @@ public HostedContentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs index 6d1925b7086..f767ee0464b 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs index 6e45503b69d..2ff91615e1d 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Delta/DeltaGetResponse.cs index 4ccdebee93e..efe4c7cb8cd 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Delta/DeltaResponse.cs index 8d9da1a7649..e44246951b7 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Chats.Item.Mes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs index 14a1dd6cceb..5d96eba84b6 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs @@ -85,7 +85,7 @@ public ForwardToChatPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("additionalMessage", AdditionalMessage); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteCollectionOfPrimitiveValues("targetChatIds", TargetChatIds); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs index 53364f5ad10..afd37c22e03 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs @@ -36,7 +36,7 @@ public partial class ForwardToChatPostResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs index 3bb32767456..6a4e9d99679 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs @@ -51,7 +51,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsForwardToChatPostResponseAsync(global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs index bfdbbfdbb16..838f291d0e5 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs @@ -20,7 +20,7 @@ public partial class ForwardToChatResponse : global::Microsoft.Graph.Beta.Chats. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs index 86df99e8390..cfd2b55c86a 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs index 924ce0fa92e..9ec41ab6682 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs @@ -93,7 +93,7 @@ public HostedContentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs index 1cde5678858..aaacd805b7f 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs index 14d7f4da0f2..5c41b2a1cb1 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs index a9e16b1bdf9..bf169213706 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public SetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs index c929b481c9c..1a6d791aee5 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.Messages.Ite public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs index 59b216967d8..8031cc70a03 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public UnsetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs index f8de0f2434a..23e855a7672 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.Messages.Ite public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index c3e1a766617..7874d5e4c73 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -111,7 +111,7 @@ public RepliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs index ffdeedbd9ae..9b03ecaddef 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs @@ -69,7 +69,7 @@ public ReplyWithQuotePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteObjectValue("replyMessage", ReplyMessage); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs index cf7c06c1a94..44e8e51a636 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs @@ -52,7 +52,7 @@ public ReplyWithQuoteRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.cs index 87fd7a0183c..dce595a6eb7 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public SetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.SetReaction.SetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.SetReaction.SetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.cs index ccf22fd3ac9..50fa1286894 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.Messages.Ite public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs index ba7fa99a272..9f088dfc770 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public UnsetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs index ead59224e7e..33046a56d6d 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.Messages.Ite public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs index 90b6d2b3beb..d859c6461e9 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs @@ -113,7 +113,7 @@ public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -155,7 +155,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs index 0fa0bbecaa4..21c1b757767 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs @@ -69,7 +69,7 @@ public ReplyWithQuotePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteObjectValue("replyMessage", ReplyMessage); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs index 9c332a0fcc1..f209ef73915 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs @@ -52,7 +52,7 @@ public ReplyWithQuoteRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Operations/Item/TeamsAsyncOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Operations/Item/TeamsAsyncOperationItemRequestBuilder.cs index f8cd97396d2..4a6281f88a7 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Operations/Item/TeamsAsyncOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Operations/Item/TeamsAsyncOperationItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsAsyncOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAsyncOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Operations/OperationsRequestBuilder.cs index 93c00473838..7def2b74358 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Operations/OperationsRequestBuilder.cs @@ -94,7 +94,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamsAsyncOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAsyncOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs index 3c363c6614f..8c758e9de21 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/PermissionGrants/PermissionGrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/PermissionGrants/PermissionGrantsRequestBuilder.cs index ac4151dc34d..ad344a7ee40 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/PermissionGrants/PermissionGrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/PermissionGrants/PermissionGrantsRequestBuilder.cs @@ -94,7 +94,7 @@ public PermissionGrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/PinnedMessages/Item/PinnedChatMessageInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/PinnedMessages/Item/PinnedChatMessageInfoItemRequestBuilder.cs index 97e9bb7fb94..2b74a5566c4 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/PinnedMessages/Item/PinnedChatMessageInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/PinnedMessages/Item/PinnedChatMessageInfoItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PinnedChatMessageInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PinnedChatMessageInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/PinnedMessages/PinnedMessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/PinnedMessages/PinnedMessagesRequestBuilder.cs index 9b73e3a73fe..514567f7d26 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/PinnedMessages/PinnedMessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/PinnedMessages/PinnedMessagesRequestBuilder.cs @@ -95,7 +95,7 @@ public PinnedMessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PinnedChatMessageInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PinnedChatMessageInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserPostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserPostRequestBody.cs index 1475b922342..7af075cc42b 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserPostRequestBody.cs @@ -53,7 +53,7 @@ public RemoveAllAccessForUserPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.RemoveAllAccessForUser.RemoveAllAccessForUserPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.RemoveAllAccessForUser.RemoveAllAccessForUserPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("user", User); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserRequestBuilder.cs index b188ca7435b..e2f3e632f54 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.RemoveAllAcc public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.RemoveAllAccessForUser.RemoveAllAccessForUserPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.RemoveAllAccessForUser.RemoveAllAccessForUserPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/SendActivityNotification/SendActivityNotificationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/SendActivityNotification/SendActivityNotificationPostRequestBody.cs index 07b23cbef41..4745bfc9617 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/SendActivityNotification/SendActivityNotificationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/SendActivityNotification/SendActivityNotificationPostRequestBody.cs @@ -155,7 +155,7 @@ public SendActivityNotificationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.SendActivityNotification.SendActivityNotificationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.SendActivityNotification.SendActivityNotificationPostRequestBody(); } /// @@ -182,7 +182,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("activityType", ActivityType); writer.WriteLongValue("chainId", ChainId); writer.WriteStringValue("iconId", IconId); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/SendActivityNotification/SendActivityNotificationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/SendActivityNotification/SendActivityNotificationRequestBuilder.cs index 442f0f0a79f..4266aeceda1 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/SendActivityNotification/SendActivityNotificationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/SendActivityNotification/SendActivityNotificationRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.SendActivity public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.SendActivityNotification.SendActivityNotificationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.SendActivityNotification.SendActivityNotificationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Tabs/Item/TeamsTabItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Tabs/Item/TeamsTabItemRequestBuilder.cs index b6086c58d07..da12fd71939 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Tabs/Item/TeamsTabItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Tabs/Item/TeamsTabItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Tabs/TabsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Tabs/TabsRequestBuilder.cs index 09790bb6699..8c86a1d0e3b 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Tabs/TabsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Tabs/TabsRequestBuilder.cs @@ -95,7 +95,7 @@ public TabsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/UnhideForUser/UnhideForUserPostRequestBody.cs b/src/Microsoft.Graph/Generated/Chats/Item/UnhideForUser/UnhideForUserPostRequestBody.cs index d6d1a978c92..f1c55f9a7b9 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/UnhideForUser/UnhideForUserPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/UnhideForUser/UnhideForUserPostRequestBody.cs @@ -69,7 +69,7 @@ public UnhideForUserPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Chats.Item.UnhideForUser.UnhideForUserPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Chats.Item.UnhideForUser.UnhideForUserPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("tenantId", TenantId); writer.WriteObjectValue("user", User); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/UnhideForUser/UnhideForUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/UnhideForUser/UnhideForUserRequestBuilder.cs index 1fdd0d25d67..023227a0dd7 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/UnhideForUser/UnhideForUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/UnhideForUser/UnhideForUserRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.UnhideForUse public async Task PostAsync(global::Microsoft.Graph.Beta.Chats.Item.UnhideForUser.UnhideForUserPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Chats.Item.UnhideForUser.UnhideForUserPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Commands/CommandsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Commands/CommandsRequestBuilder.cs index 87b07809ea0..ce58c2a88f1 100644 --- a/src/Microsoft.Graph/Generated/Commands/CommandsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Commands/CommandsRequestBuilder.cs @@ -93,7 +93,7 @@ public CommandsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Command body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Command body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Commands/Item/CommandItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Commands/Item/CommandItemRequestBuilder.cs index 4bd2d2af118..70d8d240ad3 100644 --- a/src/Microsoft.Graph/Generated/Commands/Item/CommandItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Commands/Item/CommandItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Command body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Command body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsRequestBuilder.cs index e4a8f821032..a64f2d16a93 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/CallRecordsRequestBuilder.cs @@ -90,8 +90,8 @@ public CallRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Usage: toDateTime={toDateTime} public global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime.MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime(DateTimeOffset? fromDateTime, DateTimeOffset? toDateTime) { - _ = fromDateTime ?? throw new ArgumentNullException(nameof(fromDateTime)); - _ = toDateTime ?? throw new ArgumentNullException(nameof(toDateTime)); + if(ReferenceEquals(fromDateTime, null)) throw new ArgumentNullException(nameof(fromDateTime)); + if(ReferenceEquals(toDateTime, null)) throw new ArgumentNullException(nameof(toDateTime)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime.MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTimeRequestBuilder(PathParameters, RequestAdapter, fromDateTime, toDateTime); } /// @@ -102,8 +102,8 @@ public CallRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Usage: toDateTime={toDateTime} public global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime.MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeRequestBuilder MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime(DateTimeOffset? fromDateTime, DateTimeOffset? toDateTime) { - _ = fromDateTime ?? throw new ArgumentNullException(nameof(fromDateTime)); - _ = toDateTime ?? throw new ArgumentNullException(nameof(toDateTime)); + if(ReferenceEquals(fromDateTime, null)) throw new ArgumentNullException(nameof(fromDateTime)); + if(ReferenceEquals(toDateTime, null)) throw new ArgumentNullException(nameof(toDateTime)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime.MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeRequestBuilder(PathParameters, RequestAdapter, fromDateTime, toDateTime); } /// @@ -114,8 +114,8 @@ public CallRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Usage: toDateTime={toDateTime} public global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime.MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime(DateTimeOffset? fromDateTime, DateTimeOffset? toDateTime) { - _ = fromDateTime ?? throw new ArgumentNullException(nameof(fromDateTime)); - _ = toDateTime ?? throw new ArgumentNullException(nameof(toDateTime)); + if(ReferenceEquals(fromDateTime, null)) throw new ArgumentNullException(nameof(fromDateTime)); + if(ReferenceEquals(toDateTime, null)) throw new ArgumentNullException(nameof(toDateTime)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime.MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTimeRequestBuilder(PathParameters, RequestAdapter, fromDateTime, toDateTime); } /// @@ -126,8 +126,8 @@ public CallRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Usage: toDateTime={toDateTime} public global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime.MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTimeRequestBuilder MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime(DateTimeOffset? fromDateTime, DateTimeOffset? toDateTime) { - _ = fromDateTime ?? throw new ArgumentNullException(nameof(fromDateTime)); - _ = toDateTime ?? throw new ArgumentNullException(nameof(toDateTime)); + if(ReferenceEquals(fromDateTime, null)) throw new ArgumentNullException(nameof(fromDateTime)); + if(ReferenceEquals(toDateTime, null)) throw new ArgumentNullException(nameof(toDateTime)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime.MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTimeRequestBuilder(PathParameters, RequestAdapter, fromDateTime, toDateTime); } /// @@ -138,8 +138,8 @@ public CallRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Usage: toDateTime={toDateTime} public global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime.MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTimeRequestBuilder MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime(DateTimeOffset? fromDateTime, DateTimeOffset? toDateTime) { - _ = fromDateTime ?? throw new ArgumentNullException(nameof(fromDateTime)); - _ = toDateTime ?? throw new ArgumentNullException(nameof(toDateTime)); + if(ReferenceEquals(fromDateTime, null)) throw new ArgumentNullException(nameof(fromDateTime)); + if(ReferenceEquals(toDateTime, null)) throw new ArgumentNullException(nameof(toDateTime)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime.MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTimeRequestBuilder(PathParameters, RequestAdapter, fromDateTime, toDateTime); } /// @@ -159,7 +159,7 @@ public CallRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CallRecords.CallRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -201,7 +201,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecords.CallRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/CallRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/CallRecordItemRequestBuilder.cs index ded92a4d40d..0baa924ecef 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/CallRecordItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/CallRecordItemRequestBuilder.cs @@ -115,7 +115,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallRecords.CallRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -176,7 +176,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecords.CallRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Organizer_v2/Organizer_v2RequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Organizer_v2/Organizer_v2RequestBuilder.cs index 6a238a34285..a74656423f6 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Organizer_v2/Organizer_v2RequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Organizer_v2/Organizer_v2RequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallRecords.Organizer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecords.Organizer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Participants_v2/Item/ParticipantItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Participants_v2/Item/ParticipantItemRequestBuilder.cs index 86399387d90..b37b126d191 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Participants_v2/Item/ParticipantItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Participants_v2/Item/ParticipantItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallRecords.Participant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecords.Participant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Participants_v2/Participants_v2RequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Participants_v2/Participants_v2RequestBuilder.cs index 54a15d7a812..ed190654fa7 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Participants_v2/Participants_v2RequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Participants_v2/Participants_v2RequestBuilder.cs @@ -94,7 +94,7 @@ public Participants_v2RequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CallRecords.Participant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecords.Participant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/Item/Segments/Item/SegmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/Item/Segments/Item/SegmentItemRequestBuilder.cs index 8e1d82ac7fe..ac6f339f093 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/Item/Segments/Item/SegmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/Item/Segments/Item/SegmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallRecords.Segment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecords.Segment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/Item/Segments/SegmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/Item/Segments/SegmentsRequestBuilder.cs index 0599b81ee8d..b25717f8226 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/Item/Segments/SegmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/Item/Segments/SegmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public SegmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CallRecords.Segment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecords.Segment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/Item/SessionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/Item/SessionItemRequestBuilder.cs index 126de62dbd1..5a1ccb9c4d6 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/Item/SessionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/Item/SessionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallRecords.Session body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecords.Session body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/SessionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/SessionsRequestBuilder.cs index d823d505391..f07e86f1d8e 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/SessionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/Item/Sessions/SessionsRequestBuilder.cs @@ -94,7 +94,7 @@ public SessionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CallRecords.Session body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecords.Session body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse.cs index 8661315c25a..4e28ef38d36 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetRespo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime.GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime.GetDirectRoutingCallsWithFromDateTimeWithToDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse.cs index f91e5eea76c..31963b28ebd 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime/GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime.GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetDirectRoutingCallsWithFromDateTimeWithToDateTime.GetDirectRoutingCallsWithFromDateTimeWithToDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime/GetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime/GetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeGetResponse.cs index 70b6fc6dffd..c3e5ff8d734 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime/GetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime/GetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class GetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeGetResp /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime.GetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime.GetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime/GetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime/GetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeResponse.cs index c05d16cc26d..8ee57630b9d 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime/GetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime/GetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime.GetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnBlockedUsersLogWithFromDateTimeWithToDateTime.GetPstnBlockedUsersLogWithFromDateTimeWithToDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse.cs index 84aeaea2847..0e5f03de312 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime.GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime.GetPstnCallsWithFromDateTimeWithToDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/GetPstnCallsWithFromDateTimeWithToDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/GetPstnCallsWithFromDateTimeWithToDateTimeResponse.cs index a90b803aad3..3402042353f 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/GetPstnCallsWithFromDateTimeWithToDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime/GetPstnCallsWithFromDateTimeWithToDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetPstnCallsWithFromDateTimeWithToDateTimeResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime.GetPstnCallsWithFromDateTimeWithToDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnCallsWithFromDateTimeWithToDateTime.GetPstnCallsWithFromDateTimeWithToDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime/GetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime/GetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTimeGetResponse.cs index 17aa6b34b99..a27b89444a4 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime/GetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime/GetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class GetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDate /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime.GetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime.GetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime/GetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime/GetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTimeResponse.cs index 29137490ab7..b5b1ba40f70 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime/GetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime/GetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDate /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime.GetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTime.GetPstnOnlineMeetingDialoutReportWithFromDateTimeWithToDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime/GetSmsLogWithFromDateTimeWithToDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime/GetSmsLogWithFromDateTimeWithToDateTimeGetResponse.cs index 65172bf374e..10773397658 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime/GetSmsLogWithFromDateTimeWithToDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime/GetSmsLogWithFromDateTimeWithToDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class GetSmsLogWithFromDateTimeWithToDateTimeGetResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime.GetSmsLogWithFromDateTimeWithToDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime.GetSmsLogWithFromDateTimeWithToDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime/GetSmsLogWithFromDateTimeWithToDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime/GetSmsLogWithFromDateTimeWithToDateTimeResponse.cs index 95ed6567a53..8cd38f7fa78 100644 --- a/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime/GetSmsLogWithFromDateTimeWithToDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/CallRecords/MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime/GetSmsLogWithFromDateTimeWithToDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetSmsLogWithFromDateTimeWithToDateTimeResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime.GetSmsLogWithFromDateTimeWithToDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.CallRecords.MicrosoftGraphCallRecordsGetSmsLogWithFromDateTimeWithToDateTime.GetSmsLogWithFromDateTimeWithToDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/CallsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/CallsRequestBuilder.cs index 92b8dda6550..24cbbe06214 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/CallsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/CallsRequestBuilder.cs @@ -100,7 +100,7 @@ public CallsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Call body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Call body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewPostRequestBody.cs index 6b34a8b1584..a493e3e6689 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewPostRequestBody.cs @@ -52,7 +52,7 @@ public AddLargeGalleryViewPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.AddLargeGalleryView.AddLargeGalleryViewPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.AddLargeGalleryView.AddLargeGalleryViewPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewRequestBuilder.cs index 4c83a1c03fc..2074782c913 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/AddLargeGalleryView/AddLargeGalleryViewRequestBuilder.cs @@ -52,7 +52,7 @@ public AddLargeGalleryViewRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.AddLargeGalleryView.AddLargeGalleryViewPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.AddLargeGalleryView.AddLargeGalleryViewPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Answer/AnswerPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Answer/AnswerPostRequestBody.cs index b823fa05d53..e5a5af7afc9 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Answer/AnswerPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Answer/AnswerPostRequestBody.cs @@ -107,7 +107,7 @@ public AnswerPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.Answer.AnswerPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.Answer.AnswerPostRequestBody(); } /// @@ -131,7 +131,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfEnumValues("acceptedModalities", AcceptedModalities); writer.WriteStringValue("callbackUri", CallbackUri); writer.WriteObjectValue("callOptions", CallOptions); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Answer/AnswerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Answer/AnswerRequestBuilder.cs index 9300f3e6512..2aff887e806 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Answer/AnswerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Answer/AnswerRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.It public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.Answer.AnswerPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.Answer.AnswerPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/AudioRoutingGroups/AudioRoutingGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/AudioRoutingGroups/AudioRoutingGroupsRequestBuilder.cs index 442c852fe92..166be94e904 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/AudioRoutingGroups/AudioRoutingGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/AudioRoutingGroups/AudioRoutingGroupsRequestBuilder.cs @@ -95,7 +95,7 @@ public AudioRoutingGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AudioRoutingGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AudioRoutingGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/AudioRoutingGroups/Item/AudioRoutingGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/AudioRoutingGroups/Item/AudioRoutingGroupItemRequestBuilder.cs index 5f065bf2675..ba10dc6c6b5 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/AudioRoutingGroups/Item/AudioRoutingGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/AudioRoutingGroups/Item/AudioRoutingGroupItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AudioRoutingGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AudioRoutingGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/CallItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/CallItemRequestBuilder.cs index de77d14c048..2e2c993d555 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/CallItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/CallItemRequestBuilder.cs @@ -242,7 +242,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Call body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -303,7 +303,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Call body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/CancelMediaProcessing/CancelMediaProcessingPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/CancelMediaProcessing/CancelMediaProcessingPostRequestBody.cs index 425ec043fb6..95f6cd6ea7c 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/CancelMediaProcessing/CancelMediaProcessingPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/CancelMediaProcessing/CancelMediaProcessingPostRequestBody.cs @@ -52,7 +52,7 @@ public CancelMediaProcessingPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.CancelMediaProcessing.CancelMediaProcessingPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.CancelMediaProcessing.CancelMediaProcessingPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/CancelMediaProcessing/CancelMediaProcessingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/CancelMediaProcessing/CancelMediaProcessingRequestBuilder.cs index 6ca138b5afc..b5f6ab7d316 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/CancelMediaProcessing/CancelMediaProcessingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/CancelMediaProcessing/CancelMediaProcessingRequestBuilder.cs @@ -52,7 +52,7 @@ public CancelMediaProcessingRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.CancelMediaProcessing.CancelMediaProcessingPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.CancelMediaProcessing.CancelMediaProcessingPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRolePostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRolePostRequestBody.cs index 6a7b59598d0..a185417b91f 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRolePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRolePostRequestBody.cs @@ -43,7 +43,7 @@ public ChangeScreenSharingRolePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.ChangeScreenSharingRole.ChangeScreenSharingRolePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.ChangeScreenSharingRole.ChangeScreenSharingRolePostRequestBody(); } /// @@ -63,7 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("role", Role); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRoleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRoleRequestBuilder.cs index d499d00b000..ee941fb0471 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRoleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/ChangeScreenSharingRole/ChangeScreenSharingRoleRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.It public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.ChangeScreenSharingRole.ChangeScreenSharingRolePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.ChangeScreenSharingRole.ChangeScreenSharingRolePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/ContentSharingSessions/ContentSharingSessionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/ContentSharingSessions/ContentSharingSessionsRequestBuilder.cs index a64dec35d11..b388f8988bf 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/ContentSharingSessions/ContentSharingSessionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/ContentSharingSessions/ContentSharingSessionsRequestBuilder.cs @@ -94,7 +94,7 @@ public ContentSharingSessionsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ContentSharingSession body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ContentSharingSession body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/ContentSharingSessions/Item/ContentSharingSessionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/ContentSharingSessions/Item/ContentSharingSessionItemRequestBuilder.cs index 4f60ca9d83e..7b07b3d04dd 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/ContentSharingSessions/Item/ContentSharingSessionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/ContentSharingSessions/Item/ContentSharingSessionItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ContentSharingSession body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ContentSharingSession body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/ContentSharingSessions/Item/PngOfCurrentSlide/PngOfCurrentSlideRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/ContentSharingSessions/Item/PngOfCurrentSlide/PngOfCurrentSlideRequestBuilder.cs index 90eacf22c2f..00c49ebe16b 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/ContentSharingSessions/Item/PngOfCurrentSlide/PngOfCurrentSlideRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/ContentSharingSessions/Item/PngOfCurrentSlide/PngOfCurrentSlideRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Mute/MutePostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Mute/MutePostRequestBody.cs index 29f304ff070..885153045d5 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Mute/MutePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Mute/MutePostRequestBody.cs @@ -52,7 +52,7 @@ public MutePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.Mute.MutePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.Mute.MutePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Mute/MuteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Mute/MuteRequestBuilder.cs index df1a6a3f6f7..6bcaa47ad23 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Mute/MuteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Mute/MuteRequestBuilder.cs @@ -52,7 +52,7 @@ public MuteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.Mute.MutePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.Mute.MutePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Operations/Item/CommsOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Operations/Item/CommsOperationItemRequestBuilder.cs index 1a1ccd4a933..ee33aa83f12 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Operations/Item/CommsOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Operations/Item/CommsOperationItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CommsOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CommsOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Operations/OperationsRequestBuilder.cs index 246060e1199..027f39dcc36 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CommsOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CommsOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InvitePostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InvitePostRequestBody.cs index e2dda4a7db0..bd1a4a8f5fb 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InvitePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InvitePostRequestBody.cs @@ -69,7 +69,7 @@ public InvitePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Invite.InvitePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Invite.InvitePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteCollectionOfObjectValues("participants", Participants); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs index 999f332811c..acbf7467057 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs @@ -35,8 +35,8 @@ public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas { } /// - /// Invite participants to the active call. For more information about how to handle operations, see commsOperation. - /// Find more info here + /// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. + /// Find more info here /// /// A /// The request body @@ -52,7 +52,7 @@ public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Invite.InvitePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -61,7 +61,7 @@ public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.InviteParticipantsOperation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Invite participants to the active call. For more information about how to handle operations, see commsOperation. + /// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. /// /// A /// The request body @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Invite.InvitePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/Mute/MutePostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/Mute/MutePostRequestBody.cs index 859e23ac514..5111d77bb18 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/Mute/MutePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/Mute/MutePostRequestBody.cs @@ -52,7 +52,7 @@ public MutePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Item.Mute.MutePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Item.Mute.MutePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/Mute/MuteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/Mute/MuteRequestBuilder.cs index cbefb03d4fd..3c66f5e1754 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/Mute/MuteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/Mute/MuteRequestBuilder.cs @@ -52,7 +52,7 @@ public MuteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Item.Mute.MutePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Item.Mute.MutePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/ParticipantItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/ParticipantItemRequestBuilder.cs index bf3edc6a3ef..425c4712dc8 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/ParticipantItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/ParticipantItemRequestBuilder.cs @@ -116,7 +116,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Participant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Participant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicPostRequestBody.cs index 8a631dc8f23..e47334d6375 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicPostRequestBody.cs @@ -69,7 +69,7 @@ public StartHoldMusicPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Item.StartHoldMusic.StartHoldMusicPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Item.StartHoldMusic.StartHoldMusicPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteObjectValue("customPrompt", CustomPrompt); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicRequestBuilder.cs index bcf091447c1..84f6a7d262f 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StartHoldMusic/StartHoldMusicRequestBuilder.cs @@ -52,7 +52,7 @@ public StartHoldMusicRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Item.StartHoldMusic.StartHoldMusicPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Item.StartHoldMusic.StartHoldMusicPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicPostRequestBody.cs index 39e4efa49df..45c96ba4ee9 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicPostRequestBody.cs @@ -52,7 +52,7 @@ public StopHoldMusicPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Item.StopHoldMusic.StopHoldMusicPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Item.StopHoldMusic.StopHoldMusicPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicRequestBuilder.cs index 313b8507a76..4b4170fb04d 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Item/StopHoldMusic/StopHoldMusicRequestBuilder.cs @@ -52,7 +52,7 @@ public StopHoldMusicRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Item.StopHoldMusic.StopHoldMusicPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.Item.StopHoldMusic.StopHoldMusicPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/MuteAll/MuteAllPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/MuteAll/MuteAllPostRequestBody.cs index 98bf11d35da..70f31d43148 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/MuteAll/MuteAllPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/MuteAll/MuteAllPostRequestBody.cs @@ -68,7 +68,7 @@ public MuteAllPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.MuteAll.MuteAllPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.MuteAll.MuteAllPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteCollectionOfPrimitiveValues("participants", Participants); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/MuteAll/MuteAllRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/MuteAll/MuteAllRequestBuilder.cs index 2d50adafc7a..9493c343df5 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/MuteAll/MuteAllRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/MuteAll/MuteAllRequestBuilder.cs @@ -52,7 +52,7 @@ public MuteAllRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.MuteAll.MuteAllPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.Participants.MuteAll.MuteAllPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/ParticipantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/ParticipantsRequestBuilder.cs index 2f13d483d0b..debe8ae2c6b 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/ParticipantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/ParticipantsRequestBuilder.cs @@ -106,7 +106,7 @@ public ParticipantsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Participant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Participant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/PlayPrompt/PlayPromptPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/PlayPrompt/PlayPromptPostRequestBody.cs index d560144d0c7..24a107ee17a 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/PlayPrompt/PlayPromptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/PlayPrompt/PlayPromptPostRequestBody.cs @@ -75,7 +75,7 @@ public PlayPromptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.PlayPrompt.PlayPromptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.PlayPrompt.PlayPromptPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteBoolValue("loop", Loop); writer.WriteCollectionOfObjectValues("prompts", Prompts); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/PlayPrompt/PlayPromptRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/PlayPrompt/PlayPromptRequestBuilder.cs index 678dddd936d..bc51025a2f4 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/PlayPrompt/PlayPromptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/PlayPrompt/PlayPromptRequestBuilder.cs @@ -52,7 +52,7 @@ public PlayPromptRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.PlayPrompt.PlayPromptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.PlayPrompt.PlayPromptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Record/RecordPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Record/RecordPostRequestBody.cs index 3243e92050b..ffdf7e61fa6 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Record/RecordPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Record/RecordPostRequestBody.cs @@ -121,7 +121,7 @@ public RecordPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.Record.RecordPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.Record.RecordPostRequestBody(); } /// @@ -149,7 +149,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("bargeInAllowed", BargeInAllowed); writer.WriteStringValue("clientContext", ClientContext); writer.WriteIntValue("initialSilenceTimeoutInSeconds", InitialSilenceTimeoutInSeconds); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Record/RecordRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Record/RecordRequestBuilder.cs index 3171dbd6206..45721279470 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Record/RecordRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Record/RecordRequestBuilder.cs @@ -51,7 +51,7 @@ public RecordRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.Record.RecordPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.Record.RecordPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/RecordResponse/RecordResponsePostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/RecordResponse/RecordResponsePostRequestBody.cs index 52d09cfd5d2..24632f7698f 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/RecordResponse/RecordResponsePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/RecordResponse/RecordResponsePostRequestBody.cs @@ -121,7 +121,7 @@ public RecordResponsePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.RecordResponse.RecordResponsePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.RecordResponse.RecordResponsePostRequestBody(); } /// @@ -149,7 +149,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("bargeInAllowed", BargeInAllowed); writer.WriteStringValue("clientContext", ClientContext); writer.WriteIntValue("initialSilenceTimeoutInSeconds", InitialSilenceTimeoutInSeconds); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/RecordResponse/RecordResponseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/RecordResponse/RecordResponseRequestBuilder.cs index f3be836c91d..a49644e0847 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/RecordResponse/RecordResponseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/RecordResponse/RecordResponseRequestBuilder.cs @@ -52,7 +52,7 @@ public RecordResponseRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.RecordResponse.RecordResponsePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.RecordResponse.RecordResponsePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Redirect/RedirectPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Redirect/RedirectPostRequestBody.cs index 1d345e69e61..21a814bc81c 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Redirect/RedirectPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Redirect/RedirectPostRequestBody.cs @@ -93,7 +93,7 @@ public RedirectPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.Redirect.RedirectPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.Redirect.RedirectPostRequestBody(); } /// @@ -118,7 +118,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("callbackUri", CallbackUri); writer.WriteBoolValue("maskCallee", MaskCallee); writer.WriteBoolValue("maskCaller", MaskCaller); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Redirect/RedirectRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Redirect/RedirectRequestBuilder.cs index 3a9df267149..dd0cc195b08 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Redirect/RedirectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Redirect/RedirectRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.It public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.Redirect.RedirectPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.Redirect.RedirectPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Reject/RejectPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Reject/RejectPostRequestBody.cs index 161d538f8a6..13a31eeeb73 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Reject/RejectPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Reject/RejectPostRequestBody.cs @@ -59,7 +59,7 @@ public RejectPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.Reject.RejectPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.Reject.RejectPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("callbackUri", CallbackUri); writer.WriteEnumValue("reason", Reason); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Reject/RejectRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Reject/RejectRequestBuilder.cs index e6b0dab0aec..c7cec92d768 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Reject/RejectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Reject/RejectRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.It public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.Reject.RejectPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.Reject.RejectPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/SendDtmfTones/SendDtmfTonesPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/SendDtmfTones/SendDtmfTonesPostRequestBody.cs index 30f93d0be81..7ec39ad036d 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/SendDtmfTones/SendDtmfTonesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/SendDtmfTones/SendDtmfTonesPostRequestBody.cs @@ -75,7 +75,7 @@ public SendDtmfTonesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.SendDtmfTones.SendDtmfTonesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.SendDtmfTones.SendDtmfTonesPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteIntValue("delayBetweenTonesMs", DelayBetweenTonesMs); writer.WriteCollectionOfEnumValues("tones", Tones); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/SendDtmfTones/SendDtmfTonesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/SendDtmfTones/SendDtmfTonesRequestBuilder.cs index 7d829d28e85..51c7bf064c0 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/SendDtmfTones/SendDtmfTonesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/SendDtmfTones/SendDtmfTonesRequestBuilder.cs @@ -51,7 +51,7 @@ public SendDtmfTonesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.SendDtmfTones.SendDtmfTonesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.SendDtmfTones.SendDtmfTonesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartRecording/StartRecordingPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartRecording/StartRecordingPostRequestBody.cs index 5fc89142d36..cb7458c12a7 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartRecording/StartRecordingPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartRecording/StartRecordingPostRequestBody.cs @@ -52,7 +52,7 @@ public StartRecordingPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.StartRecording.StartRecordingPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.StartRecording.StartRecordingPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartRecording/StartRecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartRecording/StartRecordingRequestBuilder.cs index fe9b2609f3e..62625f15a0d 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartRecording/StartRecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartRecording/StartRecordingRequestBuilder.cs @@ -51,7 +51,7 @@ public StartRecordingRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.StartRecording.StartRecordingPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.StartRecording.StartRecordingPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartTranscription/StartTranscriptionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartTranscription/StartTranscriptionPostRequestBody.cs index e2ce459b19e..bc4c6b90326 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartTranscription/StartTranscriptionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartTranscription/StartTranscriptionPostRequestBody.cs @@ -68,7 +68,7 @@ public StartTranscriptionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.StartTranscription.StartTranscriptionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.StartTranscription.StartTranscriptionPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteStringValue("language", Language); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartTranscription/StartTranscriptionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartTranscription/StartTranscriptionRequestBuilder.cs index f3f539c7c07..5a8696bd9a4 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartTranscription/StartTranscriptionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StartTranscription/StartTranscriptionRequestBuilder.cs @@ -51,7 +51,7 @@ public StartTranscriptionRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.StartTranscription.StartTranscriptionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.StartTranscription.StartTranscriptionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopRecording/StopRecordingPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopRecording/StopRecordingPostRequestBody.cs index 7d5d043f16b..12860fcbd4b 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopRecording/StopRecordingPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopRecording/StopRecordingPostRequestBody.cs @@ -52,7 +52,7 @@ public StopRecordingPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.StopRecording.StopRecordingPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.StopRecording.StopRecordingPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopRecording/StopRecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopRecording/StopRecordingRequestBuilder.cs index a996355f0ea..96483eebe7c 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopRecording/StopRecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopRecording/StopRecordingRequestBuilder.cs @@ -51,7 +51,7 @@ public StopRecordingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.StopRecording.StopRecordingPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.StopRecording.StopRecordingPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopTranscription/StopTranscriptionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopTranscription/StopTranscriptionPostRequestBody.cs index 39958c9ba85..90f0079f930 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopTranscription/StopTranscriptionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopTranscription/StopTranscriptionPostRequestBody.cs @@ -68,7 +68,7 @@ public StopTranscriptionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.StopTranscription.StopTranscriptionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.StopTranscription.StopTranscriptionPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteStringValue("language", Language); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopTranscription/StopTranscriptionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopTranscription/StopTranscriptionRequestBuilder.cs index ba184a0fec4..43b39320218 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopTranscription/StopTranscriptionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/StopTranscription/StopTranscriptionRequestBuilder.cs @@ -51,7 +51,7 @@ public StopTranscriptionRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.StopTranscription.StopTranscriptionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.StopTranscription.StopTranscriptionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/SubscribeToTone/SubscribeToTonePostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/SubscribeToTone/SubscribeToTonePostRequestBody.cs index d5a8500d7f8..058859ce01d 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/SubscribeToTone/SubscribeToTonePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/SubscribeToTone/SubscribeToTonePostRequestBody.cs @@ -52,7 +52,7 @@ public SubscribeToTonePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.SubscribeToTone.SubscribeToTonePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.SubscribeToTone.SubscribeToTonePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/SubscribeToTone/SubscribeToToneRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/SubscribeToTone/SubscribeToToneRequestBuilder.cs index 60677b69b8e..a1eac9e9363 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/SubscribeToTone/SubscribeToToneRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/SubscribeToTone/SubscribeToToneRequestBuilder.cs @@ -52,7 +52,7 @@ public SubscribeToToneRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.SubscribeToTone.SubscribeToTonePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.SubscribeToTone.SubscribeToTonePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Transfer/TransferPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Transfer/TransferPostRequestBody.cs index 83a4f9da654..9175d56826e 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Transfer/TransferPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Transfer/TransferPostRequestBody.cs @@ -69,7 +69,7 @@ public TransferPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.Transfer.TransferPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.Transfer.TransferPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("transferee", Transferee); writer.WriteObjectValue("transferTarget", TransferTarget); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Transfer/TransferRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Transfer/TransferRequestBuilder.cs index e26a32a0047..69c41ab28cc 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Transfer/TransferRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Transfer/TransferRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.It public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.Transfer.TransferPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.Transfer.TransferPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Unmute/UnmutePostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Unmute/UnmutePostRequestBody.cs index 08146d61d89..fde338af59c 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Unmute/UnmutePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Unmute/UnmutePostRequestBody.cs @@ -52,7 +52,7 @@ public UnmutePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.Unmute.UnmutePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.Unmute.UnmutePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Unmute/UnmuteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Unmute/UnmuteRequestBuilder.cs index b2af7d54324..6c0f377dc43 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Unmute/UnmuteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Unmute/UnmuteRequestBuilder.cs @@ -52,7 +52,7 @@ public UnmuteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.Unmute.UnmutePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.Unmute.UnmutePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusPostRequestBody.cs index 56d3237eb33..f8c1ed9fdff 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusPostRequestBody.cs @@ -59,7 +59,7 @@ public UpdateRecordingStatusPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.Item.UpdateRecordingStatus.UpdateRecordingStatusPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.Item.UpdateRecordingStatus.UpdateRecordingStatusPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientContext", ClientContext); writer.WriteEnumValue("status", Status); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusRequestBuilder.cs index a0a1938236b..0f689cae2b2 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/UpdateRecordingStatus/UpdateRecordingStatusRequestBuilder.cs @@ -52,7 +52,7 @@ public UpdateRecordingStatusRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Item.UpdateRecordingStatus.UpdateRecordingStatusPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.Item.UpdateRecordingStatus.UpdateRecordingStatusPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityPostRequestBody.cs index 558d308d678..0299896c8c0 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityPostRequestBody.cs @@ -53,7 +53,7 @@ public LogTeleconferenceDeviceQualityPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Calls.LogTeleconferenceDeviceQuality.LogTeleconferenceDeviceQualityPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Calls.LogTeleconferenceDeviceQuality.LogTeleconferenceDeviceQualityPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("quality", Quality); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityRequestBuilder.cs index 5077cd599e8..905970fe723 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/LogTeleconferenceDeviceQuality/LogTeleconferenceDeviceQualityRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.Lo public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Calls.LogTeleconferenceDeviceQuality.LogTeleconferenceDeviceQualityPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Calls.LogTeleconferenceDeviceQuality.LogTeleconferenceDeviceQualityPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/CommunicationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/CommunicationsRequestBuilder.cs index a4715263668..a84b3d9f843 100644 --- a/src/Microsoft.Graph/Generated/Communications/CommunicationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/CommunicationsRequestBuilder.cs @@ -127,7 +127,7 @@ public CommunicationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.CloudCommunications body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudCommunications body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/GetAllOnlineMeetingMessages/GetAllOnlineMeetingMessagesGetResponse.cs b/src/Microsoft.Graph/Generated/Communications/GetAllOnlineMeetingMessages/GetAllOnlineMeetingMessagesGetResponse.cs index 8402ed1a1e3..d26c7f05140 100644 --- a/src/Microsoft.Graph/Generated/Communications/GetAllOnlineMeetingMessages/GetAllOnlineMeetingMessagesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/GetAllOnlineMeetingMessages/GetAllOnlineMeetingMessagesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllOnlineMeetingMessagesGetResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.GetAllOnlineMeetingMessages.GetAllOnlineMeetingMessagesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.GetAllOnlineMeetingMessages.GetAllOnlineMeetingMessagesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Communications/GetAllOnlineMeetingMessages/GetAllOnlineMeetingMessagesResponse.cs b/src/Microsoft.Graph/Generated/Communications/GetAllOnlineMeetingMessages/GetAllOnlineMeetingMessagesResponse.cs index ae1c55cf283..97c456d3c4a 100644 --- a/src/Microsoft.Graph/Generated/Communications/GetAllOnlineMeetingMessages/GetAllOnlineMeetingMessagesResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/GetAllOnlineMeetingMessages/GetAllOnlineMeetingMessagesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllOnlineMeetingMessagesResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.GetAllOnlineMeetingMessages.GetAllOnlineMeetingMessagesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.GetAllOnlineMeetingMessages.GetAllOnlineMeetingMessagesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdPostRequestBody.cs index ec8fe94ca96..9604c166a2f 100644 --- a/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdPostRequestBody.cs @@ -52,7 +52,7 @@ public GetPresencesByUserIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.GetPresencesByUserId.GetPresencesByUserIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.GetPresencesByUserId.GetPresencesByUserIdPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdPostResponse.cs b/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdPostResponse.cs index c83c96fe44c..cacf0af73ab 100644 --- a/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetPresencesByUserIdPostResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.GetPresencesByUserId.GetPresencesByUserIdPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.GetPresencesByUserId.GetPresencesByUserIdPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdRequestBuilder.cs index edd7fbbfb13..4ecccaac95c 100644 --- a/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdRequestBuilder.cs @@ -51,7 +51,7 @@ public GetPresencesByUserIdRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsGetPresencesByUserIdPostResponseAsync(global::Microsoft.Graph.Beta.Communications.GetPresencesByUserId.GetPresencesByUserIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetPresencesByUserIdRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.GetPresencesByUserId.GetPresencesByUserIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.GetPresencesByUserId.GetPresencesByUserIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdResponse.cs b/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdResponse.cs index 90a39e2222a..5cf3ed4e19e 100644 --- a/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/GetPresencesByUserId/GetPresencesByUserIdResponse.cs @@ -20,7 +20,7 @@ public partial class GetPresencesByUserIdResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.GetPresencesByUserId.GetPresencesByUserIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.GetPresencesByUserId.GetPresencesByUserIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/EngagementConversationMessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/EngagementConversationMessageItemRequestBuilder.cs index c453f8ef28e..89215149b25 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/EngagementConversationMessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/EngagementConversationMessageItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs index 36c57ce829f..7ed0cc9f00e 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Reactions/ReactionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Reactions/ReactionsRequestBuilder.cs index 362dd81f276..0428240589b 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Reactions/ReactionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Reactions/ReactionsRequestBuilder.cs @@ -94,7 +94,7 @@ public ReactionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/Item/EngagementConversationMessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/Item/EngagementConversationMessageItemRequestBuilder.cs index 747038fda01..9a95c167aba 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/Item/EngagementConversationMessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/Item/EngagementConversationMessageItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/Item/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/Item/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs index 9dcd03950ac..2115903a969 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/Item/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/Item/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/Item/Reactions/ReactionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/Item/Reactions/ReactionsRequestBuilder.cs index f9186280ee5..1d2991e85c0 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/Item/Reactions/ReactionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/Item/Reactions/ReactionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ReactionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index a63903e83d5..125b1534cfa 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -93,7 +93,7 @@ public RepliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/MessagesRequestBuilder.cs index 91d13081245..0621209522c 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Messages/MessagesRequestBuilder.cs @@ -93,7 +93,7 @@ public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/AlternativeRecording/AlternativeRecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/AlternativeRecording/AlternativeRecordingRequestBuilder.cs index 949c7caf60f..94d234dda99 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/AlternativeRecording/AlternativeRecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/AlternativeRecording/AlternativeRecordingRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/AttendeeReport/AttendeeReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/AttendeeReport/AttendeeReportRequestBuilder.cs index a810f344a07..cde553a6423 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/AttendeeReport/AttendeeReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/AttendeeReport/AttendeeReportRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/BroadcastRecording/BroadcastRecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/BroadcastRecording/BroadcastRecordingRequestBuilder.cs index fab15e38fc5..5d104caa585 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/BroadcastRecording/BroadcastRecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/BroadcastRecording/BroadcastRecordingRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/Recording/RecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/Recording/RecordingRequestBuilder.cs index 69dd7a1955e..b35b22c310a 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/Recording/RecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeeting/Recording/RecordingRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeetingEngagementConversationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeetingEngagementConversationItemRequestBuilder.cs index 539f9126547..6069bba4eda 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeetingEngagementConversationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/OnlineMeetingEngagementConversationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnlineMeetingEngagementConversation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnlineMeetingEngagementConversation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs index 40bede8823e..950cc96ab49 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Reactions/ReactionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Reactions/ReactionsRequestBuilder.cs index 029759f982d..2fc9c2c2e2e 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Reactions/ReactionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Reactions/ReactionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ReactionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/Item/EngagementConversationMessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/Item/EngagementConversationMessageItemRequestBuilder.cs index bf1859ff0df..af404a7b9f2 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/Item/EngagementConversationMessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/Item/EngagementConversationMessageItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/Item/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/Item/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs index ae530403acc..06161bc8521 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/Item/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/Item/Reactions/Item/EngagementConversationMessageReactionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/Item/Reactions/ReactionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/Item/Reactions/ReactionsRequestBuilder.cs index 167cc9406b2..31b7883fe58 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/Item/Reactions/ReactionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/Item/Reactions/ReactionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ReactionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/RepliesRequestBuilder.cs index a1df1f7b469..d8f577200b6 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/Replies/RepliesRequestBuilder.cs @@ -93,7 +93,7 @@ public RepliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/StarterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/StarterRequestBuilder.cs index 82c2d26e4a8..5b79bd2b261 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/StarterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/Item/Starter/StarterRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EngagementConversationMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementConversationMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/OnlineMeetingConversationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/OnlineMeetingConversationsRequestBuilder.cs index 1ad6e8f7457..d64717daece 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/OnlineMeetingConversationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingConversations/OnlineMeetingConversationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OnlineMeetingConversationsRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnlineMeetingEngagementConversation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnlineMeetingEngagementConversation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/CreateOrGet/CreateOrGetPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/CreateOrGet/CreateOrGetPostRequestBody.cs index 6c3b02a9328..fb62419c0da 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/CreateOrGet/CreateOrGetPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/CreateOrGet/CreateOrGetPostRequestBody.cs @@ -113,7 +113,7 @@ public CreateOrGetPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.OnlineMeetings.CreateOrGet.CreateOrGetPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.CreateOrGet.CreateOrGetPostRequestBody(); } /// @@ -138,7 +138,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("chatInfo", ChatInfo); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("externalId", ExternalId); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/CreateOrGet/CreateOrGetRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/CreateOrGet/CreateOrGetRequestBuilder.cs index f06148d5d2c..ce41af2bae9 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/CreateOrGet/CreateOrGetRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/CreateOrGet/CreateOrGetRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateOrGetRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.OnlineMeetings.CreateOrGet.CreateOrGetPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.OnlineMeetings.CreateOrGet.CreateOrGetPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs index 2043fffec22..8bd6d835a98 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserI /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs index 3e5fe31d536..a7397d62cf6 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserI /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs index 3eeedabd1ba..630de815665 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUser /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs index 7e9cb41163b..212ea49b56d 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUser /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AiInsights/AiInsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AiInsights/AiInsightsRequestBuilder.cs index 9ef864bb67d..daa99f56dd7 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AiInsights/AiInsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AiInsights/AiInsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public AiInsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CallAiInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CallAiInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AiInsights/Item/CallAiInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AiInsights/Item/CallAiInsightItemRequestBuilder.cs index 964017f975a..493eda2ee7d 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AiInsights/Item/CallAiInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AiInsights/Item/CallAiInsightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallAiInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallAiInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AlternativeRecording/AlternativeRecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AlternativeRecording/AlternativeRecordingRequestBuilder.cs index dfc2ac0649d..a1fd0709f6b 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AlternativeRecording/AlternativeRecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AlternativeRecording/AlternativeRecordingRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/AttendanceReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/AttendanceReportsRequestBuilder.cs index 094d998eecc..9d077bb6a85 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/AttendanceReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/AttendanceReportsRequestBuilder.cs @@ -93,7 +93,7 @@ public AttendanceReportsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/AttendanceRecordsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/AttendanceRecordsRequestBuilder.cs index d64eebb25de..b1988cb13bd 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/AttendanceRecordsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/AttendanceRecordsRequestBuilder.cs @@ -93,7 +93,7 @@ public AttendanceRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs index 7bd866a2d69..59df7290738 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/Item/MeetingAttendanceReportItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/Item/MeetingAttendanceReportItemRequestBuilder.cs index d0b86b0232f..c388c64e608 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/Item/MeetingAttendanceReportItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendanceReports/Item/MeetingAttendanceReportItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendeeReport/AttendeeReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendeeReport/AttendeeReportRequestBuilder.cs index 6cf86720a08..1c7061f7585 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendeeReport/AttendeeReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/AttendeeReport/AttendeeReportRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/BroadcastRecording/BroadcastRecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/BroadcastRecording/BroadcastRecordingRequestBuilder.cs index 52bda5dfb7b..1bf8b79fa9e 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/BroadcastRecording/BroadcastRecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/BroadcastRecording/BroadcastRecordingRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs index d90e04f9438..2930c6e90b1 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs @@ -52,7 +52,7 @@ public GetVirtualAppointmentJoinWebUrlGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs index 632e558d5d2..5955f0066ee 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs @@ -20,7 +20,7 @@ public partial class GetVirtualAppointmentJoinWebUrlResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/AttendanceRecordsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/AttendanceRecordsRequestBuilder.cs index 1c340b6bb0d..3f65a20ba8d 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/AttendanceRecordsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/AttendanceRecordsRequestBuilder.cs @@ -93,7 +93,7 @@ public AttendanceRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs index 0e3538c4a4c..405d43cf549 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/MeetingAttendanceReport/MeetingAttendanceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/MeetingAttendanceReport/MeetingAttendanceReportRequestBuilder.cs index 1b15c5b0e0b..3f5831bd7e1 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/MeetingAttendanceReport/MeetingAttendanceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/MeetingAttendanceReport/MeetingAttendanceReportRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/OnlineMeetingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/OnlineMeetingItemRequestBuilder.cs index 0e2d2729c5f..a6a7fa53967 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/OnlineMeetingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/OnlineMeetingItemRequestBuilder.cs @@ -174,7 +174,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -235,7 +235,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recording/RecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recording/RecordingRequestBuilder.cs index 28f97bdc161..55619369bef 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recording/RecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recording/RecordingRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Delta/DeltaGetResponse.cs index 1261d802c9a..43d556ede2a 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.Recordings.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.Recordings.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Delta/DeltaResponse.cs index 97576756cd8..7e26da8a6ed 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Communications /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.Recordings.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.Recordings.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Item/CallRecordingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Item/CallRecordingItemRequestBuilder.cs index d223d1a0ca1..a7fccccd071 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Item/CallRecordingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Item/CallRecordingItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallRecording body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecording body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Item/Content/ContentRequestBuilder.cs index b280f13d044..fdd7b240195 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/RecordingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/RecordingsRequestBuilder.cs index 6526d28b79b..a19075fd18a 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/RecordingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Recordings/RecordingsRequestBuilder.cs @@ -99,7 +99,7 @@ public RecordingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CallRecording body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecording body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/CustomQuestions/CustomQuestionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/CustomQuestions/CustomQuestionsRequestBuilder.cs index 92f88f69e92..c0adce76424 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/CustomQuestions/CustomQuestionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/CustomQuestions/CustomQuestionsRequestBuilder.cs @@ -97,7 +97,7 @@ public CustomQuestionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/CustomQuestions/Item/MeetingRegistrationQuestionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/CustomQuestions/Item/MeetingRegistrationQuestionItemRequestBuilder.cs index c7fc6c72eb1..8ba7ee89bb0 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/CustomQuestions/Item/MeetingRegistrationQuestionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/CustomQuestions/Item/MeetingRegistrationQuestionItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/Registrants/Item/MeetingRegistrantBaseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/Registrants/Item/MeetingRegistrantBaseItemRequestBuilder.cs index 38108243499..ce278d248ae 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/Registrants/Item/MeetingRegistrantBaseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/Registrants/Item/MeetingRegistrantBaseItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistrantBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistrantBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/Registrants/RegistrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/Registrants/RegistrantsRequestBuilder.cs index fe2eea2eafc..7806367bb9c 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/Registrants/RegistrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/Registrants/RegistrantsRequestBuilder.cs @@ -97,7 +97,7 @@ public RegistrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistrantBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistrantBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs index ad57394aaef..ffd20632283 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs index b94776f12a4..e586bafda1f 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs @@ -59,7 +59,7 @@ public SendVirtualAppointmentReminderSmsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendees", Attendees); writer.WriteEnumValue("remindBeforeTimeInMinutesType", RemindBeforeTimeInMinutesType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs index 84ec0c75db3..939c93456e4 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.OnlineMe public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs index 6115a4e3e34..5b7dbe1e872 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs @@ -59,7 +59,7 @@ public SendVirtualAppointmentSmsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendees", Attendees); writer.WriteEnumValue("messageType", MessageType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs index 8a8a105e59f..a916087ff77 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.OnlineMe public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Delta/DeltaGetResponse.cs index 2cb21af34ab..4952ef0863d 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.Transcripts.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.Transcripts.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Delta/DeltaResponse.cs index 46bd9d05a2b..341605fe1f0 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Communications /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.Transcripts.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetings.Item.Transcripts.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Item/CallTranscriptItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Item/CallTranscriptItemRequestBuilder.cs index c47339119b8..66de066bde1 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Item/CallTranscriptItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Item/CallTranscriptItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallTranscript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallTranscript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Item/Content/ContentRequestBuilder.cs index 86a804e94a0..01abbcc552b 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Item/MetadataContent/MetadataContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Item/MetadataContent/MetadataContentRequestBuilder.cs index 2ddfe0d9a53..30efd5d60f6 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Item/MetadataContent/MetadataContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/Item/MetadataContent/MetadataContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/TranscriptsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/TranscriptsRequestBuilder.cs index 774bc622f4b..75188c650dc 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/TranscriptsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/Item/Transcripts/TranscriptsRequestBuilder.cs @@ -99,7 +99,7 @@ public TranscriptsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CallTranscript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CallTranscript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/OnlineMeetingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/OnlineMeetingsRequestBuilder.cs index e9009450201..ef38e8eacf8 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/OnlineMeetingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetings/OnlineMeetingsRequestBuilder.cs @@ -112,7 +112,7 @@ public OnlineMeetingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -154,7 +154,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs index 8f5c8df8aab..16cf944807b 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs @@ -52,7 +52,7 @@ public GetVirtualAppointmentJoinWebUrlGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.OnlineMeetingsWithJoinWebUrl.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetingsWithJoinWebUrl.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs index 2caf0751e10..82a76dde17b 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs @@ -20,7 +20,7 @@ public partial class GetVirtualAppointmentJoinWebUrlResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Communications.OnlineMeetingsWithJoinWebUrl.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetingsWithJoinWebUrl.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/OnlineMeetingsWithJoinWebUrlRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/OnlineMeetingsWithJoinWebUrlRequestBuilder.cs index 88cf8967c74..4763f5a5b1f 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/OnlineMeetingsWithJoinWebUrlRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/OnlineMeetingsWithJoinWebUrlRequestBuilder.cs @@ -116,7 +116,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs index baef0b0d5da..a5be79ac0f0 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs @@ -59,7 +59,7 @@ public SendVirtualAppointmentReminderSmsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendees", Attendees); writer.WriteEnumValue("remindBeforeTimeInMinutesType", RemindBeforeTimeInMinutesType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs index 3d156d80cd8..10e4d29639e 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.OnlineMe public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs index 328d627fd80..b6cd09a9de6 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs @@ -59,7 +59,7 @@ public SendVirtualAppointmentSmsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendees", Attendees); writer.WriteEnumValue("messageType", MessageType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs index eb6ec56bb18..c5ab3b5f22a 100644 --- a/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.OnlineMe public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Presences/Item/ClearPresence/ClearPresencePostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Presences/Item/ClearPresence/ClearPresencePostRequestBody.cs index 8799450c58d..3cc9f602aff 100644 --- a/src/Microsoft.Graph/Generated/Communications/Presences/Item/ClearPresence/ClearPresencePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Presences/Item/ClearPresence/ClearPresencePostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPresencePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Presences.Item.ClearPresence.ClearPresencePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Presences.Item.ClearPresence.ClearPresencePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("sessionId", SessionId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/Presences/Item/ClearPresence/ClearPresenceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Presences/Item/ClearPresence/ClearPresenceRequestBuilder.cs index 147e42b128f..20f9f69345c 100644 --- a/src/Microsoft.Graph/Generated/Communications/Presences/Item/ClearPresence/ClearPresenceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Presences/Item/ClearPresence/ClearPresenceRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Presence public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Presences.Item.ClearPresence.ClearPresencePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Presences.Item.ClearPresence.ClearPresencePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Presences/Item/PresenceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Presences/Item/PresenceItemRequestBuilder.cs index 4e929072f2c..9dc6359460d 100644 --- a/src/Microsoft.Graph/Generated/Communications/Presences/Item/PresenceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Presences/Item/PresenceItemRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Presence body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -188,7 +188,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Presence body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetPresence/SetPresencePostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetPresence/SetPresencePostRequestBody.cs index 0450e8d7c7a..91d1bfe32c1 100644 --- a/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetPresence/SetPresencePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetPresence/SetPresencePostRequestBody.cs @@ -90,7 +90,7 @@ public SetPresencePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Presences.Item.SetPresence.SetPresencePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Presences.Item.SetPresence.SetPresencePostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("activity", Activity); writer.WriteStringValue("availability", Availability); writer.WriteTimeSpanValue("expirationDuration", ExpirationDuration); diff --git a/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetPresence/SetPresenceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetPresence/SetPresenceRequestBuilder.cs index fd1eaffc41e..040d06b9716 100644 --- a/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetPresence/SetPresenceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetPresence/SetPresenceRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Presence public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Presences.Item.SetPresence.SetPresencePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Presences.Item.SetPresence.SetPresencePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetStatusMessage/SetStatusMessagePostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetStatusMessage/SetStatusMessagePostRequestBody.cs index 15779a3aab1..13ed64f7e00 100644 --- a/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetStatusMessage/SetStatusMessagePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetStatusMessage/SetStatusMessagePostRequestBody.cs @@ -53,7 +53,7 @@ public SetStatusMessagePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Presences.Item.SetStatusMessage.SetStatusMessagePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Presences.Item.SetStatusMessage.SetStatusMessagePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("statusMessage", StatusMessage); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetStatusMessage/SetStatusMessageRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetStatusMessage/SetStatusMessageRequestBuilder.cs index ae117683188..c2b8f205a5a 100644 --- a/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetStatusMessage/SetStatusMessageRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetStatusMessage/SetStatusMessageRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Presence public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Presences.Item.SetStatusMessage.SetStatusMessagePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Presences.Item.SetStatusMessage.SetStatusMessagePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetUserPreferredPresence/SetUserPreferredPresencePostRequestBody.cs b/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetUserPreferredPresence/SetUserPreferredPresencePostRequestBody.cs index cdfe0fbe38f..80ed763236f 100644 --- a/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetUserPreferredPresence/SetUserPreferredPresencePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetUserPreferredPresence/SetUserPreferredPresencePostRequestBody.cs @@ -74,7 +74,7 @@ public SetUserPreferredPresencePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Communications.Presences.Item.SetUserPreferredPresence.SetUserPreferredPresencePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Communications.Presences.Item.SetUserPreferredPresence.SetUserPreferredPresencePostRequestBody(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("activity", Activity); writer.WriteStringValue("availability", Availability); writer.WriteTimeSpanValue("expirationDuration", ExpirationDuration); diff --git a/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetUserPreferredPresence/SetUserPreferredPresenceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetUserPreferredPresence/SetUserPreferredPresenceRequestBuilder.cs index c586a1a5478..dd4d998e654 100644 --- a/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetUserPreferredPresence/SetUserPreferredPresenceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Presences/Item/SetUserPreferredPresence/SetUserPreferredPresenceRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Presence public async Task PostAsync(global::Microsoft.Graph.Beta.Communications.Presences.Item.SetUserPreferredPresence.SetUserPreferredPresencePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Communications.Presences.Item.SetUserPreferredPresence.SetUserPreferredPresencePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Communications/Presences/PresencesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Presences/PresencesRequestBuilder.cs index dc896317600..47ec80f55d5 100644 --- a/src/Microsoft.Graph/Generated/Communications/Presences/PresencesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Presences/PresencesRequestBuilder.cs @@ -93,7 +93,7 @@ public PresencesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Presence body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Presence body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/ComplianceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/ComplianceRequestBuilder.cs index c05a7b406f7..4064875b1bb 100644 --- a/src/Microsoft.Graph/Generated/Compliance/ComplianceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/ComplianceRequestBuilder.cs @@ -80,7 +80,7 @@ public ComplianceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.Compliance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -122,7 +122,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Compliance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/CasesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/CasesRequestBuilder.cs index dc63557ae05..80644557e91 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/CasesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/CasesRequestBuilder.cs @@ -99,7 +99,7 @@ public CasesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.Case body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.Case body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/CaseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/CaseItemRequestBuilder.cs index 63ac234eca8..d184f053a36 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/CaseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/CaseItemRequestBuilder.cs @@ -172,7 +172,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.Case body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -236,7 +236,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.Case body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/CustodiansRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/CustodiansRequestBuilder.cs index 61e28a7fab9..48aeaab9e2f 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/CustodiansRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/CustodiansRequestBuilder.cs @@ -113,7 +113,7 @@ public CustodiansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.Custodian body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.Custodian body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/CustodianItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/CustodianItemRequestBuilder.cs index b30594fcb59..e190cab576a 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/CustodianItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/CustodianItemRequestBuilder.cs @@ -164,7 +164,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.Custodian body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -228,7 +228,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.Custodian body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/SiteSources/Item/SiteSourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/SiteSources/Item/SiteSourceItemRequestBuilder.cs index a73f81c4343..4a389e709b7 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/SiteSources/Item/SiteSourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/SiteSources/Item/SiteSourceItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.SiteSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.SiteSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/SiteSources/SiteSourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/SiteSources/SiteSourcesRequestBuilder.cs index ce4cfa87732..b3119175cf2 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/SiteSources/SiteSourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/SiteSources/SiteSourcesRequestBuilder.cs @@ -99,7 +99,7 @@ public SiteSourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.SiteSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.SiteSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UnifiedGroupSources/Item/UnifiedGroupSourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UnifiedGroupSources/Item/UnifiedGroupSourceItemRequestBuilder.cs index 57476ec2a3c..20c3e55e7fe 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UnifiedGroupSources/Item/UnifiedGroupSourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UnifiedGroupSources/Item/UnifiedGroupSourceItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.UnifiedGroupSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.UnifiedGroupSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UnifiedGroupSources/UnifiedGroupSourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UnifiedGroupSources/UnifiedGroupSourcesRequestBuilder.cs index 16c844cab20..ff3b4cf331d 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UnifiedGroupSources/UnifiedGroupSourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UnifiedGroupSources/UnifiedGroupSourcesRequestBuilder.cs @@ -99,7 +99,7 @@ public UnifiedGroupSourcesRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.UnifiedGroupSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.UnifiedGroupSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UserSources/Item/UserSourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UserSources/Item/UserSourceItemRequestBuilder.cs index 9ab350690f9..aae3116e98f 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UserSources/Item/UserSourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UserSources/Item/UserSourceItemRequestBuilder.cs @@ -101,7 +101,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.UserSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.UserSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UserSources/UserSourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UserSources/UserSourcesRequestBuilder.cs index 4b29aa6947e..8a85e2f0f68 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UserSources/UserSourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/Item/UserSources/UserSourcesRequestBuilder.cs @@ -99,7 +99,7 @@ public UserSourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.UserSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.UserSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryApplyHold/ApplyHoldPostRequestBody.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryApplyHold/ApplyHoldPostRequestBody.cs index 4c700116cc8..80fe5e1b996 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryApplyHold/ApplyHoldPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryApplyHold/ApplyHoldPostRequestBody.cs @@ -52,7 +52,7 @@ public ApplyHoldPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.Custodians.MicrosoftGraphEdiscoveryApplyHold.ApplyHoldPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.Custodians.MicrosoftGraphEdiscoveryApplyHold.ApplyHoldPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryApplyHold/MicrosoftGraphEdiscoveryApplyHoldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryApplyHold/MicrosoftGraphEdiscoveryApplyHoldRequestBuilder.cs index f486d7a932d..eacddb58304 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryApplyHold/MicrosoftGraphEdiscoveryApplyHoldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryApplyHold/MicrosoftGraphEdiscoveryApplyHoldRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Compliance.Ediscovery.C public async Task PostAsync(global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.Custodians.MicrosoftGraphEdiscoveryApplyHold.ApplyHoldPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.Custodians.MicrosoftGraphEdiscoveryApplyHold.ApplyHoldPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryRemoveHold/MicrosoftGraphEdiscoveryRemoveHoldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryRemoveHold/MicrosoftGraphEdiscoveryRemoveHoldRequestBuilder.cs index 429f2505419..17134e9b4dd 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryRemoveHold/MicrosoftGraphEdiscoveryRemoveHoldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryRemoveHold/MicrosoftGraphEdiscoveryRemoveHoldRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Compliance.Ediscovery.C public async Task PostAsync(global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.Custodians.MicrosoftGraphEdiscoveryRemoveHold.RemoveHoldPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.Custodians.MicrosoftGraphEdiscoveryRemoveHold.RemoveHoldPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryRemoveHold/RemoveHoldPostRequestBody.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryRemoveHold/RemoveHoldPostRequestBody.cs index 6ef865d689d..cd1266387e3 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryRemoveHold/RemoveHoldPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Custodians/MicrosoftGraphEdiscoveryRemoveHold/RemoveHoldPostRequestBody.cs @@ -52,7 +52,7 @@ public RemoveHoldPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.Custodians.MicrosoftGraphEdiscoveryRemoveHold.RemoveHoldPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.Custodians.MicrosoftGraphEdiscoveryRemoveHold.RemoveHoldPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/LegalHoldItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/LegalHoldItemRequestBuilder.cs index 06060bd7a65..e1e0540130e 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/LegalHoldItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/LegalHoldItemRequestBuilder.cs @@ -123,7 +123,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.LegalHold body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.LegalHold body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/SiteSources/Item/SiteSourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/SiteSources/Item/SiteSourceItemRequestBuilder.cs index b04a254caf9..26a9680b710 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/SiteSources/Item/SiteSourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/SiteSources/Item/SiteSourceItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.SiteSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.SiteSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/SiteSources/SiteSourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/SiteSources/SiteSourcesRequestBuilder.cs index e59bff8ca6f..0d3caf9ece1 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/SiteSources/SiteSourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/SiteSources/SiteSourcesRequestBuilder.cs @@ -99,7 +99,7 @@ public SiteSourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.SiteSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.SiteSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UnifiedGroupSources/Item/UnifiedGroupSourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UnifiedGroupSources/Item/UnifiedGroupSourceItemRequestBuilder.cs index 68b3b092512..973519a2540 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UnifiedGroupSources/Item/UnifiedGroupSourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UnifiedGroupSources/Item/UnifiedGroupSourceItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.UnifiedGroupSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.UnifiedGroupSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UnifiedGroupSources/UnifiedGroupSourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UnifiedGroupSources/UnifiedGroupSourcesRequestBuilder.cs index bfa889d6394..106306bc171 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UnifiedGroupSources/UnifiedGroupSourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UnifiedGroupSources/UnifiedGroupSourcesRequestBuilder.cs @@ -97,7 +97,7 @@ public UnifiedGroupSourcesRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.UnifiedGroupSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.UnifiedGroupSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UserSources/Item/UserSourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UserSources/Item/UserSourceItemRequestBuilder.cs index f14fa56f98c..74370f6a6ca 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UserSources/Item/UserSourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UserSources/Item/UserSourceItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.UserSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.UserSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UserSources/UserSourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UserSources/UserSourcesRequestBuilder.cs index 64b55d64c28..47f78f0e8cb 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UserSources/UserSourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/Item/UserSources/UserSourcesRequestBuilder.cs @@ -99,7 +99,7 @@ public UserSourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.UserSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.UserSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/LegalHoldsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/LegalHoldsRequestBuilder.cs index 670194b43bf..ed965f35e6e 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/LegalHoldsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/LegalHolds/LegalHoldsRequestBuilder.cs @@ -97,7 +97,7 @@ public LegalHoldsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.LegalHold body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.LegalHold body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/Item/DataSource/DataSourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/Item/DataSource/DataSourceRequestBuilder.cs index b266a5eef9a..a3505a3b0ce 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/Item/DataSource/DataSourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/Item/DataSource/DataSourceRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.DataSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.DataSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/Item/NoncustodialDataSourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/Item/NoncustodialDataSourceItemRequestBuilder.cs index d786d599bc2..3ff541016ec 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/Item/NoncustodialDataSourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/Item/NoncustodialDataSourceItemRequestBuilder.cs @@ -142,7 +142,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.NoncustodialDataSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -206,7 +206,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.NoncustodialDataSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryApplyHold/ApplyHoldPostRequestBody.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryApplyHold/ApplyHoldPostRequestBody.cs index a7df6648e08..74120839980 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryApplyHold/ApplyHoldPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryApplyHold/ApplyHoldPostRequestBody.cs @@ -52,7 +52,7 @@ public ApplyHoldPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.NoncustodialDataSources.MicrosoftGraphEdiscoveryApplyHold.ApplyHoldPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.NoncustodialDataSources.MicrosoftGraphEdiscoveryApplyHold.ApplyHoldPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryApplyHold/MicrosoftGraphEdiscoveryApplyHoldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryApplyHold/MicrosoftGraphEdiscoveryApplyHoldRequestBuilder.cs index 8352296a6c7..019bfe18c40 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryApplyHold/MicrosoftGraphEdiscoveryApplyHoldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryApplyHold/MicrosoftGraphEdiscoveryApplyHoldRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Compliance.Ediscovery.C public async Task PostAsync(global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.NoncustodialDataSources.MicrosoftGraphEdiscoveryApplyHold.ApplyHoldPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.NoncustodialDataSources.MicrosoftGraphEdiscoveryApplyHold.ApplyHoldPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryRemoveHold/MicrosoftGraphEdiscoveryRemoveHoldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryRemoveHold/MicrosoftGraphEdiscoveryRemoveHoldRequestBuilder.cs index 7ecbee17e2a..218b6b5059e 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryRemoveHold/MicrosoftGraphEdiscoveryRemoveHoldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryRemoveHold/MicrosoftGraphEdiscoveryRemoveHoldRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Compliance.Ediscovery.C public async Task PostAsync(global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.NoncustodialDataSources.MicrosoftGraphEdiscoveryRemoveHold.RemoveHoldPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.NoncustodialDataSources.MicrosoftGraphEdiscoveryRemoveHold.RemoveHoldPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryRemoveHold/RemoveHoldPostRequestBody.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryRemoveHold/RemoveHoldPostRequestBody.cs index a7bc670fdbe..b91b7ff3b5d 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryRemoveHold/RemoveHoldPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/MicrosoftGraphEdiscoveryRemoveHold/RemoveHoldPostRequestBody.cs @@ -52,7 +52,7 @@ public RemoveHoldPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.NoncustodialDataSources.MicrosoftGraphEdiscoveryRemoveHold.RemoveHoldPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.NoncustodialDataSources.MicrosoftGraphEdiscoveryRemoveHold.RemoveHoldPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/NoncustodialDataSourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/NoncustodialDataSourcesRequestBuilder.cs index 2450755d502..262b942786b 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/NoncustodialDataSourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/NoncustodialDataSources/NoncustodialDataSourcesRequestBuilder.cs @@ -113,7 +113,7 @@ public NoncustodialDataSourcesRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.NoncustodialDataSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.NoncustodialDataSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Operations/Item/CaseOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Operations/Item/CaseOperationItemRequestBuilder.cs index ba4e6bf6ce5..57fa4c190a3 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Operations/Item/CaseOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Operations/Item/CaseOperationItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.CaseOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.CaseOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Operations/OperationsRequestBuilder.cs index c77e8712151..55f1d29f9d1 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Operations/OperationsRequestBuilder.cs @@ -104,7 +104,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.CaseOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.CaseOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryAddToReviewSet/AddToReviewSetPostRequestBody.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryAddToReviewSet/AddToReviewSetPostRequestBody.cs index bb1c9d244f5..c150edbbb2b 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryAddToReviewSet/AddToReviewSetPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryAddToReviewSet/AddToReviewSetPostRequestBody.cs @@ -59,7 +59,7 @@ public AddToReviewSetPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.ReviewSets.Item.MicrosoftGraphEdiscoveryAddToReviewSet.AddToReviewSetPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.ReviewSets.Item.MicrosoftGraphEdiscoveryAddToReviewSet.AddToReviewSetPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("additionalDataOptions", AdditionalDataOptions); writer.WriteObjectValue("sourceCollection", SourceCollection); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryAddToReviewSet/MicrosoftGraphEdiscoveryAddToReviewSetRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryAddToReviewSet/MicrosoftGraphEdiscoveryAddToReviewSetRequestBuilder.cs index 195f9c7a6d5..e681e8d17d7 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryAddToReviewSet/MicrosoftGraphEdiscoveryAddToReviewSetRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryAddToReviewSet/MicrosoftGraphEdiscoveryAddToReviewSetRequestBuilder.cs @@ -51,7 +51,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Compliance.Ediscovery.C public async Task PostAsync(global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.ReviewSets.Item.MicrosoftGraphEdiscoveryAddToReviewSet.AddToReviewSetPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.ReviewSets.Item.MicrosoftGraphEdiscoveryAddToReviewSet.AddToReviewSetPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryExport/ExportPostRequestBody.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryExport/ExportPostRequestBody.cs index da945018e6b..081e08fdd35 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryExport/ExportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryExport/ExportPostRequestBody.cs @@ -113,7 +113,7 @@ public ExportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.ReviewSets.Item.MicrosoftGraphEdiscoveryExport.ExportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.ReviewSets.Item.MicrosoftGraphEdiscoveryExport.ExportPostRequestBody(); } /// @@ -138,7 +138,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("azureBlobContainer", AzureBlobContainer); writer.WriteStringValue("azureBlobToken", AzureBlobToken); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryExport/MicrosoftGraphEdiscoveryExportRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryExport/MicrosoftGraphEdiscoveryExportRequestBuilder.cs index 3096ceee99b..e81e76f3cbf 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryExport/MicrosoftGraphEdiscoveryExportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/MicrosoftGraphEdiscoveryExport/MicrosoftGraphEdiscoveryExportRequestBuilder.cs @@ -51,7 +51,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Compliance.Ediscovery.C public async Task PostAsync(global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.ReviewSets.Item.MicrosoftGraphEdiscoveryExport.ExportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.ReviewSets.Item.MicrosoftGraphEdiscoveryExport.ExportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/Item/MicrosoftGraphEdiscoveryApplyTags/ApplyTagsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/Item/MicrosoftGraphEdiscoveryApplyTags/ApplyTagsPostRequestBody.cs index 7a55af8c4f8..15d393bfc14 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/Item/MicrosoftGraphEdiscoveryApplyTags/ApplyTagsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/Item/MicrosoftGraphEdiscoveryApplyTags/ApplyTagsPostRequestBody.cs @@ -69,7 +69,7 @@ public ApplyTagsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.ReviewSets.Item.Queries.Item.MicrosoftGraphEdiscoveryApplyTags.ApplyTagsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.ReviewSets.Item.Queries.Item.MicrosoftGraphEdiscoveryApplyTags.ApplyTagsPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("tagsToAdd", TagsToAdd); writer.WriteCollectionOfObjectValues("tagsToRemove", TagsToRemove); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/Item/MicrosoftGraphEdiscoveryApplyTags/MicrosoftGraphEdiscoveryApplyTagsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/Item/MicrosoftGraphEdiscoveryApplyTags/MicrosoftGraphEdiscoveryApplyTagsRequestBuilder.cs index 2ec9a3a08fb..6b435c6d367 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/Item/MicrosoftGraphEdiscoveryApplyTags/MicrosoftGraphEdiscoveryApplyTagsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/Item/MicrosoftGraphEdiscoveryApplyTags/MicrosoftGraphEdiscoveryApplyTagsRequestBuilder.cs @@ -51,7 +51,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Compliance.Ediscovery.C public async Task PostAsync(global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.ReviewSets.Item.Queries.Item.MicrosoftGraphEdiscoveryApplyTags.ApplyTagsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.ReviewSets.Item.Queries.Item.MicrosoftGraphEdiscoveryApplyTags.ApplyTagsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/Item/ReviewSetQueryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/Item/ReviewSetQueryItemRequestBuilder.cs index ad717e2512d..7b036703fb7 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/Item/ReviewSetQueryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/Item/ReviewSetQueryItemRequestBuilder.cs @@ -109,7 +109,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSetQuery body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -173,7 +173,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSetQuery body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/QueriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/QueriesRequestBuilder.cs index 2e9af9d2ba8..ec079bd8fd6 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/QueriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/Queries/QueriesRequestBuilder.cs @@ -99,7 +99,7 @@ public QueriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSetQuery body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSetQuery body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/ReviewSetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/ReviewSetItemRequestBuilder.cs index 3e9c8e200f5..87929fe54f9 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/ReviewSetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/Item/ReviewSetItemRequestBuilder.cs @@ -121,7 +121,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -185,7 +185,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/ReviewSetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/ReviewSetsRequestBuilder.cs index c4261b1293c..8612fc97866 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/ReviewSetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/ReviewSets/ReviewSetsRequestBuilder.cs @@ -98,7 +98,7 @@ public ReviewSetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Settings/SettingsRequestBuilder.cs index 4928a711962..49b02282854 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Settings/SettingsRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.CaseSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.CaseSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/Item/AdditionalSources/AdditionalSourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/Item/AdditionalSources/AdditionalSourcesRequestBuilder.cs index 4d69ceac1af..45f7abaf3b6 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/Item/AdditionalSources/AdditionalSourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/Item/AdditionalSources/AdditionalSourcesRequestBuilder.cs @@ -98,7 +98,7 @@ public AdditionalSourcesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.DataSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.DataSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/Item/AdditionalSources/Item/DataSourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/Item/AdditionalSources/Item/DataSourceItemRequestBuilder.cs index ddf2483bda3..fe7dfdabacd 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/Item/AdditionalSources/Item/DataSourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/Item/AdditionalSources/Item/DataSourceItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.DataSource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.DataSource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/Item/SourceCollectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/Item/SourceCollectionItemRequestBuilder.cs index 59fb3e5237c..42c624b53e5 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/Item/SourceCollectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/Item/SourceCollectionItemRequestBuilder.cs @@ -150,7 +150,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.SourceCollection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -214,7 +214,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.SourceCollection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/SourceCollectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/SourceCollectionsRequestBuilder.cs index e6e94e1adf5..b46459723fa 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/SourceCollectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/SourceCollections/SourceCollectionsRequestBuilder.cs @@ -99,7 +99,7 @@ public SourceCollectionsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.SourceCollection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.SourceCollection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/Item/TagItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/Item/TagItemRequestBuilder.cs index d2124bd447e..e3862882938 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/Item/TagItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/Item/TagItemRequestBuilder.cs @@ -116,7 +116,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.Tag body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -180,7 +180,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.Tag body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/MicrosoftGraphEdiscoveryAsHierarchy/AsHierarchyGetResponse.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/MicrosoftGraphEdiscoveryAsHierarchy/AsHierarchyGetResponse.cs index 767fe27c88f..2cc707ed42c 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/MicrosoftGraphEdiscoveryAsHierarchy/AsHierarchyGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/MicrosoftGraphEdiscoveryAsHierarchy/AsHierarchyGetResponse.cs @@ -37,7 +37,7 @@ public partial class AsHierarchyGetResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.Tags.MicrosoftGraphEdiscoveryAsHierarchy.AsHierarchyGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.Tags.MicrosoftGraphEdiscoveryAsHierarchy.AsHierarchyGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/MicrosoftGraphEdiscoveryAsHierarchy/AsHierarchyResponse.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/MicrosoftGraphEdiscoveryAsHierarchy/AsHierarchyResponse.cs index 0ea6fcfc18e..df825f0b6f5 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/MicrosoftGraphEdiscoveryAsHierarchy/AsHierarchyResponse.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/MicrosoftGraphEdiscoveryAsHierarchy/AsHierarchyResponse.cs @@ -20,7 +20,7 @@ public partial class AsHierarchyResponse : global::Microsoft.Graph.Beta.Complian /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.Tags.MicrosoftGraphEdiscoveryAsHierarchy.AsHierarchyResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Compliance.Ediscovery.Cases.Item.Tags.MicrosoftGraphEdiscoveryAsHierarchy.AsHierarchyResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/TagsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/TagsRequestBuilder.cs index 40a520f233c..3c3e8d304a9 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/TagsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/Cases/Item/Tags/TagsRequestBuilder.cs @@ -106,7 +106,7 @@ public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.Tag body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -150,7 +150,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.Tag body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/EdiscoveryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/EdiscoveryRequestBuilder.cs index 0100ca823a4..e089a71fefa 100644 --- a/src/Microsoft.Graph/Generated/Compliance/Ediscovery/EdiscoveryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Compliance/Ediscovery/EdiscoveryRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Ediscovery.Ediscoveryroot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Ediscovery.Ediscoveryroot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/ConnectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/ConnectionsRequestBuilder.cs index a9782031eab..3c1ebbba078 100644 --- a/src/Microsoft.Graph/Generated/Connections/ConnectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/ConnectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ConnectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalConnection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalConnection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/Item/ExternalConnectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/Item/ExternalConnectionItemRequestBuilder.cs index 69abbdcccec..88c31d4ee7b 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/ExternalConnectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/ExternalConnectionItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalConnection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalConnection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Groups/GroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/Item/Groups/GroupsRequestBuilder.cs index 92dc33fe63e..2ad8623d080 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Groups/GroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Groups/GroupsRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Groups/Item/ExternalGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/Item/Groups/Item/ExternalGroupItemRequestBuilder.cs index 8880930ab40..d85336d12e6 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Groups/Item/ExternalGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Groups/Item/ExternalGroupItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Groups/Item/Members/Item/IdentityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/Item/Groups/Item/Members/Item/IdentityItemRequestBuilder.cs index 618bdcdda0e..23a75e2544e 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Groups/Item/Members/Item/IdentityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Groups/Item/Members/Item/IdentityItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.Identity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.Identity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Groups/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/Item/Groups/Item/Members/MembersRequestBuilder.cs index cb5d821000a..f6898c73280 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Groups/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Groups/Item/Members/MembersRequestBuilder.cs @@ -93,7 +93,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.Identity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.Identity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/Activities/ActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/Activities/ActivitiesRequestBuilder.cs index f56efe8839f..37e94a7649a 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/Activities/ActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/Activities/ActivitiesRequestBuilder.cs @@ -93,7 +93,7 @@ public ActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/Activities/Item/ExternalActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/Activities/Item/ExternalActivityItemRequestBuilder.cs index 34849eeca97..b129447e438 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/Activities/Item/ExternalActivityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/Activities/Item/ExternalActivityItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/ExternalItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/ExternalItemItemRequestBuilder.cs index c4f57f24cf0..7be89e9c593 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/ExternalItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/ExternalItemItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PutAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostRequestBody.cs index abbc62f6dd8..76588b3470c 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostRequestBody.cs @@ -53,7 +53,7 @@ public AddActivitiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("activities", Activities); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostResponse.cs b/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostResponse.cs index 29b849b30c8..671ab771343 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostResponse.cs @@ -37,7 +37,7 @@ public partial class AddActivitiesPostResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesPostResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesResponse.cs b/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesResponse.cs index 9a172a873af..33f7b7dbab3 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesResponse.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesResponse.cs @@ -20,7 +20,7 @@ public partial class AddActivitiesResponse : global::Microsoft.Graph.Beta.Connec /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder.cs index 49ab8bdf6b7..197761a56dc 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder.cs @@ -50,7 +50,7 @@ public MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder(string rawUrl public async Task PostAsAddActivitiesPostResponseAsync(global::Microsoft.Graph.Beta.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder(string rawUrl public async Task PostAsync(global::Microsoft.Graph.Beta.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Items/ItemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/Item/Items/ItemsRequestBuilder.cs index 232a536e591..18d551cf536 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Items/ItemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Items/ItemsRequestBuilder.cs @@ -93,7 +93,7 @@ public ItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Operations/Item/ConnectionOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/Item/Operations/Item/ConnectionOperationItemRequestBuilder.cs index d8228b21ddd..f1a5519d99d 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Operations/Item/ConnectionOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Operations/Item/ConnectionOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/Item/Operations/OperationsRequestBuilder.cs index 600861b9ea7..440eace1b68 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Quota/QuotaRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/Item/Quota/QuotaRequestBuilder.cs index 76c2e15a4d9..2cac51f0748 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Quota/QuotaRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Quota/QuotaRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionQuota body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionQuota body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Connections/Item/Schema/SchemaRequestBuilder.cs b/src/Microsoft.Graph/Generated/Connections/Item/Schema/SchemaRequestBuilder.cs index fcd8fb7d321..de4d2b9001a 100644 --- a/src/Microsoft.Graph/Generated/Connections/Item/Schema/SchemaRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Connections/Item/Schema/SchemaRequestBuilder.cs @@ -74,7 +74,7 @@ public SchemaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.Schema body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.Schema body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contacts/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Contacts/Delta/DeltaGetResponse.cs index 0d0945adb22..6aa9328efc1 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contacts.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Contacts/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Contacts/Delta/DeltaResponse.cs index 147479004e8..69ce6321d2b 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Contacts.Delta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contacts.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsPostRequestBody.cs index d87265be3e4..5788bf4cbfe 100644 --- a/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetByIdsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Contacts.GetByIds.GetByIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.GetByIds.GetByIdsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteCollectionOfPrimitiveValues("types", Types); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsPostResponse.cs b/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsPostResponse.cs index 5e30a574447..dc6bb6b5edd 100644 --- a/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetByIdsPostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contacts.GetByIds.GetByIdsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.GetByIds.GetByIdsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsRequestBuilder.cs index ab1412fe5e6..9b2e03e9d18 100644 --- a/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsGetByIdsPostResponseAsync(global::Microsoft.Graph.Beta.Contacts.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Contacts.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Contacts.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsResponse.cs b/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsResponse.cs index f46b6717384..b2d03e1c41d 100644 --- a/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/Contacts/GetByIds/GetByIdsResponse.cs @@ -20,7 +20,7 @@ public partial class GetByIdsResponse : global::Microsoft.Graph.Beta.Contacts.Ge /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contacts.GetByIds.GetByIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.GetByIds.GetByIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Contacts/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Contacts/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs index b01989e517e..1a9db76c036 100644 --- a/src/Microsoft.Graph/Generated/Contacts/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Contacts/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetUserOwnedObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Contacts.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("type", Type); writer.WriteStringValue("userId", UserId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Contacts/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs index deb952bfbf4..49c6b2f9bde 100644 --- a/src/Microsoft.Graph/Generated/Contacts/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contacts/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs @@ -52,7 +52,7 @@ public GetUserOwnedObjectsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Contacts.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Contacts.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs index 2f676f63013..10660e56af4 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs index 8a0090e896a..1f53d329f4e 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberGroups.CheckMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberGroups.CheckMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs index d448afee983..e7c894ab098 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsCheckMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs index 73759816ad3..f2e7ea513f7 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberGroupsResponse : global::Microsoft.Graph.Beta.Co /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberGroups.CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberGroups.CheckMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs index ed85c5cf4fa..c4aefcdb003 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs index 072e58e1938..8ae7577abf3 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberObjects.CheckMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberObjects.CheckMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs index 56da061bddb..ba0a62b0e1e 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsCheckMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs index 25512be197c..f031c420808 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberObjectsResponse : global::Microsoft.Graph.Beta.C /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberObjects.CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.Item.CheckMemberObjects.CheckMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs index e2103c8db2a..6fc2e6207b2 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Contacts.Item.GetMemberGroups.GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.Item.GetMemberGroups.GetMemberGroupsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs index 0306c1c264b..6aa510e6d8a 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contacts.Item.GetMemberGroups.GetMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.Item.GetMemberGroups.GetMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs index 6afde53b4d9..83be5e0bafc 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsGetMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.Contacts.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Contacts.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Contacts.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsResponse.cs index 91a30fcf7e6..b56357d5ed5 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberGroups/GetMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberGroupsResponse : global::Microsoft.Graph.Beta.Cont /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contacts.Item.GetMemberGroups.GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.Item.GetMemberGroups.GetMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs index d5b561cf8f3..07e0e485e5f 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Contacts.Item.GetMemberObjects.GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.Item.GetMemberObjects.GetMemberObjectsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs index f9a78daed52..71971f20668 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contacts.Item.GetMemberObjects.GetMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.Item.GetMemberObjects.GetMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs index 1a3c4c80245..dd87ecca6e8 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.Contacts.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Contacts.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Contacts.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsResponse.cs index 4f26fcc8b26..d67a2d8887a 100644 --- a/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/Contacts/Item/GetMemberObjects/GetMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberObjectsResponse : global::Microsoft.Graph.Beta.Con /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contacts.Item.GetMemberObjects.GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.Item.GetMemberObjects.GetMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Contacts/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/Contacts/ValidateProperties/ValidatePropertiesPostRequestBody.cs index 953379699c2..71b03624765 100644 --- a/src/Microsoft.Graph/Generated/Contacts/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Contacts/ValidateProperties/ValidatePropertiesPostRequestBody.cs @@ -90,7 +90,7 @@ public ValidatePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Contacts.ValidateProperties.ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contacts.ValidateProperties.ValidatePropertiesPostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("entityType", EntityType); writer.WriteStringValue("mailNickname", MailNickname); diff --git a/src/Microsoft.Graph/Generated/Contacts/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contacts/ValidateProperties/ValidatePropertiesRequestBuilder.cs index 7b654b5dac8..fe8dd48f45e 100644 --- a/src/Microsoft.Graph/Generated/Contacts/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contacts/ValidateProperties/ValidatePropertiesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Contacts.ValidateProper public async Task PostAsync(global::Microsoft.Graph.Beta.Contacts.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Contacts.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contracts/ContractsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contracts/ContractsRequestBuilder.cs index e55c110bd4e..56b7f88634a 100644 --- a/src/Microsoft.Graph/Generated/Contracts/ContractsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contracts/ContractsRequestBuilder.cs @@ -118,7 +118,7 @@ public ContractsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Contract body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Contract body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contracts/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Contracts/Delta/DeltaGetResponse.cs index 7b8755d227a..a01619c372c 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contracts.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Contracts/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Contracts/Delta/DeltaResponse.cs index b36738a1fd2..c315c2ececa 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Contracts.Delt /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contracts.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsPostRequestBody.cs index 94cc9edb14c..9c2fbb8349c 100644 --- a/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetByIdsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Contracts.GetByIds.GetByIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.GetByIds.GetByIdsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteCollectionOfPrimitiveValues("types", Types); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsPostResponse.cs b/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsPostResponse.cs index 6dd5c3bfab6..16bc1385533 100644 --- a/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetByIdsPostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contracts.GetByIds.GetByIdsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.GetByIds.GetByIdsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsRequestBuilder.cs index 7862e316d8b..39c38248fb4 100644 --- a/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsGetByIdsPostResponseAsync(global::Microsoft.Graph.Beta.Contracts.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Contracts.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Contracts.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsResponse.cs b/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsResponse.cs index e8258f5a40c..3294da0f63c 100644 --- a/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/Contracts/GetByIds/GetByIdsResponse.cs @@ -20,7 +20,7 @@ public partial class GetByIdsResponse : global::Microsoft.Graph.Beta.Contracts.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contracts.GetByIds.GetByIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.GetByIds.GetByIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Contracts/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Contracts/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs index 70c135da6cf..00c7c23eb5e 100644 --- a/src/Microsoft.Graph/Generated/Contracts/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Contracts/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetUserOwnedObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Contracts.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("type", Type); writer.WriteStringValue("userId", UserId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Contracts/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contracts/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs index 6983f7aa606..6c6dc5ef280 100644 --- a/src/Microsoft.Graph/Generated/Contracts/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contracts/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs @@ -52,7 +52,7 @@ public GetUserOwnedObjectsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Contracts.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Contracts.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs index 12ec093dd15..2b3b578dd4d 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs index f0d37fbcae2..5165e61802f 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberGroups.CheckMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberGroups.CheckMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs index 32cb58f24ca..56e66ee2293 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsCheckMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs index b86104a0fd5..12027c91f79 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberGroupsResponse : global::Microsoft.Graph.Beta.Co /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberGroups.CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberGroups.CheckMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs index a2181452968..b3c90d194f4 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs index 4e0f3215b3d..ce9768bf7c9 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberObjects.CheckMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberObjects.CheckMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs index 6e471ff5b7f..1cf3d73043e 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsCheckMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs index 44a0b65d233..93960352a8c 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberObjectsResponse : global::Microsoft.Graph.Beta.C /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberObjects.CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.Item.CheckMemberObjects.CheckMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/ContractItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contracts/Item/ContractItemRequestBuilder.cs index 526b42ab643..55c0d977735 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/ContractItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/ContractItemRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Contract body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -188,7 +188,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Contract body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs index d6268e35991..59c7a6a8a59 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Contracts.Item.GetMemberGroups.GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.Item.GetMemberGroups.GetMemberGroupsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs index 6ad494d01ac..731e35618e0 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contracts.Item.GetMemberGroups.GetMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.Item.GetMemberGroups.GetMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs index f50f44d5d62..7fec02dfe91 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsGetMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.Contracts.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Contracts.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Contracts.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsResponse.cs index f24c74a0987..d323678ea9c 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberGroups/GetMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberGroupsResponse : global::Microsoft.Graph.Beta.Cont /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contracts.Item.GetMemberGroups.GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.Item.GetMemberGroups.GetMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs index 8283f0d56ab..136bf0d5812 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Contracts.Item.GetMemberObjects.GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.Item.GetMemberObjects.GetMemberObjectsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs index 71daadcf9e2..299460677e3 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contracts.Item.GetMemberObjects.GetMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.Item.GetMemberObjects.GetMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs index 5ab0785ceeb..b813ca073ce 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.Contracts.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Contracts.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Contracts.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsResponse.cs index 76de598238b..2f1d170a72f 100644 --- a/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/Contracts/Item/GetMemberObjects/GetMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberObjectsResponse : global::Microsoft.Graph.Beta.Con /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Contracts.Item.GetMemberObjects.GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.Item.GetMemberObjects.GetMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Contracts/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/Contracts/ValidateProperties/ValidatePropertiesPostRequestBody.cs index 1ce0cc364c5..febc6c4d50a 100644 --- a/src/Microsoft.Graph/Generated/Contracts/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Contracts/ValidateProperties/ValidatePropertiesPostRequestBody.cs @@ -90,7 +90,7 @@ public ValidatePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Contracts.ValidateProperties.ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Contracts.ValidateProperties.ValidatePropertiesPostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("entityType", EntityType); writer.WriteStringValue("mailNickname", MailNickname); diff --git a/src/Microsoft.Graph/Generated/Contracts/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Contracts/ValidateProperties/ValidatePropertiesRequestBuilder.cs index 2266e1b80ae..120f8affd95 100644 --- a/src/Microsoft.Graph/Generated/Contracts/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Contracts/ValidateProperties/ValidatePropertiesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Contracts.ValidatePrope public async Task PostAsync(global::Microsoft.Graph.Beta.Contracts.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Contracts.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ClassifyExactMatches/ClassifyExactMatchesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DataClassification/ClassifyExactMatches/ClassifyExactMatchesPostRequestBody.cs index ffebc261b69..bafc861a951 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ClassifyExactMatches/ClassifyExactMatchesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ClassifyExactMatches/ClassifyExactMatchesPostRequestBody.cs @@ -101,7 +101,7 @@ public ClassifyExactMatchesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DataClassification.ClassifyExactMatches.ClassifyExactMatchesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DataClassification.ClassifyExactMatches.ClassifyExactMatchesPostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("contentClassifications", ContentClassifications); writer.WriteCollectionOfPrimitiveValues("sensitiveTypeIds", SensitiveTypeIds); writer.WriteStringValue("text", Text); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ClassifyExactMatches/ClassifyExactMatchesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/ClassifyExactMatches/ClassifyExactMatchesRequestBuilder.cs index fba0d6d106c..91b645dee52 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ClassifyExactMatches/ClassifyExactMatchesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ClassifyExactMatches/ClassifyExactMatchesRequestBuilder.cs @@ -51,7 +51,7 @@ public ClassifyExactMatchesRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.DataClassification.ClassifyExactMatches.ClassifyExactMatchesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DataClassification.ClassifyExactMatches.ClassifyExactMatchesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ClassifyFile/ClassifyFilePostRequestBody.cs b/src/Microsoft.Graph/Generated/DataClassification/ClassifyFile/ClassifyFilePostRequestBody.cs index f5787277d11..3db8752f11d 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ClassifyFile/ClassifyFilePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ClassifyFile/ClassifyFilePostRequestBody.cs @@ -68,7 +68,7 @@ public ClassifyFilePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DataClassification.ClassifyFile.ClassifyFilePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DataClassification.ClassifyFile.ClassifyFilePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("file", File); writer.WriteCollectionOfPrimitiveValues("sensitiveTypeIds", SensitiveTypeIds); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ClassifyFile/ClassifyFileRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/ClassifyFile/ClassifyFileRequestBuilder.cs index 9cf8f5ecdd4..5d3704acdbd 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ClassifyFile/ClassifyFileRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ClassifyFile/ClassifyFileRequestBuilder.cs @@ -51,7 +51,7 @@ public ClassifyFileRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.DataClassification.ClassifyFile.ClassifyFilePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DataClassification.ClassifyFile.ClassifyFilePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ClassifyFileJobs/ClassifyFileJobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/ClassifyFileJobs/ClassifyFileJobsRequestBuilder.cs index e5042831aca..3084362f90a 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ClassifyFileJobs/ClassifyFileJobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ClassifyFileJobs/ClassifyFileJobsRequestBuilder.cs @@ -93,7 +93,7 @@ public ClassifyFileJobsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ClassifyFileJobs/Item/JobResponseBaseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/ClassifyFileJobs/Item/JobResponseBaseItemRequestBuilder.cs index 8afc96e3188..22c1fd96901 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ClassifyFileJobs/Item/JobResponseBaseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ClassifyFileJobs/Item/JobResponseBaseItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ClassifyTextJobs/ClassifyTextJobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/ClassifyTextJobs/ClassifyTextJobsRequestBuilder.cs index 23b78864a9e..add26f956f1 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ClassifyTextJobs/ClassifyTextJobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ClassifyTextJobs/ClassifyTextJobsRequestBuilder.cs @@ -93,7 +93,7 @@ public ClassifyTextJobsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ClassifyTextJobs/Item/JobResponseBaseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/ClassifyTextJobs/Item/JobResponseBaseItemRequestBuilder.cs index 066de19dcfb..9527e462673 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ClassifyTextJobs/Item/JobResponseBaseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ClassifyTextJobs/Item/JobResponseBaseItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/DataClassificationRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/DataClassificationRequestBuilder.cs index 9657b40c98c..32159876ba8 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/DataClassificationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/DataClassificationRequestBuilder.cs @@ -140,7 +140,7 @@ public DataClassificationRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.DataClassificationService body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -182,7 +182,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DataClassificationService body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/EvaluateDlpPoliciesJobs/EvaluateDlpPoliciesJobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/EvaluateDlpPoliciesJobs/EvaluateDlpPoliciesJobsRequestBuilder.cs index 43258b17ada..1e859552fa9 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/EvaluateDlpPoliciesJobs/EvaluateDlpPoliciesJobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/EvaluateDlpPoliciesJobs/EvaluateDlpPoliciesJobsRequestBuilder.cs @@ -93,7 +93,7 @@ public EvaluateDlpPoliciesJobsRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/EvaluateDlpPoliciesJobs/Item/JobResponseBaseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/EvaluateDlpPoliciesJobs/Item/JobResponseBaseItemRequestBuilder.cs index ebb7e457415..f9e6537ab41 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/EvaluateDlpPoliciesJobs/Item/JobResponseBaseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/EvaluateDlpPoliciesJobs/Item/JobResponseBaseItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/EvaluateLabelJobs/EvaluateLabelJobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/EvaluateLabelJobs/EvaluateLabelJobsRequestBuilder.cs index 012342aca96..34b5b589751 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/EvaluateLabelJobs/EvaluateLabelJobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/EvaluateLabelJobs/EvaluateLabelJobsRequestBuilder.cs @@ -93,7 +93,7 @@ public EvaluateLabelJobsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/EvaluateLabelJobs/Item/JobResponseBaseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/EvaluateLabelJobs/Item/JobResponseBaseItemRequestBuilder.cs index 38b55e2ed89..767ee803750 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/EvaluateLabelJobs/Item/JobResponseBaseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/EvaluateLabelJobs/Item/JobResponseBaseItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/ExactMatchDataStoresRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/ExactMatchDataStoresRequestBuilder.cs index 072da46941e..39ce9369e9e 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/ExactMatchDataStoresRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/ExactMatchDataStoresRequestBuilder.cs @@ -93,7 +93,7 @@ public ExactMatchDataStoresRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExactMatchDataStore body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExactMatchDataStore body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/ExactMatchDataStoreItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/ExactMatchDataStoreItemRequestBuilder.cs index 23490c27a33..a6f125244b5 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/ExactMatchDataStoreItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/ExactMatchDataStoreItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExactMatchDataStore body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExactMatchDataStore body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupPostRequestBody.cs b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupPostRequestBody.cs index 596e9c5c803..3ee9fe2033d 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupPostRequestBody.cs @@ -84,7 +84,7 @@ public LookupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DataClassification.ExactMatchDataStores.Item.Lookup.LookupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DataClassification.ExactMatchDataStores.Item.Lookup.LookupPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("key", Key); writer.WriteCollectionOfPrimitiveValues("resultColumnNames", ResultColumnNames); writer.WriteCollectionOfPrimitiveValues("values", Values); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupPostResponse.cs b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupPostResponse.cs index 676771b9ae3..86f6decbd15 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DataClassification.ExactMatchDataStores.Item.Lookup.LookupPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DataClassification.ExactMatchDataStores.Item.Lookup.LookupPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupRequestBuilder.cs index 43e521edd1f..3c87e85c5c3 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupRequestBuilder.cs @@ -50,7 +50,7 @@ public LookupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsLookupPostResponseAsync(global::Microsoft.Graph.Beta.DataClassification.ExactMatchDataStores.Item.Lookup.LookupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public LookupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.DataClassification.ExactMatchDataStores.Item.Lookup.LookupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DataClassification.ExactMatchDataStores.Item.Lookup.LookupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupResponse.cs b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupResponse.cs index 80407d1094c..e0a476a6346 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupResponse.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Lookup/LookupResponse.cs @@ -20,7 +20,7 @@ public partial class LookupResponse : global::Microsoft.Graph.Beta.DataClassific /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DataClassification.ExactMatchDataStores.Item.Lookup.LookupResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DataClassification.ExactMatchDataStores.Item.Lookup.LookupResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Sessions/Item/ExactMatchSessionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Sessions/Item/ExactMatchSessionItemRequestBuilder.cs index e8fb16f5367..89b22d87428 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Sessions/Item/ExactMatchSessionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Sessions/Item/ExactMatchSessionItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExactMatchSession body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExactMatchSession body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Sessions/Item/UploadAgent/UploadAgentRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Sessions/Item/UploadAgent/UploadAgentRequestBuilder.cs index 324edc9b84c..921692b1a17 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Sessions/Item/UploadAgent/UploadAgentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Sessions/Item/UploadAgent/UploadAgentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExactMatchUploadAgent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExactMatchUploadAgent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Sessions/SessionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Sessions/SessionsRequestBuilder.cs index 52b1d06ebc8..0af12a281b3 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Sessions/SessionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchDataStores/Item/Sessions/SessionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SessionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExactMatchSession body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExactMatchSession body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchUploadAgents/ExactMatchUploadAgentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchUploadAgents/ExactMatchUploadAgentsRequestBuilder.cs index 3263c05666d..0f01cdc5441 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchUploadAgents/ExactMatchUploadAgentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchUploadAgents/ExactMatchUploadAgentsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExactMatchUploadAgentsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExactMatchUploadAgent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExactMatchUploadAgent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchUploadAgents/Item/ExactMatchUploadAgentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchUploadAgents/Item/ExactMatchUploadAgentItemRequestBuilder.cs index 0e99ca32cb0..988a1b670f8 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/ExactMatchUploadAgents/Item/ExactMatchUploadAgentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/ExactMatchUploadAgents/Item/ExactMatchUploadAgentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExactMatchUploadAgent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExactMatchUploadAgent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/Jobs/Item/JobResponseBaseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/Jobs/Item/JobResponseBaseItemRequestBuilder.cs index fa872dc468c..63187578617 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/Jobs/Item/JobResponseBaseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/Jobs/Item/JobResponseBaseItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/Jobs/JobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/Jobs/JobsRequestBuilder.cs index a193306af71..cedd8c77b72 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/Jobs/JobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/Jobs/JobsRequestBuilder.cs @@ -93,7 +93,7 @@ public JobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.JobResponseBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/SensitiveTypes/Item/SensitiveTypeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/SensitiveTypes/Item/SensitiveTypeItemRequestBuilder.cs index 66898ea1900..dd347b4a09a 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/SensitiveTypes/Item/SensitiveTypeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/SensitiveTypes/Item/SensitiveTypeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SensitiveType body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SensitiveType body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/SensitiveTypes/SensitiveTypesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/SensitiveTypes/SensitiveTypesRequestBuilder.cs index 719bf3e7775..2a504328e78 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/SensitiveTypes/SensitiveTypesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/SensitiveTypes/SensitiveTypesRequestBuilder.cs @@ -93,7 +93,7 @@ public SensitiveTypesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SensitiveType body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SensitiveType body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs index 8532ee149be..4aaf365d938 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs @@ -101,7 +101,7 @@ public ComputeRightsAndInheritancePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("delegatedUserEmail", DelegatedUserEmail); writer.WriteStringValue("locale", Locale); writer.WriteCollectionOfObjectValues("protectedContents", ProtectedContents); diff --git a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs index d4c8da5d79b..9bfcb010365 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs @@ -52,7 +52,7 @@ public ComputeRightsAndInheritanceRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs index e71e66f985b..c124c10d483 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.Evaluate.EvaluatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.Evaluate.EvaluatePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("currentLabel", CurrentLabel); writer.WriteCollectionOfObjectValues("discoveredSensitiveTypes", DiscoveredSensitiveTypes); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs index 37b394850cc..b72ce337f73 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs @@ -51,7 +51,7 @@ public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs index 28a6cf172e1..75e6e216fb2 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs index de7e44b97f6..63011af5df4 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs @@ -101,7 +101,7 @@ public ComputeRightsAndInheritancePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("delegatedUserEmail", DelegatedUserEmail); writer.WriteStringValue("locale", Locale); writer.WriteCollectionOfObjectValues("protectedContents", ProtectedContents); diff --git a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs index 6140646624a..bf584eb5861 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs @@ -52,7 +52,7 @@ public ComputeRightsAndInheritanceRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs index 9403bed92d1..298de09e991 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("currentLabel", CurrentLabel); writer.WriteCollectionOfObjectValues("discoveredSensitiveTypes", DiscoveredSensitiveTypes); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs index d44f3e28a30..523e015af84 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs @@ -51,7 +51,7 @@ public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DataClassification.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs index 6916ce081a4..4530efd5e30 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs index ec3d9010f3c..6fd67cc55f8 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs @@ -120,7 +120,7 @@ public SublabelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/SensitivityLabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/SensitivityLabelsRequestBuilder.cs index c162e69b42a..319a5ffd5ec 100644 --- a/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/SensitivityLabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataClassification/SensitivityLabels/SensitivityLabelsRequestBuilder.cs @@ -120,7 +120,7 @@ public SensitivityLabelsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataPolicyOperations/DataPolicyOperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataPolicyOperations/DataPolicyOperationsRequestBuilder.cs index 61f14e5e1d5..865a9ccdaf6 100644 --- a/src/Microsoft.Graph/Generated/DataPolicyOperations/DataPolicyOperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataPolicyOperations/DataPolicyOperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public DataPolicyOperationsRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DataPolicyOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DataPolicyOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DataPolicyOperations/Item/DataPolicyOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DataPolicyOperations/Item/DataPolicyOperationItemRequestBuilder.cs index 1935aed3982..b0c16abded6 100644 --- a/src/Microsoft.Graph/Generated/DataPolicyOperations/Item/DataPolicyOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DataPolicyOperations/Item/DataPolicyOperationItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DataPolicyOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DataPolicyOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/AndroidManagedAppProtectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/AndroidManagedAppProtectionsRequestBuilder.cs index b951fc53fcc..37e4deef72c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/AndroidManagedAppProtectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/AndroidManagedAppProtectionsRequestBuilder.cs @@ -99,7 +99,7 @@ public AndroidManagedAppProtectionsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AndroidManagedAppProtection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AndroidManagedAppProtection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs index 562dd936426..605622f6ae4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs @@ -52,7 +52,7 @@ public HasPayloadLinksPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.AndroidManagedAppProtections.HasPayloadLinks.HasPayloadLinksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.AndroidManagedAppProtections.HasPayloadLinks.HasPayloadLinksPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("payloadIds", PayloadIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostResponse.cs index e66d2812f95..f2dd615d88a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostResponse.cs @@ -36,7 +36,7 @@ public partial class HasPayloadLinksPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.AndroidManagedAppProtections.HasPayloadLinks.HasPayloadLinksPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.AndroidManagedAppProtections.HasPayloadLinks.HasPayloadLinksPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs index 9d87aff006e..a34d6a7b8a2 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs @@ -50,7 +50,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsHasPayloadLinksPostResponseAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.AndroidManagedAppProtections.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.AndroidManagedAppProtections.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.AndroidManagedAppProtections.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksResponse.cs index e4e1bc1a215..4c75b108024 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/HasPayloadLinks/HasPayloadLinksResponse.cs @@ -20,7 +20,7 @@ public partial class HasPayloadLinksResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.AndroidManagedAppProtections.HasPayloadLinks.HasPayloadLinksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.AndroidManagedAppProtections.HasPayloadLinks.HasPayloadLinksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/AndroidManagedAppProtectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/AndroidManagedAppProtectionItemRequestBuilder.cs index b9d8205dc36..eaedbb67db0 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/AndroidManagedAppProtectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/AndroidManagedAppProtectionItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AndroidManagedAppProtection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AndroidManagedAppProtection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Apps/AppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Apps/AppsRequestBuilder.cs index f319b6fe251..6dda3699a59 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Apps/AppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Apps/AppsRequestBuilder.cs @@ -93,7 +93,7 @@ public AppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs index 71c3aea23b1..a378da66747 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs index 408dc27916b..46cb596a673 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs index 5b722133439..b06fb39bdc8 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs index c4c76b00a53..e72c16aea24 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/AndroidManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedAppPolicyDeploymentSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppPolicyDeploymentSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/DefaultManagedAppProtectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/DefaultManagedAppProtectionsRequestBuilder.cs index 1ec05d77d30..3432672b42a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/DefaultManagedAppProtectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/DefaultManagedAppProtectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public DefaultManagedAppProtectionsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DefaultManagedAppProtection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DefaultManagedAppProtection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/Apps/AppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/Apps/AppsRequestBuilder.cs index 9d0ad557d5b..2125de91640 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/Apps/AppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/Apps/AppsRequestBuilder.cs @@ -93,7 +93,7 @@ public AppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs index d4ef5f44eeb..30db410ac9e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/DefaultManagedAppProtectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/DefaultManagedAppProtectionItemRequestBuilder.cs index 7d81d3e52ad..1b3c3400fa5 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/DefaultManagedAppProtectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/DefaultManagedAppProtectionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DefaultManagedAppProtection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DefaultManagedAppProtection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs index 8bc24b9859d..615da48b0c9 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/DefaultManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedAppPolicyDeploymentSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppPolicyDeploymentSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementRequestBuilder.cs index 37e242da6c6..0feb917fddd 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementRequestBuilder.cs @@ -242,7 +242,7 @@ public DeviceAppManagementRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceAppManagement body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -284,7 +284,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceAppManagement body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/DeviceAppManagementTasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/DeviceAppManagementTasksRequestBuilder.cs index 5be2ee2cc76..397d8fd9524 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/DeviceAppManagementTasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/DeviceAppManagementTasksRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceAppManagementTasksRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceAppManagementTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceAppManagementTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/Item/DeviceAppManagementTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/Item/DeviceAppManagementTaskItemRequestBuilder.cs index d355ff76358..8f2e8990746 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/Item/DeviceAppManagementTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/Item/DeviceAppManagementTaskItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceAppManagementTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceAppManagementTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/Item/UpdateStatus/UpdateStatusPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/Item/UpdateStatus/UpdateStatusPostRequestBody.cs index 5d3c48b1833..540c57f1d7f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/Item/UpdateStatus/UpdateStatusPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/Item/UpdateStatus/UpdateStatusPostRequestBody.cs @@ -59,7 +59,7 @@ public UpdateStatusPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.DeviceAppManagementTasks.Item.UpdateStatus.UpdateStatusPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.DeviceAppManagementTasks.Item.UpdateStatus.UpdateStatusPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("note", Note); writer.WriteEnumValue("status", Status); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/Item/UpdateStatus/UpdateStatusRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/Item/UpdateStatus/UpdateStatusRequestBuilder.cs index 22ee0fa7379..967b4127bc0 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/Item/UpdateStatus/UpdateStatusRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/DeviceAppManagementTasks/Item/UpdateStatus/UpdateStatusRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Dev public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.DeviceAppManagementTasks.Item.UpdateStatus.UpdateStatusPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.DeviceAppManagementTasks.Item.UpdateStatus.UpdateStatusPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/EnterpriseCodeSigningCertificates/EnterpriseCodeSigningCertificatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/EnterpriseCodeSigningCertificates/EnterpriseCodeSigningCertificatesRequestBuilder.cs index fe814dce256..ae8dbdd745a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/EnterpriseCodeSigningCertificates/EnterpriseCodeSigningCertificatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/EnterpriseCodeSigningCertificates/EnterpriseCodeSigningCertificatesRequestBuilder.cs @@ -93,7 +93,7 @@ public EnterpriseCodeSigningCertificatesRequestBuilder(string rawUrl, IRequestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EnterpriseCodeSigningCertificate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EnterpriseCodeSigningCertificate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/EnterpriseCodeSigningCertificates/Item/EnterpriseCodeSigningCertificateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/EnterpriseCodeSigningCertificates/Item/EnterpriseCodeSigningCertificateItemRequestBuilder.cs index 67082b1924f..b729f36f1dc 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/EnterpriseCodeSigningCertificates/Item/EnterpriseCodeSigningCertificateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/EnterpriseCodeSigningCertificates/Item/EnterpriseCodeSigningCertificateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EnterpriseCodeSigningCertificate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EnterpriseCodeSigningCertificate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs index fae3269d499..bfa3ef6940b 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs @@ -52,7 +52,7 @@ public HasPayloadLinksPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.IosLobAppProvisioningConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.IosLobAppProvisioningConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("payloadIds", PayloadIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs index a1e9f8c4dd7..cebc98fc265 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs @@ -36,7 +36,7 @@ public partial class HasPayloadLinksPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.IosLobAppProvisioningConfigurations.HasPayloadLinks.HasPayloadLinksPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.IosLobAppProvisioningConfigurations.HasPayloadLinks.HasPayloadLinksPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs index 65043086413..aa749f9e579 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs @@ -50,7 +50,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsHasPayloadLinksPostResponseAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.IosLobAppProvisioningConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.IosLobAppProvisioningConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.IosLobAppProvisioningConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs index bccfdcf16cc..3e4140ef832 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs @@ -20,7 +20,7 @@ public partial class HasPayloadLinksResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.IosLobAppProvisioningConfigurations.HasPayloadLinks.HasPayloadLinksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.IosLobAppProvisioningConfigurations.HasPayloadLinks.HasPayloadLinksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/IosLobAppProvisioningConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/IosLobAppProvisioningConfigurationsRequestBuilder.cs index bded284ec37..e085f6ada10 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/IosLobAppProvisioningConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/IosLobAppProvisioningConfigurationsRequestBuilder.cs @@ -99,7 +99,7 @@ public IosLobAppProvisioningConfigurationsRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assign/AssignPostRequestBody.cs index a79ad4c1bf8..c3168bad138 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assign/AssignPostRequestBody.cs @@ -69,7 +69,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.IosLobAppProvisioningConfigurations.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.IosLobAppProvisioningConfigurations.Item.Assign.AssignPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("appProvisioningConfigurationGroupAssignments", AppProvisioningConfigurationGroupAssignments); writer.WriteCollectionOfObjectValues("iOSLobAppProvisioningConfigAssignments", IOSLobAppProvisioningConfigAssignments); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assign/AssignRequestBuilder.cs index f2aa0d13b46..e8c672489d6 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Ios public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.IosLobAppProvisioningConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.IosLobAppProvisioningConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs index 7b8592fafa7..6d131bc4905 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs @@ -54,7 +54,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { } /// - /// The associated group assignments for IosLobAppProvisioningConfiguration, this determines which devices/users the IOS LOB app provisioning conifguration will be targeted to. + /// The associated group assignments for IosLobAppProvisioningConfiguration. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfigurationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfigurationAssignment.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// The associated group assignments for IosLobAppProvisioningConfiguration, this determines which devices/users the IOS LOB app provisioning conifguration will be targeted to. + /// The associated group assignments for IosLobAppProvisioningConfiguration. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfigurationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.IosLobAppProvisioningConfigurations.Item.Assignments.AssignmentsRequestBuilder(rawUrl, RequestAdapter); } /// - /// The associated group assignments for IosLobAppProvisioningConfiguration, this determines which devices/users the IOS LOB app provisioning conifguration will be targeted to. + /// The associated group assignments for IosLobAppProvisioningConfiguration. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class AssignmentsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assignments/Item/IosLobAppProvisioningConfigurationAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assignments/Item/IosLobAppProvisioningConfigurationAssignmentItemRequestBuilder.cs index d262fdf6fd8..a7577f11d8f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assignments/Item/IosLobAppProvisioningConfigurationAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/Assignments/Item/IosLobAppProvisioningConfigurationAssignmentItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// The associated group assignments for IosLobAppProvisioningConfiguration, this determines which devices/users the IOS LOB app provisioning conifguration will be targeted to. + /// The associated group assignments for IosLobAppProvisioningConfiguration. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfigurationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// The associated group assignments for IosLobAppProvisioningConfiguration, this determines which devices/users the IOS LOB app provisioning conifguration will be targeted to. + /// The associated group assignments for IosLobAppProvisioningConfiguration. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfigurationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class IosLobAppProvisioningConfigurationAssignmentItemRequestBuil { } /// - /// The associated group assignments for IosLobAppProvisioningConfiguration, this determines which devices/users the IOS LOB app provisioning conifguration will be targeted to. + /// The associated group assignments for IosLobAppProvisioningConfiguration. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class IosLobAppProvisioningConfigurationAssignmentItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs index a946d5380f0..58906de676d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceStatusesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/DeviceStatuses/Item/ManagedDeviceMobileAppConfigurationDeviceStatusItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/DeviceStatuses/Item/ManagedDeviceMobileAppConfigurationDeviceStatusItemRequestBuilder.cs index 3df55160354..3c058528eb6 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/DeviceStatuses/Item/ManagedDeviceMobileAppConfigurationDeviceStatusItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/DeviceStatuses/Item/ManagedDeviceMobileAppConfigurationDeviceStatusItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs index e004b654a2b..cf4a9459f38 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppProvisioningConfigGroupAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppProvisioningConfigGroupAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/GroupAssignments/Item/MobileAppProvisioningConfigGroupAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/GroupAssignments/Item/MobileAppProvisioningConfigGroupAssignmentItemRequestBuilder.cs index 4c5f7f3d227..5b4bdcc1fe3 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/GroupAssignments/Item/MobileAppProvisioningConfigGroupAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/GroupAssignments/Item/MobileAppProvisioningConfigGroupAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppProvisioningConfigGroupAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppProvisioningConfigGroupAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/IosLobAppProvisioningConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/IosLobAppProvisioningConfigurationItemRequestBuilder.cs index 137b303de1b..88f25648792 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/IosLobAppProvisioningConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/IosLobAppProvisioningConfigurationItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/UserStatuses/Item/ManagedDeviceMobileAppConfigurationUserStatusItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/UserStatuses/Item/ManagedDeviceMobileAppConfigurationUserStatusItemRequestBuilder.cs index 51f65b04b85..b85097fff22 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/UserStatuses/Item/ManagedDeviceMobileAppConfigurationUserStatusItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/UserStatuses/Item/ManagedDeviceMobileAppConfigurationUserStatusItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/UserStatuses/UserStatusesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/UserStatuses/UserStatusesRequestBuilder.cs index f6c420384c9..4de862ef5c8 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/UserStatuses/UserStatusesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosLobAppProvisioningConfigurations/Item/UserStatuses/UserStatusesRequestBuilder.cs @@ -93,7 +93,7 @@ public UserStatusesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs index f89110199d4..1b80711c623 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs @@ -52,7 +52,7 @@ public HasPayloadLinksPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.IosManagedAppProtections.HasPayloadLinks.HasPayloadLinksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.IosManagedAppProtections.HasPayloadLinks.HasPayloadLinksPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("payloadIds", PayloadIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostResponse.cs index 20c3cf8fd08..85a6a85a873 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksPostResponse.cs @@ -36,7 +36,7 @@ public partial class HasPayloadLinksPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.IosManagedAppProtections.HasPayloadLinks.HasPayloadLinksPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.IosManagedAppProtections.HasPayloadLinks.HasPayloadLinksPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs index 19dce9509b7..7323bb51512 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs @@ -50,7 +50,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsHasPayloadLinksPostResponseAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.IosManagedAppProtections.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.IosManagedAppProtections.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.IosManagedAppProtections.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksResponse.cs index d81750665f9..2a1dd0692a5 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/HasPayloadLinks/HasPayloadLinksResponse.cs @@ -20,7 +20,7 @@ public partial class HasPayloadLinksResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.IosManagedAppProtections.HasPayloadLinks.HasPayloadLinksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.IosManagedAppProtections.HasPayloadLinks.HasPayloadLinksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/IosManagedAppProtectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/IosManagedAppProtectionsRequestBuilder.cs index 6621ea8c917..fc36b7a0d28 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/IosManagedAppProtectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/IosManagedAppProtectionsRequestBuilder.cs @@ -99,7 +99,7 @@ public IosManagedAppProtectionsRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IosManagedAppProtection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IosManagedAppProtection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Apps/AppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Apps/AppsRequestBuilder.cs index 5a65bf2d399..7b5f355a9a7 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Apps/AppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Apps/AppsRequestBuilder.cs @@ -93,7 +93,7 @@ public AppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs index 4d2acaa40ae..90c30f1eb5d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs index d49c4be8c8b..524a55456dd 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs index 94ef8e7beab..943f7c0c2a3 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs index f50ddd7048e..12ef2ee2755 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedAppPolicyDeploymentSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppPolicyDeploymentSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/IosManagedAppProtectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/IosManagedAppProtectionItemRequestBuilder.cs index 803b9c3fb6b..f9f6cd2f532 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/IosManagedAppProtectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/IosManagedAppProtections/Item/IosManagedAppProtectionItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IosManagedAppProtection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IosManagedAppProtection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs index 83ef60da39d..fb00e3b72dd 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedAppPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/TargetApps/TargetAppsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/TargetApps/TargetAppsPostRequestBody.cs index 4868598449c..2743b02ab73 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/TargetApps/TargetAppsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/TargetApps/TargetAppsPostRequestBody.cs @@ -53,7 +53,7 @@ public TargetAppsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppPolicies.Item.TargetApps.TargetAppsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppPolicies.Item.TargetApps.TargetAppsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("apps", Apps); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs index f6dbd44b842..9e8dc3349e8 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Man public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppPolicies.Item.TargetApps.TargetAppsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppPolicies.Item.TargetApps.TargetAppsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/ManagedAppPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/ManagedAppPoliciesRequestBuilder.cs index c3340b04c25..ae68f73c881 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/ManagedAppPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppPolicies/ManagedAppPoliciesRequestBuilder.cs @@ -93,7 +93,7 @@ public ManagedAppPoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedAppPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/GetUserIdsWithFlaggedAppRegistration/GetUserIdsWithFlaggedAppRegistrationGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/GetUserIdsWithFlaggedAppRegistration/GetUserIdsWithFlaggedAppRegistrationGetResponse.cs index 90ae5b40355..55a57e543c7 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/GetUserIdsWithFlaggedAppRegistration/GetUserIdsWithFlaggedAppRegistrationGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/GetUserIdsWithFlaggedAppRegistration/GetUserIdsWithFlaggedAppRegistrationGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppRegistrations.GetUserIdsWithFlaggedAppRegistration.GetUserIdsWithFlaggedAppRegistrationGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppRegistrations.GetUserIdsWithFlaggedAppRegistration.GetUserIdsWithFlaggedAppRegistrationGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/GetUserIdsWithFlaggedAppRegistration/GetUserIdsWithFlaggedAppRegistrationResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/GetUserIdsWithFlaggedAppRegistration/GetUserIdsWithFlaggedAppRegistrationResponse.cs index 9701fa0302f..c7253c57642 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/GetUserIdsWithFlaggedAppRegistration/GetUserIdsWithFlaggedAppRegistrationResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/GetUserIdsWithFlaggedAppRegistration/GetUserIdsWithFlaggedAppRegistrationResponse.cs @@ -20,7 +20,7 @@ public partial class GetUserIdsWithFlaggedAppRegistrationResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppRegistrations.GetUserIdsWithFlaggedAppRegistration.GetUserIdsWithFlaggedAppRegistrationResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppRegistrations.GetUserIdsWithFlaggedAppRegistration.GetUserIdsWithFlaggedAppRegistrationResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/AppliedPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/AppliedPoliciesRequestBuilder.cs index 5766e394254..4bc19c23014 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/AppliedPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/AppliedPoliciesRequestBuilder.cs @@ -93,7 +93,7 @@ public AppliedPoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedAppPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs index d3d23ea5ca2..e8c2ec768e3 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedAppPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/TargetApps/TargetAppsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/TargetApps/TargetAppsPostRequestBody.cs index 6f89a8adbe5..06daf1a146d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/TargetApps/TargetAppsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/TargetApps/TargetAppsPostRequestBody.cs @@ -53,7 +53,7 @@ public TargetAppsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppRegistrations.Item.AppliedPolicies.Item.TargetApps.TargetAppsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppRegistrations.Item.AppliedPolicies.Item.TargetApps.TargetAppsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("apps", Apps); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs index 28f6725ac2b..32686bca09d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/AppliedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Man public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppRegistrations.Item.AppliedPolicies.Item.TargetApps.TargetAppsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppRegistrations.Item.AppliedPolicies.Item.TargetApps.TargetAppsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/IntendedPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/IntendedPoliciesRequestBuilder.cs index 0d4f14c98da..656cc57c804 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/IntendedPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/IntendedPoliciesRequestBuilder.cs @@ -93,7 +93,7 @@ public IntendedPoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedAppPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs index 0a303fde273..58f32e1ef0a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/ManagedAppPolicyItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedAppPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/TargetApps/TargetAppsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/TargetApps/TargetAppsPostRequestBody.cs index 259996864ec..c1db10abe00 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/TargetApps/TargetAppsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/TargetApps/TargetAppsPostRequestBody.cs @@ -53,7 +53,7 @@ public TargetAppsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppRegistrations.Item.IntendedPolicies.Item.TargetApps.TargetAppsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppRegistrations.Item.IntendedPolicies.Item.TargetApps.TargetAppsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("apps", Apps); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs index ffcc4ca2244..ae523a65058 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/IntendedPolicies/Item/TargetApps/TargetAppsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Man public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppRegistrations.Item.IntendedPolicies.Item.TargetApps.TargetAppsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedAppRegistrations.Item.IntendedPolicies.Item.TargetApps.TargetAppsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppLogCollectionRequests/Item/ManagedAppLogCollectionRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppLogCollectionRequests/Item/ManagedAppLogCollectionRequestItemRequestBuilder.cs index 2e028249a7c..3e8c5d4ce7d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppLogCollectionRequests/Item/ManagedAppLogCollectionRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppLogCollectionRequests/Item/ManagedAppLogCollectionRequestItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedAppLogCollectionRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppLogCollectionRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppLogCollectionRequests/ManagedAppLogCollectionRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppLogCollectionRequests/ManagedAppLogCollectionRequestsRequestBuilder.cs index 6159688879a..1f91a741eaf 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppLogCollectionRequests/ManagedAppLogCollectionRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppLogCollectionRequests/ManagedAppLogCollectionRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public ManagedAppLogCollectionRequestsRequestBuilder(string rawUrl, IRequestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedAppLogCollectionRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppLogCollectionRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppRegistrationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppRegistrationItemRequestBuilder.cs index fe174a1b133..7701a409b1d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppRegistrationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/ManagedAppRegistrationItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedAppRegistration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppRegistration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/Operations/Item/ManagedAppOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/Operations/Item/ManagedAppOperationItemRequestBuilder.cs index 3f66871032f..0e7740beb7c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/Operations/Item/ManagedAppOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/Operations/Item/ManagedAppOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedAppOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/Operations/OperationsRequestBuilder.cs index d49ade91e40..0a7a3ee41c4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/Item/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedAppOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/ManagedAppRegistrationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/ManagedAppRegistrationsRequestBuilder.cs index f39371746c0..83e9c06fb32 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/ManagedAppRegistrationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppRegistrations/ManagedAppRegistrationsRequestBuilder.cs @@ -99,7 +99,7 @@ public ManagedAppRegistrationsRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedAppRegistration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppRegistration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppStatuses/Item/ManagedAppStatusItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppStatuses/Item/ManagedAppStatusItemRequestBuilder.cs index 41a608c1d11..2daec315106 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppStatuses/Item/ManagedAppStatusItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppStatuses/Item/ManagedAppStatusItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedAppStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppStatuses/ManagedAppStatusesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppStatuses/ManagedAppStatusesRequestBuilder.cs index aab268ff6eb..7fcdd27198b 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppStatuses/ManagedAppStatusesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedAppStatuses/ManagedAppStatusesRequestBuilder.cs @@ -93,7 +93,7 @@ public ManagedAppStatusesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedAppStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBookCategories/Item/ManagedEBookCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBookCategories/Item/ManagedEBookCategoryItemRequestBuilder.cs index 21ce35c4030..91eb1a01aa1 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBookCategories/Item/ManagedEBookCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBookCategories/Item/ManagedEBookCategoryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedEBookCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedEBookCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBookCategories/ManagedEBookCategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBookCategories/ManagedEBookCategoriesRequestBuilder.cs index 80c47e26a16..944358751ee 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBookCategories/ManagedEBookCategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBookCategories/ManagedEBookCategoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public ManagedEBookCategoriesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedEBookCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedEBookCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assign/AssignPostRequestBody.cs index b515466f747..bcb3c687adc 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedEBooks.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedEBooks.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("managedEBookAssignments", ManagedEBookAssignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assign/AssignRequestBuilder.cs index 8352622d34e..df86398e5a3 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Man public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedEBooks.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.ManagedEBooks.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/AssignmentsRequestBuilder.cs index b5898bc03d1..067124c0a7c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedEBookAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedEBookAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/Item/ManagedEBookAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/Item/ManagedEBookAssignmentItemRequestBuilder.cs index a1918325f9e..483634bc1ec 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/Item/ManagedEBookAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/Assignments/Item/ManagedEBookAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedEBookAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedEBookAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/DeviceStates/DeviceStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/DeviceStates/DeviceStatesRequestBuilder.cs index cec86099af0..a5357fe410e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/DeviceStates/DeviceStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/DeviceStates/DeviceStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceInstallState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceInstallState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/DeviceStates/Item/DeviceInstallStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/DeviceStates/Item/DeviceInstallStateItemRequestBuilder.cs index 979a9b81f7f..49ce53cfe0f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/DeviceStates/Item/DeviceInstallStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/DeviceStates/Item/DeviceInstallStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceInstallState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceInstallState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/InstallSummary/InstallSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/InstallSummary/InstallSummaryRequestBuilder.cs index 33754ef2ad2..a4f74b176ef 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/InstallSummary/InstallSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/InstallSummary/InstallSummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EBookInstallSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EBookInstallSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/ManagedEBookItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/ManagedEBookItemRequestBuilder.cs index 503988a1436..9031d417fb7 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/ManagedEBookItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/ManagedEBookItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedEBook body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedEBook body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/Item/DeviceStates/DeviceStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/Item/DeviceStates/DeviceStatesRequestBuilder.cs index 14ff8648a55..5f80248b0bd 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/Item/DeviceStates/DeviceStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/Item/DeviceStates/DeviceStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceInstallState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceInstallState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/Item/DeviceStates/Item/DeviceInstallStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/Item/DeviceStates/Item/DeviceInstallStateItemRequestBuilder.cs index afe3cae8d9c..df0ce821128 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/Item/DeviceStates/Item/DeviceInstallStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/Item/DeviceStates/Item/DeviceInstallStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceInstallState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceInstallState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/Item/UserInstallStateSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/Item/UserInstallStateSummaryItemRequestBuilder.cs index 8fa4d988258..277a80c6bbe 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/Item/UserInstallStateSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/Item/UserInstallStateSummaryItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserInstallStateSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserInstallStateSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/UserStateSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/UserStateSummaryRequestBuilder.cs index c5458b33a06..a6aca57f117 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/UserStateSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/Item/UserStateSummary/UserStateSummaryRequestBuilder.cs @@ -93,7 +93,7 @@ public UserStateSummaryRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserInstallStateSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserInstallStateSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/ManagedEBooksRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/ManagedEBooksRequestBuilder.cs index 5c0286c36c0..4270667f54c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/ManagedEBooksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/ManagedEBooks/ManagedEBooksRequestBuilder.cs @@ -93,7 +93,7 @@ public ManagedEBooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedEBook body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedEBook body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs index a45747ea689..5716aecc81e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs @@ -52,7 +52,7 @@ public HasPayloadLinksPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.HasPayloadLinks.HasPayloadLinksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.HasPayloadLinks.HasPayloadLinksPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("payloadIds", PayloadIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksPostResponse.cs index 9805e17a6f8..64347070d17 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksPostResponse.cs @@ -36,7 +36,7 @@ public partial class HasPayloadLinksPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.HasPayloadLinks.HasPayloadLinksPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.HasPayloadLinks.HasPayloadLinksPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs index 1f00ac680d4..1a5fddf7b8c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs @@ -50,7 +50,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsHasPayloadLinksPostResponseAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksResponse.cs index 4719e8f4daa..2ed28f466d4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/HasPayloadLinks/HasPayloadLinksResponse.cs @@ -20,7 +20,7 @@ public partial class HasPayloadLinksResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.HasPayloadLinks.HasPayloadLinksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MdmWindowsInformationProtectionPolicies.HasPayloadLinks.HasPayloadLinksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/AssignmentsRequestBuilder.cs index 689e6eeb0b7..140034b0e2f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs index c5e04d5208c..0835a4c7893 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/ExemptAppLockerFilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/ExemptAppLockerFilesRequestBuilder.cs index 949299cca3f..d683a169538 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/ExemptAppLockerFilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/ExemptAppLockerFilesRequestBuilder.cs @@ -93,7 +93,7 @@ public ExemptAppLockerFilesRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs index ff2155191df..b3849fbbfa9 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/MdmWindowsInformationProtectionPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/MdmWindowsInformationProtectionPolicyItemRequestBuilder.cs index 721fadf3b17..906fd7f66e4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/MdmWindowsInformationProtectionPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/MdmWindowsInformationProtectionPolicyItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MdmWindowsInformationProtectionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MdmWindowsInformationProtectionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs index a0b6e0e0147..e6b39186885 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/ProtectedAppLockerFilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/ProtectedAppLockerFilesRequestBuilder.cs index 19662b0d904..2329af89d97 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/ProtectedAppLockerFilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/ProtectedAppLockerFilesRequestBuilder.cs @@ -93,7 +93,7 @@ public ProtectedAppLockerFilesRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/MdmWindowsInformationProtectionPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/MdmWindowsInformationProtectionPoliciesRequestBuilder.cs index 87eaff2ceac..13109db3770 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/MdmWindowsInformationProtectionPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MdmWindowsInformationProtectionPolicies/MdmWindowsInformationProtectionPoliciesRequestBuilder.cs @@ -99,7 +99,7 @@ public MdmWindowsInformationProtectionPoliciesRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MdmWindowsInformationProtectionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MdmWindowsInformationProtectionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCatalogPackages/Item/MobileAppCatalogPackageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCatalogPackages/Item/MobileAppCatalogPackageItemRequestBuilder.cs index ec2817f3e21..4bdd9b93554 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCatalogPackages/Item/MobileAppCatalogPackageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCatalogPackages/Item/MobileAppCatalogPackageItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppCatalogPackage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppCatalogPackage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCatalogPackages/MobileAppCatalogPackagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCatalogPackages/MobileAppCatalogPackagesRequestBuilder.cs index 9c9053cf3b7..22b3451e519 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCatalogPackages/MobileAppCatalogPackagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCatalogPackages/MobileAppCatalogPackagesRequestBuilder.cs @@ -93,7 +93,7 @@ public MobileAppCatalogPackagesRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppCatalogPackage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppCatalogPackage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCategories/Item/MobileAppCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCategories/Item/MobileAppCategoryItemRequestBuilder.cs index 0d610ff20c5..e8d8183f71c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCategories/Item/MobileAppCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCategories/Item/MobileAppCategoryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCategories/MobileAppCategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCategories/MobileAppCategoriesRequestBuilder.cs index 3f185699a18..f12116914dd 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCategories/MobileAppCategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppCategories/MobileAppCategoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public MobileAppCategoriesRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assign/AssignPostRequestBody.cs index 7d290907cc2..b560f167c10 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileAppConfigurations.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileAppConfigurations.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assign/AssignRequestBuilder.cs index 8d6b2622884..e6d1481b5d7 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileAppConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileAppConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs index 5ddae9db847..9e3e6fb0be4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assignments/Item/ManagedDeviceMobileAppConfigurationAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assignments/Item/ManagedDeviceMobileAppConfigurationAssignmentItemRequestBuilder.cs index b820afb2be4..1b28724929f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assignments/Item/ManagedDeviceMobileAppConfigurationAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/Assignments/Item/ManagedDeviceMobileAppConfigurationAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/DeviceStatusSummary/DeviceStatusSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/DeviceStatusSummary/DeviceStatusSummaryRequestBuilder.cs index 2c51bf315a0..b6381f608b5 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/DeviceStatusSummary/DeviceStatusSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/DeviceStatusSummary/DeviceStatusSummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs index 051730eb5f1..1024801c513 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceStatusesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/DeviceStatuses/Item/ManagedDeviceMobileAppConfigurationDeviceStatusItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/DeviceStatuses/Item/ManagedDeviceMobileAppConfigurationDeviceStatusItemRequestBuilder.cs index aa8f4f8936a..04f8bb6eda9 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/DeviceStatuses/Item/ManagedDeviceMobileAppConfigurationDeviceStatusItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/DeviceStatuses/Item/ManagedDeviceMobileAppConfigurationDeviceStatusItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/ManagedDeviceMobileAppConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/ManagedDeviceMobileAppConfigurationItemRequestBuilder.cs index 043cc8f5948..2784e30eaee 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/ManagedDeviceMobileAppConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/ManagedDeviceMobileAppConfigurationItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/UserStatusSummary/UserStatusSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/UserStatusSummary/UserStatusSummaryRequestBuilder.cs index 1f42fad8279..d641999fea2 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/UserStatusSummary/UserStatusSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/UserStatusSummary/UserStatusSummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/UserStatuses/Item/ManagedDeviceMobileAppConfigurationUserStatusItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/UserStatuses/Item/ManagedDeviceMobileAppConfigurationUserStatusItemRequestBuilder.cs index 37a802bab59..5e244f88897 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/UserStatuses/Item/ManagedDeviceMobileAppConfigurationUserStatusItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/UserStatuses/Item/ManagedDeviceMobileAppConfigurationUserStatusItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/UserStatuses/UserStatusesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/UserStatuses/UserStatusesRequestBuilder.cs index c5f0bccfb9e..a40a34edf6a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/UserStatuses/UserStatusesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/Item/UserStatuses/UserStatusesRequestBuilder.cs @@ -93,7 +93,7 @@ public UserStatusesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/MobileAppConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/MobileAppConfigurationsRequestBuilder.cs index 66f9bc42f7f..e4cdb7be4ca 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/MobileAppConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppConfigurations/MobileAppConfigurationsRequestBuilder.cs @@ -93,7 +93,7 @@ public MobileAppConfigurationsRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppRelationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppRelationships/Item/MobileAppRelationshipItemRequestBuilder.cs index 001d89c6d9d..8c1a1ffc4df 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppRelationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppRelationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppRelationships/MobileAppRelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppRelationships/MobileAppRelationshipsRequestBuilder.cs index 3cd47cc427b..33f10fef1a4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppRelationships/MobileAppRelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileAppRelationships/MobileAppRelationshipsRequestBuilder.cs @@ -93,7 +93,7 @@ public MobileAppRelationshipsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs index ebe91bfaacb..5dbfa043243 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs @@ -52,7 +52,7 @@ public HasPayloadLinksPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.HasPayloadLinks.HasPayloadLinksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.HasPayloadLinks.HasPayloadLinksPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("payloadIds", PayloadIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksPostResponse.cs index 8fca6930659..3dbd9de7032 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksPostResponse.cs @@ -36,7 +36,7 @@ public partial class HasPayloadLinksPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.HasPayloadLinks.HasPayloadLinksPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.HasPayloadLinks.HasPayloadLinksPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs index 40ecfa143f1..056d78630b5 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs @@ -50,7 +50,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsHasPayloadLinksPostResponseAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksResponse.cs index d92c6390b29..cfd4b03114a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/HasPayloadLinks/HasPayloadLinksResponse.cs @@ -20,7 +20,7 @@ public partial class HasPayloadLinksResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.HasPayloadLinks.HasPayloadLinksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.HasPayloadLinks.HasPayloadLinksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assign/AssignPostRequestBody.cs index 59cd9b03328..fffbd379665 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("mobileAppAssignments", MobileAppAssignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assign/AssignRequestBuilder.cs index 25f48119bcc..c3dfe17b870 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assignments/AssignmentsRequestBuilder.cs index 8f901c5d91e..5052a24f0f8 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index f1d5dadb93a..24f028c493a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Assignments/AssignmentsRequestBuilder.cs index 095413f439f..df51093fa3f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index 761f1cc08ba..00e1f258761 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index d9763b643eb..c6dbf24017e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Relationships/RelationshipsRequestBuilder.cs index 5c4c054bec6..fec76a3b1f7 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidForWorkApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphAndroidForWorkApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/AssignmentsRequestBuilder.cs index 965d0435277..a402ff8cf4e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index 0a9313a3eba..7e457d6be50 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/ContentVersionsRequestBuilder.cs index 65b6445ecdd..e3ba42a041c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/ContentVersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs index 9e410b8f41a..237b928f880 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs index c5c3dce709b..95aadbe170d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs index e4517645f3c..65a0ba4f606 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -93,7 +93,7 @@ public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index c3c6a81cdc8..5dd56cc9fae 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -53,7 +53,7 @@ public CommitPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index 31c5610087d..8c07720bc91 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs index 41a202d246f..66b34b4dfcf 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs index 09a394d47dd..14e183520dc 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index 24bab54b5b5..4f20f1e17c4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Relationships/RelationshipsRequestBuilder.cs index 67a7cfffe10..4bddc9cf3c4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidLobApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphAndroidLobApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Assignments/AssignmentsRequestBuilder.cs index 787de0e01c5..395884e04d7 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index 402671de0cf..3267bfc3190 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index 2f67c961ac2..fa481bb3848 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Relationships/RelationshipsRequestBuilder.cs index 01ce854aff2..708e541baef 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidManagedStoreApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphAndroidManagedStoreApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/AssignmentsRequestBuilder.cs index 60526ca3a50..165ba63044d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index 5c9a63ad5f9..2913a2f0504 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index bf05a162a51..88531ec793b 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Relationships/RelationshipsRequestBuilder.cs index a6112fb20e4..6991ea0a50f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphAndroidStoreApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphAndroidStoreApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/AssignmentsRequestBuilder.cs index 5e734a3fc11..d5b7cbfd348 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index c152c3a92a0..72301824345 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/ContentVersionsRequestBuilder.cs index 5e422c678de..1464dde50b4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/ContentVersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs index b5874e2e348..bf781c40b09 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs index bc8afebd3f7..84a4810dcef 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs index 27be8f47ae7..048884302ce 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -93,7 +93,7 @@ public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index 1e1f364ade0..a7b35351844 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -53,7 +53,7 @@ public CommitPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index 3f4fbfed850..622d3bda6f7 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs index a5956bf0aa0..2549736e2f7 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs index b7325f0ce48..6580646470f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index 6de580705ce..15ba6a5522d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Relationships/RelationshipsRequestBuilder.cs index 4c0f4f48d8a..6cf50d704c0 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosLobApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphIosLobApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/AssignmentsRequestBuilder.cs index e38090b8178..f87f54ecc31 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index 4427e648fc0..12198f30a92 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index bac4a8ea6d8..458f838a40f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Relationships/RelationshipsRequestBuilder.cs index 4a6e8d2c672..2b9dd164ba4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosStoreApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphIosStoreApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/AssignedLicenses/AssignedLicensesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/AssignedLicenses/AssignedLicensesRequestBuilder.cs index 3767c7f746f..4a5ca75b68f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/AssignedLicenses/AssignedLicensesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/AssignedLicenses/AssignedLicensesRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignedLicensesRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IosVppAppAssignedLicense body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IosVppAppAssignedLicense body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/AssignedLicenses/Item/IosVppAppAssignedLicenseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/AssignedLicenses/Item/IosVppAppAssignedLicenseItemRequestBuilder.cs index 072e48083fa..557d2e52832 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/AssignedLicenses/Item/IosVppAppAssignedLicenseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/AssignedLicenses/Item/IosVppAppAssignedLicenseItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IosVppAppAssignedLicense body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IosVppAppAssignedLicense body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/AssignmentsRequestBuilder.cs index 87e29924418..a3239a4e4fd 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index 7665fe3e71b..382c50932ad 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index e6c5ff24f66..dae55e12c3b 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Relationships/RelationshipsRequestBuilder.cs index d82207da425..ff89f1460b8 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphIosVppApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphIosVppApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/AssignmentsRequestBuilder.cs index 1c70e225426..ba022e386d0 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index 849b46d29e0..87f89123e53 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/ContentVersionsRequestBuilder.cs index 040775c1d0d..5aee293a2ff 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/ContentVersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs index e8ab66b80b4..0948d77b358 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs index db53349aa90..6d88cafa506 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/FilesRequestBuilder.cs index 1e0c90b2b8c..e132f9a50ab 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/FilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -93,7 +93,7 @@ public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index 5475b6460ca..833ccfa7ee5 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -53,7 +53,7 @@ public CommitPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index d86bdc8475f..9d4b67a64df 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs index c050d553ed2..4973d551a5e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs index 12bdc1505be..1f3a7c230b1 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index ee511595a8d..6e222a8bb6b 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Relationships/RelationshipsRequestBuilder.cs index c0f1823b9c7..8b710baed54 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSDmgApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSDmgApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/AssignmentsRequestBuilder.cs index 7959366430b..5e35f3e9fd0 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index aa00c7b25d5..7ec20a830fc 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/ContentVersionsRequestBuilder.cs index d1a6942ca0a..fde08dd3684 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/ContentVersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs index e95a5a7550b..d2e3fb7b62d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs index 94a2fbdf9ba..348a358a762 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs index 4a212710f66..94a6e98ee62 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -93,7 +93,7 @@ public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index c41384d50df..a4e9dac57be 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -53,7 +53,7 @@ public CommitPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index fb49b4fc672..dace0752e3d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs index 61dc13d982e..00e3b2bcd45 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs index ac5e57d9de1..57d4bbdbcba 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index 88f556b0457..2a3e60b8bd2 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Relationships/RelationshipsRequestBuilder.cs index f13f70db936..1f541e2a9b1 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSLobApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSLobApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Assignments/AssignmentsRequestBuilder.cs index 1a80c5c6b85..67342f24c56 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index e176d518342..73fd7430c17 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/ContentVersionsRequestBuilder.cs index 30fb2e2289a..b71770a142b 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/ContentVersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs index 903b5b5f538..8feb2408624 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs index 3c0f091b664..ec8fb8dd8e0 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/FilesRequestBuilder.cs index a4f409fa775..fb640ddfc2d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/FilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -93,7 +93,7 @@ public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index 3d916b5de11..497dd588219 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -53,7 +53,7 @@ public CommitPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSPkgApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSPkgApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index 4364df18a2b..caf56e922bc 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSPkgApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSPkgApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs index 7bb7402593f..3debaece641 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs index e57035f3cd8..c260278a335 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index e72ec48c851..f656729dc4e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Relationships/RelationshipsRequestBuilder.cs index 3a4f866d7bb..950d1d33547 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMacOSPkgApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMacOSPkgApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/AssignmentsRequestBuilder.cs index 5de3ea137cc..b5ff6513620 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index 3dcfe215b9d..0336696b435 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/ContentVersionsRequestBuilder.cs index 39e4d61fcea..3fcb5c9e444 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/ContentVersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs index f21fbacda5e..14d6ad6a73f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs index 13e8e742721..080b01c6588 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs index 6d00349a02d..f94642f6a65 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -93,7 +93,7 @@ public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index 3d8b2844d52..cf37a09d0f0 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -53,7 +53,7 @@ public CommitPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index 0fcc34f3ba6..eb185bd9967 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs index 738dad3213f..2e570cdca97 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs index b518d987e1c..87c7ed8ddca 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index 3187c5c346c..1c2c328a15a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Relationships/RelationshipsRequestBuilder.cs index afcb03042d5..b552c26c04e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedAndroidLobApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedAndroidLobApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/AssignmentsRequestBuilder.cs index 9f282f75869..b7fee269930 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index c50849a78ff..e84c58fb0a4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/ContentVersionsRequestBuilder.cs index 8896624e847..91c65d1da21 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/ContentVersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs index 45b7422a364..37eb51cbb5b 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs index 190c85bdba7..84b8620e93e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs index 5cddb8aad02..b79c6fd19c8 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -93,7 +93,7 @@ public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index 054baf9922f..38a9601e34b 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -53,7 +53,7 @@ public CommitPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index 8e11e144f43..ce25ecfa37b 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs index f18753433e2..9c4ae72efbe 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs index 75268f34db4..6a79c9b82a8 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index c57f26f98f7..6dfba2b36d8 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Relationships/RelationshipsRequestBuilder.cs index 869d2d00a18..277cef397e0 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedIOSLobApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedIOSLobApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/AssignmentsRequestBuilder.cs index 813c84e9715..5f3a4c4da6e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index 85058731886..5a10c3de453 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/ContentVersionsRequestBuilder.cs index 26021c679b5..b84623c0854 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/ContentVersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs index 3359adb9173..4a12c662f59 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs index e121f7d72b3..13d26d2e635 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs index 4dcf734454e..de89b531b84 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -93,7 +93,7 @@ public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index cae469d6e08..b5bb5dbbdcb 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -53,7 +53,7 @@ public CommitPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index a7683cfba2e..3d1bdf46da8 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs index 2be7055f6d9..758a29cbb3c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs index 8579ced9d8a..5391cb8ab18 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index 92eed8abcd0..c80d9727887 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Relationships/RelationshipsRequestBuilder.cs index 44da5d374bf..6ca54289131 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphManagedMobileLobApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphManagedMobileLobApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/AssignmentsRequestBuilder.cs index cad0147d615..3584b9e80c9 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index 8dd75c46cab..86414dcd2f7 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/ContainedApps/ContainedAppsRequestBuilder.cs index 5131aeb76f2..9632cd1ee6f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/ContainedApps/ContainedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/ContainedApps/ContainedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs index c8463b91daa..e2d41c855db 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index b0654c460d6..75a613186dd 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Relationships/RelationshipsRequestBuilder.cs index 3382c29b259..562c26906ac 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphMicrosoftStoreForBusinessApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphMicrosoftStoreForBusinessApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/AssignmentsRequestBuilder.cs index c5fc37a0ba1..21217a2b42e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index b6811304976..92fd40a1f83 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/ContentVersionsRequestBuilder.cs index 141f60754fe..b8a1a60fb0c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/ContentVersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/ContentVersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs index 40f8244964e..9aeddb1e1d0 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs index 5afad8bd025..58d2f27547d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs index 3dfe23b81af..2480060518d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -93,7 +93,7 @@ public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index 4d5ea0d4d30..625ace5d31a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -53,7 +53,7 @@ public CommitPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index f7125e0e6a1..874b2a903af 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs index e57d73249e7..9a4519ab0db 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs index e3ab1589ab5..d92d0fdca7c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index 657e270d94d..8157b3b9f52 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Relationships/RelationshipsRequestBuilder.cs index 97f819ff21c..cac670f33f6 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWin32LobApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWin32LobApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Assignments/AssignmentsRequestBuilder.cs index f07c3097c39..90775404b45 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index cd1c84b65b6..3e2deb51be5 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index 65e290d0fb1..63bd59ba4a7 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Relationships/RelationshipsRequestBuilder.cs index 414e8e4bae2..3803a39f86f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWinGetApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWinGetApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/AssignmentsRequestBuilder.cs index 09032b4c089..534a961dfe1 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index bf55f95efd9..9cc7e9f8834 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/ContentVersionsRequestBuilder.cs index 51bf66b910a..c34c75119ca 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/ContentVersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/ContentVersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs index 7ffa4f1b800..b1d95b794a4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs index e689acc6d83..57cd0f6ee4d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/FilesRequestBuilder.cs index f317fd7b3db..e59c4cfb896 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/FilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -93,7 +93,7 @@ public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index 217f306e959..e5dacbaffb6 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -53,7 +53,7 @@ public CommitPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index 0e6a416a3d2..d681f716d96 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs index 5c8c70cb3e6..6a5c7a5be08 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs index e82e82c373e..0fa64cad8c8 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index cb4b1070a74..2e8d0350b64 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Relationships/RelationshipsRequestBuilder.cs index 3c52558da6e..77ce140980f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsAppX/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsAppX.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/AssignmentsRequestBuilder.cs index dc3384e651d..2179a8e4c42 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index b0248bcf245..ccfa214f748 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/ContentVersionsRequestBuilder.cs index c6732a04a40..a513108e752 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/ContentVersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/ContentVersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs index 4602cb56b5e..d6fd6cf8517 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs index 1c8d44b69bb..3a86e1cc42c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/FilesRequestBuilder.cs index 7dd2164387e..0e1a8096c16 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/FilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -93,7 +93,7 @@ public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index bd13f9a1a07..44bef48ae49 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -53,7 +53,7 @@ public CommitPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index 3e93364061c..54c7133826c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs index b12f01eef3f..4e0a1b83bdc 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs index 5803041e973..2ae1d740e34 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index 530f523d6a8..edec7f2f25b 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Relationships/RelationshipsRequestBuilder.cs index 602b46f77f8..e20142bfda4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsMobileMSI/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsMobileMSI.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Assignments/AssignmentsRequestBuilder.cs index 3d3098a5b28..c3cc489c43e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index 68ec7223ec4..3e44079011f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index fefd972e411..e8f4462ac3c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Relationships/RelationshipsRequestBuilder.cs index fee35cec435..9c3d3aed22c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsStoreApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsStoreApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/AssignmentsRequestBuilder.cs index 5d64e00c1e5..66000ad53f2 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index de09c33d679..0f2f55dbbcb 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/CommittedContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/CommittedContainedAppsRequestBuilder.cs index 841e0ad45e7..a5683954cbe 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/CommittedContainedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/CommittedContainedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public CommittedContainedAppsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/Item/MobileContainedAppItemRequestBuilder.cs index fe9f7f73389..f7b8c09fdca 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/Item/MobileContainedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/CommittedContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/ContentVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/ContentVersionsRequestBuilder.cs index 9922fa00984..d8bf36165ee 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/ContentVersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/ContentVersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContentVersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs index 92d986e2826..9bd01997c99 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/ContainedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public ContainedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs index 1a09c03121e..f5e6c842140 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/ContainedApps/Item/MobileContainedAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileContainedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/FilesRequestBuilder.cs index 47eaade89a0..afbba7ac129 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/FilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/FilesRequestBuilder.cs @@ -93,7 +93,7 @@ public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs index 439a922a424..998be1beddc 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/Commit/CommitPostRequestBody.cs @@ -53,7 +53,7 @@ public CommitPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fileEncryptionInfo", FileEncryptionInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs index 19f120ca075..b49f3b55e99 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/Commit/CommitRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.ContentVersions.Item.Files.Item.Commit.CommitPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs index 26533da2445..ea2e3258156 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/Files/Item/MobileAppContentFileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContentFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs index 91cc7ca0210..47152d8413a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/ContentVersions/Item/MobileAppContentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index 943083e601d..39124e7f429 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Relationships/RelationshipsRequestBuilder.cs index 3ec862aca5a..8a06bb5323d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsUniversalAppX/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsUniversalAppX.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/AssignmentsRequestBuilder.cs index 64f8f4652fc..e286ca3cc93 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs index 90c6889d935..76697fda11a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Assignments/Item/MobileAppAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index 4fcd9bfad5f..f31127e8011 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Relationships/RelationshipsRequestBuilder.cs index e305b19df9c..730363e7f0a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/GraphWindowsWebApp/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.GraphWindowsWebApp.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/MobileAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/MobileAppItemRequestBuilder.cs index 4b79e9807a1..23c28a9b109 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/MobileAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/MobileAppItemRequestBuilder.cs @@ -252,7 +252,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -313,7 +313,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs index 1b462157749..cc244f815fd 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Relationships/Item/MobileAppRelationshipItemRequestBuilder.cs @@ -57,7 +57,7 @@ public async Task DeleteAsync(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +182,7 @@ public partial class MobileAppRelationshipItemRequestBuilderDeleteRequestConfigu { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MobileAppRelationshipItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Relationships/RelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Relationships/RelationshipsRequestBuilder.cs index ec6dea89815..7689fd41f5f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/Relationships/RelationshipsRequestBuilder.cs @@ -54,7 +54,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Cancellation token to use when cancelling requests @@ -93,7 +93,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -102,7 +102,7 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MobileAppRelationship.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppRelationship body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.Relationships.RelationshipsRequestBuilder(rawUrl, RequestAdapter); } /// - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RelationshipsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/UpdateRelationships/UpdateRelationshipsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/UpdateRelationships/UpdateRelationshipsPostRequestBody.cs index 1e0b2e56929..7d4e4e6316a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/UpdateRelationships/UpdateRelationshipsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/UpdateRelationships/UpdateRelationshipsPostRequestBody.cs @@ -53,7 +53,7 @@ public UpdateRelationshipsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.UpdateRelationships.UpdateRelationshipsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.UpdateRelationships.UpdateRelationshipsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("relationships", Relationships); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/UpdateRelationships/UpdateRelationshipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/UpdateRelationships/UpdateRelationshipsRequestBuilder.cs index 81c38036e81..9fe0edcf1b4 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/UpdateRelationships/UpdateRelationshipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/Item/UpdateRelationships/UpdateRelationshipsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Mob public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.UpdateRelationships.UpdateRelationshipsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.Item.UpdateRelationships.UpdateRelationshipsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/MobileAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/MobileAppsRequestBuilder.cs index 8b67a169606..38d45000998 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/MobileAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/MobileAppsRequestBuilder.cs @@ -242,7 +242,7 @@ public MobileAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -284,7 +284,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlPostRequestBody.cs index 4a12198cd0e..fdc29ad53e5 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlPostRequestBody.cs @@ -52,7 +52,7 @@ public ValidateXmlPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.ValidateXml.ValidateXmlPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.ValidateXml.ValidateXmlPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("officeConfigurationXml", OfficeConfigurationXml); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlPostResponse.cs index 42ea798079c..d0031975424 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlPostResponse.cs @@ -52,7 +52,7 @@ public ValidateXmlPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.ValidateXml.ValidateXmlPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.ValidateXml.ValidateXmlPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlRequestBuilder.cs index 30953fa2f37..4d2aa798645 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlRequestBuilder.cs @@ -50,7 +50,7 @@ public ValidateXmlRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsValidateXmlPostResponseAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.ValidateXml.ValidateXmlPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public ValidateXmlRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.ValidateXml.ValidateXmlPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.ValidateXml.ValidateXmlPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlResponse.cs index ad1e52f4af3..089479b6b09 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/MobileApps/ValidateXml/ValidateXmlResponse.cs @@ -20,7 +20,7 @@ public partial class ValidateXmlResponse : global::Microsoft.Graph.Beta.DeviceAp /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.ValidateXml.ValidateXmlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.MobileApps.ValidateXml.ValidateXmlResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsPostRequestBody.cs index b482d07428c..d4d461543b3 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsPostRequestBody.cs @@ -52,7 +52,7 @@ public GetPolicySetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.PolicySets.GetPolicySets.GetPolicySetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.PolicySets.GetPolicySets.GetPolicySetsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("policySetIds", PolicySetIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsPostResponse.cs index cfaac8ee195..2a88efa90c7 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetPolicySetsPostResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.PolicySets.GetPolicySets.GetPolicySetsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.PolicySets.GetPolicySets.GetPolicySetsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsRequestBuilder.cs index 68ede35cf7e..e154512c569 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetPolicySetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsGetPolicySetsPostResponseAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.PolicySets.GetPolicySets.GetPolicySetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetPolicySetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.PolicySets.GetPolicySets.GetPolicySetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.PolicySets.GetPolicySets.GetPolicySetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsResponse.cs index 95ff5344dae..387f02353de 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/GetPolicySets/GetPolicySetsResponse.cs @@ -20,7 +20,7 @@ public partial class GetPolicySetsResponse : global::Microsoft.Graph.Beta.Device /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.PolicySets.GetPolicySets.GetPolicySetsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.PolicySets.GetPolicySets.GetPolicySetsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Assignments/AssignmentsRequestBuilder.cs index 768ddd713fe..e2d925bbc8c 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PolicySetAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PolicySetAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Assignments/Item/PolicySetAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Assignments/Item/PolicySetAssignmentItemRequestBuilder.cs index ae6a36b4188..6629030d365 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Assignments/Item/PolicySetAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Assignments/Item/PolicySetAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PolicySetAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PolicySetAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Items/Item/PolicySetItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Items/Item/PolicySetItemItemRequestBuilder.cs index a0a4f39daf2..a66f2d0eb52 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Items/Item/PolicySetItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Items/Item/PolicySetItemItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PolicySetItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PolicySetItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Items/ItemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Items/ItemsRequestBuilder.cs index 906efd29c6c..9f28405a583 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Items/ItemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Items/ItemsRequestBuilder.cs @@ -93,7 +93,7 @@ public ItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PolicySetItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PolicySetItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/PolicySetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/PolicySetItemRequestBuilder.cs index 408c0c248e1..3356cfa4e75 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/PolicySetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/PolicySetItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PolicySet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PolicySet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Update/UpdatePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Update/UpdatePostRequestBody.cs index 2abc93dd739..42ed86c406e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Update/UpdatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Update/UpdatePostRequestBody.cs @@ -101,7 +101,7 @@ public UpdatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.PolicySets.Item.Update.UpdatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.PolicySets.Item.Update.UpdatePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("addedPolicySetItems", AddedPolicySetItems); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteCollectionOfPrimitiveValues("deletedPolicySetItems", DeletedPolicySetItems); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Update/UpdateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Update/UpdateRequestBuilder.cs index 9f286e983c1..0e914ea70ad 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Update/UpdateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/Item/Update/UpdateRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Pol public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.PolicySets.Item.Update.UpdatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.PolicySets.Item.Update.UpdatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/PolicySetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/PolicySetsRequestBuilder.cs index 22827873ef4..0ab830226c0 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/PolicySetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/PolicySets/PolicySetsRequestBuilder.cs @@ -99,7 +99,7 @@ public PolicySetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PolicySet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PolicySet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/SymantecCodeSigningCertificate/SymantecCodeSigningCertificateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/SymantecCodeSigningCertificate/SymantecCodeSigningCertificateRequestBuilder.cs index d407afeaaad..c66bf270343 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/SymantecCodeSigningCertificate/SymantecCodeSigningCertificateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/SymantecCodeSigningCertificate/SymantecCodeSigningCertificateRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SymantecCodeSigningCertificate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SymantecCodeSigningCertificate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs index 946fed443b7..89b0a4e790a 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs @@ -52,7 +52,7 @@ public HasPayloadLinksPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("payloadIds", PayloadIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs index 6bca97f0a40..e46b99b2277 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs @@ -36,7 +36,7 @@ public partial class HasPayloadLinksPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.HasPayloadLinks.HasPayloadLinksPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.HasPayloadLinks.HasPayloadLinksPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs index 29e3117facf..0e647cb4a83 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs @@ -50,7 +50,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsHasPayloadLinksPostResponseAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs index 683552eecbb..c630553dd17 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs @@ -20,7 +20,7 @@ public partial class HasPayloadLinksResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.HasPayloadLinks.HasPayloadLinksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.HasPayloadLinks.HasPayloadLinksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Apps/AppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Apps/AppsRequestBuilder.cs index 1b623212a91..3e4d3e49078 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Apps/AppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Apps/AppsRequestBuilder.cs @@ -93,7 +93,7 @@ public AppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs index 002ed9c15d5..5ac469f3791 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assign/AssignPostRequestBody.cs index cb2def9e665..9a43e2d863d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assign/AssignRequestBuilder.cs index 6e789f56bf2..6f77e3fc590 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Tar public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs index 55b98b84f6c..e27175ca332 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs index d931d99ae8f..1c8132bc447 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/ChangeSettings/ChangeSettingsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/ChangeSettings/ChangeSettingsPostRequestBody.cs index 160ee6654d0..04d01b54c68 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/ChangeSettings/ChangeSettingsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/ChangeSettings/ChangeSettingsPostRequestBody.cs @@ -53,7 +53,7 @@ public ChangeSettingsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.Item.ChangeSettings.ChangeSettingsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.Item.ChangeSettings.ChangeSettingsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("settings", Settings); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/ChangeSettings/ChangeSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/ChangeSettings/ChangeSettingsRequestBuilder.cs index d91880129e6..8021598fbce 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/ChangeSettings/ChangeSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/ChangeSettings/ChangeSettingsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Tar public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.Item.ChangeSettings.ChangeSettingsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.Item.ChangeSettings.ChangeSettingsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs index e108e234a18..0f5cfc9fb26 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedAppPolicyDeploymentSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppPolicyDeploymentSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs index 0b5e579ed57..1e34500e079 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Settings/SettingsRequestBuilder.cs index 0310ae727f4..77a07ebc69f 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/Settings/SettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/TargetApps/TargetAppsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/TargetApps/TargetAppsPostRequestBody.cs index f10f8c914a2..bd05c9c40b7 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/TargetApps/TargetAppsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/TargetApps/TargetAppsPostRequestBody.cs @@ -59,7 +59,7 @@ public TargetAppsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.Item.TargetApps.TargetAppsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.Item.TargetApps.TargetAppsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("appGroupType", AppGroupType); writer.WriteCollectionOfObjectValues("apps", Apps); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/TargetApps/TargetAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/TargetApps/TargetAppsRequestBuilder.cs index 7a6e30f484c..894d62a9454 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/TargetApps/TargetAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/TargetApps/TargetAppsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Tar public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.Item.TargetApps.TargetAppsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.TargetedManagedAppConfigurations.Item.TargetApps.TargetAppsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/TargetedManagedAppConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/TargetedManagedAppConfigurationItemRequestBuilder.cs index 2f16029a49f..a575fcca3a2 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/TargetedManagedAppConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/Item/TargetedManagedAppConfigurationItemRequestBuilder.cs @@ -138,7 +138,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TargetedManagedAppConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -199,7 +199,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TargetedManagedAppConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/TargetedManagedAppConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/TargetedManagedAppConfigurationsRequestBuilder.cs index 8511024753f..e72981b35d0 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/TargetedManagedAppConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/TargetedManagedAppConfigurations/TargetedManagedAppConfigurationsRequestBuilder.cs @@ -99,7 +99,7 @@ public TargetedManagedAppConfigurationsRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TargetedManagedAppConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TargetedManagedAppConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/GetLicensesForAppWithBundleId/GetLicensesForAppWithBundleIdGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/GetLicensesForAppWithBundleId/GetLicensesForAppWithBundleIdGetResponse.cs index b5ab2e485eb..80749486649 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/GetLicensesForAppWithBundleId/GetLicensesForAppWithBundleIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/GetLicensesForAppWithBundleId/GetLicensesForAppWithBundleIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetLicensesForAppWithBundleIdGetResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.VppTokens.GetLicensesForAppWithBundleId.GetLicensesForAppWithBundleIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.VppTokens.GetLicensesForAppWithBundleId.GetLicensesForAppWithBundleIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/GetLicensesForAppWithBundleId/GetLicensesForAppWithBundleIdResponse.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/GetLicensesForAppWithBundleId/GetLicensesForAppWithBundleIdResponse.cs index addb92d73bc..3e06d032e08 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/GetLicensesForAppWithBundleId/GetLicensesForAppWithBundleIdResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/GetLicensesForAppWithBundleId/GetLicensesForAppWithBundleIdResponse.cs @@ -20,7 +20,7 @@ public partial class GetLicensesForAppWithBundleIdResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceAppManagement.VppTokens.GetLicensesForAppWithBundleId.GetLicensesForAppWithBundleIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.VppTokens.GetLicensesForAppWithBundleId.GetLicensesForAppWithBundleIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/Item/RevokeLicenses/RevokeLicensesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/Item/RevokeLicenses/RevokeLicensesPostRequestBody.cs index 6a06b8d50f1..6b591343b77 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/Item/RevokeLicenses/RevokeLicensesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/Item/RevokeLicenses/RevokeLicensesPostRequestBody.cs @@ -48,7 +48,7 @@ public RevokeLicensesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.VppTokens.Item.RevokeLicenses.RevokeLicensesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.VppTokens.Item.RevokeLicenses.RevokeLicensesPostRequestBody(); } /// @@ -69,7 +69,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("notifyManagedDevices", NotifyManagedDevices); writer.WriteBoolValue("revokeUntrackedLicenses", RevokeUntrackedLicenses); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/Item/RevokeLicenses/RevokeLicensesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/Item/RevokeLicenses/RevokeLicensesRequestBuilder.cs index 0131c38367c..695faea8258 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/Item/RevokeLicenses/RevokeLicensesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/Item/RevokeLicenses/RevokeLicensesRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Vpp public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.VppTokens.Item.RevokeLicenses.RevokeLicensesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.VppTokens.Item.RevokeLicenses.RevokeLicensesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/Item/VppTokenItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/Item/VppTokenItemRequestBuilder.cs index b804821f7bf..6faae039576 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/Item/VppTokenItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/Item/VppTokenItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.VppToken body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.VppToken body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/VppTokensRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/VppTokensRequestBuilder.cs index 91143aae1ca..f2eafd8b8d3 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/VppTokensRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/VppTokens/VppTokensRequestBuilder.cs @@ -110,7 +110,7 @@ public VppTokensRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.VppToken body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.VppToken body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assign/AssignPostRequestBody.cs index abea8ca39cf..d65592ba4e6 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.WdacSupplementalPolicies.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.WdacSupplementalPolicies.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("wdacPolicyAssignments", WdacPolicyAssignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assign/AssignRequestBuilder.cs index b57abd6a80c..62dd70fb3a7 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Wda public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.WdacSupplementalPolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.WdacSupplementalPolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assignments/AssignmentsRequestBuilder.cs index 16210b2473f..f64e6f2e9cd 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assignments/Item/WindowsDefenderApplicationControlSupplementalPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assignments/Item/WindowsDefenderApplicationControlSupplementalPolicyAssignmentItemRequestBuilder.cs index c7a0ab45b6d..98240605517 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assignments/Item/WindowsDefenderApplicationControlSupplementalPolicyAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/Assignments/Item/WindowsDefenderApplicationControlSupplementalPolicyAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/DeploySummary/DeploySummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/DeploySummary/DeploySummaryRequestBuilder.cs index add0e721ee3..fd98b819ce3 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/DeploySummary/DeploySummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/DeploySummary/DeploySummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyDeploymentSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyDeploymentSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs index a3931461b90..bf8aac87003 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceStatusesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/DeviceStatuses/Item/WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatusItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/DeviceStatuses/Item/WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatusItemRequestBuilder.cs index 823ab9abe1b..be1bbb38e4d 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/DeviceStatuses/Item/WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatusItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/DeviceStatuses/Item/WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatusItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/WindowsDefenderApplicationControlSupplementalPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/WindowsDefenderApplicationControlSupplementalPolicyItemRequestBuilder.cs index 15db25932d8..295629f95a5 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/WindowsDefenderApplicationControlSupplementalPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/Item/WindowsDefenderApplicationControlSupplementalPolicyItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/WdacSupplementalPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/WdacSupplementalPoliciesRequestBuilder.cs index 0d8292d33dc..c0be8ba8488 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/WdacSupplementalPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WdacSupplementalPolicies/WdacSupplementalPoliciesRequestBuilder.cs @@ -93,7 +93,7 @@ public WdacSupplementalPoliciesRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionDeviceRegistrations/Item/WindowsInformationProtectionDeviceRegistrationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionDeviceRegistrations/Item/WindowsInformationProtectionDeviceRegistrationItemRequestBuilder.cs index c616f981811..d4bd4cc7397 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionDeviceRegistrations/Item/WindowsInformationProtectionDeviceRegistrationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionDeviceRegistrations/Item/WindowsInformationProtectionDeviceRegistrationItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionDeviceRegistration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionDeviceRegistration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionDeviceRegistrations/WindowsInformationProtectionDeviceRegistrationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionDeviceRegistrations/WindowsInformationProtectionDeviceRegistrationsRequestBuilder.cs index 5677a3dd733..c6b9860e5d5 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionDeviceRegistrations/WindowsInformationProtectionDeviceRegistrationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionDeviceRegistrations/WindowsInformationProtectionDeviceRegistrationsRequestBuilder.cs @@ -93,7 +93,7 @@ public WindowsInformationProtectionDeviceRegistrationsRequestBuilder(string rawU public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionDeviceRegistration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionDeviceRegistration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/AssignmentsRequestBuilder.cs index d08477760e5..c2c2fc155f6 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs index cc8352ed851..85dadf8906e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/ExemptAppLockerFilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/ExemptAppLockerFilesRequestBuilder.cs index 653c6895bca..e3ac7c7d6cb 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/ExemptAppLockerFilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/ExemptAppLockerFilesRequestBuilder.cs @@ -93,7 +93,7 @@ public ExemptAppLockerFilesRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs index b52931968b3..11e5c259d81 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ExemptAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs index d7e7bf8e1fd..ac1586dada1 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/Item/WindowsInformationProtectionAppLockerFileItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/ProtectedAppLockerFilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/ProtectedAppLockerFilesRequestBuilder.cs index 47e1b514ac3..de8e5efb1ba 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/ProtectedAppLockerFilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/ProtectedAppLockerFiles/ProtectedAppLockerFilesRequestBuilder.cs @@ -93,7 +93,7 @@ public ProtectedAppLockerFilesRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/WindowsInformationProtectionPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/WindowsInformationProtectionPolicyItemRequestBuilder.cs index 4a2b215e42b..fe473426ad9 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/WindowsInformationProtectionPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/Item/WindowsInformationProtectionPolicyItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/WindowsInformationProtectionPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/WindowsInformationProtectionPoliciesRequestBuilder.cs index 693fd2d38d0..fcbd3129fbd 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/WindowsInformationProtectionPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionPolicies/WindowsInformationProtectionPoliciesRequestBuilder.cs @@ -93,7 +93,7 @@ public WindowsInformationProtectionPoliciesRequestBuilder(string rawUrl, IReques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionWipeActions/Item/WindowsInformationProtectionWipeActionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionWipeActions/Item/WindowsInformationProtectionWipeActionItemRequestBuilder.cs index 510639d87a6..415a0a549a3 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionWipeActions/Item/WindowsInformationProtectionWipeActionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionWipeActions/Item/WindowsInformationProtectionWipeActionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionWipeAction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionWipeAction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionWipeActions/WindowsInformationProtectionWipeActionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionWipeActions/WindowsInformationProtectionWipeActionsRequestBuilder.cs index 35bf2193d40..1667c764f7e 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionWipeActions/WindowsInformationProtectionWipeActionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsInformationProtectionWipeActions/WindowsInformationProtectionWipeActionsRequestBuilder.cs @@ -93,7 +93,7 @@ public WindowsInformationProtectionWipeActionsRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionWipeAction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionWipeAction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Apps/AppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Apps/AppsRequestBuilder.cs index 1df83d6dcac..da5be62dbfc 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Apps/AppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Apps/AppsRequestBuilder.cs @@ -93,7 +93,7 @@ public AppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs index 03f93c0cc61..6af05c958a6 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Apps/Item/ManagedMobileAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedMobileApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assign/AssignPostRequestBody.cs index 7e8a40f8120..8617d9a9117 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.WindowsManagedAppProtections.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.WindowsManagedAppProtections.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assign/AssignRequestBuilder.cs index 02a3a8f5546..87899743e92 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Win public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.WindowsManagedAppProtections.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.WindowsManagedAppProtections.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs index ca6bfd61cba..48e2460c815 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs index c8ac551ced5..c0c2237e4c6 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/Assignments/Item/TargetedManagedAppPolicyAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs index 250cd47017d..c9022de4574 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/DeploymentSummary/DeploymentSummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedAppPolicyDeploymentSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppPolicyDeploymentSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/TargetApps/TargetAppsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/TargetApps/TargetAppsPostRequestBody.cs index 692250c1423..943dd8bf4da 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/TargetApps/TargetAppsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/TargetApps/TargetAppsPostRequestBody.cs @@ -53,7 +53,7 @@ public TargetAppsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceAppManagement.WindowsManagedAppProtections.Item.TargetApps.TargetAppsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceAppManagement.WindowsManagedAppProtections.Item.TargetApps.TargetAppsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("apps", Apps); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/TargetApps/TargetAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/TargetApps/TargetAppsRequestBuilder.cs index f677803d614..2716db0a279 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/TargetApps/TargetAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/TargetApps/TargetAppsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.Win public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceAppManagement.WindowsManagedAppProtections.Item.TargetApps.TargetAppsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceAppManagement.WindowsManagedAppProtections.Item.TargetApps.TargetAppsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/WindowsManagedAppProtectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/WindowsManagedAppProtectionItemRequestBuilder.cs index ef80c5eb6d3..42dff4f379b 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/WindowsManagedAppProtectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/Item/WindowsManagedAppProtectionItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsManagedAppProtection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsManagedAppProtection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/WindowsManagedAppProtectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/WindowsManagedAppProtectionsRequestBuilder.cs index 58f793ffe2c..e31d6cc0c42 100644 --- a/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/WindowsManagedAppProtectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceAppManagement/WindowsManagedAppProtections/WindowsManagedAppProtectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public WindowsManagedAppProtectionsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsManagedAppProtection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsManagedAppProtection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AdvancedThreatProtectionOnboardingStateSummary/AdvancedThreatProtectionOnboardingDeviceSettingStates/AdvancedThreatProtectionOnboardingDeviceSettingStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AdvancedThreatProtectionOnboardingStateSummary/AdvancedThreatProtectionOnboardingDeviceSettingStates/AdvancedThreatProtectionOnboardingDeviceSettingStatesRequestBuilder.cs index f6246c3c9e0..00a2632b795 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AdvancedThreatProtectionOnboardingStateSummary/AdvancedThreatProtectionOnboardingDeviceSettingStates/AdvancedThreatProtectionOnboardingDeviceSettingStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AdvancedThreatProtectionOnboardingStateSummary/AdvancedThreatProtectionOnboardingDeviceSettingStates/AdvancedThreatProtectionOnboardingDeviceSettingStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public AdvancedThreatProtectionOnboardingDeviceSettingStatesRequestBuilder(strin public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AdvancedThreatProtectionOnboardingDeviceSettingState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AdvancedThreatProtectionOnboardingDeviceSettingState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AdvancedThreatProtectionOnboardingStateSummary/AdvancedThreatProtectionOnboardingDeviceSettingStates/Item/AdvancedThreatProtectionOnboardingDeviceSettingStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AdvancedThreatProtectionOnboardingStateSummary/AdvancedThreatProtectionOnboardingDeviceSettingStates/Item/AdvancedThreatProtectionOnboardingDeviceSettingStateItemRequestBuilder.cs index 0ebd0e40c2a..c7c51785c99 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AdvancedThreatProtectionOnboardingStateSummary/AdvancedThreatProtectionOnboardingDeviceSettingStates/Item/AdvancedThreatProtectionOnboardingDeviceSettingStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AdvancedThreatProtectionOnboardingStateSummary/AdvancedThreatProtectionOnboardingDeviceSettingStates/Item/AdvancedThreatProtectionOnboardingDeviceSettingStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AdvancedThreatProtectionOnboardingDeviceSettingState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AdvancedThreatProtectionOnboardingDeviceSettingState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AdvancedThreatProtectionOnboardingStateSummary/AdvancedThreatProtectionOnboardingStateSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AdvancedThreatProtectionOnboardingStateSummary/AdvancedThreatProtectionOnboardingStateSummaryRequestBuilder.cs index b998b18042a..5122493f99f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AdvancedThreatProtectionOnboardingStateSummary/AdvancedThreatProtectionOnboardingStateSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AdvancedThreatProtectionOnboardingStateSummary/AdvancedThreatProtectionOnboardingStateSummaryRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AdvancedThreatProtectionOnboardingStateSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AdvancedThreatProtectionOnboardingStateSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/AndroidDeviceOwnerEnrollmentProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/AndroidDeviceOwnerEnrollmentProfilesRequestBuilder.cs index e82bbe9fb8c..fe6ca01666c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/AndroidDeviceOwnerEnrollmentProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/AndroidDeviceOwnerEnrollmentProfilesRequestBuilder.cs @@ -93,7 +93,7 @@ public AndroidDeviceOwnerEnrollmentProfilesRequestBuilder(string rawUrl, IReques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerEnrollmentProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerEnrollmentProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/AndroidDeviceOwnerEnrollmentProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/AndroidDeviceOwnerEnrollmentProfileItemRequestBuilder.cs index 3ee9e0cfb0b..82ee935709e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/AndroidDeviceOwnerEnrollmentProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/AndroidDeviceOwnerEnrollmentProfileItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerEnrollmentProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerEnrollmentProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/CreateToken/CreateTokenPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/CreateToken/CreateTokenPostRequestBody.cs index 1451b756365..7ec17aea8f0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/CreateToken/CreateTokenPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/CreateToken/CreateTokenPostRequestBody.cs @@ -42,7 +42,7 @@ public CreateTokenPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AndroidDeviceOwnerEnrollmentProfiles.Item.CreateToken.CreateTokenPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidDeviceOwnerEnrollmentProfiles.Item.CreateToken.CreateTokenPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("tokenValidityInSeconds", TokenValidityInSeconds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/CreateToken/CreateTokenRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/CreateToken/CreateTokenRequestBuilder.cs index 28e325b16a3..d210db4dca2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/CreateToken/CreateTokenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/CreateToken/CreateTokenRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Androi public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AndroidDeviceOwnerEnrollmentProfiles.Item.CreateToken.CreateTokenPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.AndroidDeviceOwnerEnrollmentProfiles.Item.CreateToken.CreateTokenPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetPostRequestBody.cs index 7deb853f620..8ebbc915a99 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetPostRequestBody.cs @@ -53,7 +53,7 @@ public SetEnrollmentTimeDeviceMembershipTargetPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AndroidDeviceOwnerEnrollmentProfiles.Item.SetEnrollmentTimeDeviceMembershipTarget.SetEnrollmentTimeDeviceMembershipTargetPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidDeviceOwnerEnrollmentProfiles.Item.SetEnrollmentTimeDeviceMembershipTarget.SetEnrollmentTimeDeviceMembershipTargetPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("enrollmentTimeDeviceMembershipTargets", EnrollmentTimeDeviceMembershipTargets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetRequestBuilder.cs index ca1330da5d0..460c83507a8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidDeviceOwnerEnrollmentProfiles/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetRequestBuilder.cs @@ -51,7 +51,7 @@ public SetEnrollmentTimeDeviceMembershipTargetRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AndroidDeviceOwnerEnrollmentProfiles.Item.SetEnrollmentTimeDeviceMembershipTarget.SetEnrollmentTimeDeviceMembershipTargetPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.AndroidDeviceOwnerEnrollmentProfiles.Item.SetEnrollmentTimeDeviceMembershipTarget.SetEnrollmentTimeDeviceMembershipTargetPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkAppConfigurationSchemas/AndroidForWorkAppConfigurationSchemasRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkAppConfigurationSchemas/AndroidForWorkAppConfigurationSchemasRequestBuilder.cs index 0a61d4e5829..11090894548 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkAppConfigurationSchemas/AndroidForWorkAppConfigurationSchemasRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkAppConfigurationSchemas/AndroidForWorkAppConfigurationSchemasRequestBuilder.cs @@ -93,7 +93,7 @@ public AndroidForWorkAppConfigurationSchemasRequestBuilder(string rawUrl, IReque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AndroidForWorkAppConfigurationSchema body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AndroidForWorkAppConfigurationSchema body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkAppConfigurationSchemas/Item/AndroidForWorkAppConfigurationSchemaItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkAppConfigurationSchemas/Item/AndroidForWorkAppConfigurationSchemaItemRequestBuilder.cs index f829e482b2a..733ca58690a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkAppConfigurationSchemas/Item/AndroidForWorkAppConfigurationSchemaItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkAppConfigurationSchemas/Item/AndroidForWorkAppConfigurationSchemaItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AndroidForWorkAppConfigurationSchema body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AndroidForWorkAppConfigurationSchema body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/AndroidForWorkEnrollmentProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/AndroidForWorkEnrollmentProfilesRequestBuilder.cs index f06e38adb3a..da9d4b2664c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/AndroidForWorkEnrollmentProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/AndroidForWorkEnrollmentProfilesRequestBuilder.cs @@ -93,7 +93,7 @@ public AndroidForWorkEnrollmentProfilesRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AndroidForWorkEnrollmentProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AndroidForWorkEnrollmentProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/Item/AndroidForWorkEnrollmentProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/Item/AndroidForWorkEnrollmentProfileItemRequestBuilder.cs index 087b0a37531..1ae6ffe8457 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/Item/AndroidForWorkEnrollmentProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/Item/AndroidForWorkEnrollmentProfileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AndroidForWorkEnrollmentProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AndroidForWorkEnrollmentProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/Item/CreateToken/CreateTokenPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/Item/CreateToken/CreateTokenPostRequestBody.cs index 10636d99d03..ed884034fd7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/Item/CreateToken/CreateTokenPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/Item/CreateToken/CreateTokenPostRequestBody.cs @@ -42,7 +42,7 @@ public CreateTokenPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkEnrollmentProfiles.Item.CreateToken.CreateTokenPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkEnrollmentProfiles.Item.CreateToken.CreateTokenPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("tokenValidityInSeconds", TokenValidityInSeconds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/Item/CreateToken/CreateTokenRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/Item/CreateToken/CreateTokenRequestBuilder.cs index 15e62978e11..2596031ac84 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/Item/CreateToken/CreateTokenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkEnrollmentProfiles/Item/CreateToken/CreateTokenRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Androi public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkEnrollmentProfiles.Item.CreateToken.CreateTokenPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkEnrollmentProfiles.Item.CreateToken.CreateTokenPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/AndroidForWorkSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/AndroidForWorkSettingsRequestBuilder.cs index 0f89f326ade..f897c5ab764 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/AndroidForWorkSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/AndroidForWorkSettingsRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AndroidForWorkSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AndroidForWorkSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/CompleteSignup/CompleteSignupPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/CompleteSignup/CompleteSignupPostRequestBody.cs index d5583495b8f..e62a1ba492f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/CompleteSignup/CompleteSignupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/CompleteSignup/CompleteSignupPostRequestBody.cs @@ -52,7 +52,7 @@ public CompleteSignupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkSettings.CompleteSignup.CompleteSignupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkSettings.CompleteSignup.CompleteSignupPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("enterpriseToken", EnterpriseToken); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/CompleteSignup/CompleteSignupRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/CompleteSignup/CompleteSignupRequestBuilder.cs index d0bd9818da3..c25b82950db 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/CompleteSignup/CompleteSignupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/CompleteSignup/CompleteSignupRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Androi public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkSettings.CompleteSignup.CompleteSignupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkSettings.CompleteSignup.CompleteSignupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlPostRequestBody.cs index 04950b2ca95..88b5509f3c5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlPostRequestBody.cs @@ -52,7 +52,7 @@ public RequestSignupUrlPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkSettings.RequestSignupUrl.RequestSignupUrlPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkSettings.RequestSignupUrl.RequestSignupUrlPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("hostName", HostName); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlPostResponse.cs index 72544e94e1a..563871266a3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlPostResponse.cs @@ -52,7 +52,7 @@ public RequestSignupUrlPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkSettings.RequestSignupUrl.RequestSignupUrlPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkSettings.RequestSignupUrl.RequestSignupUrlPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlRequestBuilder.cs index 2b0acfef2db..5c7c1c0bb1c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlRequestBuilder.cs @@ -50,7 +50,7 @@ public RequestSignupUrlRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsRequestSignupUrlPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkSettings.RequestSignupUrl.RequestSignupUrlPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestSignupUrlRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkSettings.RequestSignupUrl.RequestSignupUrlPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkSettings.RequestSignupUrl.RequestSignupUrlPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlResponse.cs index 05c52c00e6c..4974bd0e8f8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidForWorkSettings/RequestSignupUrl/RequestSignupUrlResponse.cs @@ -20,7 +20,7 @@ public partial class RequestSignupUrlResponse : global::Microsoft.Graph.Beta.Dev /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkSettings.RequestSignupUrl.RequestSignupUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidForWorkSettings.RequestSignupUrl.RequestSignupUrlResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/AddApps/AddAppsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/AddApps/AddAppsPostRequestBody.cs index 789e0b162b5..244d9656db9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/AddApps/AddAppsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/AddApps/AddAppsPostRequestBody.cs @@ -52,7 +52,7 @@ public AddAppsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.AddApps.AddAppsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.AddApps.AddAppsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("productIds", ProductIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/AddApps/AddAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/AddApps/AddAppsRequestBuilder.cs index 0491920e5c8..4ea43e453b7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/AddApps/AddAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/AddApps/AddAppsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Androi public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.AddApps.AddAppsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.AddApps.AddAppsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/AndroidManagedStoreAccountEnterpriseSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/AndroidManagedStoreAccountEnterpriseSettingsRequestBuilder.cs index c153560cf13..bfef3a32919 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/AndroidManagedStoreAccountEnterpriseSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/AndroidManagedStoreAccountEnterpriseSettingsRequestBuilder.cs @@ -144,7 +144,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAccountEnterpriseSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -205,7 +205,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAccountEnterpriseSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/ApproveApps/ApproveAppsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/ApproveApps/ApproveAppsPostRequestBody.cs index 547948219c1..ab7ffdad96d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/ApproveApps/ApproveAppsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/ApproveApps/ApproveAppsPostRequestBody.cs @@ -58,7 +58,7 @@ public ApproveAppsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.ApproveApps.ApproveAppsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.ApproveApps.ApproveAppsPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("approveAllPermissions", ApproveAllPermissions); writer.WriteCollectionOfPrimitiveValues("packageIds", PackageIds); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/ApproveApps/ApproveAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/ApproveApps/ApproveAppsRequestBuilder.cs index 1cd3d3ac947..344b1388fcd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/ApproveApps/ApproveAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/ApproveApps/ApproveAppsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Androi public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.ApproveApps.ApproveAppsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.ApproveApps.ApproveAppsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CompleteSignup/CompleteSignupPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CompleteSignup/CompleteSignupPostRequestBody.cs index ed85215b75c..5c7e15fa184 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CompleteSignup/CompleteSignupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CompleteSignup/CompleteSignupPostRequestBody.cs @@ -52,7 +52,7 @@ public CompleteSignupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.CompleteSignup.CompleteSignupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.CompleteSignup.CompleteSignupPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("enterpriseToken", EnterpriseToken); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CompleteSignup/CompleteSignupRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CompleteSignup/CompleteSignupRequestBuilder.cs index f35e4bd9777..36d198ccc35 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CompleteSignup/CompleteSignupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CompleteSignup/CompleteSignupRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Androi public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.CompleteSignup.CompleteSignupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.CompleteSignup.CompleteSignupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenPostRequestBody.cs index ee9a4476bcf..072be1f5af5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenPostRequestBody.cs @@ -52,7 +52,7 @@ public CreateGooglePlayWebTokenPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.CreateGooglePlayWebToken.CreateGooglePlayWebTokenPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.CreateGooglePlayWebToken.CreateGooglePlayWebTokenPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("parentUri", ParentUri); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenPostResponse.cs index 037240e469d..93ec4f95115 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenPostResponse.cs @@ -52,7 +52,7 @@ public CreateGooglePlayWebTokenPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.CreateGooglePlayWebToken.CreateGooglePlayWebTokenPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.CreateGooglePlayWebToken.CreateGooglePlayWebTokenPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenRequestBuilder.cs index 351f9153937..be1b05b30d8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenRequestBuilder.cs @@ -50,7 +50,7 @@ public CreateGooglePlayWebTokenRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsCreateGooglePlayWebTokenPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.CreateGooglePlayWebToken.CreateGooglePlayWebTokenPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CreateGooglePlayWebTokenRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.CreateGooglePlayWebToken.CreateGooglePlayWebTokenPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.CreateGooglePlayWebToken.CreateGooglePlayWebTokenPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenResponse.cs index 2dfd27218d0..2e5e0e2e96c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/CreateGooglePlayWebToken/CreateGooglePlayWebTokenResponse.cs @@ -20,7 +20,7 @@ public partial class CreateGooglePlayWebTokenResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.CreateGooglePlayWebToken.CreateGooglePlayWebTokenResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.CreateGooglePlayWebToken.CreateGooglePlayWebTokenResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlPostRequestBody.cs index 5889425a120..64f3f78474a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlPostRequestBody.cs @@ -52,7 +52,7 @@ public RequestSignupUrlPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.RequestSignupUrl.RequestSignupUrlPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.RequestSignupUrl.RequestSignupUrlPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("hostName", HostName); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlPostResponse.cs index 03640e68762..123e8cd5ca7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlPostResponse.cs @@ -52,7 +52,7 @@ public RequestSignupUrlPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.RequestSignupUrl.RequestSignupUrlPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.RequestSignupUrl.RequestSignupUrlPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlRequestBuilder.cs index 272cd224f02..c8762ae3ba5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlRequestBuilder.cs @@ -50,7 +50,7 @@ public RequestSignupUrlRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsRequestSignupUrlPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.RequestSignupUrl.RequestSignupUrlPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestSignupUrlRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.RequestSignupUrl.RequestSignupUrlPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.RequestSignupUrl.RequestSignupUrlPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlResponse.cs index 76a2e7503e8..a2be99693bf 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/RequestSignupUrl/RequestSignupUrlResponse.cs @@ -20,7 +20,7 @@ public partial class RequestSignupUrlResponse : global::Microsoft.Graph.Beta.Dev /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.RequestSignupUrl.RequestSignupUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.RequestSignupUrl.RequestSignupUrlResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/SetAndroidDeviceOwnerFullyManagedEnrollmentState/SetAndroidDeviceOwnerFullyManagedEnrollmentStatePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/SetAndroidDeviceOwnerFullyManagedEnrollmentState/SetAndroidDeviceOwnerFullyManagedEnrollmentStatePostRequestBody.cs index 27134104d52..8c0d81eb2f4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/SetAndroidDeviceOwnerFullyManagedEnrollmentState/SetAndroidDeviceOwnerFullyManagedEnrollmentStatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/SetAndroidDeviceOwnerFullyManagedEnrollmentState/SetAndroidDeviceOwnerFullyManagedEnrollmentStatePostRequestBody.cs @@ -42,7 +42,7 @@ public SetAndroidDeviceOwnerFullyManagedEnrollmentStatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.SetAndroidDeviceOwnerFullyManagedEnrollmentState.SetAndroidDeviceOwnerFullyManagedEnrollmentStatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.SetAndroidDeviceOwnerFullyManagedEnrollmentState.SetAndroidDeviceOwnerFullyManagedEnrollmentStatePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("enabled", Enabled); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/SetAndroidDeviceOwnerFullyManagedEnrollmentState/SetAndroidDeviceOwnerFullyManagedEnrollmentStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/SetAndroidDeviceOwnerFullyManagedEnrollmentState/SetAndroidDeviceOwnerFullyManagedEnrollmentStateRequestBuilder.cs index b9bcd680fde..5e0a650e121 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/SetAndroidDeviceOwnerFullyManagedEnrollmentState/SetAndroidDeviceOwnerFullyManagedEnrollmentStateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAccountEnterpriseSettings/SetAndroidDeviceOwnerFullyManagedEnrollmentState/SetAndroidDeviceOwnerFullyManagedEnrollmentStateRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Androi public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.SetAndroidDeviceOwnerFullyManagedEnrollmentState.SetAndroidDeviceOwnerFullyManagedEnrollmentStatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.AndroidManagedStoreAccountEnterpriseSettings.SetAndroidDeviceOwnerFullyManagedEnrollmentState.SetAndroidDeviceOwnerFullyManagedEnrollmentStatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAppConfigurationSchemas/AndroidManagedStoreAppConfigurationSchemasRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAppConfigurationSchemas/AndroidManagedStoreAppConfigurationSchemasRequestBuilder.cs index b19d65e9491..4f707c51c78 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAppConfigurationSchemas/AndroidManagedStoreAppConfigurationSchemasRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAppConfigurationSchemas/AndroidManagedStoreAppConfigurationSchemasRequestBuilder.cs @@ -93,7 +93,7 @@ public AndroidManagedStoreAppConfigurationSchemasRequestBuilder(string rawUrl, I public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppConfigurationSchema body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppConfigurationSchema body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAppConfigurationSchemas/Item/AndroidManagedStoreAppConfigurationSchemaItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAppConfigurationSchemas/Item/AndroidManagedStoreAppConfigurationSchemaItemRequestBuilder.cs index 724d78e3e60..512312d79fe 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAppConfigurationSchemas/Item/AndroidManagedStoreAppConfigurationSchemaItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AndroidManagedStoreAppConfigurationSchemas/Item/AndroidManagedStoreAppConfigurationSchemaItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppConfigurationSchema body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppConfigurationSchema body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/ApplePushNotificationCertificateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/ApplePushNotificationCertificateRequestBuilder.cs index 0ce67be6dac..0f6630ae3be 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/ApplePushNotificationCertificateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/ApplePushNotificationCertificateRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ApplePushNotificationCertificate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ApplePushNotificationCertificate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/DownloadApplePushNotificationCertificateSigningRequest/DownloadApplePushNotificationCertificateSigningRequestGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/DownloadApplePushNotificationCertificateSigningRequest/DownloadApplePushNotificationCertificateSigningRequestGetResponse.cs index 5eb4049a8a4..d7eb97f6d6c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/DownloadApplePushNotificationCertificateSigningRequest/DownloadApplePushNotificationCertificateSigningRequestGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/DownloadApplePushNotificationCertificateSigningRequest/DownloadApplePushNotificationCertificateSigningRequestGetResponse.cs @@ -52,7 +52,7 @@ public DownloadApplePushNotificationCertificateSigningRequestGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ApplePushNotificationCertificate.DownloadApplePushNotificationCertificateSigningRequest.DownloadApplePushNotificationCertificateSigningRequestGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ApplePushNotificationCertificate.DownloadApplePushNotificationCertificateSigningRequest.DownloadApplePushNotificationCertificateSigningRequestGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/DownloadApplePushNotificationCertificateSigningRequest/DownloadApplePushNotificationCertificateSigningRequestResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/DownloadApplePushNotificationCertificateSigningRequest/DownloadApplePushNotificationCertificateSigningRequestResponse.cs index 9f5ca71f995..00be8585fd7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/DownloadApplePushNotificationCertificateSigningRequest/DownloadApplePushNotificationCertificateSigningRequestResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/DownloadApplePushNotificationCertificateSigningRequest/DownloadApplePushNotificationCertificateSigningRequestResponse.cs @@ -20,7 +20,7 @@ public partial class DownloadApplePushNotificationCertificateSigningRequestRespo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ApplePushNotificationCertificate.DownloadApplePushNotificationCertificateSigningRequest.DownloadApplePushNotificationCertificateSigningRequestResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ApplePushNotificationCertificate.DownloadApplePushNotificationCertificateSigningRequest.DownloadApplePushNotificationCertificateSigningRequestResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/GenerateApplePushNotificationCertificateSigningRequest/GenerateApplePushNotificationCertificateSigningRequestPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/GenerateApplePushNotificationCertificateSigningRequest/GenerateApplePushNotificationCertificateSigningRequestPostResponse.cs index 6aabbcf8426..ab0bd113352 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/GenerateApplePushNotificationCertificateSigningRequest/GenerateApplePushNotificationCertificateSigningRequestPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/GenerateApplePushNotificationCertificateSigningRequest/GenerateApplePushNotificationCertificateSigningRequestPostResponse.cs @@ -52,7 +52,7 @@ public GenerateApplePushNotificationCertificateSigningRequestPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ApplePushNotificationCertificate.GenerateApplePushNotificationCertificateSigningRequest.GenerateApplePushNotificationCertificateSigningRequestPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ApplePushNotificationCertificate.GenerateApplePushNotificationCertificateSigningRequest.GenerateApplePushNotificationCertificateSigningRequestPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/GenerateApplePushNotificationCertificateSigningRequest/GenerateApplePushNotificationCertificateSigningRequestResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/GenerateApplePushNotificationCertificateSigningRequest/GenerateApplePushNotificationCertificateSigningRequestResponse.cs index 30a71634fd9..e83a84e2444 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/GenerateApplePushNotificationCertificateSigningRequest/GenerateApplePushNotificationCertificateSigningRequestResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ApplePushNotificationCertificate/GenerateApplePushNotificationCertificateSigningRequest/GenerateApplePushNotificationCertificateSigningRequestResponse.cs @@ -20,7 +20,7 @@ public partial class GenerateApplePushNotificationCertificateSigningRequestRespo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ApplePushNotificationCertificate.GenerateApplePushNotificationCertificateSigningRequest.GenerateApplePushNotificationCertificateSigningRequestResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ApplePushNotificationCertificate.GenerateApplePushNotificationCertificateSigningRequest.GenerateApplePushNotificationCertificateSigningRequestResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/AppleUserInitiatedEnrollmentProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/AppleUserInitiatedEnrollmentProfilesRequestBuilder.cs index 11fc9e92884..131680be05d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/AppleUserInitiatedEnrollmentProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/AppleUserInitiatedEnrollmentProfilesRequestBuilder.cs @@ -93,7 +93,7 @@ public AppleUserInitiatedEnrollmentProfilesRequestBuilder(string rawUrl, IReques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AppleUserInitiatedEnrollmentProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AppleUserInitiatedEnrollmentProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/AppleUserInitiatedEnrollmentProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/AppleUserInitiatedEnrollmentProfileItemRequestBuilder.cs index e63a1d3ddad..375c5c262f3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/AppleUserInitiatedEnrollmentProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/AppleUserInitiatedEnrollmentProfileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AppleUserInitiatedEnrollmentProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppleUserInitiatedEnrollmentProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/Assignments/AssignmentsRequestBuilder.cs index 8b42e065aec..ff084eee1da 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AppleEnrollmentProfileAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AppleEnrollmentProfileAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/Assignments/Item/AppleEnrollmentProfileAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/Assignments/Item/AppleEnrollmentProfileAssignmentItemRequestBuilder.cs index 42d3cc2911d..37d7bc73dfb 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/Assignments/Item/AppleEnrollmentProfileAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/Assignments/Item/AppleEnrollmentProfileAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AppleEnrollmentProfileAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppleEnrollmentProfileAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/SetPriority/SetPriorityPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/SetPriority/SetPriorityPostRequestBody.cs index d22490bd8a6..22c8440663d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/SetPriority/SetPriorityPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/SetPriority/SetPriorityPostRequestBody.cs @@ -42,7 +42,7 @@ public SetPriorityPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AppleUserInitiatedEnrollmentProfiles.Item.SetPriority.SetPriorityPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AppleUserInitiatedEnrollmentProfiles.Item.SetPriority.SetPriorityPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("priority", Priority); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/SetPriority/SetPriorityRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/SetPriority/SetPriorityRequestBuilder.cs index c92208551ba..f23fae28118 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/SetPriority/SetPriorityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AppleUserInitiatedEnrollmentProfiles/Item/SetPriority/SetPriorityRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AppleU public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AppleUserInitiatedEnrollmentProfiles.Item.SetPriority.SetPriorityPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.AppleUserInitiatedEnrollmentProfiles.Item.SetPriority.SetPriorityPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/AssignmentFiltersRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/AssignmentFiltersRequestBuilder.cs index c7170d72bac..be4c363d6e9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/AssignmentFiltersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/AssignmentFiltersRequestBuilder.cs @@ -122,7 +122,7 @@ public AssignmentFiltersRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementAssignmentFilter body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementAssignmentFilter body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Enable/EnablePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Enable/EnablePostRequestBody.cs index 870318cf6a8..bbd4fad44cc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Enable/EnablePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Enable/EnablePostRequestBody.cs @@ -42,7 +42,7 @@ public EnablePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.Enable.EnablePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.Enable.EnablePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("enable", Enable); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Enable/EnableRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Enable/EnableRequestBuilder.cs index e4128cd544f..a33ebcfbf80 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Enable/EnableRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Enable/EnableRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Assign public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.Enable.EnablePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.Enable.EnablePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/GetPlatformSupportedPropertiesWithPlatform/GetPlatformSupportedPropertiesWithPlatformGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/GetPlatformSupportedPropertiesWithPlatform/GetPlatformSupportedPropertiesWithPlatformGetResponse.cs index 3ace81c8b00..eb5c4c716a5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/GetPlatformSupportedPropertiesWithPlatform/GetPlatformSupportedPropertiesWithPlatformGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/GetPlatformSupportedPropertiesWithPlatform/GetPlatformSupportedPropertiesWithPlatformGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetPlatformSupportedPropertiesWithPlatformGetResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.GetPlatformSupportedPropertiesWithPlatform.GetPlatformSupportedPropertiesWithPlatformGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.GetPlatformSupportedPropertiesWithPlatform.GetPlatformSupportedPropertiesWithPlatformGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/GetPlatformSupportedPropertiesWithPlatform/GetPlatformSupportedPropertiesWithPlatformResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/GetPlatformSupportedPropertiesWithPlatform/GetPlatformSupportedPropertiesWithPlatformResponse.cs index b8a99174843..efb056f52de 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/GetPlatformSupportedPropertiesWithPlatform/GetPlatformSupportedPropertiesWithPlatformResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/GetPlatformSupportedPropertiesWithPlatform/GetPlatformSupportedPropertiesWithPlatformResponse.cs @@ -20,7 +20,7 @@ public partial class GetPlatformSupportedPropertiesWithPlatformResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.GetPlatformSupportedPropertiesWithPlatform.GetPlatformSupportedPropertiesWithPlatformResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.GetPlatformSupportedPropertiesWithPlatform.GetPlatformSupportedPropertiesWithPlatformResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Item/DeviceAndAppManagementAssignmentFilterItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Item/DeviceAndAppManagementAssignmentFilterItemRequestBuilder.cs index 236efa69aab..ca03ec4304e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Item/DeviceAndAppManagementAssignmentFilterItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Item/DeviceAndAppManagementAssignmentFilterItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementAssignmentFilter body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementAssignmentFilter body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Item/GetSupportedProperties/GetSupportedPropertiesGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Item/GetSupportedProperties/GetSupportedPropertiesGetResponse.cs index 8a7a42c04ca..e0e618f8028 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Item/GetSupportedProperties/GetSupportedPropertiesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Item/GetSupportedProperties/GetSupportedPropertiesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetSupportedPropertiesGetResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.Item.GetSupportedProperties.GetSupportedPropertiesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.Item.GetSupportedProperties.GetSupportedPropertiesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Item/GetSupportedProperties/GetSupportedPropertiesResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Item/GetSupportedProperties/GetSupportedPropertiesResponse.cs index 831ffe88675..341784cdab5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Item/GetSupportedProperties/GetSupportedPropertiesResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/Item/GetSupportedProperties/GetSupportedPropertiesResponse.cs @@ -20,7 +20,7 @@ public partial class GetSupportedPropertiesResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.Item.GetSupportedProperties.GetSupportedPropertiesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.Item.GetSupportedProperties.GetSupportedPropertiesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/ValidateFilter/ValidateFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/ValidateFilter/ValidateFilterPostRequestBody.cs index c70e73f0a69..e08310a85b8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/ValidateFilter/ValidateFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/ValidateFilter/ValidateFilterPostRequestBody.cs @@ -53,7 +53,7 @@ public ValidateFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.ValidateFilter.ValidateFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.ValidateFilter.ValidateFilterPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("deviceAndAppManagementAssignmentFilter", DeviceAndAppManagementAssignmentFilter); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/ValidateFilter/ValidateFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/ValidateFilter/ValidateFilterRequestBuilder.cs index 27fc354e51d..6a42d8b705e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/ValidateFilter/ValidateFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AssignmentFilters/ValidateFilter/ValidateFilterRequestBuilder.cs @@ -51,7 +51,7 @@ public ValidateFilterRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.ValidateFilter.ValidateFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.AssignmentFilters.ValidateFilter.ValidateFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/AuditEventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/AuditEventsRequestBuilder.cs index dff7502920e..7b5843bc308 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/AuditEventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/AuditEventsRequestBuilder.cs @@ -110,7 +110,7 @@ public AuditEventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuditEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuditEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditActivityTypesWithCategory/GetAuditActivityTypesWithCategoryGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditActivityTypesWithCategory/GetAuditActivityTypesWithCategoryGetResponse.cs index 1e6fdec97ca..42b4a3158d3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditActivityTypesWithCategory/GetAuditActivityTypesWithCategoryGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditActivityTypesWithCategory/GetAuditActivityTypesWithCategoryGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.AuditEvents.GetAuditActivityTypesWithCategory.GetAuditActivityTypesWithCategoryGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AuditEvents.GetAuditActivityTypesWithCategory.GetAuditActivityTypesWithCategoryGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditActivityTypesWithCategory/GetAuditActivityTypesWithCategoryResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditActivityTypesWithCategory/GetAuditActivityTypesWithCategoryResponse.cs index 407eddb518d..bb7b97626bf 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditActivityTypesWithCategory/GetAuditActivityTypesWithCategoryResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditActivityTypesWithCategory/GetAuditActivityTypesWithCategoryResponse.cs @@ -20,7 +20,7 @@ public partial class GetAuditActivityTypesWithCategoryResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.AuditEvents.GetAuditActivityTypesWithCategory.GetAuditActivityTypesWithCategoryResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AuditEvents.GetAuditActivityTypesWithCategory.GetAuditActivityTypesWithCategoryResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditCategories/GetAuditCategoriesGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditCategories/GetAuditCategoriesGetResponse.cs index dcbe50f917f..d7f5030018f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditCategories/GetAuditCategoriesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditCategories/GetAuditCategoriesGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.AuditEvents.GetAuditCategories.GetAuditCategoriesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AuditEvents.GetAuditCategories.GetAuditCategoriesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditCategories/GetAuditCategoriesResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditCategories/GetAuditCategoriesResponse.cs index 802e045e29e..0e02c57d6af 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditCategories/GetAuditCategoriesResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/GetAuditCategories/GetAuditCategoriesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAuditCategoriesResponse : global::Microsoft.Graph.Beta.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.AuditEvents.GetAuditCategories.GetAuditCategoriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.AuditEvents.GetAuditCategories.GetAuditCategoriesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/Item/AuditEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/Item/AuditEventItemRequestBuilder.cs index 9df1bd87406..52ac4bba442 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/Item/AuditEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AuditEvents/Item/AuditEventItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuditEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuditEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AutopilotEvents/AutopilotEventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AutopilotEvents/AutopilotEventsRequestBuilder.cs index b061fcf695a..f4fd912f3bb 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AutopilotEvents/AutopilotEventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AutopilotEvents/AutopilotEventsRequestBuilder.cs @@ -93,7 +93,7 @@ public AutopilotEventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementAutopilotEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementAutopilotEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/AutopilotEvents/Item/DeviceManagementAutopilotEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/AutopilotEvents/Item/DeviceManagementAutopilotEventItemRequestBuilder.cs index 565ef41a52a..a6949f5218b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/AutopilotEvents/Item/DeviceManagementAutopilotEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/AutopilotEvents/Item/DeviceManagementAutopilotEventItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementAutopilotEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementAutopilotEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CartToClassAssociations/CartToClassAssociationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CartToClassAssociations/CartToClassAssociationsRequestBuilder.cs index 1941593e0c4..6ed23ec3459 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CartToClassAssociations/CartToClassAssociationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CartToClassAssociations/CartToClassAssociationsRequestBuilder.cs @@ -93,7 +93,7 @@ public CartToClassAssociationsRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CartToClassAssociation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CartToClassAssociation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CartToClassAssociations/Item/CartToClassAssociationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CartToClassAssociations/Item/CartToClassAssociationItemRequestBuilder.cs index b2ad49c5d42..3472981616d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CartToClassAssociations/Item/CartToClassAssociationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CartToClassAssociations/Item/CartToClassAssociationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CartToClassAssociation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CartToClassAssociation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Categories/CategoriesRequestBuilder.cs index 945a8730de1..89f4617f32e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Categories/CategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Categories/CategoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Categories/Item/DeviceManagementSettingCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Categories/Item/DeviceManagementSettingCategoryItemRequestBuilder.cs index fa06f6f466f..f18ffc40d11 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Categories/Item/DeviceManagementSettingCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Categories/Item/DeviceManagementSettingCategoryItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs index f8aa5013f04..98a9355225d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs index a234133205f..18b42b8893b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/CertificateConnectorDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/CertificateConnectorDetailsRequestBuilder.cs index 2d420f2ccc6..1867eade2bc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/CertificateConnectorDetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/CertificateConnectorDetailsRequestBuilder.cs @@ -93,7 +93,7 @@ public CertificateConnectorDetailsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CertificateConnectorDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateConnectorDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/CertificateConnectorDetailsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/CertificateConnectorDetailsItemRequestBuilder.cs index a91b72b6b21..39ce4a4c11f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/CertificateConnectorDetailsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/CertificateConnectorDetailsItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CertificateConnectorDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateConnectorDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostRequestBody.cs index 5705ec2089b..7cdcb15c687 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostRequestBody.cs @@ -53,7 +53,7 @@ public GetHealthMetricTimeSeriesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("timeSeries", TimeSeries); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostResponse.cs index a38c87d57b7..cf4c844f1de 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetHealthMetricTimeSeriesPostResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesRequestBuilder.cs index 1f5cd70c309..89cab748f47 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesRequestBuilder.cs @@ -50,7 +50,7 @@ public GetHealthMetricTimeSeriesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsGetHealthMetricTimeSeriesPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetHealthMetricTimeSeriesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesResponse.cs index a7740c03940..8ab36fe2435 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesResponse.cs @@ -20,7 +20,7 @@ public partial class GetHealthMetricTimeSeriesResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsPostRequestBody.cs index 3e9b5491ad6..48cd1b529a7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsPostRequestBody.cs @@ -52,7 +52,7 @@ public GetHealthMetricsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetrics.GetHealthMetricsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetrics.GetHealthMetricsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("metricNames", MetricNames); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsPostResponse.cs index 97fdbd1bdff..86a36faa8a9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetHealthMetricsPostResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetrics.GetHealthMetricsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetrics.GetHealthMetricsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsRequestBuilder.cs index eee26c33cfa..640bbe53645 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetHealthMetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetHealthMetricsPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetrics.GetHealthMetricsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetHealthMetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetrics.GetHealthMetricsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetrics.GetHealthMetricsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsResponse.cs index 314f653c750..e56aad85c60 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CertificateConnectorDetails/Item/GetHealthMetrics/GetHealthMetricsResponse.cs @@ -20,7 +20,7 @@ public partial class GetHealthMetricsResponse : global::Microsoft.Graph.Beta.Dev /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetrics.GetHealthMetricsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CertificateConnectorDetails.Item.GetHealthMetrics.GetHealthMetricsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/ChromeOSOnboardingSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/ChromeOSOnboardingSettingsRequestBuilder.cs index 9cdc5c28083..1ecf1bf51ac 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/ChromeOSOnboardingSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/ChromeOSOnboardingSettingsRequestBuilder.cs @@ -105,7 +105,7 @@ public ChromeOSOnboardingSettingsRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChromeOSOnboardingSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChromeOSOnboardingSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/Connect/ConnectPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/Connect/ConnectPostRequestBody.cs index 7c8396e7482..5e398612339 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/Connect/ConnectPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/Connect/ConnectPostRequestBody.cs @@ -68,7 +68,7 @@ public ConnectPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ChromeOSOnboardingSettings.Connect.ConnectPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ChromeOSOnboardingSettings.Connect.ConnectPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("ownerAccessToken", OwnerAccessToken); writer.WriteStringValue("ownerUserPrincipalName", OwnerUserPrincipalName); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/Connect/ConnectRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/Connect/ConnectRequestBuilder.cs index ab220fc5bff..dbbf117270d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/Connect/ConnectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/Connect/ConnectRequestBuilder.cs @@ -51,7 +51,7 @@ public ConnectRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ChromeOSOnboardingSettings.Connect.ConnectPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ChromeOSOnboardingSettings.Connect.ConnectPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/Item/ChromeOSOnboardingSettingsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/Item/ChromeOSOnboardingSettingsItemRequestBuilder.cs index 12186910183..e95c91704df 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/Item/ChromeOSOnboardingSettingsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ChromeOSOnboardingSettings/Item/ChromeOSOnboardingSettingsItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChromeOSOnboardingSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChromeOSOnboardingSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/CloudCertificationAuthorityRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/CloudCertificationAuthorityRequestBuilder.cs index d57e7ad3a7f..78d9a496753 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/CloudCertificationAuthorityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/CloudCertificationAuthorityRequestBuilder.cs @@ -93,7 +93,7 @@ public CloudCertificationAuthorityRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudCertificationAuthority body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudCertificationAuthority body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/ChangeCloudCertificationAuthorityStatus/ChangeCloudCertificationAuthorityStatusPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/ChangeCloudCertificationAuthorityStatus/ChangeCloudCertificationAuthorityStatusPostRequestBody.cs index dc7cb071365..d14168956ef 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/ChangeCloudCertificationAuthorityStatus/ChangeCloudCertificationAuthorityStatusPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/ChangeCloudCertificationAuthorityStatus/ChangeCloudCertificationAuthorityStatusPostRequestBody.cs @@ -49,7 +49,7 @@ public ChangeCloudCertificationAuthorityStatusPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.ChangeCloudCertificationAuthorityStatus.ChangeCloudCertificationAuthorityStatusPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.ChangeCloudCertificationAuthorityStatus.ChangeCloudCertificationAuthorityStatusPostRequestBody(); } /// @@ -70,7 +70,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("certificationAuthorityStatus", CertificationAuthorityStatus); writer.WriteIntValue("certificationAuthorityVersion", CertificationAuthorityVersion); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/ChangeCloudCertificationAuthorityStatus/ChangeCloudCertificationAuthorityStatusRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/ChangeCloudCertificationAuthorityStatus/ChangeCloudCertificationAuthorityStatusRequestBuilder.cs index 02653fbcdc2..ed3f79d2c4f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/ChangeCloudCertificationAuthorityStatus/ChangeCloudCertificationAuthorityStatusRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/ChangeCloudCertificationAuthorityStatus/ChangeCloudCertificationAuthorityStatusRequestBuilder.cs @@ -51,7 +51,7 @@ public ChangeCloudCertificationAuthorityStatusRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.ChangeCloudCertificationAuthorityStatus.ChangeCloudCertificationAuthorityStatusPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.ChangeCloudCertificationAuthorityStatus.ChangeCloudCertificationAuthorityStatusPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/CloudCertificationAuthorityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/CloudCertificationAuthorityItemRequestBuilder.cs index f0facee34e8..f771192ba2e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/CloudCertificationAuthorityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/CloudCertificationAuthorityItemRequestBuilder.cs @@ -168,7 +168,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudCertificationAuthority body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -229,7 +229,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudCertificationAuthority body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthority/GetAllCloudCertificationAuthorityPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthority/GetAllCloudCertificationAuthorityPostResponse.cs index cd5f288c385..767b92ae8ab 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthority/GetAllCloudCertificationAuthorityPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthority/GetAllCloudCertificationAuthorityPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllCloudCertificationAuthorityPostResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.GetAllCloudCertificationAuthority.GetAllCloudCertificationAuthorityPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.GetAllCloudCertificationAuthority.GetAllCloudCertificationAuthorityPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthority/GetAllCloudCertificationAuthorityResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthority/GetAllCloudCertificationAuthorityResponse.cs index 3fcaac75bfa..a52b0a9764b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthority/GetAllCloudCertificationAuthorityResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthority/GetAllCloudCertificationAuthorityResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllCloudCertificationAuthorityResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.GetAllCloudCertificationAuthority.GetAllCloudCertificationAuthorityResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.GetAllCloudCertificationAuthority.GetAllCloudCertificationAuthorityResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthorityLeafCertificates/GetAllCloudCertificationAuthorityLeafCertificatesPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthorityLeafCertificates/GetAllCloudCertificationAuthorityLeafCertificatesPostResponse.cs index eddc1ab6994..b7cfaea6252 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthorityLeafCertificates/GetAllCloudCertificationAuthorityLeafCertificatesPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthorityLeafCertificates/GetAllCloudCertificationAuthorityLeafCertificatesPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllCloudCertificationAuthorityLeafCertificatesPostRespon /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.GetAllCloudCertificationAuthorityLeafCertificates.GetAllCloudCertificationAuthorityLeafCertificatesPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.GetAllCloudCertificationAuthorityLeafCertificates.GetAllCloudCertificationAuthorityLeafCertificatesPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthorityLeafCertificates/GetAllCloudCertificationAuthorityLeafCertificatesResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthorityLeafCertificates/GetAllCloudCertificationAuthorityLeafCertificatesResponse.cs index f9701310d14..4aef0b916ff 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthorityLeafCertificates/GetAllCloudCertificationAuthorityLeafCertificatesResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/GetAllCloudCertificationAuthorityLeafCertificates/GetAllCloudCertificationAuthorityLeafCertificatesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllCloudCertificationAuthorityLeafCertificatesResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.GetAllCloudCertificationAuthorityLeafCertificates.GetAllCloudCertificationAuthorityLeafCertificatesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.GetAllCloudCertificationAuthorityLeafCertificates.GetAllCloudCertificationAuthorityLeafCertificatesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/PostCloudCertificationAuthority/PostCloudCertificationAuthorityPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/PostCloudCertificationAuthority/PostCloudCertificationAuthorityPostResponse.cs index d53a7da7997..92b3c6631e7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/PostCloudCertificationAuthority/PostCloudCertificationAuthorityPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/PostCloudCertificationAuthority/PostCloudCertificationAuthorityPostResponse.cs @@ -36,7 +36,7 @@ public partial class PostCloudCertificationAuthorityPostResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.PostCloudCertificationAuthority.PostCloudCertificationAuthorityPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.PostCloudCertificationAuthority.PostCloudCertificationAuthorityPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/PostCloudCertificationAuthority/PostCloudCertificationAuthorityResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/PostCloudCertificationAuthority/PostCloudCertificationAuthorityResponse.cs index 6f6a9402c74..d8ea2c42276 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/PostCloudCertificationAuthority/PostCloudCertificationAuthorityResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/PostCloudCertificationAuthority/PostCloudCertificationAuthorityResponse.cs @@ -20,7 +20,7 @@ public partial class PostCloudCertificationAuthorityResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.PostCloudCertificationAuthority.PostCloudCertificationAuthorityResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.PostCloudCertificationAuthority.PostCloudCertificationAuthorityResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeCloudCertificationAuthorityCertificate/RevokeCloudCertificationAuthorityCertificatePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeCloudCertificationAuthorityCertificate/RevokeCloudCertificationAuthorityCertificatePostRequestBody.cs index 662426bdf53..e53b1f9123f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeCloudCertificationAuthorityCertificate/RevokeCloudCertificationAuthorityCertificatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeCloudCertificationAuthorityCertificate/RevokeCloudCertificationAuthorityCertificatePostRequestBody.cs @@ -42,7 +42,7 @@ public RevokeCloudCertificationAuthorityCertificatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.RevokeCloudCertificationAuthorityCertificate.RevokeCloudCertificationAuthorityCertificatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.RevokeCloudCertificationAuthorityCertificate.RevokeCloudCertificationAuthorityCertificatePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("certificationAuthorityVersion", CertificationAuthorityVersion); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeCloudCertificationAuthorityCertificate/RevokeCloudCertificationAuthorityCertificateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeCloudCertificationAuthorityCertificate/RevokeCloudCertificationAuthorityCertificateRequestBuilder.cs index 1c66e9fc9c0..bca0f73673b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeCloudCertificationAuthorityCertificate/RevokeCloudCertificationAuthorityCertificateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeCloudCertificationAuthorityCertificate/RevokeCloudCertificationAuthorityCertificateRequestBuilder.cs @@ -51,7 +51,7 @@ public RevokeCloudCertificationAuthorityCertificateRequestBuilder(string rawUrl, public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.RevokeCloudCertificationAuthorityCertificate.RevokeCloudCertificationAuthorityCertificatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.RevokeCloudCertificationAuthorityCertificate.RevokeCloudCertificationAuthorityCertificatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificate/RevokeLeafCertificatePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificate/RevokeLeafCertificatePostRequestBody.cs index 79a969eae7b..4be207a2cbc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificate/RevokeLeafCertificatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificate/RevokeLeafCertificatePostRequestBody.cs @@ -52,7 +52,7 @@ public RevokeLeafCertificatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.RevokeLeafCertificate.RevokeLeafCertificatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.RevokeLeafCertificate.RevokeLeafCertificatePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("leafCertificateId", LeafCertificateId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificate/RevokeLeafCertificateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificate/RevokeLeafCertificateRequestBuilder.cs index b83079078d4..ab742d4b189 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificate/RevokeLeafCertificateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificate/RevokeLeafCertificateRequestBuilder.cs @@ -51,7 +51,7 @@ public RevokeLeafCertificateRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.RevokeLeafCertificate.RevokeLeafCertificatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.RevokeLeafCertificate.RevokeLeafCertificatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificateBySerialNumber/RevokeLeafCertificateBySerialNumberPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificateBySerialNumber/RevokeLeafCertificateBySerialNumberPostRequestBody.cs index cff088c1531..ec3fc5119a7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificateBySerialNumber/RevokeLeafCertificateBySerialNumberPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificateBySerialNumber/RevokeLeafCertificateBySerialNumberPostRequestBody.cs @@ -52,7 +52,7 @@ public RevokeLeafCertificateBySerialNumberPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.RevokeLeafCertificateBySerialNumber.RevokeLeafCertificateBySerialNumberPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.RevokeLeafCertificateBySerialNumber.RevokeLeafCertificateBySerialNumberPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("certificateSerialNumber", CertificateSerialNumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificateBySerialNumber/RevokeLeafCertificateBySerialNumberRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificateBySerialNumber/RevokeLeafCertificateBySerialNumberRequestBuilder.cs index 2546e47bd75..7b19923ce78 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificateBySerialNumber/RevokeLeafCertificateBySerialNumberRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/RevokeLeafCertificateBySerialNumber/RevokeLeafCertificateBySerialNumberRequestBuilder.cs @@ -51,7 +51,7 @@ public RevokeLeafCertificateBySerialNumberRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.RevokeLeafCertificateBySerialNumber.RevokeLeafCertificateBySerialNumberPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.RevokeLeafCertificateBySerialNumber.RevokeLeafCertificateBySerialNumberPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/SearchCloudCertificationAuthorityLeafCertificateBySerialNumber/SearchCloudCertificationAuthorityLeafCertificateBySerialNumberPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/SearchCloudCertificationAuthorityLeafCertificateBySerialNumber/SearchCloudCertificationAuthorityLeafCertificateBySerialNumberPostRequestBody.cs index e6802e8f460..77b3b1e86fa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/SearchCloudCertificationAuthorityLeafCertificateBySerialNumber/SearchCloudCertificationAuthorityLeafCertificateBySerialNumberPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/SearchCloudCertificationAuthorityLeafCertificateBySerialNumber/SearchCloudCertificationAuthorityLeafCertificateBySerialNumberPostRequestBody.cs @@ -52,7 +52,7 @@ public SearchCloudCertificationAuthorityLeafCertificateBySerialNumberPostRequest /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.SearchCloudCertificationAuthorityLeafCertificateBySerialNumber.SearchCloudCertificationAuthorityLeafCertificateBySerialNumberPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.SearchCloudCertificationAuthorityLeafCertificateBySerialNumber.SearchCloudCertificationAuthorityLeafCertificateBySerialNumberPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("certificateSerialNumber", CertificateSerialNumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/SearchCloudCertificationAuthorityLeafCertificateBySerialNumber/SearchCloudCertificationAuthorityLeafCertificateBySerialNumberRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/SearchCloudCertificationAuthorityLeafCertificateBySerialNumber/SearchCloudCertificationAuthorityLeafCertificateBySerialNumberRequestBuilder.cs index 59bc86bfc4c..cbe51f29798 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/SearchCloudCertificationAuthorityLeafCertificateBySerialNumber/SearchCloudCertificationAuthorityLeafCertificateBySerialNumberRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/SearchCloudCertificationAuthorityLeafCertificateBySerialNumber/SearchCloudCertificationAuthorityLeafCertificateBySerialNumberRequestBuilder.cs @@ -51,7 +51,7 @@ public SearchCloudCertificationAuthorityLeafCertificateBySerialNumberRequestBuil public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.SearchCloudCertificationAuthorityLeafCertificateBySerialNumber.SearchCloudCertificationAuthorityLeafCertificateBySerialNumberPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.SearchCloudCertificationAuthorityLeafCertificateBySerialNumber.SearchCloudCertificationAuthorityLeafCertificateBySerialNumberPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/UploadExternallySignedCertificationAuthorityCertificate/UploadExternallySignedCertificationAuthorityCertificatePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/UploadExternallySignedCertificationAuthorityCertificate/UploadExternallySignedCertificationAuthorityCertificatePostRequestBody.cs index 0f9dfa78d67..34f723e364a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/UploadExternallySignedCertificationAuthorityCertificate/UploadExternallySignedCertificationAuthorityCertificatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/UploadExternallySignedCertificationAuthorityCertificate/UploadExternallySignedCertificationAuthorityCertificatePostRequestBody.cs @@ -75,7 +75,7 @@ public UploadExternallySignedCertificationAuthorityCertificatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.UploadExternallySignedCertificationAuthorityCertificate.UploadExternallySignedCertificationAuthorityCertificatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.UploadExternallySignedCertificationAuthorityCertificate.UploadExternallySignedCertificationAuthorityCertificatePostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("certificationAuthorityVersion", CertificationAuthorityVersion); writer.WriteStringValue("signedCertificate", SignedCertificate); writer.WriteCollectionOfObjectValues("trustChainCertificates", TrustChainCertificates); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/UploadExternallySignedCertificationAuthorityCertificate/UploadExternallySignedCertificationAuthorityCertificateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/UploadExternallySignedCertificationAuthorityCertificate/UploadExternallySignedCertificationAuthorityCertificateRequestBuilder.cs index c6417dd4193..adf95052dea 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/UploadExternallySignedCertificationAuthorityCertificate/UploadExternallySignedCertificationAuthorityCertificateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthority/Item/UploadExternallySignedCertificationAuthorityCertificate/UploadExternallySignedCertificationAuthorityCertificateRequestBuilder.cs @@ -51,7 +51,7 @@ public UploadExternallySignedCertificationAuthorityCertificateRequestBuilder(str public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.UploadExternallySignedCertificationAuthorityCertificate.UploadExternallySignedCertificationAuthorityCertificatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.CloudCertificationAuthority.Item.UploadExternallySignedCertificationAuthorityCertificate.UploadExternallySignedCertificationAuthorityCertificatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthorityLeafCertificate/CloudCertificationAuthorityLeafCertificateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthorityLeafCertificate/CloudCertificationAuthorityLeafCertificateRequestBuilder.cs index b92c938b016..9e72172a5cd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthorityLeafCertificate/CloudCertificationAuthorityLeafCertificateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthorityLeafCertificate/CloudCertificationAuthorityLeafCertificateRequestBuilder.cs @@ -93,7 +93,7 @@ public CloudCertificationAuthorityLeafCertificateRequestBuilder(string rawUrl, I public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudCertificationAuthorityLeafCertificate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudCertificationAuthorityLeafCertificate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthorityLeafCertificate/Item/CloudCertificationAuthorityLeafCertificateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthorityLeafCertificate/Item/CloudCertificationAuthorityLeafCertificateItemRequestBuilder.cs index becd222b4f2..b536e69efa3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthorityLeafCertificate/Item/CloudCertificationAuthorityLeafCertificateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudCertificationAuthorityLeafCertificate/Item/CloudCertificationAuthorityLeafCertificateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudCertificationAuthorityLeafCertificate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudCertificationAuthorityLeafCertificate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudPCConnectivityIssues/CloudPCConnectivityIssuesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudPCConnectivityIssues/CloudPCConnectivityIssuesRequestBuilder.cs index 2ae9e7971d3..80055bced83 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudPCConnectivityIssues/CloudPCConnectivityIssuesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudPCConnectivityIssues/CloudPCConnectivityIssuesRequestBuilder.cs @@ -93,7 +93,7 @@ public CloudPCConnectivityIssuesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPCConnectivityIssue body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPCConnectivityIssue body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CloudPCConnectivityIssues/Item/CloudPCConnectivityIssueItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CloudPCConnectivityIssues/Item/CloudPCConnectivityIssueItemRequestBuilder.cs index 4ef0cd58b34..6227536f500 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CloudPCConnectivityIssues/Item/CloudPCConnectivityIssueItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CloudPCConnectivityIssues/Item/CloudPCConnectivityIssueItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPCConnectivityIssue body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPCConnectivityIssue body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnGetResponse.cs index 28ab49086dc..bcc7553fb50 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnGetResponse.cs @@ -36,7 +36,7 @@ public partial class AppDiagnosticsWithUpnGetResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.AppDiagnosticsWithUpn.AppDiagnosticsWithUpnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.AppDiagnosticsWithUpn.AppDiagnosticsWithUpnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnResponse.cs index 02f154e05b5..99d97475fef 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnResponse.cs @@ -20,7 +20,7 @@ public partial class AppDiagnosticsWithUpnResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.AppDiagnosticsWithUpn.AppDiagnosticsWithUpnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.AppDiagnosticsWithUpn.AppDiagnosticsWithUpnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/ComanagedDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/ComanagedDevicesRequestBuilder.cs index e1c4800558b..d0691a66615 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/ComanagedDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/ComanagedDevicesRequestBuilder.cs @@ -129,7 +129,7 @@ public ComanagedDevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsPostRequestBody.cs index 2688f7166f6..1d7c32e042b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsPostRequestBody.cs @@ -53,7 +53,7 @@ public DownloadAppDiagnosticsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.DownloadAppDiagnostics.DownloadAppDiagnosticsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.DownloadAppDiagnostics.DownloadAppDiagnosticsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("request", Request); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsRequestBuilder.cs index 7340df5103c..336c6c50bf3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsRequestBuilder.cs @@ -50,7 +50,7 @@ public DownloadAppDiagnosticsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.DownloadAppDiagnostics.DownloadAppDiagnosticsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.DownloadAppDiagnostics.DownloadAppDiagnosticsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticPostRequestBody.cs index 220fdeb10b4..6e6dc03f828 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticPostRequestBody.cs @@ -53,7 +53,7 @@ public DownloadPowerliftAppDiagnosticPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.DownloadPowerliftAppDiagnostic.DownloadPowerliftAppDiagnosticPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.DownloadPowerliftAppDiagnostic.DownloadPowerliftAppDiagnosticPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("request", Request); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticRequestBuilder.cs index a080527dfa4..373fe9e0f1f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticRequestBuilder.cs @@ -50,7 +50,7 @@ public DownloadPowerliftAppDiagnosticRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.DownloadPowerliftAppDiagnostic.DownloadPowerliftAppDiagnosticPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.DownloadPowerliftAppDiagnostic.DownloadPowerliftAppDiagnosticPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/ExecuteAction/ExecuteActionPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/ExecuteAction/ExecuteActionPostRequestBody.cs index 5d5bc1cd667..b21d8c9c43f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/ExecuteAction/ExecuteActionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/ExecuteAction/ExecuteActionPostRequestBody.cs @@ -173,7 +173,7 @@ public ExecuteActionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.ExecuteAction.ExecuteActionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.ExecuteAction.ExecuteActionPostRequestBody(); } /// @@ -203,7 +203,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("actionName", ActionName); writer.WriteStringValue("carrierUrl", CarrierUrl); writer.WriteStringValue("deprovisionReason", DeprovisionReason); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/ExecuteAction/ExecuteActionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/ExecuteAction/ExecuteActionRequestBuilder.cs index d5ef30a6d55..bb72d852497 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/ExecuteAction/ExecuteActionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/ExecuteAction/ExecuteActionRequestBuilder.cs @@ -51,7 +51,7 @@ public ExecuteActionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.ExecuteAction.ExecuteActionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.ExecuteAction.ExecuteActionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimPostRequestBody.cs index c0229377cc6..6b3669934b5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimPostRequestBody.cs @@ -52,7 +52,7 @@ public ActivateDeviceEsimPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.ActivateDeviceEsim.ActivateDeviceEsimPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.ActivateDeviceEsim.ActivateDeviceEsimPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("carrierUrl", CarrierUrl); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimRequestBuilder.cs index c0c342a77c6..f8256ded386 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.ActivateDeviceEsim.ActivateDeviceEsimPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.ActivateDeviceEsim.ActivateDeviceEsimPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/AssignmentFilterEvaluationStatusDetails/AssignmentFilterEvaluationStatusDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/AssignmentFilterEvaluationStatusDetails/AssignmentFilterEvaluationStatusDetailsRequestBuilder.cs index 1ab5138d4be..d4c3b2a3223 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/AssignmentFilterEvaluationStatusDetails/AssignmentFilterEvaluationStatusDetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/AssignmentFilterEvaluationStatusDetails/AssignmentFilterEvaluationStatusDetailsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentFilterEvaluationStatusDetailsRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/AssignmentFilterEvaluationStatusDetails/Item/AssignmentFilterEvaluationStatusDetailsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/AssignmentFilterEvaluationStatusDetails/Item/AssignmentFilterEvaluationStatusDetailsItemRequestBuilder.cs index d347865da6a..5205c6c0cc8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/AssignmentFilterEvaluationStatusDetails/Item/AssignmentFilterEvaluationStatusDetailsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/AssignmentFilterEvaluationStatusDetails/Item/AssignmentFilterEvaluationStatusDetailsItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ChangeAssignments/ChangeAssignmentsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ChangeAssignments/ChangeAssignmentsPostRequestBody.cs index 3fe7995d518..c0cc09f05d7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ChangeAssignments/ChangeAssignmentsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ChangeAssignments/ChangeAssignmentsPostRequestBody.cs @@ -53,7 +53,7 @@ public ChangeAssignmentsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.ChangeAssignments.ChangeAssignmentsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.ChangeAssignments.ChangeAssignmentsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("deviceAssignmentItems", DeviceAssignmentItems); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ChangeAssignments/ChangeAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ChangeAssignments/ChangeAssignmentsRequestBuilder.cs index f02aa624220..34d7b533f1e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ChangeAssignments/ChangeAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ChangeAssignments/ChangeAssignmentsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.ChangeAssignments.ChangeAssignmentsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.ChangeAssignments.ChangeAssignmentsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CleanWindowsDevice/CleanWindowsDevicePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CleanWindowsDevice/CleanWindowsDevicePostRequestBody.cs index 27b39632ba9..4153e95e7d5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CleanWindowsDevice/CleanWindowsDevicePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CleanWindowsDevice/CleanWindowsDevicePostRequestBody.cs @@ -42,7 +42,7 @@ public CleanWindowsDevicePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.CleanWindowsDevice.CleanWindowsDevicePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.CleanWindowsDevice.CleanWindowsDevicePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("keepUserData", KeepUserData); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CleanWindowsDevice/CleanWindowsDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CleanWindowsDevice/CleanWindowsDeviceRequestBuilder.cs index 5b6a9a7b86d..a0bf779a5c1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CleanWindowsDevice/CleanWindowsDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CleanWindowsDevice/CleanWindowsDeviceRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.CleanWindowsDevice.CleanWindowsDevicePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.CleanWindowsDevice.CleanWindowsDevicePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestPostRequestBody.cs index af1c7edcdb8..ec7b93093f0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateDeviceLogCollectionRequestPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.CreateDeviceLogCollectionRequest.CreateDeviceLogCollectionRequestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.CreateDeviceLogCollectionRequest.CreateDeviceLogCollectionRequestPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("templateType", TemplateType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestRequestBuilder.cs index 294e9691313..8e7e78b0fd5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestRequestBuilder.cs @@ -51,7 +51,7 @@ public CreateDeviceLogCollectionRequestRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.CreateDeviceLogCollectionRequest.CreateDeviceLogCollectionRequestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.CreateDeviceLogCollectionRequest.CreateDeviceLogCollectionRequestPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDevicePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDevicePostRequestBody.cs index e8432d36088..d5e6c011080 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDevicePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDevicePostRequestBody.cs @@ -52,7 +52,7 @@ public DeleteUserFromSharedAppleDevicePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.DeleteUserFromSharedAppleDevice.DeleteUserFromSharedAppleDevicePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.DeleteUserFromSharedAppleDevice.DeleteUserFromSharedAppleDevicePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("userPrincipalName", UserPrincipalName); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDeviceRequestBuilder.cs index d238db4540c..b21b21b5179 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDeviceRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.DeleteUserFromSharedAppleDevice.DeleteUserFromSharedAppleDevicePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.DeleteUserFromSharedAppleDevice.DeleteUserFromSharedAppleDevicePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Deprovision/DeprovisionPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Deprovision/DeprovisionPostRequestBody.cs index 02cddf4abe3..2ea98124af5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Deprovision/DeprovisionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Deprovision/DeprovisionPostRequestBody.cs @@ -52,7 +52,7 @@ public DeprovisionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.Deprovision.DeprovisionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.Deprovision.DeprovisionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deprovisionReason", DeprovisionReason); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Deprovision/DeprovisionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Deprovision/DeprovisionRequestBuilder.cs index d02ee1a2bc2..6f8a01bfeeb 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Deprovision/DeprovisionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Deprovision/DeprovisionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.Deprovision.DeprovisionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.Deprovision.DeprovisionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCategory/DeviceCategoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCategory/DeviceCategoryRequestBuilder.cs index cf68e5e4338..acc3bcc4a95 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCategory/DeviceCategoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCategory/DeviceCategoryRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCategory/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCategory/Ref/RefRequestBuilder.cs index 05a98f5f5e6..4bf2b95fd85 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCategory/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCategory/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate b public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCompliancePolicyStates/DeviceCompliancePolicyStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCompliancePolicyStates/DeviceCompliancePolicyStatesRequestBuilder.cs index 9131f9237cb..3e0d9607a34 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCompliancePolicyStates/DeviceCompliancePolicyStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCompliancePolicyStates/DeviceCompliancePolicyStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceCompliancePolicyStatesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCompliancePolicyStates/Item/DeviceCompliancePolicyStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCompliancePolicyStates/Item/DeviceCompliancePolicyStateItemRequestBuilder.cs index 05a8c6149db..0b599bba182 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCompliancePolicyStates/Item/DeviceCompliancePolicyStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceCompliancePolicyStates/Item/DeviceCompliancePolicyStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceConfigurationStates/DeviceConfigurationStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceConfigurationStates/DeviceConfigurationStatesRequestBuilder.cs index c85cd9fbde5..b1a9ad8dceb 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceConfigurationStates/DeviceConfigurationStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceConfigurationStates/DeviceConfigurationStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceConfigurationStatesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceConfigurationStates/Item/DeviceConfigurationStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceConfigurationStates/Item/DeviceConfigurationStateItemRequestBuilder.cs index fa5ebe068c9..f1042a8ac86 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceConfigurationStates/Item/DeviceConfigurationStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceConfigurationStates/Item/DeviceConfigurationStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceHealthScriptStates/DeviceHealthScriptStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceHealthScriptStates/DeviceHealthScriptStatesRequestBuilder.cs index 83a79a236da..b39350df727 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceHealthScriptStates/DeviceHealthScriptStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceHealthScriptStates/DeviceHealthScriptStatesRequestBuilder.cs @@ -81,7 +81,7 @@ public DeviceHealthScriptStatesRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -123,7 +123,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceHealthScriptStates/WithIdWithPolicyIdWithDeviceId/WithIdWithPolicyIdWithDeviceIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceHealthScriptStates/WithIdWithPolicyIdWithDeviceId/WithIdWithPolicyIdWithDeviceIdRequestBuilder.cs index 90e4c6292fb..ea337790237 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceHealthScriptStates/WithIdWithPolicyIdWithDeviceId/WithIdWithPolicyIdWithDeviceIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/DeviceHealthScriptStates/WithIdWithPolicyIdWithDeviceId/WithIdWithPolicyIdWithDeviceIdRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/EnableLostMode/EnableLostModePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/EnableLostMode/EnableLostModePostRequestBody.cs index 590c4bb7c97..cdd2150a8bd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/EnableLostMode/EnableLostModePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/EnableLostMode/EnableLostModePostRequestBody.cs @@ -84,7 +84,7 @@ public EnableLostModePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.EnableLostMode.EnableLostModePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.EnableLostMode.EnableLostModePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("footer", Footer); writer.WriteStringValue("message", Message); writer.WriteStringValue("phoneNumber", PhoneNumber); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/EnableLostMode/EnableLostModeRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/EnableLostMode/EnableLostModeRequestBuilder.cs index f925f5b129c..0250c38ce1f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/EnableLostMode/EnableLostModeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/EnableLostMode/EnableLostModeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.EnableLostMode.EnableLostModePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.EnableLostMode.EnableLostModePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetFileVaultKey/GetFileVaultKeyGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetFileVaultKey/GetFileVaultKeyGetResponse.cs index 5eaf4fd2c57..dad21d069e8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetFileVaultKey/GetFileVaultKeyGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetFileVaultKey/GetFileVaultKeyGetResponse.cs @@ -52,7 +52,7 @@ public GetFileVaultKeyGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.GetFileVaultKey.GetFileVaultKeyGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.GetFileVaultKey.GetFileVaultKeyGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetFileVaultKey/GetFileVaultKeyResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetFileVaultKey/GetFileVaultKeyResponse.cs index 82a84c94109..380d545412e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetFileVaultKey/GetFileVaultKeyResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetFileVaultKey/GetFileVaultKeyResponse.cs @@ -20,7 +20,7 @@ public partial class GetFileVaultKeyResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.GetFileVaultKey.GetFileVaultKeyResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.GetFileVaultKey.GetFileVaultKeyResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsGetResponse.cs index 0ff9a9bd0ba..719251f912a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetNonCompliantSettingsGetResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.GetNonCompliantSettings.GetNonCompliantSettingsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.GetNonCompliantSettings.GetNonCompliantSettingsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsResponse.cs index be3772e3137..3b89687b56c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsResponse.cs @@ -20,7 +20,7 @@ public partial class GetNonCompliantSettingsResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.GetNonCompliantSettings.GetNonCompliantSettingsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.GetNonCompliantSettings.GetNonCompliantSettingsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationPostRequestBody.cs index 5bd5cbdc1e3..af5ef9cc02a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationPostRequestBody.cs @@ -52,7 +52,7 @@ public InitiateOnDemandProactiveRemediationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.InitiateOnDemandProactiveRemediation.InitiateOnDemandProactiveRemediationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.InitiateOnDemandProactiveRemediation.InitiateOnDemandProactiveRemediationPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("scriptPolicyId", ScriptPolicyId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationRequestBuilder.cs index 15740d2aff8..492688951a6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.InitiateOnDemandProactiveRemediation.InitiateOnDemandProactiveRemediationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.InitiateOnDemandProactiveRemediation.InitiateOnDemandProactiveRemediationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs index 2c9d0cdacc1..9da356a365f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs @@ -52,7 +52,7 @@ public CreateDownloadUrlPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl.CreateDownloadUrlPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl.CreateDownloadUrlPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs index ab2f9531d8e..fd6c52329d0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs @@ -20,7 +20,7 @@ public partial class CreateDownloadUrlResponse : global::Microsoft.Graph.Beta.De /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl.CreateDownloadUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl.CreateDownloadUrlResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs index 90e95c290a2..3006195f018 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponse body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponse body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs index 31f0e2f7e6c..89e00f1355f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public LogCollectionRequestsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponse body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponse body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceItemRequestBuilder.cs index bc1613f06bc..7ab0d4edaab 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceItemRequestBuilder.cs @@ -420,7 +420,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -481,7 +481,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/Item/ManagedDeviceMobileAppConfigurationStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/Item/ManagedDeviceMobileAppConfigurationStateItemRequestBuilder.cs index b0d99420095..8d7d3b032ee 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/Item/ManagedDeviceMobileAppConfigurationStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/Item/ManagedDeviceMobileAppConfigurationStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/ManagedDeviceMobileAppConfigurationStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/ManagedDeviceMobileAppConfigurationStatesRequestBuilder.cs index c9862c5a8ba..66140246510 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/ManagedDeviceMobileAppConfigurationStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/ManagedDeviceMobileAppConfigurationStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public ManagedDeviceMobileAppConfigurationStatesRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/OverrideComplianceState/OverrideComplianceStatePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/OverrideComplianceState/OverrideComplianceStatePostRequestBody.cs index 86cdc2628e5..8402a9dc922 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/OverrideComplianceState/OverrideComplianceStatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/OverrideComplianceState/OverrideComplianceStatePostRequestBody.cs @@ -59,7 +59,7 @@ public OverrideComplianceStatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.OverrideComplianceState.OverrideComplianceStatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.OverrideComplianceState.OverrideComplianceStatePostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("complianceState", ComplianceState); writer.WriteStringValue("remediationUrl", RemediationUrl); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/OverrideComplianceState/OverrideComplianceStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/OverrideComplianceState/OverrideComplianceStateRequestBuilder.cs index 80bad2ffb5b..83ca7780999 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/OverrideComplianceState/OverrideComplianceStateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/OverrideComplianceState/OverrideComplianceStateRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.OverrideComplianceState.OverrideComplianceStatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.OverrideComplianceState.OverrideComplianceStatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshPostRequestBody.cs index d2ef005c3c3..42be2da260b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshPostRequestBody.cs @@ -42,7 +42,7 @@ public PauseConfigurationRefreshPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.PauseConfigurationRefresh.PauseConfigurationRefreshPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.PauseConfigurationRefresh.PauseConfigurationRefreshPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("pauseTimePeriodInMinutes", PauseTimePeriodInMinutes); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshRequestBuilder.cs index b00071d98e8..e199af5fd79 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.PauseConfigurationRefresh.PauseConfigurationRefreshPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.PauseConfigurationRefresh.PauseConfigurationRefreshPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PlayLostModeSound/PlayLostModeSoundPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PlayLostModeSound/PlayLostModeSoundPostRequestBody.cs index ac567b523e4..2a4391bbd3e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PlayLostModeSound/PlayLostModeSoundPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PlayLostModeSound/PlayLostModeSoundPostRequestBody.cs @@ -52,7 +52,7 @@ public PlayLostModeSoundPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.PlayLostModeSound.PlayLostModeSoundPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.PlayLostModeSound.PlayLostModeSoundPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("durationInMinutes", DurationInMinutes); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PlayLostModeSound/PlayLostModeSoundRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PlayLostModeSound/PlayLostModeSoundRequestBuilder.cs index 3325778d33a..a7fd964eed0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PlayLostModeSound/PlayLostModeSoundRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/PlayLostModeSound/PlayLostModeSoundRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.PlayLostModeSound.PlayLostModeSoundPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.PlayLostModeSound.PlayLostModeSoundPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/Item/SecurityBaselineStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/Item/SecurityBaselineStateItemRequestBuilder.cs index b9c01d85889..b3e1a99c03c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/Item/SecurityBaselineStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/Item/SecurityBaselineStateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SecurityBaselineState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SecurityBaselineState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/Item/SettingStates/Item/SecurityBaselineSettingStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/Item/SettingStates/Item/SecurityBaselineSettingStateItemRequestBuilder.cs index 9bb7b27c64c..ebca47a720d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/Item/SettingStates/Item/SecurityBaselineSettingStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/Item/SettingStates/Item/SecurityBaselineSettingStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/Item/SettingStates/SettingStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/Item/SettingStates/SettingStatesRequestBuilder.cs index 0e7508a6711..464418fcfdd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/Item/SettingStates/SettingStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/Item/SettingStates/SettingStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/SecurityBaselineStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/SecurityBaselineStatesRequestBuilder.cs index 0bf3bf801d5..7416232bfa9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/SecurityBaselineStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SecurityBaselineStates/SecurityBaselineStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public SecurityBaselineStatesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SecurityBaselineState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SecurityBaselineState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs index 7339268e78c..76a4c0203e6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs @@ -68,7 +68,7 @@ public SendCustomNotificationToCompanyPortalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("notificationBody", NotificationBody); writer.WriteStringValue("notificationTitle", NotificationTitle); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs index 16c78d6877e..4c28ee59f94 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SetDeviceName/SetDeviceNamePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SetDeviceName/SetDeviceNamePostRequestBody.cs index bbe12271647..b56ddd89ee6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SetDeviceName/SetDeviceNamePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SetDeviceName/SetDeviceNamePostRequestBody.cs @@ -52,7 +52,7 @@ public SetDeviceNamePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.SetDeviceName.SetDeviceNamePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.SetDeviceName.SetDeviceNamePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceName", DeviceName); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SetDeviceName/SetDeviceNameRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SetDeviceName/SetDeviceNameRequestBuilder.cs index d507e7697cf..1c96d12dba4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SetDeviceName/SetDeviceNameRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/SetDeviceName/SetDeviceNameRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.SetDeviceName.SetDeviceNamePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.SetDeviceName.SetDeviceNamePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionPostRequestBody.cs index 1e4dd12d7ea..923c9400c91 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionPostRequestBody.cs @@ -53,7 +53,7 @@ public TriggerConfigurationManagerActionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.TriggerConfigurationManagerAction.TriggerConfigurationManagerActionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.TriggerConfigurationManagerAction.TriggerConfigurationManagerActionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("configurationManagerAction", ConfigurationManagerAction); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionRequestBuilder.cs index 6b989b6071b..829bd254bba 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.TriggerConfigurationManagerAction.TriggerConfigurationManagerActionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.TriggerConfigurationManagerAction.TriggerConfigurationManagerActionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountPostRequestBody.cs index 24f531171c3..3c1404b836f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountPostRequestBody.cs @@ -53,7 +53,7 @@ public UpdateWindowsDeviceAccountPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.UpdateWindowsDeviceAccount.UpdateWindowsDeviceAccountPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.UpdateWindowsDeviceAccount.UpdateWindowsDeviceAccountPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("updateWindowsDeviceAccountActionParameter", UpdateWindowsDeviceAccountActionParameter); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountRequestBuilder.cs index 6153bca0c0f..f987b78c9c7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.UpdateWindowsDeviceAccount.UpdateWindowsDeviceAccountPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.UpdateWindowsDeviceAccount.UpdateWindowsDeviceAccountPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanPostRequestBody.cs index 6951c864eba..71c332ede00 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanPostRequestBody.cs @@ -42,7 +42,7 @@ public WindowsDefenderScanPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.WindowsDefenderScan.WindowsDefenderScanPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.WindowsDefenderScan.WindowsDefenderScanPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("quickScan", QuickScan); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanRequestBuilder.cs index c0af1dd0abe..3d11738a18d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.WindowsDefenderScan.WindowsDefenderScanPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.WindowsDefenderScan.WindowsDefenderScanPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs index e8cc43c5a48..143e286c707 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs @@ -93,7 +93,7 @@ public DetectedMalwareStateRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs index 078c20bee74..af33b0352d0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs index 753227b3ec1..122854c095b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsProtectionState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsProtectionState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Wipe/WipePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Wipe/WipePostRequestBody.cs index 5e6dabad3ac..5cfc8a2473d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Wipe/WipePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Wipe/WipePostRequestBody.cs @@ -83,7 +83,7 @@ public WipePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.Wipe.WipePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.Wipe.WipePostRequestBody(); } /// @@ -108,7 +108,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("keepEnrollmentData", KeepEnrollmentData); writer.WriteBoolValue("keepUserData", KeepUserData); writer.WriteStringValue("macOsUnlockCode", MacOsUnlockCode); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Wipe/WipeRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Wipe/WipeRequestBuilder.cs index 934cf957fd1..0cafd5e3ee6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Wipe/WipeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/Item/Wipe/WipeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.Wipe.WipePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.Item.Wipe.WipePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/MoveDevicesToOU/MoveDevicesToOUPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/MoveDevicesToOU/MoveDevicesToOUPostRequestBody.cs index e55f28f45da..b368207eb58 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/MoveDevicesToOU/MoveDevicesToOUPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/MoveDevicesToOU/MoveDevicesToOUPostRequestBody.cs @@ -68,7 +68,7 @@ public MoveDevicesToOUPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.MoveDevicesToOU.MoveDevicesToOUPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.MoveDevicesToOU.MoveDevicesToOUPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("deviceIds", DeviceIds); writer.WriteStringValue("organizationalUnitPath", OrganizationalUnitPath); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/MoveDevicesToOU/MoveDevicesToOURequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/MoveDevicesToOU/MoveDevicesToOURequestBuilder.cs index 8a8819033fa..e6e09f373b4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/MoveDevicesToOU/MoveDevicesToOURequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/MoveDevicesToOU/MoveDevicesToOURequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Comana public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.MoveDevicesToOU.MoveDevicesToOUPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.MoveDevicesToOU.MoveDevicesToOUPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse.cs index a72dfae0131..fa0c6abdbc0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse.cs index 562341fd96d..bc5a912b78f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse.cs @@ -20,7 +20,7 @@ public partial class RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ComanagedDevices.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagementEligibleDevices/ComanagementEligibleDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagementEligibleDevices/ComanagementEligibleDevicesRequestBuilder.cs index 1af80e06636..d51f965169c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagementEligibleDevices/ComanagementEligibleDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagementEligibleDevices/ComanagementEligibleDevicesRequestBuilder.cs @@ -93,7 +93,7 @@ public ComanagementEligibleDevicesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ComanagementEligibleDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ComanagementEligibleDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagementEligibleDevices/Item/ComanagementEligibleDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagementEligibleDevices/Item/ComanagementEligibleDeviceItemRequestBuilder.cs index e05ea3c4bb4..9cccab8a79a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComanagementEligibleDevices/Item/ComanagementEligibleDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComanagementEligibleDevices/Item/ComanagementEligibleDeviceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ComanagementEligibleDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ComanagementEligibleDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceCategories/ComplianceCategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceCategories/ComplianceCategoriesRequestBuilder.cs index e7f5fb35f62..c30950955cb 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceCategories/ComplianceCategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceCategories/ComplianceCategoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public ComplianceCategoriesRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceCategories/Item/DeviceManagementConfigurationCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceCategories/Item/DeviceManagementConfigurationCategoryItemRequestBuilder.cs index 514963fd00e..f51f73d45b9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceCategories/Item/DeviceManagementConfigurationCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceCategories/Item/DeviceManagementConfigurationCategoryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceManagementPartners/ComplianceManagementPartnersRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceManagementPartners/ComplianceManagementPartnersRequestBuilder.cs index 53f84420d0e..b4f00823e35 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceManagementPartners/ComplianceManagementPartnersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceManagementPartners/ComplianceManagementPartnersRequestBuilder.cs @@ -93,7 +93,7 @@ public ComplianceManagementPartnersRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ComplianceManagementPartner body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ComplianceManagementPartner body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceManagementPartners/Item/ComplianceManagementPartnerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceManagementPartners/Item/ComplianceManagementPartnerItemRequestBuilder.cs index 4b379e3d6d2..a23ae4b78ef 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceManagementPartners/Item/ComplianceManagementPartnerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceManagementPartners/Item/ComplianceManagementPartnerItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ComplianceManagementPartner body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ComplianceManagementPartner body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/CompliancePoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/CompliancePoliciesRequestBuilder.cs index 54bb1928411..438a023eb1e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/CompliancePoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/CompliancePoliciesRequestBuilder.cs @@ -93,7 +93,7 @@ public CompliancePoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementCompliancePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementCompliancePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignPostRequestBody.cs index cb0f4062bf8..4e53cc49abd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignPostResponse.cs index 06627b410e3..afc24ee5810 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignPostResponse.cs @@ -36,7 +36,7 @@ public partial class AssignPostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.Assign.AssignPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.Assign.AssignPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignRequestBuilder.cs index 5ce4367d14e..0ab1c742a87 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignRequestBuilder.cs @@ -50,7 +50,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsAssignPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignResponse.cs index e7572daa035..ceff6c270b2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assign/AssignResponse.cs @@ -20,7 +20,7 @@ public partial class AssignResponse : global::Microsoft.Graph.Beta.DeviceManagem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.Assign.AssignResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.Assign.AssignResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assignments/AssignmentsRequestBuilder.cs index 1152b34deb4..b8199ebd648 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assignments/Item/DeviceManagementConfigurationPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assignments/Item/DeviceManagementConfigurationPolicyAssignmentItemRequestBuilder.cs index 6da5c3d94aa..60122475124 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assignments/Item/DeviceManagementConfigurationPolicyAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Assignments/Item/DeviceManagementConfigurationPolicyAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/DeviceManagementCompliancePolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/DeviceManagementCompliancePolicyItemRequestBuilder.cs index 85536d91148..c5d9ae3237d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/DeviceManagementCompliancePolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/DeviceManagementCompliancePolicyItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementCompliancePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementCompliancePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/Item/DeviceManagementComplianceScheduledActionForRuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/Item/DeviceManagementComplianceScheduledActionForRuleItemRequestBuilder.cs index 60fb3f7e9f4..95976075060 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/Item/DeviceManagementComplianceScheduledActionForRuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/Item/DeviceManagementComplianceScheduledActionForRuleItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceScheduledActionForRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceScheduledActionForRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/Item/DeviceManagementComplianceActionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/Item/DeviceManagementComplianceActionItemItemRequestBuilder.cs index 01d0571a61e..33b20c3905f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/Item/DeviceManagementComplianceActionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/Item/DeviceManagementComplianceActionItemItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceActionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceActionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/ScheduledActionConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/ScheduledActionConfigurationsRequestBuilder.cs index 7dddb6abcbe..74f611b41e5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/ScheduledActionConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/ScheduledActionConfigurationsRequestBuilder.cs @@ -93,7 +93,7 @@ public ScheduledActionConfigurationsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceActionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceActionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/ScheduledActionsForRuleRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/ScheduledActionsForRuleRequestBuilder.cs index d2c65a5c4dd..0460fb8af7c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/ScheduledActionsForRuleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/ScheduledActionsForRule/ScheduledActionsForRuleRequestBuilder.cs @@ -93,7 +93,7 @@ public ScheduledActionsForRuleRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceScheduledActionForRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceScheduledActionForRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsPostRequestBody.cs index 9ace88be177..773359e7c96 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsPostRequestBody.cs @@ -53,7 +53,7 @@ public SetScheduledActionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.SetScheduledActions.SetScheduledActionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.SetScheduledActions.SetScheduledActionsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("scheduledActions", ScheduledActions); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsPostResponse.cs index 1c1bde65f1e..aee64dd7b4c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsPostResponse.cs @@ -36,7 +36,7 @@ public partial class SetScheduledActionsPostResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.SetScheduledActions.SetScheduledActionsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.SetScheduledActions.SetScheduledActionsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsRequestBuilder.cs index 0a500feaff6..e09ea48824a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsRequestBuilder.cs @@ -50,7 +50,7 @@ public SetScheduledActionsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsSetScheduledActionsPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.SetScheduledActions.SetScheduledActionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public SetScheduledActionsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.SetScheduledActions.SetScheduledActionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.SetScheduledActions.SetScheduledActionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsResponse.cs index b4ca883aa40..65817f67433 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/SetScheduledActions/SetScheduledActionsResponse.cs @@ -20,7 +20,7 @@ public partial class SetScheduledActionsResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.SetScheduledActions.SetScheduledActionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.CompliancePolicies.Item.SetScheduledActions.SetScheduledActionsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs index 6ea107e52b0..fa79327bf59 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/SettingsRequestBuilder.cs index ba409a1922f..39866fb4870 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/CompliancePolicies/Item/Settings/SettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceSettings/ComplianceSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceSettings/ComplianceSettingsRequestBuilder.cs index 9217c58a6dd..e9ab4a083e1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceSettings/ComplianceSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceSettings/ComplianceSettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public ComplianceSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceSettings/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceSettings/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs index 0ea82e4b353..c6155360de0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceSettings/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ComplianceSettings/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConditionalAccessSettings/ConditionalAccessSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConditionalAccessSettings/ConditionalAccessSettingsRequestBuilder.cs index cd7b17f8f5a..682773257b3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConditionalAccessSettings/ConditionalAccessSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConditionalAccessSettings/ConditionalAccessSettingsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnPremisesConditionalAccessSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesConditionalAccessSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigManagerCollections/ConfigManagerCollectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigManagerCollections/ConfigManagerCollectionsRequestBuilder.cs index f29965783ee..0788d9e8280 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigManagerCollections/ConfigManagerCollectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigManagerCollections/ConfigManagerCollectionsRequestBuilder.cs @@ -104,7 +104,7 @@ public ConfigManagerCollectionsRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConfigManagerCollection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigManagerCollection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigManagerCollections/Item/ConfigManagerCollectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigManagerCollections/Item/ConfigManagerCollectionItemRequestBuilder.cs index c76d389529b..e800c7da8a1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigManagerCollections/Item/ConfigManagerCollectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigManagerCollections/Item/ConfigManagerCollectionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConfigManagerCollection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConfigManagerCollection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationCategories/ConfigurationCategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationCategories/ConfigurationCategoriesRequestBuilder.cs index f1fc52471fa..b64b8109465 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationCategories/ConfigurationCategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationCategories/ConfigurationCategoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public ConfigurationCategoriesRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationCategories/Item/DeviceManagementConfigurationCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationCategories/Item/DeviceManagementConfigurationCategoryItemRequestBuilder.cs index ce821f67045..738b622f3b8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationCategories/Item/DeviceManagementConfigurationCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationCategories/Item/DeviceManagementConfigurationCategoryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/ConfigurationPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/ConfigurationPoliciesRequestBuilder.cs index 433fc5c6930..7a5f3284ec9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/ConfigurationPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/ConfigurationPoliciesRequestBuilder.cs @@ -93,7 +93,7 @@ public ConfigurationPoliciesRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignPostRequestBody.cs index 251484d2753..22e15055e36 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignPostResponse.cs index 4e7a98bc7bd..27a6bb93e20 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignPostResponse.cs @@ -36,7 +36,7 @@ public partial class AssignPostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.Assign.AssignPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.Assign.AssignPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignRequestBuilder.cs index 7c221cf9f46..0b1d19abfea 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignRequestBuilder.cs @@ -50,7 +50,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsAssignPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignResponse.cs index 1eda5323cd2..047a2ae5c11 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assign/AssignResponse.cs @@ -20,7 +20,7 @@ public partial class AssignResponse : global::Microsoft.Graph.Beta.DeviceManagem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.Assign.AssignResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.Assign.AssignResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assignments/AssignmentsRequestBuilder.cs index ccaa80e0411..aed4ceb45dc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assignments/Item/DeviceManagementConfigurationPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assignments/Item/DeviceManagementConfigurationPolicyAssignmentItemRequestBuilder.cs index 9e8f7c22168..48a0691cd5e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assignments/Item/DeviceManagementConfigurationPolicyAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Assignments/Item/DeviceManagementConfigurationPolicyAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetPostResponse.cs index 9bb495bd3fe..de1118e931f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetPostResponse.cs @@ -42,7 +42,7 @@ public ClearEnrollmentTimeDeviceMembershipTargetPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.ClearEnrollmentTimeDeviceMembershipTarget.ClearEnrollmentTimeDeviceMembershipTargetPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.ClearEnrollmentTimeDeviceMembershipTarget.ClearEnrollmentTimeDeviceMembershipTargetPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetResponse.cs index 2d43e2aeabb..16533f916fd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetResponse.cs @@ -20,7 +20,7 @@ public partial class ClearEnrollmentTimeDeviceMembershipTargetResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.ClearEnrollmentTimeDeviceMembershipTarget.ClearEnrollmentTimeDeviceMembershipTargetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.ClearEnrollmentTimeDeviceMembershipTarget.ClearEnrollmentTimeDeviceMembershipTargetResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/CreateCopy/CreateCopyPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/CreateCopy/CreateCopyPostRequestBody.cs index 52af7a08741..0d385fa4579 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/CreateCopy/CreateCopyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/CreateCopy/CreateCopyPostRequestBody.cs @@ -68,7 +68,7 @@ public CreateCopyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.CreateCopy.CreateCopyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.CreateCopy.CreateCopyPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/CreateCopy/CreateCopyRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/CreateCopy/CreateCopyRequestBuilder.cs index 4f030015e9b..f8fb52dd571 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/CreateCopy/CreateCopyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/CreateCopy/CreateCopyRequestBuilder.cs @@ -51,7 +51,7 @@ public CreateCopyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.CreateCopy.CreateCopyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.CreateCopy.CreateCopyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/DeviceManagementConfigurationPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/DeviceManagementConfigurationPolicyItemRequestBuilder.cs index c0e5948a52d..0faecb5d769 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/DeviceManagementConfigurationPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/DeviceManagementConfigurationPolicyItemRequestBuilder.cs @@ -150,7 +150,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -211,7 +211,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Reorder/ReorderPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Reorder/ReorderPostRequestBody.cs index 506f574f024..029fba233b6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Reorder/ReorderPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Reorder/ReorderPostRequestBody.cs @@ -42,7 +42,7 @@ public ReorderPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.Reorder.ReorderPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.Reorder.ReorderPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("priority", Priority); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Reorder/ReorderRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Reorder/ReorderRequestBuilder.cs index 7f2d6513634..383ab156123 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Reorder/ReorderRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Reorder/ReorderRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Config public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.Reorder.ReorderPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.Reorder.ReorderPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetPostRequestBody.cs index ede91e321f6..4ef5c91709e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetPostRequestBody.cs @@ -53,7 +53,7 @@ public SetEnrollmentTimeDeviceMembershipTargetPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.SetEnrollmentTimeDeviceMembershipTarget.SetEnrollmentTimeDeviceMembershipTargetPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.SetEnrollmentTimeDeviceMembershipTarget.SetEnrollmentTimeDeviceMembershipTargetPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("enrollmentTimeDeviceMembershipTargets", EnrollmentTimeDeviceMembershipTargets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetRequestBuilder.cs index b60b84d0614..5c0346e3d80 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetRequestBuilder.cs @@ -51,7 +51,7 @@ public SetEnrollmentTimeDeviceMembershipTargetRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.SetEnrollmentTimeDeviceMembershipTarget.SetEnrollmentTimeDeviceMembershipTargetPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ConfigurationPolicies.Item.SetEnrollmentTimeDeviceMembershipTarget.SetEnrollmentTimeDeviceMembershipTargetPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs index 08a3ffa4cb4..7c011f74f95 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/SettingsRequestBuilder.cs index b2085c288a0..07d8c11becd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicies/Item/Settings/SettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/ConfigurationPolicyTemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/ConfigurationPolicyTemplatesRequestBuilder.cs index f9ffc3aa48b..ab94ba6d181 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/ConfigurationPolicyTemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/ConfigurationPolicyTemplatesRequestBuilder.cs @@ -93,7 +93,7 @@ public ConfigurationPolicyTemplatesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/DeviceManagementConfigurationPolicyTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/DeviceManagementConfigurationPolicyTemplateItemRequestBuilder.cs index 767df511993..cc4fe7c815a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/DeviceManagementConfigurationPolicyTemplateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/DeviceManagementConfigurationPolicyTemplateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/Item/DeviceManagementConfigurationSettingTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/Item/DeviceManagementConfigurationSettingTemplateItemRequestBuilder.cs index c0a8d214659..bd715049b16 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/Item/DeviceManagementConfigurationSettingTemplateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/Item/DeviceManagementConfigurationSettingTemplateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs index 2a72de5a3bf..eea490d0e4d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs index 07055184ccc..07b9407b81c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/SettingTemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/SettingTemplatesRequestBuilder.cs index 64d77514241..be81a506657 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/SettingTemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationPolicyTemplates/Item/SettingTemplates/SettingTemplatesRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingTemplatesRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationSettings/ConfigurationSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationSettings/ConfigurationSettingsRequestBuilder.cs index 10ab47089c9..4cdc5c8e4d7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationSettings/ConfigurationSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationSettings/ConfigurationSettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public ConfigurationSettingsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationSettings/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationSettings/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs index 4cdd7fc3348..74026527f18 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationSettings/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ConfigurationSettings/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DataSharingConsents/DataSharingConsentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DataSharingConsents/DataSharingConsentsRequestBuilder.cs index 8ec52d333fb..edddded6629 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DataSharingConsents/DataSharingConsentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DataSharingConsents/DataSharingConsentsRequestBuilder.cs @@ -93,7 +93,7 @@ public DataSharingConsentsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DataSharingConsent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DataSharingConsent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DataSharingConsents/Item/DataSharingConsentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DataSharingConsents/Item/DataSharingConsentItemRequestBuilder.cs index f883466e9ec..c27b8d2a35e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DataSharingConsents/Item/DataSharingConsentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DataSharingConsents/Item/DataSharingConsentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DataSharingConsent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DataSharingConsent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/DepOnboardingSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/DepOnboardingSettingsRequestBuilder.cs index 057ec1a56e7..67a8222053f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/DepOnboardingSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/DepOnboardingSettingsRequestBuilder.cs @@ -104,7 +104,7 @@ public DepOnboardingSettingsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DepOnboardingSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DepOnboardingSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/GetExpiringVppTokenCountWithExpiringBeforeDateTime/GetExpiringVppTokenCountWithExpiringBeforeDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/GetExpiringVppTokenCountWithExpiringBeforeDateTime/GetExpiringVppTokenCountWithExpiringBeforeDateTimeGetResponse.cs index 916d576ff42..07dfb19e2b1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/GetExpiringVppTokenCountWithExpiringBeforeDateTime/GetExpiringVppTokenCountWithExpiringBeforeDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/GetExpiringVppTokenCountWithExpiringBeforeDateTime/GetExpiringVppTokenCountWithExpiringBeforeDateTimeGetResponse.cs @@ -42,7 +42,7 @@ public GetExpiringVppTokenCountWithExpiringBeforeDateTimeGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.GetExpiringVppTokenCountWithExpiringBeforeDateTime.GetExpiringVppTokenCountWithExpiringBeforeDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.GetExpiringVppTokenCountWithExpiringBeforeDateTime.GetExpiringVppTokenCountWithExpiringBeforeDateTimeGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/GetExpiringVppTokenCountWithExpiringBeforeDateTime/GetExpiringVppTokenCountWithExpiringBeforeDateTimeResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/GetExpiringVppTokenCountWithExpiringBeforeDateTime/GetExpiringVppTokenCountWithExpiringBeforeDateTimeResponse.cs index 303b7f5a831..bd99c5dfab7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/GetExpiringVppTokenCountWithExpiringBeforeDateTime/GetExpiringVppTokenCountWithExpiringBeforeDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/GetExpiringVppTokenCountWithExpiringBeforeDateTime/GetExpiringVppTokenCountWithExpiringBeforeDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetExpiringVppTokenCountWithExpiringBeforeDateTimeResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.GetExpiringVppTokenCountWithExpiringBeforeDateTime.GetExpiringVppTokenCountWithExpiringBeforeDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.GetExpiringVppTokenCountWithExpiringBeforeDateTime.GetExpiringVppTokenCountWithExpiringBeforeDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/DepOnboardingSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/DepOnboardingSettingItemRequestBuilder.cs index a69ad3b591d..a77b1f6f7e4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/DepOnboardingSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/DepOnboardingSettingItemRequestBuilder.cs @@ -168,7 +168,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DepOnboardingSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -229,7 +229,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DepOnboardingSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/EnrollmentProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/EnrollmentProfilesRequestBuilder.cs index 48c137a3960..120ab180343 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/EnrollmentProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/EnrollmentProfilesRequestBuilder.cs @@ -93,7 +93,7 @@ public EnrollmentProfilesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EnrollmentProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EnrollmentProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/EnrollmentProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/EnrollmentProfileItemRequestBuilder.cs index d3dc2af08ed..bf87ee7b2cb 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/EnrollmentProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/EnrollmentProfileItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EnrollmentProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EnrollmentProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/ExportMobileConfig/ExportMobileConfigGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/ExportMobileConfig/ExportMobileConfigGetResponse.cs index 418d1199f80..43d076529e5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/ExportMobileConfig/ExportMobileConfigGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/ExportMobileConfig/ExportMobileConfigGetResponse.cs @@ -52,7 +52,7 @@ public ExportMobileConfigGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.EnrollmentProfiles.Item.ExportMobileConfig.ExportMobileConfigGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.EnrollmentProfiles.Item.ExportMobileConfig.ExportMobileConfigGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/ExportMobileConfig/ExportMobileConfigResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/ExportMobileConfig/ExportMobileConfigResponse.cs index c162364ee92..bb1851ac8d6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/ExportMobileConfig/ExportMobileConfigResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/ExportMobileConfig/ExportMobileConfigResponse.cs @@ -20,7 +20,7 @@ public partial class ExportMobileConfigResponse : global::Microsoft.Graph.Beta.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.EnrollmentProfiles.Item.ExportMobileConfig.ExportMobileConfigResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.EnrollmentProfiles.Item.ExportMobileConfig.ExportMobileConfigResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/UpdateDeviceProfileAssignment/UpdateDeviceProfileAssignmentPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/UpdateDeviceProfileAssignment/UpdateDeviceProfileAssignmentPostRequestBody.cs index 3de9e86b203..a2a3f058303 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/UpdateDeviceProfileAssignment/UpdateDeviceProfileAssignmentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/UpdateDeviceProfileAssignment/UpdateDeviceProfileAssignmentPostRequestBody.cs @@ -52,7 +52,7 @@ public UpdateDeviceProfileAssignmentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.EnrollmentProfiles.Item.UpdateDeviceProfileAssignment.UpdateDeviceProfileAssignmentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.EnrollmentProfiles.Item.UpdateDeviceProfileAssignment.UpdateDeviceProfileAssignmentPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("deviceIds", DeviceIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/UpdateDeviceProfileAssignment/UpdateDeviceProfileAssignmentRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/UpdateDeviceProfileAssignment/UpdateDeviceProfileAssignmentRequestBuilder.cs index f476e818661..9b29a957610 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/UpdateDeviceProfileAssignment/UpdateDeviceProfileAssignmentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/EnrollmentProfiles/Item/UpdateDeviceProfileAssignment/UpdateDeviceProfileAssignmentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DepOnb public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.EnrollmentProfiles.Item.UpdateDeviceProfileAssignment.UpdateDeviceProfileAssignmentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.EnrollmentProfiles.Item.UpdateDeviceProfileAssignment.UpdateDeviceProfileAssignmentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GenerateEncryptionPublicKey/GenerateEncryptionPublicKeyPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GenerateEncryptionPublicKey/GenerateEncryptionPublicKeyPostResponse.cs index e52a68c3ec7..a536699f94c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GenerateEncryptionPublicKey/GenerateEncryptionPublicKeyPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GenerateEncryptionPublicKey/GenerateEncryptionPublicKeyPostResponse.cs @@ -52,7 +52,7 @@ public GenerateEncryptionPublicKeyPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.GenerateEncryptionPublicKey.GenerateEncryptionPublicKeyPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.GenerateEncryptionPublicKey.GenerateEncryptionPublicKeyPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GenerateEncryptionPublicKey/GenerateEncryptionPublicKeyResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GenerateEncryptionPublicKey/GenerateEncryptionPublicKeyResponse.cs index 2980fc69845..ad990eff5ec 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GenerateEncryptionPublicKey/GenerateEncryptionPublicKeyResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GenerateEncryptionPublicKey/GenerateEncryptionPublicKeyResponse.cs @@ -20,7 +20,7 @@ public partial class GenerateEncryptionPublicKeyResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.GenerateEncryptionPublicKey.GenerateEncryptionPublicKeyResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.GenerateEncryptionPublicKey.GenerateEncryptionPublicKeyResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GetEncryptionPublicKey/GetEncryptionPublicKeyGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GetEncryptionPublicKey/GetEncryptionPublicKeyGetResponse.cs index fae36225ce3..cd7c5123ce6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GetEncryptionPublicKey/GetEncryptionPublicKeyGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GetEncryptionPublicKey/GetEncryptionPublicKeyGetResponse.cs @@ -52,7 +52,7 @@ public GetEncryptionPublicKeyGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.GetEncryptionPublicKey.GetEncryptionPublicKeyGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.GetEncryptionPublicKey.GetEncryptionPublicKeyGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GetEncryptionPublicKey/GetEncryptionPublicKeyResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GetEncryptionPublicKey/GetEncryptionPublicKeyResponse.cs index c5a15d19f05..e3371a929f2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GetEncryptionPublicKey/GetEncryptionPublicKeyResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/GetEncryptionPublicKey/GetEncryptionPublicKeyResponse.cs @@ -20,7 +20,7 @@ public partial class GetEncryptionPublicKeyResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.GetEncryptionPublicKey.GetEncryptionPublicKeyResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.GetEncryptionPublicKey.GetEncryptionPublicKeyResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListPostRequestBody.cs index 809d1c5f42f..8fb535b60b3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListPostRequestBody.cs @@ -59,7 +59,7 @@ public ImportAppleDeviceIdentityListPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.ImportedAppleDeviceIdentities.ImportAppleDeviceIdentityList.ImportAppleDeviceIdentityListPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.ImportedAppleDeviceIdentities.ImportAppleDeviceIdentityList.ImportAppleDeviceIdentityListPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("importedAppleDeviceIdentities", ImportedAppleDeviceIdentities); writer.WriteBoolValue("overwriteImportedDeviceIdentities", OverwriteImportedDeviceIdentities); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListPostResponse.cs index 4daaa0bbbe6..0c44fbfc10d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListPostResponse.cs @@ -36,7 +36,7 @@ public partial class ImportAppleDeviceIdentityListPostResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.ImportedAppleDeviceIdentities.ImportAppleDeviceIdentityList.ImportAppleDeviceIdentityListPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.ImportedAppleDeviceIdentities.ImportAppleDeviceIdentityList.ImportAppleDeviceIdentityListPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListRequestBuilder.cs index 27d2ea75298..ae0ef58e667 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListRequestBuilder.cs @@ -50,7 +50,7 @@ public ImportAppleDeviceIdentityListRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsImportAppleDeviceIdentityListPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.ImportedAppleDeviceIdentities.ImportAppleDeviceIdentityList.ImportAppleDeviceIdentityListPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public ImportAppleDeviceIdentityListRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.ImportedAppleDeviceIdentities.ImportAppleDeviceIdentityList.ImportAppleDeviceIdentityListPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.ImportedAppleDeviceIdentities.ImportAppleDeviceIdentityList.ImportAppleDeviceIdentityListPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListResponse.cs index f7a60f2099f..7377c051873 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportAppleDeviceIdentityList/ImportAppleDeviceIdentityListResponse.cs @@ -20,7 +20,7 @@ public partial class ImportAppleDeviceIdentityListResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.ImportedAppleDeviceIdentities.ImportAppleDeviceIdentityList.ImportAppleDeviceIdentityListResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.ImportedAppleDeviceIdentities.ImportAppleDeviceIdentityList.ImportAppleDeviceIdentityListResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportedAppleDeviceIdentitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportedAppleDeviceIdentitiesRequestBuilder.cs index b155210f60f..a28cf7ba06e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportedAppleDeviceIdentitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/ImportedAppleDeviceIdentitiesRequestBuilder.cs @@ -99,7 +99,7 @@ public ImportedAppleDeviceIdentitiesRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ImportedAppleDeviceIdentity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ImportedAppleDeviceIdentity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/Item/ImportedAppleDeviceIdentityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/Item/ImportedAppleDeviceIdentityItemRequestBuilder.cs index 9c0aa9e84ad..58769672a5c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/Item/ImportedAppleDeviceIdentityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/ImportedAppleDeviceIdentities/Item/ImportedAppleDeviceIdentityItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ImportedAppleDeviceIdentity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ImportedAppleDeviceIdentity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/UploadDepToken/UploadDepTokenPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/UploadDepToken/UploadDepTokenPostRequestBody.cs index 7e7b649c516..2a18570a93c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/UploadDepToken/UploadDepTokenPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/UploadDepToken/UploadDepTokenPostRequestBody.cs @@ -68,7 +68,7 @@ public UploadDepTokenPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.UploadDepToken.UploadDepTokenPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.UploadDepToken.UploadDepTokenPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appleId", AppleId); writer.WriteStringValue("depToken", DepToken); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/UploadDepToken/UploadDepTokenRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/UploadDepToken/UploadDepTokenRequestBuilder.cs index e56bb30671b..f8f5796a3b0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/UploadDepToken/UploadDepTokenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DepOnboardingSettings/Item/UploadDepToken/UploadDepTokenRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DepOnb public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.UploadDepToken.UploadDepTokenPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DepOnboardingSettings.Item.UploadDepToken.UploadDepTokenPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DerivedCredentials/DerivedCredentialsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DerivedCredentials/DerivedCredentialsRequestBuilder.cs index 7aacd5a1c8f..1411aea00c4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DerivedCredentials/DerivedCredentialsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DerivedCredentials/DerivedCredentialsRequestBuilder.cs @@ -93,7 +93,7 @@ public DerivedCredentialsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementDerivedCredentialSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementDerivedCredentialSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DerivedCredentials/Item/DeviceManagementDerivedCredentialSettingsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DerivedCredentials/Item/DeviceManagementDerivedCredentialSettingsItemRequestBuilder.cs index 3921d88e866..2f2582bbf67 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DerivedCredentials/Item/DeviceManagementDerivedCredentialSettingsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DerivedCredentials/Item/DeviceManagementDerivedCredentialSettingsItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementDerivedCredentialSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementDerivedCredentialSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DetectedApps/DetectedAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DetectedApps/DetectedAppsRequestBuilder.cs index 7cea6f3776d..6f9cbf8aad9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DetectedApps/DetectedAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DetectedApps/DetectedAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public DetectedAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DetectedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DetectedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DetectedApps/Item/DetectedAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DetectedApps/Item/DetectedAppItemRequestBuilder.cs index 57190ef2ee0..c86931c6da5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DetectedApps/Item/DetectedAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DetectedApps/Item/DetectedAppItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DetectedApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DetectedApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCategories/DeviceCategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCategories/DeviceCategoriesRequestBuilder.cs index bf2a0b1bbb2..4fd5fd72d1d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCategories/DeviceCategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCategories/DeviceCategoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceCategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCategories/Item/DeviceCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCategories/Item/DeviceCategoryItemRequestBuilder.cs index d0d7a8d161a..0aa315226d0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCategories/Item/DeviceCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCategories/Item/DeviceCategoryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/DeviceCompliancePoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/DeviceCompliancePoliciesRequestBuilder.cs index a8d628de896..8f7834d1abb 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/DeviceCompliancePoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/DeviceCompliancePoliciesRequestBuilder.cs @@ -129,7 +129,7 @@ public DeviceCompliancePoliciesRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -171,7 +171,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetDevicesScheduledToRetire/GetDevicesScheduledToRetireGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetDevicesScheduledToRetire/GetDevicesScheduledToRetireGetResponse.cs index f78a2a7cb0e..5f9e2f67463 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetDevicesScheduledToRetire/GetDevicesScheduledToRetireGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetDevicesScheduledToRetire/GetDevicesScheduledToRetireGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetDevicesScheduledToRetireGetResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.GetDevicesScheduledToRetire.GetDevicesScheduledToRetireGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.GetDevicesScheduledToRetire.GetDevicesScheduledToRetireGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetDevicesScheduledToRetire/GetDevicesScheduledToRetireResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetDevicesScheduledToRetire/GetDevicesScheduledToRetireResponse.cs index bafe6c7694f..3060a3c334c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetDevicesScheduledToRetire/GetDevicesScheduledToRetireResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetDevicesScheduledToRetire/GetDevicesScheduledToRetireResponse.cs @@ -20,7 +20,7 @@ public partial class GetDevicesScheduledToRetireResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.GetDevicesScheduledToRetire.GetDevicesScheduledToRetireResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.GetDevicesScheduledToRetire.GetDevicesScheduledToRetireResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetNoncompliantDevicesToRetire/GetNoncompliantDevicesToRetirePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetNoncompliantDevicesToRetire/GetNoncompliantDevicesToRetirePostRequestBody.cs index fd257706069..d0c05afe1e3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetNoncompliantDevicesToRetire/GetNoncompliantDevicesToRetirePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetNoncompliantDevicesToRetire/GetNoncompliantDevicesToRetirePostRequestBody.cs @@ -160,7 +160,7 @@ public GetNoncompliantDevicesToRetirePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.GetNoncompliantDevicesToRetire.GetNoncompliantDevicesToRetirePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.GetNoncompliantDevicesToRetire.GetNoncompliantDevicesToRetirePostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetNoncompliantDevicesToRetire/GetNoncompliantDevicesToRetireRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetNoncompliantDevicesToRetire/GetNoncompliantDevicesToRetireRequestBuilder.cs index ccbea88af8c..57f6b29de79 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetNoncompliantDevicesToRetire/GetNoncompliantDevicesToRetireRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/GetNoncompliantDevicesToRetire/GetNoncompliantDevicesToRetireRequestBuilder.cs @@ -50,7 +50,7 @@ public GetNoncompliantDevicesToRetireRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.GetNoncompliantDevicesToRetire.GetNoncompliantDevicesToRetirePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.GetNoncompliantDevicesToRetire.GetNoncompliantDevicesToRetirePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs index 7eef3be05c5..f8272285a98 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs @@ -52,7 +52,7 @@ public HasPayloadLinksPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.HasPayloadLinks.HasPayloadLinksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.HasPayloadLinks.HasPayloadLinksPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("payloadIds", PayloadIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksPostResponse.cs index f690f700731..25a6c584cad 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksPostResponse.cs @@ -36,7 +36,7 @@ public partial class HasPayloadLinksPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.HasPayloadLinks.HasPayloadLinksPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.HasPayloadLinks.HasPayloadLinksPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs index b16dfb9c63c..5c0829dcf84 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs @@ -50,7 +50,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsHasPayloadLinksPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksResponse.cs index 9d92b27a38a..224be3ceb15 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/HasPayloadLinks/HasPayloadLinksResponse.cs @@ -20,7 +20,7 @@ public partial class HasPayloadLinksResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.HasPayloadLinks.HasPayloadLinksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.HasPayloadLinks.HasPayloadLinksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignPostRequestBody.cs index a333f328dd8..b3b5012f116 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignPostResponse.cs index be6647db6ae..759370b2a78 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignPostResponse.cs @@ -36,7 +36,7 @@ public partial class AssignPostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.Item.Assign.AssignPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.Item.Assign.AssignPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignRequestBuilder.cs index c677e2a914f..b5ab4a23dd5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignRequestBuilder.cs @@ -50,7 +50,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsAssignPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignResponse.cs index eb39ea5d916..e5287a2208b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assign/AssignResponse.cs @@ -20,7 +20,7 @@ public partial class AssignResponse : global::Microsoft.Graph.Beta.DeviceManagem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.Item.Assign.AssignResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.Item.Assign.AssignResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assignments/AssignmentsRequestBuilder.cs index 5fbbe66b3fb..ff3d5edfbad 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assignments/Item/DeviceCompliancePolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assignments/Item/DeviceCompliancePolicyAssignmentItemRequestBuilder.cs index a99be66ff4e..e63aa680c4c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assignments/Item/DeviceCompliancePolicyAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/Assignments/Item/DeviceCompliancePolicyAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceCompliancePolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceCompliancePolicyItemRequestBuilder.cs index 4761da3452f..9559bfe42f5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceCompliancePolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceCompliancePolicyItemRequestBuilder.cs @@ -150,7 +150,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -211,7 +211,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceSettingStateSummaries/DeviceSettingStateSummariesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceSettingStateSummaries/DeviceSettingStateSummariesRequestBuilder.cs index d3b8217d4e3..e6522e8187d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceSettingStateSummaries/DeviceSettingStateSummariesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceSettingStateSummaries/DeviceSettingStateSummariesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceSettingStateSummariesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SettingStateDeviceSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SettingStateDeviceSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceSettingStateSummaries/Item/SettingStateDeviceSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceSettingStateSummaries/Item/SettingStateDeviceSummaryItemRequestBuilder.cs index 0b64d31e4f6..feaecf2ec81 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceSettingStateSummaries/Item/SettingStateDeviceSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceSettingStateSummaries/Item/SettingStateDeviceSummaryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SettingStateDeviceSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SettingStateDeviceSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceStatusOverview/DeviceStatusOverviewRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceStatusOverview/DeviceStatusOverviewRequestBuilder.cs index 97b1f74d280..86303379317 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceStatusOverview/DeviceStatusOverviewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceStatusOverview/DeviceStatusOverviewRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceDeviceOverview body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceDeviceOverview body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs index 63b74b87db4..09ffeff8c2f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceStatusesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceDeviceStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceDeviceStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceStatuses/Item/DeviceComplianceDeviceStatusItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceStatuses/Item/DeviceComplianceDeviceStatusItemRequestBuilder.cs index 9f5fa4bc6de..813bdfc6a36 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceStatuses/Item/DeviceComplianceDeviceStatusItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/DeviceStatuses/Item/DeviceComplianceDeviceStatusItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceDeviceStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceDeviceStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduleActionsForRules/ScheduleActionsForRulesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduleActionsForRules/ScheduleActionsForRulesPostRequestBody.cs index 6da861024fd..8be4882d229 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduleActionsForRules/ScheduleActionsForRulesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduleActionsForRules/ScheduleActionsForRulesPostRequestBody.cs @@ -53,7 +53,7 @@ public ScheduleActionsForRulesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.Item.ScheduleActionsForRules.ScheduleActionsForRulesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.Item.ScheduleActionsForRules.ScheduleActionsForRulesPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("deviceComplianceScheduledActionForRules", DeviceComplianceScheduledActionForRules); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduleActionsForRules/ScheduleActionsForRulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduleActionsForRules/ScheduleActionsForRulesRequestBuilder.cs index dc83e228309..46304a76792 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduleActionsForRules/ScheduleActionsForRulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduleActionsForRules/ScheduleActionsForRulesRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Device public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.Item.ScheduleActionsForRules.ScheduleActionsForRulesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.Item.ScheduleActionsForRules.ScheduleActionsForRulesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/Item/DeviceComplianceScheduledActionForRuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/Item/DeviceComplianceScheduledActionForRuleItemRequestBuilder.cs index fb8008b7120..95a1da80346 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/Item/DeviceComplianceScheduledActionForRuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/Item/DeviceComplianceScheduledActionForRuleItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceScheduledActionForRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceScheduledActionForRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/Item/DeviceComplianceActionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/Item/DeviceComplianceActionItemItemRequestBuilder.cs index 71e59bbde59..3441da164a5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/Item/DeviceComplianceActionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/Item/DeviceComplianceActionItemItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceActionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceActionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/ScheduledActionConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/ScheduledActionConfigurationsRequestBuilder.cs index 1215535257f..5f3ab5bf826 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/ScheduledActionConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/Item/ScheduledActionConfigurations/ScheduledActionConfigurationsRequestBuilder.cs @@ -93,7 +93,7 @@ public ScheduledActionConfigurationsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceActionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceActionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/ScheduledActionsForRuleRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/ScheduledActionsForRuleRequestBuilder.cs index ada77a13392..d0521024dfe 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/ScheduledActionsForRuleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/ScheduledActionsForRule/ScheduledActionsForRuleRequestBuilder.cs @@ -93,7 +93,7 @@ public ScheduledActionsForRuleRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceScheduledActionForRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceScheduledActionForRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/UserStatusOverview/UserStatusOverviewRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/UserStatusOverview/UserStatusOverviewRequestBuilder.cs index e79f190fc52..c69b653c3a1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/UserStatusOverview/UserStatusOverviewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/UserStatusOverview/UserStatusOverviewRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceUserOverview body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceUserOverview body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/UserStatuses/Item/DeviceComplianceUserStatusItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/UserStatuses/Item/DeviceComplianceUserStatusItemRequestBuilder.cs index 5730abb6145..8dc337ceb2e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/UserStatuses/Item/DeviceComplianceUserStatusItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/UserStatuses/Item/DeviceComplianceUserStatusItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceUserStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceUserStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/UserStatuses/UserStatusesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/UserStatuses/UserStatusesRequestBuilder.cs index ed8ccc42ef3..5226f8e8421 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/UserStatuses/UserStatusesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/Item/UserStatuses/UserStatusesRequestBuilder.cs @@ -93,7 +93,7 @@ public UserStatusesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceUserStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceUserStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/SetScheduledRetireState/SetScheduledRetireStatePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/SetScheduledRetireState/SetScheduledRetireStatePostRequestBody.cs index 45b4f02d8fb..45febf4e81e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/SetScheduledRetireState/SetScheduledRetireStatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/SetScheduledRetireState/SetScheduledRetireStatePostRequestBody.cs @@ -65,7 +65,7 @@ public SetScheduledRetireStatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.SetScheduledRetireState.SetScheduledRetireStatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.SetScheduledRetireState.SetScheduledRetireStatePostRequestBody(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("managedDeviceIds", ManagedDeviceIds); writer.WriteBoolValue("scopedToAllDevices", ScopedToAllDevices); writer.WriteEnumValue("state", State); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/SetScheduledRetireState/SetScheduledRetireStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/SetScheduledRetireState/SetScheduledRetireStateRequestBuilder.cs index 89c130da9d1..de946c1e337 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/SetScheduledRetireState/SetScheduledRetireStateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/SetScheduledRetireState/SetScheduledRetireStateRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Device public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.SetScheduledRetireState.SetScheduledRetireStatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.SetScheduledRetireState.SetScheduledRetireStatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/ValidateComplianceScript/ValidateComplianceScriptPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/ValidateComplianceScript/ValidateComplianceScriptPostRequestBody.cs index 24689c2436b..82c4521853e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/ValidateComplianceScript/ValidateComplianceScriptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/ValidateComplianceScript/ValidateComplianceScriptPostRequestBody.cs @@ -53,7 +53,7 @@ public ValidateComplianceScriptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.ValidateComplianceScript.ValidateComplianceScriptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.ValidateComplianceScript.ValidateComplianceScriptPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("deviceCompliancePolicyScript", DeviceCompliancePolicyScript); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/ValidateComplianceScript/ValidateComplianceScriptRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/ValidateComplianceScript/ValidateComplianceScriptRequestBuilder.cs index 2033ef62ebc..2e1f1d2aacc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/ValidateComplianceScript/ValidateComplianceScriptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicies/ValidateComplianceScript/ValidateComplianceScriptRequestBuilder.cs @@ -51,7 +51,7 @@ public ValidateComplianceScriptRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.ValidateComplianceScript.ValidateComplianceScriptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCompliancePolicies.ValidateComplianceScript.ValidateComplianceScriptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicyDeviceStateSummary/DeviceCompliancePolicyDeviceStateSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicyDeviceStateSummary/DeviceCompliancePolicyDeviceStateSummaryRequestBuilder.cs index b9b4b0c06b9..ce5a5620754 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicyDeviceStateSummary/DeviceCompliancePolicyDeviceStateSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicyDeviceStateSummary/DeviceCompliancePolicyDeviceStateSummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyDeviceStateSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyDeviceStateSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/DeviceCompliancePolicySettingStateSummariesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/DeviceCompliancePolicySettingStateSummariesRequestBuilder.cs index 5977f9fbbed..856050ec078 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/DeviceCompliancePolicySettingStateSummariesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/DeviceCompliancePolicySettingStateSummariesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceCompliancePolicySettingStateSummariesRequestBuilder(string rawUrl, public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicySettingStateSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicySettingStateSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/Item/DeviceCompliancePolicySettingStateSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/Item/DeviceCompliancePolicySettingStateSummaryItemRequestBuilder.cs index 0527285d4c0..af748096e94 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/Item/DeviceCompliancePolicySettingStateSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/Item/DeviceCompliancePolicySettingStateSummaryItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicySettingStateSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicySettingStateSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/Item/DeviceComplianceSettingStates/DeviceComplianceSettingStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/Item/DeviceComplianceSettingStates/DeviceComplianceSettingStatesRequestBuilder.cs index 5a93f53643f..0be7d9d0ae0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/Item/DeviceComplianceSettingStates/DeviceComplianceSettingStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/Item/DeviceComplianceSettingStates/DeviceComplianceSettingStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceComplianceSettingStatesRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceSettingState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceSettingState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/Item/DeviceComplianceSettingStates/Item/DeviceComplianceSettingStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/Item/DeviceComplianceSettingStates/Item/DeviceComplianceSettingStateItemRequestBuilder.cs index d67c763e8fc..0f4c2dbdef5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/Item/DeviceComplianceSettingStates/Item/DeviceComplianceSettingStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCompliancePolicySettingStateSummaries/Item/DeviceComplianceSettingStates/Item/DeviceComplianceSettingStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceSettingState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceSettingState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/DeviceComplianceScriptsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/DeviceComplianceScriptsRequestBuilder.cs index c66e643721e..d6033c8e752 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/DeviceComplianceScriptsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/DeviceComplianceScriptsRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceComplianceScriptsRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceScript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceScript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assign/AssignPostRequestBody.cs index b5f20c22c3d..a7cdf6c8cac 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceComplianceScripts.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceComplianceScripts.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("deviceHealthScriptAssignments", DeviceHealthScriptAssignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assign/AssignRequestBuilder.cs index 2b570ded633..91a6330c373 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Device public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceComplianceScripts.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceComplianceScripts.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assignments/AssignmentsRequestBuilder.cs index e0c8fcdcbcc..b8a31728f78 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assignments/Item/DeviceHealthScriptAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assignments/Item/DeviceHealthScriptAssignmentItemRequestBuilder.cs index 6b491b80d4e..5f7318f7255 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assignments/Item/DeviceHealthScriptAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/Assignments/Item/DeviceHealthScriptAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/DeviceComplianceScriptItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/DeviceComplianceScriptItemRequestBuilder.cs index fc998cb9094..d127298cb64 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/DeviceComplianceScriptItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/DeviceComplianceScriptItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceScript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceScript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs index 929a8f09a98..8c1ac5ac199 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceRunStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/DeviceRunStates/Item/DeviceComplianceScriptDeviceStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/DeviceRunStates/Item/DeviceComplianceScriptDeviceStateItemRequestBuilder.cs index 0280ea3340e..3f735aca27f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/DeviceRunStates/Item/DeviceComplianceScriptDeviceStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/DeviceRunStates/Item/DeviceComplianceScriptDeviceStateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/RunSummary/RunSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/RunSummary/RunSummaryRequestBuilder.cs index ce84f1999c0..73d2e2de482 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/RunSummary/RunSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceComplianceScripts/Item/RunSummary/RunSummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptRunSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptRunSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationConflictSummary/DeviceConfigurationConflictSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationConflictSummary/DeviceConfigurationConflictSummaryRequestBuilder.cs index f11002a4841..b14aa274e63 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationConflictSummary/DeviceConfigurationConflictSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationConflictSummary/DeviceConfigurationConflictSummaryRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceConfigurationConflictSummaryRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationConflictSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationConflictSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationConflictSummary/Item/DeviceConfigurationConflictSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationConflictSummary/Item/DeviceConfigurationConflictSummaryItemRequestBuilder.cs index 9de409de66f..c1383ebf25a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationConflictSummary/Item/DeviceConfigurationConflictSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationConflictSummary/Item/DeviceConfigurationConflictSummaryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationConflictSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationConflictSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationDeviceStateSummaries/DeviceConfigurationDeviceStateSummariesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationDeviceStateSummaries/DeviceConfigurationDeviceStateSummariesRequestBuilder.cs index e21f9afd84c..3ce82a302e8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationDeviceStateSummaries/DeviceConfigurationDeviceStateSummariesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationDeviceStateSummaries/DeviceConfigurationDeviceStateSummariesRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceStateSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceStateSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationRestrictedAppsViolations/DeviceConfigurationRestrictedAppsViolationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationRestrictedAppsViolations/DeviceConfigurationRestrictedAppsViolationsRequestBuilder.cs index 56a313952f3..4c6a5c0f334 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationRestrictedAppsViolations/DeviceConfigurationRestrictedAppsViolationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationRestrictedAppsViolations/DeviceConfigurationRestrictedAppsViolationsRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceConfigurationRestrictedAppsViolationsRequestBuilder(string rawUrl, public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RestrictedAppsViolation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RestrictedAppsViolation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationRestrictedAppsViolations/Item/RestrictedAppsViolationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationRestrictedAppsViolations/Item/RestrictedAppsViolationItemRequestBuilder.cs index 28a55d8e429..65ab7072837 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationRestrictedAppsViolations/Item/RestrictedAppsViolationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationRestrictedAppsViolations/Item/RestrictedAppsViolationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RestrictedAppsViolation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RestrictedAppsViolation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationUserStateSummaries/DeviceConfigurationUserStateSummariesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationUserStateSummaries/DeviceConfigurationUserStateSummariesRequestBuilder.cs index 4a876716bfc..fd38b3ef25d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationUserStateSummaries/DeviceConfigurationUserStateSummariesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationUserStateSummaries/DeviceConfigurationUserStateSummariesRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserStateSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserStateSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/DeviceConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/DeviceConfigurationsRequestBuilder.cs index 7141b611e06..d4ddfd9a79b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/DeviceConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/DeviceConfigurationsRequestBuilder.cs @@ -111,7 +111,7 @@ public DeviceConfigurationsRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetIosAvailableUpdateVersions/GetIosAvailableUpdateVersionsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetIosAvailableUpdateVersions/GetIosAvailableUpdateVersionsGetResponse.cs index 27bdd978c46..dbfa19537e5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetIosAvailableUpdateVersions/GetIosAvailableUpdateVersionsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetIosAvailableUpdateVersions/GetIosAvailableUpdateVersionsGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetIosAvailableUpdateVersionsGetResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.GetIosAvailableUpdateVersions.GetIosAvailableUpdateVersionsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.GetIosAvailableUpdateVersions.GetIosAvailableUpdateVersionsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetIosAvailableUpdateVersions/GetIosAvailableUpdateVersionsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetIosAvailableUpdateVersions/GetIosAvailableUpdateVersionsResponse.cs index 68062903dbb..933bd719516 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetIosAvailableUpdateVersions/GetIosAvailableUpdateVersionsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetIosAvailableUpdateVersions/GetIosAvailableUpdateVersionsResponse.cs @@ -20,7 +20,7 @@ public partial class GetIosAvailableUpdateVersionsResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.GetIosAvailableUpdateVersions.GetIosAvailableUpdateVersionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.GetIosAvailableUpdateVersions.GetIosAvailableUpdateVersionsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesPostRequestBody.cs index 9b8c34ba117..4971478f4f7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesPostRequestBody.cs @@ -52,7 +52,7 @@ public GetTargetedUsersAndDevicesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.GetTargetedUsersAndDevices.GetTargetedUsersAndDevicesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.GetTargetedUsersAndDevices.GetTargetedUsersAndDevicesPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("deviceConfigurationIds", DeviceConfigurationIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesPostResponse.cs index 84dff0de58f..182b48d7b1e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetTargetedUsersAndDevicesPostResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.GetTargetedUsersAndDevices.GetTargetedUsersAndDevicesPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.GetTargetedUsersAndDevices.GetTargetedUsersAndDevicesPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesRequestBuilder.cs index 2261f3ca85f..c83eda21045 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesRequestBuilder.cs @@ -50,7 +50,7 @@ public GetTargetedUsersAndDevicesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsGetTargetedUsersAndDevicesPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.GetTargetedUsersAndDevices.GetTargetedUsersAndDevicesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetTargetedUsersAndDevicesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.GetTargetedUsersAndDevices.GetTargetedUsersAndDevicesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.GetTargetedUsersAndDevices.GetTargetedUsersAndDevicesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesResponse.cs index 11aa82c0b83..6782b2d0b9b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/GetTargetedUsersAndDevices/GetTargetedUsersAndDevicesResponse.cs @@ -20,7 +20,7 @@ public partial class GetTargetedUsersAndDevicesResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.GetTargetedUsersAndDevices.GetTargetedUsersAndDevicesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.GetTargetedUsersAndDevices.GetTargetedUsersAndDevicesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs index a23a9398d14..dfdbda23ae0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs @@ -52,7 +52,7 @@ public HasPayloadLinksPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("payloadIds", PayloadIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs index dff4c9cc411..9dca0e4d8d8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs @@ -36,7 +36,7 @@ public partial class HasPayloadLinksPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.HasPayloadLinks.HasPayloadLinksPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.HasPayloadLinks.HasPayloadLinksPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs index ace46952760..f270d9fa3fb 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs @@ -50,7 +50,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsHasPayloadLinksPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs index c9cf57db0e2..9b6d487f4ce 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs @@ -20,7 +20,7 @@ public partial class HasPayloadLinksResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.HasPayloadLinks.HasPayloadLinksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.HasPayloadLinks.HasPayloadLinksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignPostRequestBody.cs index eb9ff73b16a..c506e67dcf2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignPostRequestBody.cs @@ -69,7 +69,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.Assign.AssignPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteCollectionOfObjectValues("deviceConfigurationGroupAssignments", DeviceConfigurationGroupAssignments); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignPostResponse.cs index b5787c22a56..99b2d28ecd3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignPostResponse.cs @@ -36,7 +36,7 @@ public partial class AssignPostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.Assign.AssignPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.Assign.AssignPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignRequestBuilder.cs index deee73116c6..569d18c0084 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignRequestBuilder.cs @@ -50,7 +50,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsAssignPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignResponse.cs index 255af8e8595..f6ef11aa191 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assign/AssignResponse.cs @@ -20,7 +20,7 @@ public partial class AssignResponse : global::Microsoft.Graph.Beta.DeviceManagem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.Assign.AssignResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.Assign.AssignResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/AssignedAccessMultiModeProfiles/AssignedAccessMultiModeProfilesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/AssignedAccessMultiModeProfiles/AssignedAccessMultiModeProfilesPostRequestBody.cs index eb2a5a7c79b..40f4a270243 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/AssignedAccessMultiModeProfiles/AssignedAccessMultiModeProfilesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/AssignedAccessMultiModeProfiles/AssignedAccessMultiModeProfilesPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignedAccessMultiModeProfilesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.AssignedAccessMultiModeProfiles.AssignedAccessMultiModeProfilesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.AssignedAccessMultiModeProfiles.AssignedAccessMultiModeProfilesPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignedAccessMultiModeProfiles", AssignedAccessMultiModeProfiles); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/AssignedAccessMultiModeProfiles/AssignedAccessMultiModeProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/AssignedAccessMultiModeProfiles/AssignedAccessMultiModeProfilesRequestBuilder.cs index c2d66cd138a..b271a3f7d8a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/AssignedAccessMultiModeProfiles/AssignedAccessMultiModeProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/AssignedAccessMultiModeProfiles/AssignedAccessMultiModeProfilesRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Device public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.AssignedAccessMultiModeProfiles.AssignedAccessMultiModeProfilesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.AssignedAccessMultiModeProfiles.AssignedAccessMultiModeProfilesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs index d079837f5ce..be0b0348791 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assignments/Item/DeviceConfigurationAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assignments/Item/DeviceConfigurationAssignmentItemRequestBuilder.cs index 32849939ba2..20b59dcc946 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assignments/Item/DeviceConfigurationAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/Assignments/Item/DeviceConfigurationAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceConfigurationItemRequestBuilder.cs index c490dc230f4..25bdcb85405 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceConfigurationItemRequestBuilder.cs @@ -167,7 +167,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -228,7 +228,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceSettingStateSummaries/DeviceSettingStateSummariesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceSettingStateSummaries/DeviceSettingStateSummariesRequestBuilder.cs index 3471fc614c9..fa3077847e1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceSettingStateSummaries/DeviceSettingStateSummariesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceSettingStateSummaries/DeviceSettingStateSummariesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceSettingStateSummariesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SettingStateDeviceSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SettingStateDeviceSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceSettingStateSummaries/Item/SettingStateDeviceSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceSettingStateSummaries/Item/SettingStateDeviceSummaryItemRequestBuilder.cs index 983f4d0b646..a9ad05f6751 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceSettingStateSummaries/Item/SettingStateDeviceSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceSettingStateSummaries/Item/SettingStateDeviceSummaryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SettingStateDeviceSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SettingStateDeviceSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceStatusOverview/DeviceStatusOverviewRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceStatusOverview/DeviceStatusOverviewRequestBuilder.cs index 05e31923f4e..ca2c159a87b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceStatusOverview/DeviceStatusOverviewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceStatusOverview/DeviceStatusOverviewRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceOverview body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceOverview body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs index 017aa878456..c03d9634829 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceStatuses/DeviceStatusesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceStatusesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceStatuses/Item/DeviceConfigurationDeviceStatusItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceStatuses/Item/DeviceConfigurationDeviceStatusItemRequestBuilder.cs index 7a030782615..96f68ebe9d8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceStatuses/Item/DeviceConfigurationDeviceStatusItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/DeviceStatuses/Item/DeviceConfigurationDeviceStatusItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GetOmaSettingPlainTextValueWithSecretReferenceValueId/GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GetOmaSettingPlainTextValueWithSecretReferenceValueId/GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse.cs index 8cadd948e43..22824beab2f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GetOmaSettingPlainTextValueWithSecretReferenceValueId/GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GetOmaSettingPlainTextValueWithSecretReferenceValueId/GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse.cs @@ -52,7 +52,7 @@ public GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.GetOmaSettingPlainTextValueWithSecretReferenceValueId.GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.GetOmaSettingPlainTextValueWithSecretReferenceValueId.GetOmaSettingPlainTextValueWithSecretReferenceValueIdGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GetOmaSettingPlainTextValueWithSecretReferenceValueId/GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GetOmaSettingPlainTextValueWithSecretReferenceValueId/GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse.cs index ae7052523fd..736445b44f6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GetOmaSettingPlainTextValueWithSecretReferenceValueId/GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GetOmaSettingPlainTextValueWithSecretReferenceValueId/GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse.cs @@ -20,7 +20,7 @@ public partial class GetOmaSettingPlainTextValueWithSecretReferenceValueIdRespon /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.GetOmaSettingPlainTextValueWithSecretReferenceValueId.GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.GetOmaSettingPlainTextValueWithSecretReferenceValueId.GetOmaSettingPlainTextValueWithSecretReferenceValueIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs index 8d27137f6f2..5f4be865804 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationGroupAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationGroupAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GroupAssignments/Item/DeviceConfigurationGroupAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GroupAssignments/Item/DeviceConfigurationGroupAssignmentItemRequestBuilder.cs index 8d908f787d6..ffb85060db6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GroupAssignments/Item/DeviceConfigurationGroupAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/GroupAssignments/Item/DeviceConfigurationGroupAssignmentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationGroupAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationGroupAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/UserStatusOverview/UserStatusOverviewRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/UserStatusOverview/UserStatusOverviewRequestBuilder.cs index 1a7749da457..772d3122fe4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/UserStatusOverview/UserStatusOverviewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/UserStatusOverview/UserStatusOverviewRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserOverview body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserOverview body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/UserStatuses/Item/DeviceConfigurationUserStatusItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/UserStatuses/Item/DeviceConfigurationUserStatusItemRequestBuilder.cs index 311a05f644c..bfdc6462ed2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/UserStatuses/Item/DeviceConfigurationUserStatusItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/UserStatuses/Item/DeviceConfigurationUserStatusItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/UserStatuses/UserStatusesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/UserStatuses/UserStatusesRequestBuilder.cs index 04ca2814766..cdf15b58e06 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/UserStatuses/UserStatusesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/UserStatuses/UserStatusesRequestBuilder.cs @@ -93,7 +93,7 @@ public UserStatusesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/WindowsPrivacyAccessControls/WindowsPrivacyAccessControlsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/WindowsPrivacyAccessControls/WindowsPrivacyAccessControlsPostRequestBody.cs index f4881ef3c3b..ecfe2cde33e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/WindowsPrivacyAccessControls/WindowsPrivacyAccessControlsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/WindowsPrivacyAccessControls/WindowsPrivacyAccessControlsPostRequestBody.cs @@ -53,7 +53,7 @@ public WindowsPrivacyAccessControlsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.WindowsPrivacyAccessControls.WindowsPrivacyAccessControlsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.WindowsPrivacyAccessControls.WindowsPrivacyAccessControlsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("windowsPrivacyAccessControls", WindowsPrivacyAccessControls); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/WindowsPrivacyAccessControls/WindowsPrivacyAccessControlsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/WindowsPrivacyAccessControls/WindowsPrivacyAccessControlsRequestBuilder.cs index 5737a235e43..9cff2da50ff 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/WindowsPrivacyAccessControls/WindowsPrivacyAccessControlsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurations/Item/WindowsPrivacyAccessControls/WindowsPrivacyAccessControlsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Device public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.WindowsPrivacyAccessControls.WindowsPrivacyAccessControlsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceConfigurations.Item.WindowsPrivacyAccessControls.WindowsPrivacyAccessControlsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationsAllManagedDeviceCertificateStates/DeviceConfigurationsAllManagedDeviceCertificateStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationsAllManagedDeviceCertificateStates/DeviceConfigurationsAllManagedDeviceCertificateStatesRequestBuilder.cs index cdaf7b0f952..ca6672f023c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationsAllManagedDeviceCertificateStates/DeviceConfigurationsAllManagedDeviceCertificateStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationsAllManagedDeviceCertificateStates/DeviceConfigurationsAllManagedDeviceCertificateStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceConfigurationsAllManagedDeviceCertificateStatesRequestBuilder(strin public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedAllDeviceCertificateState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAllDeviceCertificateState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationsAllManagedDeviceCertificateStates/Item/ManagedAllDeviceCertificateStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationsAllManagedDeviceCertificateStates/Item/ManagedAllDeviceCertificateStateItemRequestBuilder.cs index 7fedbb0fe4c..077f59b5f70 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationsAllManagedDeviceCertificateStates/Item/ManagedAllDeviceCertificateStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceConfigurationsAllManagedDeviceCertificateStates/Item/ManagedAllDeviceCertificateStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedAllDeviceCertificateState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAllDeviceCertificateState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/DeviceCustomAttributeShellScriptsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/DeviceCustomAttributeShellScriptsRequestBuilder.cs index 9a1870fe314..66ea0c0348e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/DeviceCustomAttributeShellScriptsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/DeviceCustomAttributeShellScriptsRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceCustomAttributeShellScriptsRequestBuilder(string rawUrl, IRequestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceCustomAttributeShellScript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCustomAttributeShellScript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assign/AssignPostRequestBody.cs index 5881e10469b..3d9e8024298 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assign/AssignPostRequestBody.cs @@ -69,7 +69,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceCustomAttributeShellScripts.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceCustomAttributeShellScripts.Item.Assign.AssignPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("deviceManagementScriptAssignments", DeviceManagementScriptAssignments); writer.WriteCollectionOfObjectValues("deviceManagementScriptGroupAssignments", DeviceManagementScriptGroupAssignments); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assign/AssignRequestBuilder.cs index 39e5b119b0f..3d67f809054 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Device public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCustomAttributeShellScripts.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceCustomAttributeShellScripts.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assignments/AssignmentsRequestBuilder.cs index 95a27a6a5b6..469333dc71d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assignments/Item/DeviceManagementScriptAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assignments/Item/DeviceManagementScriptAssignmentItemRequestBuilder.cs index f9b64049711..e43cdfb9d40 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assignments/Item/DeviceManagementScriptAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/Assignments/Item/DeviceManagementScriptAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/DeviceCustomAttributeShellScriptItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/DeviceCustomAttributeShellScriptItemRequestBuilder.cs index 72009083e39..1b5e8e170ec 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/DeviceCustomAttributeShellScriptItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/DeviceCustomAttributeShellScriptItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceCustomAttributeShellScript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCustomAttributeShellScript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs index a9f20b049ff..2de4717afd7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceRunStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs index 46bb1f52a8a..d9386a46470 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs index 648975d8a6a..f2daccec398 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/GroupAssignments/Item/DeviceManagementScriptGroupAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/GroupAssignments/Item/DeviceManagementScriptGroupAssignmentItemRequestBuilder.cs index a13f15e6386..907f1e489f3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/GroupAssignments/Item/DeviceManagementScriptGroupAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/GroupAssignments/Item/DeviceManagementScriptGroupAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/Item/DeviceManagementScriptUserStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/Item/DeviceManagementScriptUserStateItemRequestBuilder.cs index e29269a3e6d..e92cd631026 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/Item/DeviceManagementScriptUserStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/Item/DeviceManagementScriptUserStateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs index 7a6fecf1eb9..403c4d74c07 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceRunStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs index 551cd865c2a..a66219f3d18 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/UserRunStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/UserRunStatesRequestBuilder.cs index 979c06e4279..caf493747b6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/UserRunStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceCustomAttributeShellScripts/Item/UserRunStates/UserRunStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public UserRunStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationPostRequestBody.cs index 6f1afec69c4..29641bb81fd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateEnrollmentNotificationConfigurationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.CreateEnrollmentNotificationConfiguration.CreateEnrollmentNotificationConfigurationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.CreateEnrollmentNotificationConfiguration.CreateEnrollmentNotificationConfigurationPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("deviceEnrollmentNotificationConfigurations", DeviceEnrollmentNotificationConfigurations); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationRequestBuilder.cs index f80662a6a5b..eda50c5b696 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Device public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.CreateEnrollmentNotificationConfiguration.CreateEnrollmentNotificationConfigurationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.CreateEnrollmentNotificationConfiguration.CreateEnrollmentNotificationConfigurationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/DeviceEnrollmentConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/DeviceEnrollmentConfigurationsRequestBuilder.cs index 4042f2ede10..d29f28404d6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/DeviceEnrollmentConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/DeviceEnrollmentConfigurationsRequestBuilder.cs @@ -105,7 +105,7 @@ public DeviceEnrollmentConfigurationsRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceEnrollmentConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceEnrollmentConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs index 56405b2b8b7..02639391b34 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs @@ -52,7 +52,7 @@ public HasPayloadLinksPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("payloadIds", PayloadIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs index 21fe75087da..2514f1b8de4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs @@ -36,7 +36,7 @@ public partial class HasPayloadLinksPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs index 4d6297e94ad..e8f1cf385e8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs @@ -50,7 +50,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsHasPayloadLinksPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs index fbcf73b5385..b6dd1fa631d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs @@ -20,7 +20,7 @@ public partial class HasPayloadLinksResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assign/AssignPostRequestBody.cs index e657f844d48..c4031331e5b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("enrollmentConfigurationAssignments", EnrollmentConfigurationAssignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assign/AssignRequestBuilder.cs index 96f9e61ee91..f1f569bce64 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Device public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs index 84a04b81c85..15fe621bc46 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EnrollmentConfigurationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EnrollmentConfigurationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assignments/Item/EnrollmentConfigurationAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assignments/Item/EnrollmentConfigurationAssignmentItemRequestBuilder.cs index 802c55b6203..e17f3a57a47 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assignments/Item/EnrollmentConfigurationAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/Assignments/Item/EnrollmentConfigurationAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EnrollmentConfigurationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EnrollmentConfigurationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs index 0fd9e2b6ce5..96d81245f48 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceEnrollmentConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceEnrollmentConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityPostRequestBody.cs index f5761debd63..68fd6a48f33 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityPostRequestBody.cs @@ -42,7 +42,7 @@ public SetPriorityPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.Item.SetPriority.SetPriorityPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.Item.SetPriority.SetPriorityPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("priority", Priority); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityRequestBuilder.cs index 7ddc3c591be..d0c7e6f3ece 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Device public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.Item.SetPriority.SetPriorityPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceEnrollmentConfigurations.Item.SetPriority.SetPriorityPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/DeviceHealthScriptsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/DeviceHealthScriptsRequestBuilder.cs index 69f6197ad1c..21bd4518f05 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/DeviceHealthScriptsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/DeviceHealthScriptsRequestBuilder.cs @@ -111,7 +111,7 @@ public DeviceHealthScriptsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assign/AssignPostRequestBody.cs index df602e9f843..4ac20c28962 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("deviceHealthScriptAssignments", DeviceHealthScriptAssignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assign/AssignRequestBuilder.cs index 8514cbd8070..9c375f97394 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Device public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assignments/AssignmentsRequestBuilder.cs index cb6a990e739..8b3423fbe86 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assignments/Item/DeviceHealthScriptAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assignments/Item/DeviceHealthScriptAssignmentItemRequestBuilder.cs index 8d805524ac0..1fc2f4c8cc9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assignments/Item/DeviceHealthScriptAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/Assignments/Item/DeviceHealthScriptAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/DeviceHealthScriptItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/DeviceHealthScriptItemRequestBuilder.cs index 8cc9d3e909e..61ce2c226b8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/DeviceHealthScriptItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/DeviceHealthScriptItemRequestBuilder.cs @@ -138,7 +138,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -199,7 +199,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs index 4e61a1fa493..0f6950f7e5f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceRunStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/DeviceRunStates/Item/DeviceHealthScriptDeviceStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/DeviceRunStates/Item/DeviceHealthScriptDeviceStateItemRequestBuilder.cs index e835fe449b4..43cf2825228 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/DeviceRunStates/Item/DeviceHealthScriptDeviceStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/DeviceRunStates/Item/DeviceHealthScriptDeviceStateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/GetGlobalScriptHighestAvailableVersion/GetGlobalScriptHighestAvailableVersionPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/GetGlobalScriptHighestAvailableVersion/GetGlobalScriptHighestAvailableVersionPostResponse.cs index ad905b4a768..38c4b5ee986 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/GetGlobalScriptHighestAvailableVersion/GetGlobalScriptHighestAvailableVersionPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/GetGlobalScriptHighestAvailableVersion/GetGlobalScriptHighestAvailableVersionPostResponse.cs @@ -52,7 +52,7 @@ public GetGlobalScriptHighestAvailableVersionPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.GetGlobalScriptHighestAvailableVersion.GetGlobalScriptHighestAvailableVersionPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.GetGlobalScriptHighestAvailableVersion.GetGlobalScriptHighestAvailableVersionPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/GetGlobalScriptHighestAvailableVersion/GetGlobalScriptHighestAvailableVersionResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/GetGlobalScriptHighestAvailableVersion/GetGlobalScriptHighestAvailableVersionResponse.cs index a75690f8b41..3cebf34648b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/GetGlobalScriptHighestAvailableVersion/GetGlobalScriptHighestAvailableVersionResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/GetGlobalScriptHighestAvailableVersion/GetGlobalScriptHighestAvailableVersionResponse.cs @@ -20,7 +20,7 @@ public partial class GetGlobalScriptHighestAvailableVersionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.GetGlobalScriptHighestAvailableVersion.GetGlobalScriptHighestAvailableVersionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.GetGlobalScriptHighestAvailableVersion.GetGlobalScriptHighestAvailableVersionResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/RunSummary/RunSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/RunSummary/RunSummaryRequestBuilder.cs index 22ebc2a026a..b2d717b543c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/RunSummary/RunSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/RunSummary/RunSummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptRunSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptRunSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptPostRequestBody.cs index 94f8de9d2c0..4bee889cacf 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptPostRequestBody.cs @@ -52,7 +52,7 @@ public UpdateGlobalScriptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.UpdateGlobalScript.UpdateGlobalScriptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.UpdateGlobalScript.UpdateGlobalScriptPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("version", Version); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptPostResponse.cs index b3a615ba9a5..abeb5317c9f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptPostResponse.cs @@ -52,7 +52,7 @@ public UpdateGlobalScriptPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.UpdateGlobalScript.UpdateGlobalScriptPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.UpdateGlobalScript.UpdateGlobalScriptPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptRequestBuilder.cs index 20479b03f20..822084bbc8e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptRequestBuilder.cs @@ -50,7 +50,7 @@ public UpdateGlobalScriptRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsUpdateGlobalScriptPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.UpdateGlobalScript.UpdateGlobalScriptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public UpdateGlobalScriptRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.UpdateGlobalScript.UpdateGlobalScriptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.UpdateGlobalScript.UpdateGlobalScriptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptResponse.cs index 4d425428171..aad2d4de143 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceHealthScripts/Item/UpdateGlobalScript/UpdateGlobalScriptResponse.cs @@ -20,7 +20,7 @@ public partial class UpdateGlobalScriptResponse : global::Microsoft.Graph.Beta.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.UpdateGlobalScript.UpdateGlobalScriptResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceHealthScripts.Item.UpdateGlobalScript.UpdateGlobalScriptResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementPartners/DeviceManagementPartnersRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementPartners/DeviceManagementPartnersRequestBuilder.cs index 3b9b7bcdad0..0a719547199 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementPartners/DeviceManagementPartnersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementPartners/DeviceManagementPartnersRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceManagementPartnersRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementPartner body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementPartner body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementPartners/Item/DeviceManagementPartnerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementPartners/Item/DeviceManagementPartnerItemRequestBuilder.cs index fa748532943..511056efec5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementPartners/Item/DeviceManagementPartnerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementPartners/Item/DeviceManagementPartnerItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementPartner body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementPartner body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementRequestBuilder.cs index cd057f7596b..c8787752cc1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementRequestBuilder.cs @@ -1237,7 +1237,7 @@ public DeviceManagementRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagement.DeviceManagement body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -1299,7 +1299,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagement.DeviceManagement body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/DeviceManagementScriptsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/DeviceManagementScriptsRequestBuilder.cs index 2aca4440f14..3108f3be1e1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/DeviceManagementScriptsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/DeviceManagementScriptsRequestBuilder.cs @@ -99,7 +99,7 @@ public DeviceManagementScriptsRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs index a21c50b7a90..8af091d0a48 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs @@ -52,7 +52,7 @@ public HasPayloadLinksPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceManagementScripts.HasPayloadLinks.HasPayloadLinksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceManagementScripts.HasPayloadLinks.HasPayloadLinksPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("payloadIds", PayloadIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksPostResponse.cs index 51a4baa54c9..357cdbdbfce 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksPostResponse.cs @@ -36,7 +36,7 @@ public partial class HasPayloadLinksPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceManagementScripts.HasPayloadLinks.HasPayloadLinksPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceManagementScripts.HasPayloadLinks.HasPayloadLinksPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs index 2b32a5cf2ac..3754c76de80 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs @@ -50,7 +50,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsHasPayloadLinksPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceManagementScripts.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceManagementScripts.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceManagementScripts.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksResponse.cs index e7cd0c48c29..3529683cb9f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/HasPayloadLinks/HasPayloadLinksResponse.cs @@ -20,7 +20,7 @@ public partial class HasPayloadLinksResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.DeviceManagementScripts.HasPayloadLinks.HasPayloadLinksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceManagementScripts.HasPayloadLinks.HasPayloadLinksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assign/AssignPostRequestBody.cs index 778d2983e4a..e5defd515a6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assign/AssignPostRequestBody.cs @@ -69,7 +69,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceManagementScripts.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceManagementScripts.Item.Assign.AssignPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("deviceManagementScriptAssignments", DeviceManagementScriptAssignments); writer.WriteCollectionOfObjectValues("deviceManagementScriptGroupAssignments", DeviceManagementScriptGroupAssignments); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assign/AssignRequestBuilder.cs index 5fcea198806..cf806ef4a3a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Device public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceManagementScripts.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceManagementScripts.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assignments/AssignmentsRequestBuilder.cs index 89c2451b2fc..1bb7c39708d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assignments/Item/DeviceManagementScriptAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assignments/Item/DeviceManagementScriptAssignmentItemRequestBuilder.cs index 9893c79e96c..e2c80fcc100 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assignments/Item/DeviceManagementScriptAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/Assignments/Item/DeviceManagementScriptAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/DeviceManagementScriptItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/DeviceManagementScriptItemRequestBuilder.cs index a62041eea7b..fd9ba83d512 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/DeviceManagementScriptItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/DeviceManagementScriptItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs index a6679bcbda7..67d27b68949 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceRunStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs index c68efb5d01c..60328f33c71 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs index 6196737073a..f3f0e77c414 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/GroupAssignments/Item/DeviceManagementScriptGroupAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/GroupAssignments/Item/DeviceManagementScriptGroupAssignmentItemRequestBuilder.cs index ff97663da71..56d14bf5aa6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/GroupAssignments/Item/DeviceManagementScriptGroupAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/GroupAssignments/Item/DeviceManagementScriptGroupAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/Item/DeviceManagementScriptUserStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/Item/DeviceManagementScriptUserStateItemRequestBuilder.cs index 6f1b8f5990f..c4ea246bcc8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/Item/DeviceManagementScriptUserStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/Item/DeviceManagementScriptUserStateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs index 3cd119eb32d..d1c3862697f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceRunStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs index 7a6768549c5..3ec2510af64 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/UserRunStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/UserRunStatesRequestBuilder.cs index 78a38654149..51f1568ad65 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/UserRunStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceManagementScripts/Item/UserRunStates/UserRunStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public UserRunStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/DeviceShellScriptsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/DeviceShellScriptsRequestBuilder.cs index 8556732c9c0..869cda80504 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/DeviceShellScriptsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/DeviceShellScriptsRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceShellScriptsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceShellScript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceShellScript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assign/AssignPostRequestBody.cs index 165be64ac6b..4d41e5c428e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assign/AssignPostRequestBody.cs @@ -69,7 +69,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.DeviceShellScripts.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.DeviceShellScripts.Item.Assign.AssignPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("deviceManagementScriptAssignments", DeviceManagementScriptAssignments); writer.WriteCollectionOfObjectValues("deviceManagementScriptGroupAssignments", DeviceManagementScriptGroupAssignments); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assign/AssignRequestBuilder.cs index a88147accff..5aa51c60d2d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Device public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.DeviceShellScripts.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.DeviceShellScripts.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assignments/AssignmentsRequestBuilder.cs index dc780228abc..b99ed310fa0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assignments/Item/DeviceManagementScriptAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assignments/Item/DeviceManagementScriptAssignmentItemRequestBuilder.cs index 5cc97ed14e6..f479a59fe35 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assignments/Item/DeviceManagementScriptAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/Assignments/Item/DeviceManagementScriptAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs index e7177e1a346..074334f4624 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceRunStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs index af32f11e46a..4d7b5310e17 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/DeviceShellScriptItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/DeviceShellScriptItemRequestBuilder.cs index 7b44dec603f..13572e25580 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/DeviceShellScriptItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/DeviceShellScriptItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceShellScript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceShellScript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs index 8c163089ae5..63b048ab397 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/GroupAssignments/Item/DeviceManagementScriptGroupAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/GroupAssignments/Item/DeviceManagementScriptGroupAssignmentItemRequestBuilder.cs index 6083aa91417..56d36bb861a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/GroupAssignments/Item/DeviceManagementScriptGroupAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/GroupAssignments/Item/DeviceManagementScriptGroupAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/Item/DeviceManagementScriptUserStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/Item/DeviceManagementScriptUserStateItemRequestBuilder.cs index e4024fdfae7..3f4245b0891 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/Item/DeviceManagementScriptUserStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/Item/DeviceManagementScriptUserStateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs index cc0fd0a202a..30b651b185d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceRunStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs index 63ea75dec9d..4af2f65a179 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/Item/DeviceRunStates/Item/DeviceManagementScriptDeviceStateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/UserRunStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/UserRunStatesRequestBuilder.cs index 36e29d92211..69093cc1c3e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/UserRunStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DeviceShellScripts/Item/UserRunStates/UserRunStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public UserRunStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DomainJoinConnectors/DomainJoinConnectorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DomainJoinConnectors/DomainJoinConnectorsRequestBuilder.cs index 3f76f08c3cf..fbc0fa3d245 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DomainJoinConnectors/DomainJoinConnectorsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DomainJoinConnectors/DomainJoinConnectorsRequestBuilder.cs @@ -93,7 +93,7 @@ public DomainJoinConnectorsRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementDomainJoinConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementDomainJoinConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/DomainJoinConnectors/Item/DeviceManagementDomainJoinConnectorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/DomainJoinConnectors/Item/DeviceManagementDomainJoinConnectorItemRequestBuilder.cs index 5947f0a1081..f0448cd2317 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/DomainJoinConnectors/Item/DeviceManagementDomainJoinConnectorItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/DomainJoinConnectors/Item/DeviceManagementDomainJoinConnectorItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementDomainJoinConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementDomainJoinConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/ElevationRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/ElevationRequestsRequestBuilder.cs index c15297ee2cc..ffdda7cdb05 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/ElevationRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/ElevationRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public ElevationRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevationRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevationRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Approve/ApprovePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Approve/ApprovePostRequestBody.cs index af8dddfad1d..80f2d012381 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Approve/ApprovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Approve/ApprovePostRequestBody.cs @@ -52,7 +52,7 @@ public ApprovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.Approve.ApprovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.Approve.ApprovePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reviewerJustification", ReviewerJustification); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Approve/ApproveRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Approve/ApproveRequestBuilder.cs index 7c255642b74..1dc49bf3b8d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Approve/ApproveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Approve/ApproveRequestBuilder.cs @@ -51,7 +51,7 @@ public ApproveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.Approve.ApprovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.Approve.ApprovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Deny/DenyPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Deny/DenyPostRequestBody.cs index df8be7a1f4e..e8b42d1935b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Deny/DenyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Deny/DenyPostRequestBody.cs @@ -52,7 +52,7 @@ public DenyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.Deny.DenyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.Deny.DenyPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reviewerJustification", ReviewerJustification); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Deny/DenyRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Deny/DenyRequestBuilder.cs index f8ee053f71d..1090c945169 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Deny/DenyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Deny/DenyRequestBuilder.cs @@ -51,7 +51,7 @@ public DenyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.Deny.DenyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.Deny.DenyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/GetAllElevationRequests/GetAllElevationRequestsPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/GetAllElevationRequests/GetAllElevationRequestsPostResponse.cs index 72f6f9a915c..e2487f62774 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/GetAllElevationRequests/GetAllElevationRequestsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/GetAllElevationRequests/GetAllElevationRequestsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllElevationRequestsPostResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.GetAllElevationRequests.GetAllElevationRequestsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.GetAllElevationRequests.GetAllElevationRequestsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/GetAllElevationRequests/GetAllElevationRequestsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/GetAllElevationRequests/GetAllElevationRequestsResponse.cs index a1b4f9f363c..9fc8b20ab9b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/GetAllElevationRequests/GetAllElevationRequestsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/GetAllElevationRequests/GetAllElevationRequestsResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllElevationRequestsResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.GetAllElevationRequests.GetAllElevationRequestsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.GetAllElevationRequests.GetAllElevationRequestsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/PrivilegeManagementElevationRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/PrivilegeManagementElevationRequestItemRequestBuilder.cs index f766b10b998..9c93495661f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/PrivilegeManagementElevationRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/PrivilegeManagementElevationRequestItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevationRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevationRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Revoke/RevokePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Revoke/RevokePostRequestBody.cs index 01d5b261ffe..b6d2ee1d869 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Revoke/RevokePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Revoke/RevokePostRequestBody.cs @@ -52,7 +52,7 @@ public RevokePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.Revoke.RevokePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.Revoke.RevokePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reviewerJustification", ReviewerJustification); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Revoke/RevokeRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Revoke/RevokeRequestBuilder.cs index 55a0d5410ac..ef235f403b4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Revoke/RevokeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ElevationRequests/Item/Revoke/RevokeRequestBuilder.cs @@ -51,7 +51,7 @@ public RevokeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.Revoke.RevokePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ElevationRequests.Item.Revoke.RevokePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/EmbeddedSIMActivationCodePoolsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/EmbeddedSIMActivationCodePoolsRequestBuilder.cs index c8f6e181615..0d15bd93585 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/EmbeddedSIMActivationCodePoolsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/EmbeddedSIMActivationCodePoolsRequestBuilder.cs @@ -93,7 +93,7 @@ public EmbeddedSIMActivationCodePoolsRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePool body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePool body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignPostRequestBody.cs index 965d7a34c16..3407a1cd6a8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.EmbeddedSIMActivationCodePools.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.EmbeddedSIMActivationCodePools.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignPostResponse.cs index af1b55e0993..37116ce857c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignPostResponse.cs @@ -36,7 +36,7 @@ public partial class AssignPostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.EmbeddedSIMActivationCodePools.Item.Assign.AssignPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.EmbeddedSIMActivationCodePools.Item.Assign.AssignPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignRequestBuilder.cs index db1a8a07979..8ab67055fe4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignRequestBuilder.cs @@ -50,7 +50,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsAssignPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.EmbeddedSIMActivationCodePools.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.EmbeddedSIMActivationCodePools.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.EmbeddedSIMActivationCodePools.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignResponse.cs index a89468690f5..4270078e74b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assign/AssignResponse.cs @@ -20,7 +20,7 @@ public partial class AssignResponse : global::Microsoft.Graph.Beta.DeviceManagem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.EmbeddedSIMActivationCodePools.Item.Assign.AssignResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.EmbeddedSIMActivationCodePools.Item.Assign.AssignResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assignments/AssignmentsRequestBuilder.cs index 6c49b967592..7dd34a1e0f8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePoolAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePoolAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assignments/Item/EmbeddedSIMActivationCodePoolAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assignments/Item/EmbeddedSIMActivationCodePoolAssignmentItemRequestBuilder.cs index 70823c86efb..132317159e2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assignments/Item/EmbeddedSIMActivationCodePoolAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/Assignments/Item/EmbeddedSIMActivationCodePoolAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePoolAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePoolAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/DeviceStates/DeviceStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/DeviceStates/DeviceStatesRequestBuilder.cs index a6dee7f9ffc..1f17017be21 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/DeviceStates/DeviceStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/DeviceStates/DeviceStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EmbeddedSIMDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EmbeddedSIMDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/DeviceStates/Item/EmbeddedSIMDeviceStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/DeviceStates/Item/EmbeddedSIMDeviceStateItemRequestBuilder.cs index 75fe74e6a50..ff668876640 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/DeviceStates/Item/EmbeddedSIMDeviceStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/DeviceStates/Item/EmbeddedSIMDeviceStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EmbeddedSIMDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EmbeddedSIMDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/EmbeddedSIMActivationCodePoolItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/EmbeddedSIMActivationCodePoolItemRequestBuilder.cs index 4bee979bfc9..31366c90dca 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/EmbeddedSIMActivationCodePoolItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/EmbeddedSIMActivationCodePools/Item/EmbeddedSIMActivationCodePoolItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePool body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePool body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/EndpointPrivilegeManagementProvisioningStatus/EndpointPrivilegeManagementProvisioningStatusRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/EndpointPrivilegeManagementProvisioningStatus/EndpointPrivilegeManagementProvisioningStatusRequestBuilder.cs index 784993e3b53..f2b8b28505a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/EndpointPrivilegeManagementProvisioningStatus/EndpointPrivilegeManagementProvisioningStatusRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/EndpointPrivilegeManagementProvisioningStatus/EndpointPrivilegeManagementProvisioningStatusRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EndpointPrivilegeManagementProvisioningStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EndpointPrivilegeManagementProvisioningStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/EvaluateAssignmentFilter/EvaluateAssignmentFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/EvaluateAssignmentFilter/EvaluateAssignmentFilterPostRequestBody.cs index 41ae003a18a..964f9fd0b31 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/EvaluateAssignmentFilter/EvaluateAssignmentFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/EvaluateAssignmentFilter/EvaluateAssignmentFilterPostRequestBody.cs @@ -53,7 +53,7 @@ public EvaluateAssignmentFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.EvaluateAssignmentFilter.EvaluateAssignmentFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.EvaluateAssignmentFilter.EvaluateAssignmentFilterPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/EvaluateAssignmentFilter/EvaluateAssignmentFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/EvaluateAssignmentFilter/EvaluateAssignmentFilterRequestBuilder.cs index e6ce96c410f..54c96b816d9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/EvaluateAssignmentFilter/EvaluateAssignmentFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/EvaluateAssignmentFilter/EvaluateAssignmentFilterRequestBuilder.cs @@ -50,7 +50,7 @@ public EvaluateAssignmentFilterRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.EvaluateAssignmentFilter.EvaluateAssignmentFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.EvaluateAssignmentFilter.EvaluateAssignmentFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/ExchangeConnectorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/ExchangeConnectorsRequestBuilder.cs index a5515b7ef4a..ddabc26096a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/ExchangeConnectorsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/ExchangeConnectorsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExchangeConnectorsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/Item/DeviceManagementExchangeConnectorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/Item/DeviceManagementExchangeConnectorItemRequestBuilder.cs index 9b3e6f508f1..b0768a8c2cc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/Item/DeviceManagementExchangeConnectorItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/Item/DeviceManagementExchangeConnectorItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/Item/Sync/SyncPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/Item/Sync/SyncPostRequestBody.cs index 44d8922b747..7fcba7669da 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/Item/Sync/SyncPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/Item/Sync/SyncPostRequestBody.cs @@ -43,7 +43,7 @@ public SyncPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ExchangeConnectors.Item.Sync.SyncPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ExchangeConnectors.Item.Sync.SyncPostRequestBody(); } /// @@ -63,7 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("syncType", SyncType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/Item/Sync/SyncRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/Item/Sync/SyncRequestBuilder.cs index 79245db1f34..c1ac7ee3802 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/Item/Sync/SyncRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeConnectors/Item/Sync/SyncRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Exchan public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ExchangeConnectors.Item.Sync.SyncPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ExchangeConnectors.Item.Sync.SyncPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicies/ExchangeOnPremisesPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicies/ExchangeOnPremisesPoliciesRequestBuilder.cs index af9723cafda..48ceacb6df7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicies/ExchangeOnPremisesPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicies/ExchangeOnPremisesPoliciesRequestBuilder.cs @@ -93,7 +93,7 @@ public ExchangeOnPremisesPoliciesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeOnPremisesPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeOnPremisesPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicies/Item/ConditionalAccessSettings/ConditionalAccessSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicies/Item/ConditionalAccessSettings/ConditionalAccessSettingsRequestBuilder.cs index d928a574ce2..c91184802a2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicies/Item/ConditionalAccessSettings/ConditionalAccessSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicies/Item/ConditionalAccessSettings/ConditionalAccessSettingsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnPremisesConditionalAccessSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesConditionalAccessSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicies/Item/DeviceManagementExchangeOnPremisesPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicies/Item/DeviceManagementExchangeOnPremisesPolicyItemRequestBuilder.cs index e6b72adcf10..799cfd51d6f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicies/Item/DeviceManagementExchangeOnPremisesPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicies/Item/DeviceManagementExchangeOnPremisesPolicyItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeOnPremisesPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeOnPremisesPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicy/ConditionalAccessSettings/ConditionalAccessSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicy/ConditionalAccessSettings/ConditionalAccessSettingsRequestBuilder.cs index d66f95fa9fe..f557be53530 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicy/ConditionalAccessSettings/ConditionalAccessSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicy/ConditionalAccessSettings/ConditionalAccessSettingsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnPremisesConditionalAccessSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesConditionalAccessSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicy/ExchangeOnPremisesPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicy/ExchangeOnPremisesPolicyRequestBuilder.cs index 2c776c52167..81af8ce4335 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicy/ExchangeOnPremisesPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ExchangeOnPremisesPolicy/ExchangeOnPremisesPolicyRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeOnPremisesPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeOnPremisesPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GetAssignmentFiltersStatusDetails/GetAssignmentFiltersStatusDetailsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GetAssignmentFiltersStatusDetails/GetAssignmentFiltersStatusDetailsPostRequestBody.cs index d22fb438265..f5bc26d95f9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GetAssignmentFiltersStatusDetails/GetAssignmentFiltersStatusDetailsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GetAssignmentFiltersStatusDetails/GetAssignmentFiltersStatusDetailsPostRequestBody.cs @@ -112,7 +112,7 @@ public GetAssignmentFiltersStatusDetailsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.GetAssignmentFiltersStatusDetails.GetAssignmentFiltersStatusDetailsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GetAssignmentFiltersStatusDetails.GetAssignmentFiltersStatusDetailsPostRequestBody(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("assignmentFilterIds", AssignmentFilterIds); writer.WriteStringValue("managedDeviceId", ManagedDeviceId); writer.WriteStringValue("payloadId", PayloadId); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GetAssignmentFiltersStatusDetails/GetAssignmentFiltersStatusDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GetAssignmentFiltersStatusDetails/GetAssignmentFiltersStatusDetailsRequestBuilder.cs index 6947d302258..70ba7b8853b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GetAssignmentFiltersStatusDetails/GetAssignmentFiltersStatusDetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GetAssignmentFiltersStatusDetails/GetAssignmentFiltersStatusDetailsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetAssignmentFiltersStatusDetailsRequestBuilder(string rawUrl, IRequestAd public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.GetAssignmentFiltersStatusDetails.GetAssignmentFiltersStatusDetailsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.GetAssignmentFiltersStatusDetails.GetAssignmentFiltersStatusDetailsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissions/GetEffectivePermissionsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissions/GetEffectivePermissionsGetResponse.cs index fdd4027ee21..6d9e74d60d1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissions/GetEffectivePermissionsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissions/GetEffectivePermissionsGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.GetEffectivePermissions.GetEffectivePermissionsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GetEffectivePermissions.GetEffectivePermissionsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissions/GetEffectivePermissionsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissions/GetEffectivePermissionsResponse.cs index fcc7ff39bea..aa4c34b872b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissions/GetEffectivePermissionsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissions/GetEffectivePermissionsResponse.cs @@ -20,7 +20,7 @@ public partial class GetEffectivePermissionsResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.GetEffectivePermissions.GetEffectivePermissionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GetEffectivePermissions.GetEffectivePermissionsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissionsWithScope/GetEffectivePermissionsWithScopeGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissionsWithScope/GetEffectivePermissionsWithScopeGetResponse.cs index 24886aa63c3..3c2795f4f9e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissionsWithScope/GetEffectivePermissionsWithScopeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissionsWithScope/GetEffectivePermissionsWithScopeGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetEffectivePermissionsWithScopeGetResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.GetEffectivePermissionsWithScope.GetEffectivePermissionsWithScopeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GetEffectivePermissionsWithScope.GetEffectivePermissionsWithScopeGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissionsWithScope/GetEffectivePermissionsWithScopeResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissionsWithScope/GetEffectivePermissionsWithScopeResponse.cs index 49adbec9255..5f6fe7bba40 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissionsWithScope/GetEffectivePermissionsWithScopeResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GetEffectivePermissionsWithScope/GetEffectivePermissionsWithScopeResponse.cs @@ -20,7 +20,7 @@ public partial class GetEffectivePermissionsWithScopeResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.GetEffectivePermissionsWithScope.GetEffectivePermissionsWithScopeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GetEffectivePermissionsWithScope.GetEffectivePermissionsWithScopeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByIdsWithIds/GetRoleScopeTagsByIdsWithIdsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByIdsWithIds/GetRoleScopeTagsByIdsWithIdsGetResponse.cs index 61a3571cb7a..525812101ae 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByIdsWithIds/GetRoleScopeTagsByIdsWithIdsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByIdsWithIds/GetRoleScopeTagsByIdsWithIdsGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetRoleScopeTagsByIdsWithIdsGetResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.GetRoleScopeTagsByIdsWithIds.GetRoleScopeTagsByIdsWithIdsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GetRoleScopeTagsByIdsWithIds.GetRoleScopeTagsByIdsWithIdsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByIdsWithIds/GetRoleScopeTagsByIdsWithIdsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByIdsWithIds/GetRoleScopeTagsByIdsWithIdsResponse.cs index b559e893850..5ec9d985307 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByIdsWithIds/GetRoleScopeTagsByIdsWithIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByIdsWithIds/GetRoleScopeTagsByIdsWithIdsResponse.cs @@ -20,7 +20,7 @@ public partial class GetRoleScopeTagsByIdsWithIdsResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.GetRoleScopeTagsByIdsWithIds.GetRoleScopeTagsByIdsWithIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GetRoleScopeTagsByIdsWithIds.GetRoleScopeTagsByIdsWithIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByResourceWithResource/GetRoleScopeTagsByResourceWithResourceGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByResourceWithResource/GetRoleScopeTagsByResourceWithResourceGetResponse.cs index d4df6f90236..cacf7d3cbd8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByResourceWithResource/GetRoleScopeTagsByResourceWithResourceGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByResourceWithResource/GetRoleScopeTagsByResourceWithResourceGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetRoleScopeTagsByResourceWithResourceGetResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.GetRoleScopeTagsByResourceWithResource.GetRoleScopeTagsByResourceWithResourceGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GetRoleScopeTagsByResourceWithResource.GetRoleScopeTagsByResourceWithResourceGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByResourceWithResource/GetRoleScopeTagsByResourceWithResourceResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByResourceWithResource/GetRoleScopeTagsByResourceWithResourceResponse.cs index 955fafd922f..eb4095f166e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByResourceWithResource/GetRoleScopeTagsByResourceWithResourceResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GetRoleScopeTagsByResourceWithResource/GetRoleScopeTagsByResourceWithResourceResponse.cs @@ -20,7 +20,7 @@ public partial class GetRoleScopeTagsByResourceWithResourceResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.GetRoleScopeTagsByResourceWithResource.GetRoleScopeTagsByResourceWithResourceResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GetRoleScopeTagsByResourceWithResource.GetRoleScopeTagsByResourceWithResourceResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyCategories/GroupPolicyCategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyCategories/GroupPolicyCategoriesRequestBuilder.cs index 8074b6c6d29..ec6d6688c18 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyCategories/GroupPolicyCategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyCategories/GroupPolicyCategoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupPolicyCategoriesRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyCategories/Item/GroupPolicyCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyCategories/Item/GroupPolicyCategoryItemRequestBuilder.cs index 1a17b36fca0..6460c78d167 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyCategories/Item/GroupPolicyCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyCategories/Item/GroupPolicyCategoryItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/GroupPolicyConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/GroupPolicyConfigurationsRequestBuilder.cs index ad08fef97bb..aafe454becb 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/GroupPolicyConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/GroupPolicyConfigurationsRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupPolicyConfigurationsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignPostRequestBody.cs index 7683703ff96..dd268827308 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyConfigurations.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyConfigurations.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignPostResponse.cs index 035b058dc6a..cc60f0dc505 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignPostResponse.cs @@ -36,7 +36,7 @@ public partial class AssignPostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyConfigurations.Item.Assign.AssignPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyConfigurations.Item.Assign.AssignPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignRequestBuilder.cs index 79777238096..7ddfa8fab88 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignRequestBuilder.cs @@ -50,7 +50,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsAssignPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignResponse.cs index dade5ac262b..fa9cba80ae1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assign/AssignResponse.cs @@ -20,7 +20,7 @@ public partial class AssignResponse : global::Microsoft.Graph.Beta.DeviceManagem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyConfigurations.Item.Assign.AssignResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyConfigurations.Item.Assign.AssignResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs index 81fc04ea271..9c56932f6a4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyConfigurationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyConfigurationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assignments/Item/GroupPolicyConfigurationAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assignments/Item/GroupPolicyConfigurationAssignmentItemRequestBuilder.cs index 4a07d872ae0..eff7317c382 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assignments/Item/GroupPolicyConfigurationAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/Assignments/Item/GroupPolicyConfigurationAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyConfigurationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyConfigurationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/DefinitionValuesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/DefinitionValuesRequestBuilder.cs index f9b2e5872ad..d2bd1a543be 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/DefinitionValuesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/DefinitionValuesRequestBuilder.cs @@ -93,7 +93,7 @@ public DefinitionValuesRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionValue body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionValue body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/Item/GroupPolicyDefinitionValueItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/Item/GroupPolicyDefinitionValueItemRequestBuilder.cs index 9340753679a..2cc07fdb8fc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/Item/GroupPolicyDefinitionValueItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/Item/GroupPolicyDefinitionValueItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionValue body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionValue body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/Item/PresentationValues/Item/GroupPolicyPresentationValueItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/Item/PresentationValues/Item/GroupPolicyPresentationValueItemRequestBuilder.cs index 5eb697caebb..77cda40b4c9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/Item/PresentationValues/Item/GroupPolicyPresentationValueItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/Item/PresentationValues/Item/GroupPolicyPresentationValueItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValue body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValue body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/Item/PresentationValues/PresentationValuesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/Item/PresentationValues/PresentationValuesRequestBuilder.cs index a358d69abcb..a9fa3c629c3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/Item/PresentationValues/PresentationValuesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/DefinitionValues/Item/PresentationValues/PresentationValuesRequestBuilder.cs @@ -93,7 +93,7 @@ public PresentationValuesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValue body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValue body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/GroupPolicyConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/GroupPolicyConfigurationItemRequestBuilder.cs index 367612e0430..97c2271a952 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/GroupPolicyConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/GroupPolicyConfigurationItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/UpdateDefinitionValues/UpdateDefinitionValuesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/UpdateDefinitionValues/UpdateDefinitionValuesPostRequestBody.cs index 2468249360d..7dfce1ca83d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/UpdateDefinitionValues/UpdateDefinitionValuesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/UpdateDefinitionValues/UpdateDefinitionValuesPostRequestBody.cs @@ -85,7 +85,7 @@ public UpdateDefinitionValuesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyConfigurations.Item.UpdateDefinitionValues.UpdateDefinitionValuesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyConfigurations.Item.UpdateDefinitionValues.UpdateDefinitionValuesPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("added", Added); writer.WriteCollectionOfPrimitiveValues("deletedIds", DeletedIds); writer.WriteCollectionOfObjectValues("updated", Updated); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/UpdateDefinitionValues/UpdateDefinitionValuesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/UpdateDefinitionValues/UpdateDefinitionValuesRequestBuilder.cs index 3e8c87ba00d..702475d5dac 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/UpdateDefinitionValues/UpdateDefinitionValuesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyConfigurations/Item/UpdateDefinitionValues/UpdateDefinitionValuesRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupP public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyConfigurations.Item.UpdateDefinitionValues.UpdateDefinitionValuesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyConfigurations.Item.UpdateDefinitionValues.UpdateDefinitionValuesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitionFiles/GroupPolicyDefinitionFilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitionFiles/GroupPolicyDefinitionFilesRequestBuilder.cs index 249be36fab6..3e6de5e5382 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitionFiles/GroupPolicyDefinitionFilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitionFiles/GroupPolicyDefinitionFilesRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupPolicyDefinitionFilesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitionFiles/Item/GroupPolicyDefinitionFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitionFiles/Item/GroupPolicyDefinitionFileItemRequestBuilder.cs index b2fc3f7524c..fe67b16daef 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitionFiles/Item/GroupPolicyDefinitionFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitionFiles/Item/GroupPolicyDefinitionFileItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/GroupPolicyDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/GroupPolicyDefinitionsRequestBuilder.cs index 69353e67587..92ca711146a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/GroupPolicyDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/GroupPolicyDefinitionsRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupPolicyDefinitionsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/GroupPolicyDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/GroupPolicyDefinitionItemRequestBuilder.cs index aaaa8e79251..1ed53f7d44a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/GroupPolicyDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/GroupPolicyDefinitionItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/NextVersionDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/NextVersionDefinitionRequestBuilder.cs index bb1d4cef1ea..285fb50f6fb 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/NextVersionDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/NextVersionDefinitionRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs index 9961d71f00e..7acf5160da7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/Presentations/PresentationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/Presentations/PresentationsRequestBuilder.cs index c42f0d6e126..286fe6a68a1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/Presentations/PresentationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/Presentations/PresentationsRequestBuilder.cs @@ -93,7 +93,7 @@ public PresentationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/PreviousVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/PreviousVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs index b0fca99375a..4abcb8d04ef 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/PreviousVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/PreviousVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/PreviousVersionDefinition/Presentations/PresentationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/PreviousVersionDefinition/Presentations/PresentationsRequestBuilder.cs index 5205d813ca8..2f5dab3c283 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/PreviousVersionDefinition/Presentations/PresentationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/PreviousVersionDefinition/Presentations/PresentationsRequestBuilder.cs @@ -93,7 +93,7 @@ public PresentationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/PreviousVersionDefinition/PreviousVersionDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/PreviousVersionDefinition/PreviousVersionDefinitionRequestBuilder.cs index 4fc5b1bba19..7dcd151016b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/PreviousVersionDefinition/PreviousVersionDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/NextVersionDefinition/PreviousVersionDefinition/PreviousVersionDefinitionRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs index 6f467274969..af96aceb717 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/Presentations/PresentationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/Presentations/PresentationsRequestBuilder.cs index 9e11c3b05c1..91e27985985 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/Presentations/PresentationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/Presentations/PresentationsRequestBuilder.cs @@ -93,7 +93,7 @@ public PresentationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/NextVersionDefinition/NextVersionDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/NextVersionDefinition/NextVersionDefinitionRequestBuilder.cs index 2c5a157aa57..15070a9563c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/NextVersionDefinition/NextVersionDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/NextVersionDefinition/NextVersionDefinitionRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/NextVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/NextVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs index 0221a5cf902..6404f0c294d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/NextVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/NextVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/NextVersionDefinition/Presentations/PresentationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/NextVersionDefinition/Presentations/PresentationsRequestBuilder.cs index 076d0dea192..fc98fd72385 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/NextVersionDefinition/Presentations/PresentationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/NextVersionDefinition/Presentations/PresentationsRequestBuilder.cs @@ -93,7 +93,7 @@ public PresentationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs index b58c06aa44e..5661c13340e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/Presentations/Item/GroupPolicyPresentationItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/Presentations/PresentationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/Presentations/PresentationsRequestBuilder.cs index 1c0354ba58f..8f0d8275289 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/Presentations/PresentationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/Presentations/PresentationsRequestBuilder.cs @@ -93,7 +93,7 @@ public PresentationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/PreviousVersionDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/PreviousVersionDefinitionRequestBuilder.cs index fff94f2fc46..398f66dfa6d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/PreviousVersionDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyDefinitions/Item/PreviousVersionDefinition/PreviousVersionDefinitionRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportPostRequestBody.cs index 9401d8cbc91..e5ee7656c06 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateMigrationReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.CreateMigrationReport.CreateMigrationReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.CreateMigrationReport.CreateMigrationReportPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("groupPolicyObjectFile", GroupPolicyObjectFile); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportPostResponse.cs index 6a4f2fe5775..22394bd9f18 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportPostResponse.cs @@ -52,7 +52,7 @@ public CreateMigrationReportPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.CreateMigrationReport.CreateMigrationReportPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.CreateMigrationReport.CreateMigrationReportPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportRequestBuilder.cs index f3dac85488c..1b4585ea184 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportRequestBuilder.cs @@ -50,7 +50,7 @@ public CreateMigrationReportRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsCreateMigrationReportPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.CreateMigrationReport.CreateMigrationReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CreateMigrationReportRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.CreateMigrationReport.CreateMigrationReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.CreateMigrationReport.CreateMigrationReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportResponse.cs index 1ebaeab3003..ae2ff2020e6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/CreateMigrationReport/CreateMigrationReportResponse.cs @@ -20,7 +20,7 @@ public partial class CreateMigrationReportResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.CreateMigrationReport.CreateMigrationReportResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.CreateMigrationReport.CreateMigrationReportResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/GroupPolicyMigrationReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/GroupPolicyMigrationReportsRequestBuilder.cs index c287d850d1d..6027ca194d4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/GroupPolicyMigrationReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/GroupPolicyMigrationReportsRequestBuilder.cs @@ -99,7 +99,7 @@ public GroupPolicyMigrationReportsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyMigrationReport body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyMigrationReport body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/GroupPolicyMigrationReportItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/GroupPolicyMigrationReportItemRequestBuilder.cs index aea346c6f4b..987e50d1e58 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/GroupPolicyMigrationReportItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/GroupPolicyMigrationReportItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyMigrationReport body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyMigrationReport body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/GroupPolicySettingMappings/GroupPolicySettingMappingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/GroupPolicySettingMappings/GroupPolicySettingMappingsRequestBuilder.cs index 3f1b2950c91..085ca8cc29a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/GroupPolicySettingMappings/GroupPolicySettingMappingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/GroupPolicySettingMappings/GroupPolicySettingMappingsRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupPolicySettingMappingsRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicySettingMapping body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicySettingMapping body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/GroupPolicySettingMappings/Item/GroupPolicySettingMappingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/GroupPolicySettingMappings/Item/GroupPolicySettingMappingItemRequestBuilder.cs index 70869d17dfa..32cf069fc2f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/GroupPolicySettingMappings/Item/GroupPolicySettingMappingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/GroupPolicySettingMappings/Item/GroupPolicySettingMappingItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicySettingMapping body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicySettingMapping body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UnsupportedGroupPolicyExtensions/Item/UnsupportedGroupPolicyExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UnsupportedGroupPolicyExtensions/Item/UnsupportedGroupPolicyExtensionItemRequestBuilder.cs index 363d650aeb7..12953098b07 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UnsupportedGroupPolicyExtensions/Item/UnsupportedGroupPolicyExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UnsupportedGroupPolicyExtensions/Item/UnsupportedGroupPolicyExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnsupportedGroupPolicyExtension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnsupportedGroupPolicyExtension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UnsupportedGroupPolicyExtensions/UnsupportedGroupPolicyExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UnsupportedGroupPolicyExtensions/UnsupportedGroupPolicyExtensionsRequestBuilder.cs index aa85c1f79bb..6504ca5a4f6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UnsupportedGroupPolicyExtensions/UnsupportedGroupPolicyExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UnsupportedGroupPolicyExtensions/UnsupportedGroupPolicyExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public UnsupportedGroupPolicyExtensionsRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnsupportedGroupPolicyExtension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnsupportedGroupPolicyExtension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsPostRequestBody.cs index 08ebf134620..976837a057e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsPostRequestBody.cs @@ -52,7 +52,7 @@ public UpdateScopeTagsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.Item.UpdateScopeTags.UpdateScopeTagsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.Item.UpdateScopeTags.UpdateScopeTagsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("roleScopeTagIds", RoleScopeTagIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsPostResponse.cs index c66a302b76b..7fb9a750d46 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsPostResponse.cs @@ -52,7 +52,7 @@ public UpdateScopeTagsPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.Item.UpdateScopeTags.UpdateScopeTagsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.Item.UpdateScopeTags.UpdateScopeTagsPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsRequestBuilder.cs index 603d7665657..7beb85866cf 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsRequestBuilder.cs @@ -50,7 +50,7 @@ public UpdateScopeTagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsUpdateScopeTagsPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.Item.UpdateScopeTags.UpdateScopeTagsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public UpdateScopeTagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.Item.UpdateScopeTags.UpdateScopeTagsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.Item.UpdateScopeTags.UpdateScopeTagsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsResponse.cs index cbca51d0d2c..a90af1017fe 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyMigrationReports/Item/UpdateScopeTags/UpdateScopeTagsResponse.cs @@ -20,7 +20,7 @@ public partial class UpdateScopeTagsResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.Item.UpdateScopeTags.UpdateScopeTagsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyMigrationReports.Item.UpdateScopeTags.UpdateScopeTagsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyObjectFiles/GroupPolicyObjectFilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyObjectFiles/GroupPolicyObjectFilesRequestBuilder.cs index 4d055767b55..0f3bf8c7b0c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyObjectFiles/GroupPolicyObjectFilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyObjectFiles/GroupPolicyObjectFilesRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupPolicyObjectFilesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyObjectFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyObjectFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyObjectFiles/Item/GroupPolicyObjectFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyObjectFiles/Item/GroupPolicyObjectFileItemRequestBuilder.cs index 65fd0c2383a..cd9e657cda6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyObjectFiles/Item/GroupPolicyObjectFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyObjectFiles/Item/GroupPolicyObjectFileItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyObjectFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyObjectFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/GroupPolicyUploadedDefinitionFilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/GroupPolicyUploadedDefinitionFilesRequestBuilder.cs index 221f9889237..38621f27b4e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/GroupPolicyUploadedDefinitionFilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/GroupPolicyUploadedDefinitionFilesRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupPolicyUploadedDefinitionFilesRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyUploadedDefinitionFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyUploadedDefinitionFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/AddLanguageFiles/AddLanguageFilesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/AddLanguageFiles/AddLanguageFilesPostRequestBody.cs index e46edb71e5e..a3433787a93 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/AddLanguageFiles/AddLanguageFilesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/AddLanguageFiles/AddLanguageFilesPostRequestBody.cs @@ -53,7 +53,7 @@ public AddLanguageFilesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.AddLanguageFiles.AddLanguageFilesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.AddLanguageFiles.AddLanguageFilesPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("groupPolicyUploadedLanguageFiles", GroupPolicyUploadedLanguageFiles); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/AddLanguageFiles/AddLanguageFilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/AddLanguageFiles/AddLanguageFilesRequestBuilder.cs index 27cf87379ef..e27eca5eac6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/AddLanguageFiles/AddLanguageFilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/AddLanguageFiles/AddLanguageFilesRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupP public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.AddLanguageFiles.AddLanguageFilesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.AddLanguageFiles.AddLanguageFilesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/GroupPolicyOperations/GroupPolicyOperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/GroupPolicyOperations/GroupPolicyOperationsRequestBuilder.cs index c4c5cea8f3c..b89702738b4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/GroupPolicyOperations/GroupPolicyOperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/GroupPolicyOperations/GroupPolicyOperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupPolicyOperationsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/GroupPolicyOperations/Item/GroupPolicyOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/GroupPolicyOperations/Item/GroupPolicyOperationItemRequestBuilder.cs index 198fb259414..a4b82380cf2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/GroupPolicyOperations/Item/GroupPolicyOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/GroupPolicyOperations/Item/GroupPolicyOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/GroupPolicyUploadedDefinitionFileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/GroupPolicyUploadedDefinitionFileItemRequestBuilder.cs index 4ecce421b36..2c26e941c51 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/GroupPolicyUploadedDefinitionFileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/GroupPolicyUploadedDefinitionFileItemRequestBuilder.cs @@ -138,7 +138,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupPolicyUploadedDefinitionFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -199,7 +199,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupPolicyUploadedDefinitionFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/RemoveLanguageFiles/RemoveLanguageFilesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/RemoveLanguageFiles/RemoveLanguageFilesPostRequestBody.cs index 1a4dc10ef4b..33558f441af 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/RemoveLanguageFiles/RemoveLanguageFilesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/RemoveLanguageFiles/RemoveLanguageFilesPostRequestBody.cs @@ -53,7 +53,7 @@ public RemoveLanguageFilesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.RemoveLanguageFiles.RemoveLanguageFilesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.RemoveLanguageFiles.RemoveLanguageFilesPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("groupPolicyUploadedLanguageFiles", GroupPolicyUploadedLanguageFiles); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/RemoveLanguageFiles/RemoveLanguageFilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/RemoveLanguageFiles/RemoveLanguageFilesRequestBuilder.cs index d41e007c3f7..66a9cc4112e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/RemoveLanguageFiles/RemoveLanguageFilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/RemoveLanguageFiles/RemoveLanguageFilesRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupP public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.RemoveLanguageFiles.RemoveLanguageFilesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.RemoveLanguageFiles.RemoveLanguageFilesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UpdateLanguageFiles/UpdateLanguageFilesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UpdateLanguageFiles/UpdateLanguageFilesPostRequestBody.cs index 734b5e15776..1543909ceec 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UpdateLanguageFiles/UpdateLanguageFilesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UpdateLanguageFiles/UpdateLanguageFilesPostRequestBody.cs @@ -53,7 +53,7 @@ public UpdateLanguageFilesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.UpdateLanguageFiles.UpdateLanguageFilesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.UpdateLanguageFiles.UpdateLanguageFilesPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("groupPolicyUploadedLanguageFiles", GroupPolicyUploadedLanguageFiles); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UpdateLanguageFiles/UpdateLanguageFilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UpdateLanguageFiles/UpdateLanguageFilesRequestBuilder.cs index aeb5ad5bca2..ccc58a7040c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UpdateLanguageFiles/UpdateLanguageFilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UpdateLanguageFiles/UpdateLanguageFilesRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupP public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.UpdateLanguageFiles.UpdateLanguageFilesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.UpdateLanguageFiles.UpdateLanguageFilesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UploadNewVersion/UploadNewVersionPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UploadNewVersion/UploadNewVersionPostRequestBody.cs index 9e4347f3ec5..18251d7f5fe 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UploadNewVersion/UploadNewVersionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UploadNewVersion/UploadNewVersionPostRequestBody.cs @@ -69,7 +69,7 @@ public UploadNewVersionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.UploadNewVersion.UploadNewVersionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.UploadNewVersion.UploadNewVersionPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("content", Content); writer.WriteCollectionOfObjectValues("groupPolicyUploadedLanguageFiles", GroupPolicyUploadedLanguageFiles); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UploadNewVersion/UploadNewVersionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UploadNewVersion/UploadNewVersionRequestBuilder.cs index 226a989c118..16710c49a75 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UploadNewVersion/UploadNewVersionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/GroupPolicyUploadedDefinitionFiles/Item/UploadNewVersion/UploadNewVersionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupP public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.UploadNewVersion.UploadNewVersionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.GroupPolicyUploadedDefinitionFiles.Item.UploadNewVersion.UploadNewVersionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/HardwareConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/HardwareConfigurationsRequestBuilder.cs index 059bcc88154..9dec56d5a3e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/HardwareConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/HardwareConfigurationsRequestBuilder.cs @@ -93,7 +93,7 @@ public HardwareConfigurationsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HardwareConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignPostRequestBody.cs index 1b2d2342780..178ff60a52d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.HardwareConfigurations.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.HardwareConfigurations.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("hardwareConfigurationAssignments", HardwareConfigurationAssignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignPostResponse.cs index 41a14086bf5..98320a59e53 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignPostResponse.cs @@ -36,7 +36,7 @@ public partial class AssignPostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.HardwareConfigurations.Item.Assign.AssignPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.HardwareConfigurations.Item.Assign.AssignPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignRequestBuilder.cs index 4f6d02568cd..456ed12ce19 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignRequestBuilder.cs @@ -50,7 +50,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsAssignPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.HardwareConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.HardwareConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.HardwareConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignResponse.cs index 2e76047caac..829a6200e70 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assign/AssignResponse.cs @@ -20,7 +20,7 @@ public partial class AssignResponse : global::Microsoft.Graph.Beta.DeviceManagem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.HardwareConfigurations.Item.Assign.AssignResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.HardwareConfigurations.Item.Assign.AssignResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs index 360313e1771..53f2a82fd7b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HardwareConfigurationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareConfigurationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assignments/Item/HardwareConfigurationAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assignments/Item/HardwareConfigurationAssignmentItemRequestBuilder.cs index 46ad788f2dd..bb938614c54 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assignments/Item/HardwareConfigurationAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/Assignments/Item/HardwareConfigurationAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HardwareConfigurationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareConfigurationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs index a1d7e0dd728..8dc354926b4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/DeviceRunStates/DeviceRunStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceRunStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HardwareConfigurationDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareConfigurationDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/DeviceRunStates/Item/HardwareConfigurationDeviceStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/DeviceRunStates/Item/HardwareConfigurationDeviceStateItemRequestBuilder.cs index 4e2c5beacd6..ecd61523c1a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/DeviceRunStates/Item/HardwareConfigurationDeviceStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/DeviceRunStates/Item/HardwareConfigurationDeviceStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HardwareConfigurationDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareConfigurationDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/HardwareConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/HardwareConfigurationItemRequestBuilder.cs index 2c257e28422..37f2e258ad2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/HardwareConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/HardwareConfigurationItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HardwareConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/RunSummary/RunSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/RunSummary/RunSummaryRequestBuilder.cs index 61b839348a2..1dfe252e15e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/RunSummary/RunSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/RunSummary/RunSummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HardwareConfigurationRunSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareConfigurationRunSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/UserRunStates/Item/HardwareConfigurationUserStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/UserRunStates/Item/HardwareConfigurationUserStateItemRequestBuilder.cs index 2955b1b9ba1..35bb0d90f4e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/UserRunStates/Item/HardwareConfigurationUserStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/UserRunStates/Item/HardwareConfigurationUserStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HardwareConfigurationUserState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareConfigurationUserState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/UserRunStates/UserRunStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/UserRunStates/UserRunStatesRequestBuilder.cs index 5ece4767d87..6fa4cf27736 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/UserRunStates/UserRunStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwareConfigurations/Item/UserRunStates/UserRunStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public UserRunStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HardwareConfigurationUserState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareConfigurationUserState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordDetails/HardwarePasswordDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordDetails/HardwarePasswordDetailsRequestBuilder.cs index 4d0a8e6be16..bc011eda34b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordDetails/HardwarePasswordDetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordDetails/HardwarePasswordDetailsRequestBuilder.cs @@ -93,7 +93,7 @@ public HardwarePasswordDetailsRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HardwarePasswordDetail body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HardwarePasswordDetail body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordDetails/Item/HardwarePasswordDetailItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordDetails/Item/HardwarePasswordDetailItemRequestBuilder.cs index 71a4a450dba..c7a2e864d7c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordDetails/Item/HardwarePasswordDetailItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordDetails/Item/HardwarePasswordDetailItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HardwarePasswordDetail body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HardwarePasswordDetail body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordInfo/HardwarePasswordInfoRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordInfo/HardwarePasswordInfoRequestBuilder.cs index 7eb4b3199c9..47630eaa067 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordInfo/HardwarePasswordInfoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordInfo/HardwarePasswordInfoRequestBuilder.cs @@ -93,7 +93,7 @@ public HardwarePasswordInfoRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HardwarePasswordInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HardwarePasswordInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordInfo/Item/HardwarePasswordInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordInfo/Item/HardwarePasswordInfoItemRequestBuilder.cs index 72695979d7e..f86563debc0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordInfo/Item/HardwarePasswordInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/HardwarePasswordInfo/Item/HardwarePasswordInfoItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HardwarePasswordInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HardwarePasswordInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListPostRequestBody.cs index 78043d97b8a..043acde4628 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListPostRequestBody.cs @@ -59,7 +59,7 @@ public ImportDeviceIdentityListPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.ImportDeviceIdentityList.ImportDeviceIdentityListPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.ImportDeviceIdentityList.ImportDeviceIdentityListPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("importedDeviceIdentities", ImportedDeviceIdentities); writer.WriteBoolValue("overwriteImportedDeviceIdentities", OverwriteImportedDeviceIdentities); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListPostResponse.cs index aff5ece0297..76d00e8c899 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListPostResponse.cs @@ -36,7 +36,7 @@ public partial class ImportDeviceIdentityListPostResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.ImportDeviceIdentityList.ImportDeviceIdentityListPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.ImportDeviceIdentityList.ImportDeviceIdentityListPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListRequestBuilder.cs index e2348202486..7bcaec4d944 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListRequestBuilder.cs @@ -50,7 +50,7 @@ public ImportDeviceIdentityListRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsImportDeviceIdentityListPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.ImportDeviceIdentityList.ImportDeviceIdentityListPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public ImportDeviceIdentityListRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.ImportDeviceIdentityList.ImportDeviceIdentityListPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.ImportDeviceIdentityList.ImportDeviceIdentityListPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListResponse.cs index dfd50613ae5..d4e57317461 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportDeviceIdentityList/ImportDeviceIdentityListResponse.cs @@ -20,7 +20,7 @@ public partial class ImportDeviceIdentityListResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.ImportDeviceIdentityList.ImportDeviceIdentityListResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.ImportDeviceIdentityList.ImportDeviceIdentityListResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportedDeviceIdentitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportedDeviceIdentitiesRequestBuilder.cs index 05d9162f7ea..a60abf018a1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportedDeviceIdentitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/ImportedDeviceIdentitiesRequestBuilder.cs @@ -105,7 +105,7 @@ public ImportedDeviceIdentitiesRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ImportedDeviceIdentity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ImportedDeviceIdentity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/Item/ImportedDeviceIdentityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/Item/ImportedDeviceIdentityItemRequestBuilder.cs index 482fa96f292..27a923d9f42 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/Item/ImportedDeviceIdentityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/Item/ImportedDeviceIdentityItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ImportedDeviceIdentity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ImportedDeviceIdentity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesPostRequestBody.cs index e39d23ca721..1d8ace04f5c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesPostRequestBody.cs @@ -53,7 +53,7 @@ public SearchExistingIdentitiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.SearchExistingIdentities.SearchExistingIdentitiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.SearchExistingIdentities.SearchExistingIdentitiesPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("importedDeviceIdentities", ImportedDeviceIdentities); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesPostResponse.cs index 2b7d8c14b9f..70cfc739315 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesPostResponse.cs @@ -36,7 +36,7 @@ public partial class SearchExistingIdentitiesPostResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.SearchExistingIdentities.SearchExistingIdentitiesPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.SearchExistingIdentities.SearchExistingIdentitiesPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesRequestBuilder.cs index eb5f49c2690..ad14c5c2c08 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesRequestBuilder.cs @@ -50,7 +50,7 @@ public SearchExistingIdentitiesRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsSearchExistingIdentitiesPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.SearchExistingIdentities.SearchExistingIdentitiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public SearchExistingIdentitiesRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.SearchExistingIdentities.SearchExistingIdentitiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.SearchExistingIdentities.SearchExistingIdentitiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesResponse.cs index 77c7110b698..24b632ba41b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedDeviceIdentities/SearchExistingIdentities/SearchExistingIdentitiesResponse.cs @@ -20,7 +20,7 @@ public partial class SearchExistingIdentitiesResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.SearchExistingIdentities.SearchExistingIdentitiesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ImportedDeviceIdentities.SearchExistingIdentities.SearchExistingIdentitiesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportPostRequestBody.cs index a3473bae0d5..deb078f9dc2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportPostRequestBody.cs @@ -53,7 +53,7 @@ public ImportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ImportedWindowsAutopilotDeviceIdentities.Import.ImportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ImportedWindowsAutopilotDeviceIdentities.Import.ImportPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("importedWindowsAutopilotDeviceIdentities", ImportedWindowsAutopilotDeviceIdentities); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportPostResponse.cs index d4350d307f9..16e2884e8d9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportPostResponse.cs @@ -36,7 +36,7 @@ public partial class ImportPostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ImportedWindowsAutopilotDeviceIdentities.Import.ImportPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ImportedWindowsAutopilotDeviceIdentities.Import.ImportPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportRequestBuilder.cs index a4d7bafd274..84b6ee5af90 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportRequestBuilder.cs @@ -50,7 +50,7 @@ public ImportRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsImportPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.ImportedWindowsAutopilotDeviceIdentities.Import.ImportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public ImportRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ImportedWindowsAutopilotDeviceIdentities.Import.ImportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ImportedWindowsAutopilotDeviceIdentities.Import.ImportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportResponse.cs index 491e433cd4c..ad4c9ed7645 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Import/ImportResponse.cs @@ -20,7 +20,7 @@ public partial class ImportResponse : global::Microsoft.Graph.Beta.DeviceManagem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ImportedWindowsAutopilotDeviceIdentities.Import.ImportResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ImportedWindowsAutopilotDeviceIdentities.Import.ImportResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/ImportedWindowsAutopilotDeviceIdentitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/ImportedWindowsAutopilotDeviceIdentitiesRequestBuilder.cs index 4aebad9fb10..b7cf56de8e2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/ImportedWindowsAutopilotDeviceIdentitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/ImportedWindowsAutopilotDeviceIdentitiesRequestBuilder.cs @@ -99,7 +99,7 @@ public ImportedWindowsAutopilotDeviceIdentitiesRequestBuilder(string rawUrl, IRe public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ImportedWindowsAutopilotDeviceIdentity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ImportedWindowsAutopilotDeviceIdentity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Item/ImportedWindowsAutopilotDeviceIdentityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Item/ImportedWindowsAutopilotDeviceIdentityItemRequestBuilder.cs index 8c3b39f0915..3e7ea485e7d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Item/ImportedWindowsAutopilotDeviceIdentityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ImportedWindowsAutopilotDeviceIdentities/Item/ImportedWindowsAutopilotDeviceIdentityItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ImportedWindowsAutopilotDeviceIdentity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ImportedWindowsAutopilotDeviceIdentity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/IntentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/IntentsRequestBuilder.cs index 9b465fd3c07..96aa3966f90 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/IntentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/IntentsRequestBuilder.cs @@ -93,7 +93,7 @@ public IntentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementIntent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementIntent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assign/AssignPostRequestBody.cs index 2ad963aa1eb..c611b0e8f6d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assign/AssignRequestBuilder.cs index d27525e037c..814d0b94ab1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Intent public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assignments/AssignmentsRequestBuilder.cs index 46b59dd716c..a713f396f99 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assignments/Item/DeviceManagementIntentAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assignments/Item/DeviceManagementIntentAssignmentItemRequestBuilder.cs index eccbfa0c562..026665367cd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assignments/Item/DeviceManagementIntentAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Assignments/Item/DeviceManagementIntentAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/CategoriesRequestBuilder.cs index 80c1d4f2eeb..9a07205db63 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/CategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/CategoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentSettingCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentSettingCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/DeviceManagementIntentSettingCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/DeviceManagementIntentSettingCategoryItemRequestBuilder.cs index 40a8900a3de..9edac9b60ea 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/DeviceManagementIntentSettingCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/DeviceManagementIntentSettingCategoryItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentSettingCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentSettingCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs index 38674656726..10e737260e9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs index f4a2f920fe7..d2ebae44afe 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs index c3056f6e8e6..ae815adfe47 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/Settings/SettingsRequestBuilder.cs index 218643808f8..85366224db6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Categories/Item/Settings/SettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CompareWithTemplateId/CompareWithTemplateIdGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CompareWithTemplateId/CompareWithTemplateIdGetResponse.cs index 5c65a26c2ef..aa16ed5ba71 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CompareWithTemplateId/CompareWithTemplateIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CompareWithTemplateId/CompareWithTemplateIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class CompareWithTemplateIdGetResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.CompareWithTemplateId.CompareWithTemplateIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.CompareWithTemplateId.CompareWithTemplateIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CompareWithTemplateId/CompareWithTemplateIdResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CompareWithTemplateId/CompareWithTemplateIdResponse.cs index 84dc3555e47..e5b5ce7a6f0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CompareWithTemplateId/CompareWithTemplateIdResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CompareWithTemplateId/CompareWithTemplateIdResponse.cs @@ -20,7 +20,7 @@ public partial class CompareWithTemplateIdResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.CompareWithTemplateId.CompareWithTemplateIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.CompareWithTemplateId.CompareWithTemplateIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CreateCopy/CreateCopyPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CreateCopy/CreateCopyPostRequestBody.cs index c0dfa8498fd..2a60311a5a2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CreateCopy/CreateCopyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CreateCopy/CreateCopyPostRequestBody.cs @@ -68,7 +68,7 @@ public CreateCopyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.CreateCopy.CreateCopyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.CreateCopy.CreateCopyPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CreateCopy/CreateCopyRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CreateCopy/CreateCopyRequestBuilder.cs index bc4288c2a1f..9c26f4ab158 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CreateCopy/CreateCopyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/CreateCopy/CreateCopyRequestBuilder.cs @@ -51,7 +51,7 @@ public CreateCopyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.CreateCopy.CreateCopyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.CreateCopy.CreateCopyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceManagementIntentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceManagementIntentItemRequestBuilder.cs index 39802229bb2..dcfbd785007 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceManagementIntentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceManagementIntentItemRequestBuilder.cs @@ -185,7 +185,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementIntent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -246,7 +246,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementIntent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceSettingStateSummaries/DeviceSettingStateSummariesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceSettingStateSummaries/DeviceSettingStateSummariesRequestBuilder.cs index ececd2115e6..9f04442e174 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceSettingStateSummaries/DeviceSettingStateSummariesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceSettingStateSummaries/DeviceSettingStateSummariesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceSettingStateSummariesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceSettingStateSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceSettingStateSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceSettingStateSummaries/Item/DeviceManagementIntentDeviceSettingStateSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceSettingStateSummaries/Item/DeviceManagementIntentDeviceSettingStateSummaryItemRequestBuilder.cs index 3befdf775c2..d5eacdd8f5a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceSettingStateSummaries/Item/DeviceManagementIntentDeviceSettingStateSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceSettingStateSummaries/Item/DeviceManagementIntentDeviceSettingStateSummaryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceSettingStateSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceSettingStateSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceStateSummary/DeviceStateSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceStateSummary/DeviceStateSummaryRequestBuilder.cs index 817335c07e6..9d506dfa929 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceStateSummary/DeviceStateSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceStateSummary/DeviceStateSummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceStateSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceStateSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceStates/DeviceStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceStates/DeviceStatesRequestBuilder.cs index 710f840bb83..3ca823d4a30 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceStates/DeviceStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceStates/DeviceStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceStates/Item/DeviceManagementIntentDeviceStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceStates/Item/DeviceManagementIntentDeviceStateItemRequestBuilder.cs index 30cdf08c77c..679b9d1a2a1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceStates/Item/DeviceManagementIntentDeviceStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/DeviceStates/Item/DeviceManagementIntentDeviceStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/GetCustomizedSettings/GetCustomizedSettingsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/GetCustomizedSettings/GetCustomizedSettingsGetResponse.cs index 834e90e7c6b..ddcdf5156c9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/GetCustomizedSettings/GetCustomizedSettingsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/GetCustomizedSettings/GetCustomizedSettingsGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetCustomizedSettingsGetResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.GetCustomizedSettings.GetCustomizedSettingsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.GetCustomizedSettings.GetCustomizedSettingsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/GetCustomizedSettings/GetCustomizedSettingsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/GetCustomizedSettings/GetCustomizedSettingsResponse.cs index 6108e4d9128..04ff4a408d1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/GetCustomizedSettings/GetCustomizedSettingsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/GetCustomizedSettings/GetCustomizedSettingsResponse.cs @@ -20,7 +20,7 @@ public partial class GetCustomizedSettingsResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.GetCustomizedSettings.GetCustomizedSettingsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.GetCustomizedSettings.GetCustomizedSettingsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/MigrateToTemplate/MigrateToTemplatePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/MigrateToTemplate/MigrateToTemplatePostRequestBody.cs index 18e14aa73ec..9aec5fa4b96 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/MigrateToTemplate/MigrateToTemplatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/MigrateToTemplate/MigrateToTemplatePostRequestBody.cs @@ -58,7 +58,7 @@ public MigrateToTemplatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.MigrateToTemplate.MigrateToTemplatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.MigrateToTemplate.MigrateToTemplatePostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("newTemplateId", NewTemplateId); writer.WriteBoolValue("preserveCustomValues", PreserveCustomValues); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/MigrateToTemplate/MigrateToTemplateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/MigrateToTemplate/MigrateToTemplateRequestBuilder.cs index e040de8939d..c27b271172d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/MigrateToTemplate/MigrateToTemplateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/MigrateToTemplate/MigrateToTemplateRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Intent public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.MigrateToTemplate.MigrateToTemplatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.MigrateToTemplate.MigrateToTemplatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs index b2553fc11bd..91c136545a5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Settings/SettingsRequestBuilder.cs index 07a620bffd6..5b7de61fbe9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/Settings/SettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UpdateSettings/UpdateSettingsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UpdateSettings/UpdateSettingsPostRequestBody.cs index 105b154a268..f3caaca5bc5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UpdateSettings/UpdateSettingsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UpdateSettings/UpdateSettingsPostRequestBody.cs @@ -53,7 +53,7 @@ public UpdateSettingsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.UpdateSettings.UpdateSettingsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.UpdateSettings.UpdateSettingsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("settings", Settings); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UpdateSettings/UpdateSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UpdateSettings/UpdateSettingsRequestBuilder.cs index 4a06e4bd602..23e90e97c5c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UpdateSettings/UpdateSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UpdateSettings/UpdateSettingsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Intent public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.UpdateSettings.UpdateSettingsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Intents.Item.UpdateSettings.UpdateSettingsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UserStateSummary/UserStateSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UserStateSummary/UserStateSummaryRequestBuilder.cs index a188c2141d7..42022b17112 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UserStateSummary/UserStateSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UserStateSummary/UserStateSummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentUserStateSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentUserStateSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UserStates/Item/DeviceManagementIntentUserStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UserStates/Item/DeviceManagementIntentUserStateItemRequestBuilder.cs index d31b844bd74..36fc8a526cf 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UserStates/Item/DeviceManagementIntentUserStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UserStates/Item/DeviceManagementIntentUserStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentUserState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentUserState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UserStates/UserStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UserStates/UserStatesRequestBuilder.cs index c21ad982967..71f75967d4a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UserStates/UserStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Intents/Item/UserStates/UserStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public UserStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentUserState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementIntentUserState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/IntuneBrandingProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/IntuneBrandingProfilesRequestBuilder.cs index 5001dc70d65..f04ac8d4f10 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/IntuneBrandingProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/IntuneBrandingProfilesRequestBuilder.cs @@ -93,7 +93,7 @@ public IntuneBrandingProfilesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IntuneBrandingProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IntuneBrandingProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assign/AssignPostRequestBody.cs index af01536bcf4..d5eb810895a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.IntuneBrandingProfiles.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.IntuneBrandingProfiles.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assign/AssignRequestBuilder.cs index 839f4ee9385..00f8496b205 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Intune public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.IntuneBrandingProfiles.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.IntuneBrandingProfiles.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assignments/AssignmentsRequestBuilder.cs index 621fd7db6fb..757f3746375 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IntuneBrandingProfileAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IntuneBrandingProfileAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assignments/Item/IntuneBrandingProfileAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assignments/Item/IntuneBrandingProfileAssignmentItemRequestBuilder.cs index 98041babf2a..ea2e308cea4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assignments/Item/IntuneBrandingProfileAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/Assignments/Item/IntuneBrandingProfileAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IntuneBrandingProfileAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IntuneBrandingProfileAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/IntuneBrandingProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/IntuneBrandingProfileItemRequestBuilder.cs index 78c201e416d..ff96c3e64e7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/IntuneBrandingProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/IntuneBrandingProfiles/Item/IntuneBrandingProfileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IntuneBrandingProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IntuneBrandingProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/IosUpdateStatuses/IosUpdateStatusesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/IosUpdateStatuses/IosUpdateStatusesRequestBuilder.cs index 481d6a125ca..dbcde43c001 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/IosUpdateStatuses/IosUpdateStatusesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/IosUpdateStatuses/IosUpdateStatusesRequestBuilder.cs @@ -93,7 +93,7 @@ public IosUpdateStatusesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IosUpdateDeviceStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IosUpdateDeviceStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/IosUpdateStatuses/Item/IosUpdateDeviceStatusItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/IosUpdateStatuses/Item/IosUpdateDeviceStatusItemRequestBuilder.cs index ca08e3c65a3..4ce610010e5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/IosUpdateStatuses/Item/IosUpdateDeviceStatusItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/IosUpdateStatuses/Item/IosUpdateDeviceStatusItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IosUpdateDeviceStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IosUpdateDeviceStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/CategorySummariesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/CategorySummariesRequestBuilder.cs index 1649691f3ac..fdf20f35c51 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/CategorySummariesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/CategorySummariesRequestBuilder.cs @@ -93,7 +93,7 @@ public CategorySummariesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateCategorySummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateCategorySummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/Item/MacOSSoftwareUpdateCategorySummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/Item/MacOSSoftwareUpdateCategorySummaryItemRequestBuilder.cs index 367bf4d3a1c..76a8efee04f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/Item/MacOSSoftwareUpdateCategorySummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/Item/MacOSSoftwareUpdateCategorySummaryItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateCategorySummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateCategorySummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/Item/UpdateStateSummaries/Item/MacOSSoftwareUpdateStateSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/Item/UpdateStateSummaries/Item/MacOSSoftwareUpdateStateSummaryItemRequestBuilder.cs index 9b394c58de3..7e3a22a451d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/Item/UpdateStateSummaries/Item/MacOSSoftwareUpdateStateSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/Item/UpdateStateSummaries/Item/MacOSSoftwareUpdateStateSummaryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateStateSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateStateSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/Item/UpdateStateSummaries/UpdateStateSummariesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/Item/UpdateStateSummaries/UpdateStateSummariesRequestBuilder.cs index 9676656cccc..91c62e8519b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/Item/UpdateStateSummaries/UpdateStateSummariesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/CategorySummaries/Item/UpdateStateSummaries/UpdateStateSummariesRequestBuilder.cs @@ -93,7 +93,7 @@ public UpdateStateSummariesRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateStateSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateStateSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/MacOSSoftwareUpdateAccountSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/MacOSSoftwareUpdateAccountSummaryItemRequestBuilder.cs index 9faaac52332..46e3d6ccef3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/MacOSSoftwareUpdateAccountSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/Item/MacOSSoftwareUpdateAccountSummaryItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateAccountSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateAccountSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/MacOSSoftwareUpdateAccountSummariesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/MacOSSoftwareUpdateAccountSummariesRequestBuilder.cs index 5946cbff7d9..9b2aac61261 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/MacOSSoftwareUpdateAccountSummariesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MacOSSoftwareUpdateAccountSummaries/MacOSSoftwareUpdateAccountSummariesRequestBuilder.cs @@ -93,7 +93,7 @@ public MacOSSoftwareUpdateAccountSummariesRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateAccountSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateAccountSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceCleanupRules/Item/ManagedDeviceCleanupRuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceCleanupRules/Item/ManagedDeviceCleanupRuleItemRequestBuilder.cs index a5a2169f801..0f7c2253eae 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceCleanupRules/Item/ManagedDeviceCleanupRuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceCleanupRules/Item/ManagedDeviceCleanupRuleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceCleanupRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceCleanupRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceCleanupRules/ManagedDeviceCleanupRulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceCleanupRules/ManagedDeviceCleanupRulesRequestBuilder.cs index 42060961432..3835333de7c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceCleanupRules/ManagedDeviceCleanupRulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceCleanupRules/ManagedDeviceCleanupRulesRequestBuilder.cs @@ -93,7 +93,7 @@ public ManagedDeviceCleanupRulesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceCleanupRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceCleanupRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceEncryptionStates/Item/ManagedDeviceEncryptionStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceEncryptionStates/Item/ManagedDeviceEncryptionStateItemRequestBuilder.cs index 89bd223d131..9cbe7b8981a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceEncryptionStates/Item/ManagedDeviceEncryptionStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceEncryptionStates/Item/ManagedDeviceEncryptionStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceEncryptionState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceEncryptionState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceEncryptionStates/ManagedDeviceEncryptionStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceEncryptionStates/ManagedDeviceEncryptionStatesRequestBuilder.cs index f587fabc7ed..51d0d995092 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceEncryptionStates/ManagedDeviceEncryptionStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceEncryptionStates/ManagedDeviceEncryptionStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public ManagedDeviceEncryptionStatesRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceEncryptionState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceEncryptionState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/Item/GetAllManagedDeviceWindowsOSImages/GetAllManagedDeviceWindowsOSImagesGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/Item/GetAllManagedDeviceWindowsOSImages/GetAllManagedDeviceWindowsOSImagesGetResponse.cs index 7e24f9cb00c..d277087cf81 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/Item/GetAllManagedDeviceWindowsOSImages/GetAllManagedDeviceWindowsOSImagesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/Item/GetAllManagedDeviceWindowsOSImages/GetAllManagedDeviceWindowsOSImagesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllManagedDeviceWindowsOSImagesGetResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDeviceWindowsOSImages.Item.GetAllManagedDeviceWindowsOSImages.GetAllManagedDeviceWindowsOSImagesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDeviceWindowsOSImages.Item.GetAllManagedDeviceWindowsOSImages.GetAllManagedDeviceWindowsOSImagesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/Item/GetAllManagedDeviceWindowsOSImages/GetAllManagedDeviceWindowsOSImagesResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/Item/GetAllManagedDeviceWindowsOSImages/GetAllManagedDeviceWindowsOSImagesResponse.cs index 73a902bc9c5..a908eb8162a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/Item/GetAllManagedDeviceWindowsOSImages/GetAllManagedDeviceWindowsOSImagesResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/Item/GetAllManagedDeviceWindowsOSImages/GetAllManagedDeviceWindowsOSImagesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllManagedDeviceWindowsOSImagesResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDeviceWindowsOSImages.Item.GetAllManagedDeviceWindowsOSImages.GetAllManagedDeviceWindowsOSImagesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDeviceWindowsOSImages.Item.GetAllManagedDeviceWindowsOSImages.GetAllManagedDeviceWindowsOSImagesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/Item/ManagedDeviceWindowsOperatingSystemImageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/Item/ManagedDeviceWindowsOperatingSystemImageItemRequestBuilder.cs index c01fd6f6dff..f3aafc88aaa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/Item/ManagedDeviceWindowsOperatingSystemImageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/Item/ManagedDeviceWindowsOperatingSystemImageItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceWindowsOperatingSystemImage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceWindowsOperatingSystemImage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/ManagedDeviceWindowsOSImagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/ManagedDeviceWindowsOSImagesRequestBuilder.cs index 455916c1ef6..9cb0775f499 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/ManagedDeviceWindowsOSImagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDeviceWindowsOSImages/ManagedDeviceWindowsOSImagesRequestBuilder.cs @@ -93,7 +93,7 @@ public ManagedDeviceWindowsOSImagesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceWindowsOperatingSystemImage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceWindowsOperatingSystemImage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnGetResponse.cs index 32bbc10a8fa..6123c53f45f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnGetResponse.cs @@ -36,7 +36,7 @@ public partial class AppDiagnosticsWithUpnGetResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.AppDiagnosticsWithUpn.AppDiagnosticsWithUpnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.AppDiagnosticsWithUpn.AppDiagnosticsWithUpnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnResponse.cs index 478f4cb2e65..20e3285763e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnResponse.cs @@ -20,7 +20,7 @@ public partial class AppDiagnosticsWithUpnResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.AppDiagnosticsWithUpn.AppDiagnosticsWithUpnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.AppDiagnosticsWithUpn.AppDiagnosticsWithUpnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsPostRequestBody.cs index 9f378934b8b..c3ca8d4519f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsPostRequestBody.cs @@ -53,7 +53,7 @@ public DownloadAppDiagnosticsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.DownloadAppDiagnostics.DownloadAppDiagnosticsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.DownloadAppDiagnostics.DownloadAppDiagnosticsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("request", Request); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsRequestBuilder.cs index f70a0d9b2b3..c970e34ffb3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsRequestBuilder.cs @@ -50,7 +50,7 @@ public DownloadAppDiagnosticsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.DownloadAppDiagnostics.DownloadAppDiagnosticsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.DownloadAppDiagnostics.DownloadAppDiagnosticsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticPostRequestBody.cs index 91ddd88c673..8eb8e32c6a4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticPostRequestBody.cs @@ -53,7 +53,7 @@ public DownloadPowerliftAppDiagnosticPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.DownloadPowerliftAppDiagnostic.DownloadPowerliftAppDiagnosticPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.DownloadPowerliftAppDiagnostic.DownloadPowerliftAppDiagnosticPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("request", Request); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticRequestBuilder.cs index c0bfd2f1a41..5f02630f908 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticRequestBuilder.cs @@ -50,7 +50,7 @@ public DownloadPowerliftAppDiagnosticRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.DownloadPowerliftAppDiagnostic.DownloadPowerliftAppDiagnosticPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.DownloadPowerliftAppDiagnostic.DownloadPowerliftAppDiagnosticPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/ExecuteAction/ExecuteActionPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/ExecuteAction/ExecuteActionPostRequestBody.cs index 1ad162dee68..4ba59df1a6d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/ExecuteAction/ExecuteActionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/ExecuteAction/ExecuteActionPostRequestBody.cs @@ -173,7 +173,7 @@ public ExecuteActionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.ExecuteAction.ExecuteActionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.ExecuteAction.ExecuteActionPostRequestBody(); } /// @@ -203,7 +203,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("actionName", ActionName); writer.WriteStringValue("carrierUrl", CarrierUrl); writer.WriteStringValue("deprovisionReason", DeprovisionReason); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/ExecuteAction/ExecuteActionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/ExecuteAction/ExecuteActionRequestBuilder.cs index aa513dd8f65..d4c39aceacf 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/ExecuteAction/ExecuteActionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/ExecuteAction/ExecuteActionRequestBuilder.cs @@ -51,7 +51,7 @@ public ExecuteActionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.ExecuteAction.ExecuteActionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.ExecuteAction.ExecuteActionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimPostRequestBody.cs index 340fba64a13..8f49d2183fe 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimPostRequestBody.cs @@ -52,7 +52,7 @@ public ActivateDeviceEsimPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.ActivateDeviceEsim.ActivateDeviceEsimPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.ActivateDeviceEsim.ActivateDeviceEsimPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("carrierUrl", CarrierUrl); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimRequestBuilder.cs index 5f0e9738d8b..f1732acf01c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.ActivateDeviceEsim.ActivateDeviceEsimPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.ActivateDeviceEsim.ActivateDeviceEsimPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/AssignmentFilterEvaluationStatusDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/AssignmentFilterEvaluationStatusDetailsRequestBuilder.cs index 7f26bcecfd4..f56258458d7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/AssignmentFilterEvaluationStatusDetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/AssignmentFilterEvaluationStatusDetailsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentFilterEvaluationStatusDetailsRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/Item/AssignmentFilterEvaluationStatusDetailsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/Item/AssignmentFilterEvaluationStatusDetailsItemRequestBuilder.cs index 87666b9247d..66e159efdfa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/Item/AssignmentFilterEvaluationStatusDetailsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/Item/AssignmentFilterEvaluationStatusDetailsItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsPostRequestBody.cs index 8395c82ba53..b5af42444dc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsPostRequestBody.cs @@ -53,7 +53,7 @@ public ChangeAssignmentsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.ChangeAssignments.ChangeAssignmentsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.ChangeAssignments.ChangeAssignmentsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("deviceAssignmentItems", DeviceAssignmentItems); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsRequestBuilder.cs index f8b6fa1f9ab..16cac272151 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.ChangeAssignments.ChangeAssignmentsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.ChangeAssignments.ChangeAssignmentsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDevicePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDevicePostRequestBody.cs index ab5eb27cc87..09671688442 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDevicePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDevicePostRequestBody.cs @@ -42,7 +42,7 @@ public CleanWindowsDevicePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.CleanWindowsDevice.CleanWindowsDevicePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.CleanWindowsDevice.CleanWindowsDevicePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("keepUserData", KeepUserData); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDeviceRequestBuilder.cs index 668c7624957..4302863a73f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDeviceRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.CleanWindowsDevice.CleanWindowsDevicePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.CleanWindowsDevice.CleanWindowsDevicePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestPostRequestBody.cs index a9cec1fa960..ecd858e123d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateDeviceLogCollectionRequestPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.CreateDeviceLogCollectionRequest.CreateDeviceLogCollectionRequestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.CreateDeviceLogCollectionRequest.CreateDeviceLogCollectionRequestPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("templateType", TemplateType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestRequestBuilder.cs index 6cadba60575..9736f7b227f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestRequestBuilder.cs @@ -51,7 +51,7 @@ public CreateDeviceLogCollectionRequestRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.CreateDeviceLogCollectionRequest.CreateDeviceLogCollectionRequestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.CreateDeviceLogCollectionRequest.CreateDeviceLogCollectionRequestPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDevicePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDevicePostRequestBody.cs index 278421c9125..2d52bb9f2b0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDevicePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDevicePostRequestBody.cs @@ -52,7 +52,7 @@ public DeleteUserFromSharedAppleDevicePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.DeleteUserFromSharedAppleDevice.DeleteUserFromSharedAppleDevicePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.DeleteUserFromSharedAppleDevice.DeleteUserFromSharedAppleDevicePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("userPrincipalName", UserPrincipalName); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDeviceRequestBuilder.cs index eb887ee03c8..79389b05e68 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDeviceRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.DeleteUserFromSharedAppleDevice.DeleteUserFromSharedAppleDevicePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.DeleteUserFromSharedAppleDevice.DeleteUserFromSharedAppleDevicePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Deprovision/DeprovisionPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Deprovision/DeprovisionPostRequestBody.cs index c42835184cb..98e01454901 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Deprovision/DeprovisionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Deprovision/DeprovisionPostRequestBody.cs @@ -52,7 +52,7 @@ public DeprovisionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.Deprovision.DeprovisionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.Deprovision.DeprovisionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deprovisionReason", DeprovisionReason); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Deprovision/DeprovisionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Deprovision/DeprovisionRequestBuilder.cs index 5c0c85de914..d6802b9074e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Deprovision/DeprovisionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Deprovision/DeprovisionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.Deprovision.DeprovisionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.Deprovision.DeprovisionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCategory/DeviceCategoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCategory/DeviceCategoryRequestBuilder.cs index 4cfabf790dd..ca3ad07d023 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCategory/DeviceCategoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCategory/DeviceCategoryRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCategory/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCategory/Ref/RefRequestBuilder.cs index 1d8a8b9b8c8..73b13d59caf 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCategory/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCategory/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate b public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCompliancePolicyStates/DeviceCompliancePolicyStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCompliancePolicyStates/DeviceCompliancePolicyStatesRequestBuilder.cs index 79745e6cdb5..5e3dfd69c2c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCompliancePolicyStates/DeviceCompliancePolicyStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCompliancePolicyStates/DeviceCompliancePolicyStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceCompliancePolicyStatesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCompliancePolicyStates/Item/DeviceCompliancePolicyStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCompliancePolicyStates/Item/DeviceCompliancePolicyStateItemRequestBuilder.cs index 4447715ab40..9afe0d8af89 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCompliancePolicyStates/Item/DeviceCompliancePolicyStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceCompliancePolicyStates/Item/DeviceCompliancePolicyStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceConfigurationStates/DeviceConfigurationStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceConfigurationStates/DeviceConfigurationStatesRequestBuilder.cs index fd34ba1ad20..b0ccf9bee8b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceConfigurationStates/DeviceConfigurationStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceConfigurationStates/DeviceConfigurationStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceConfigurationStatesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceConfigurationStates/Item/DeviceConfigurationStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceConfigurationStates/Item/DeviceConfigurationStateItemRequestBuilder.cs index c7bf04e2648..3f0db38ed83 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceConfigurationStates/Item/DeviceConfigurationStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceConfigurationStates/Item/DeviceConfigurationStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceHealthScriptStates/DeviceHealthScriptStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceHealthScriptStates/DeviceHealthScriptStatesRequestBuilder.cs index 4f3c5d090e0..cb38e73372f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceHealthScriptStates/DeviceHealthScriptStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceHealthScriptStates/DeviceHealthScriptStatesRequestBuilder.cs @@ -81,7 +81,7 @@ public DeviceHealthScriptStatesRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -123,7 +123,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceHealthScriptStates/WithIdWithPolicyIdWithDeviceId/WithIdWithPolicyIdWithDeviceIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceHealthScriptStates/WithIdWithPolicyIdWithDeviceId/WithIdWithPolicyIdWithDeviceIdRequestBuilder.cs index d33afc680dd..8ec06688ac1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceHealthScriptStates/WithIdWithPolicyIdWithDeviceId/WithIdWithPolicyIdWithDeviceIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/DeviceHealthScriptStates/WithIdWithPolicyIdWithDeviceId/WithIdWithPolicyIdWithDeviceIdRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/EnableLostMode/EnableLostModePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/EnableLostMode/EnableLostModePostRequestBody.cs index 01e9ebf6c27..906c173f025 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/EnableLostMode/EnableLostModePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/EnableLostMode/EnableLostModePostRequestBody.cs @@ -84,7 +84,7 @@ public EnableLostModePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.EnableLostMode.EnableLostModePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.EnableLostMode.EnableLostModePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("footer", Footer); writer.WriteStringValue("message", Message); writer.WriteStringValue("phoneNumber", PhoneNumber); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/EnableLostMode/EnableLostModeRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/EnableLostMode/EnableLostModeRequestBuilder.cs index 4729a50a449..f174136153e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/EnableLostMode/EnableLostModeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/EnableLostMode/EnableLostModeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.EnableLostMode.EnableLostModePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.EnableLostMode.EnableLostModePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyGetResponse.cs index 00d05346d1e..b3e9ae67230 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyGetResponse.cs @@ -52,7 +52,7 @@ public GetFileVaultKeyGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.GetFileVaultKey.GetFileVaultKeyGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.GetFileVaultKey.GetFileVaultKeyGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyResponse.cs index 6baac266f61..052c2609e99 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyResponse.cs @@ -20,7 +20,7 @@ public partial class GetFileVaultKeyResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.GetFileVaultKey.GetFileVaultKeyResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.GetFileVaultKey.GetFileVaultKeyResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsGetResponse.cs index eabbd0b61ad..079f803c9a6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetNonCompliantSettingsGetResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.GetNonCompliantSettings.GetNonCompliantSettingsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.GetNonCompliantSettings.GetNonCompliantSettingsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsResponse.cs index d723eba7172..a1b50016e23 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsResponse.cs @@ -20,7 +20,7 @@ public partial class GetNonCompliantSettingsResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.GetNonCompliantSettings.GetNonCompliantSettingsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.GetNonCompliantSettings.GetNonCompliantSettingsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationPostRequestBody.cs index 91947627cad..fed9e16af7b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationPostRequestBody.cs @@ -52,7 +52,7 @@ public InitiateOnDemandProactiveRemediationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.InitiateOnDemandProactiveRemediation.InitiateOnDemandProactiveRemediationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.InitiateOnDemandProactiveRemediation.InitiateOnDemandProactiveRemediationPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("scriptPolicyId", ScriptPolicyId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationRequestBuilder.cs index 9de7b0667ff..de54866a53f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.InitiateOnDemandProactiveRemediation.InitiateOnDemandProactiveRemediationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.InitiateOnDemandProactiveRemediation.InitiateOnDemandProactiveRemediationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs index b2adaa55864..75476232d65 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs @@ -52,7 +52,7 @@ public CreateDownloadUrlPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl.CreateDownloadUrlPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl.CreateDownloadUrlPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs index d45b2568ed2..a37178402f0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs @@ -20,7 +20,7 @@ public partial class CreateDownloadUrlResponse : global::Microsoft.Graph.Beta.De /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl.CreateDownloadUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl.CreateDownloadUrlResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs index aec3f18d8db..b63d7281822 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponse body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponse body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs index b67ac74c58c..c47b57001f1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public LogCollectionRequestsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponse body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponse body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs index 93c061e2379..c81d33a4468 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs @@ -420,7 +420,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -481,7 +481,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/Item/ManagedDeviceMobileAppConfigurationStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/Item/ManagedDeviceMobileAppConfigurationStateItemRequestBuilder.cs index f718783d87d..2d889fea3a9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/Item/ManagedDeviceMobileAppConfigurationStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/Item/ManagedDeviceMobileAppConfigurationStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/ManagedDeviceMobileAppConfigurationStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/ManagedDeviceMobileAppConfigurationStatesRequestBuilder.cs index b22be85bbd7..833cc41af1c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/ManagedDeviceMobileAppConfigurationStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/ManagedDeviceMobileAppConfigurationStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public ManagedDeviceMobileAppConfigurationStatesRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStatePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStatePostRequestBody.cs index 0bc7b5c00cd..d5b8d54c22d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStatePostRequestBody.cs @@ -59,7 +59,7 @@ public OverrideComplianceStatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.OverrideComplianceState.OverrideComplianceStatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.OverrideComplianceState.OverrideComplianceStatePostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("complianceState", ComplianceState); writer.WriteStringValue("remediationUrl", RemediationUrl); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStateRequestBuilder.cs index c42f7082880..ff0dcbad279 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStateRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.OverrideComplianceState.OverrideComplianceStatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.OverrideComplianceState.OverrideComplianceStatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshPostRequestBody.cs index 359c4b1cd9e..565ea370ea6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshPostRequestBody.cs @@ -42,7 +42,7 @@ public PauseConfigurationRefreshPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.PauseConfigurationRefresh.PauseConfigurationRefreshPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.PauseConfigurationRefresh.PauseConfigurationRefreshPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("pauseTimePeriodInMinutes", PauseTimePeriodInMinutes); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshRequestBuilder.cs index c88ff967d86..cc3ca9b0010 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.PauseConfigurationRefresh.PauseConfigurationRefreshPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.PauseConfigurationRefresh.PauseConfigurationRefreshPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundPostRequestBody.cs index 682bcbc0259..86aa3c237fc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundPostRequestBody.cs @@ -52,7 +52,7 @@ public PlayLostModeSoundPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.PlayLostModeSound.PlayLostModeSoundPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.PlayLostModeSound.PlayLostModeSoundPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("durationInMinutes", DurationInMinutes); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundRequestBuilder.cs index eb9036bd1ff..ba9be851629 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.PlayLostModeSound.PlayLostModeSoundPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.PlayLostModeSound.PlayLostModeSoundPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/Item/SecurityBaselineStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/Item/SecurityBaselineStateItemRequestBuilder.cs index ee3124927e0..bbaa4609d9c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/Item/SecurityBaselineStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/Item/SecurityBaselineStateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SecurityBaselineState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SecurityBaselineState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/Item/SecurityBaselineSettingStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/Item/SecurityBaselineSettingStateItemRequestBuilder.cs index 55a2b090aad..19522a06212 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/Item/SecurityBaselineSettingStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/Item/SecurityBaselineSettingStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/SettingStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/SettingStatesRequestBuilder.cs index 05636c02e29..cfb545ea607 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/SettingStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/SettingStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/SecurityBaselineStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/SecurityBaselineStatesRequestBuilder.cs index cccc732a624..155da7ffd99 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/SecurityBaselineStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SecurityBaselineStates/SecurityBaselineStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public SecurityBaselineStatesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SecurityBaselineState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SecurityBaselineState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs index d9c4ce86b42..f1d2f7bfbd8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs @@ -68,7 +68,7 @@ public SendCustomNotificationToCompanyPortalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("notificationBody", NotificationBody); writer.WriteStringValue("notificationTitle", NotificationTitle); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs index 40a7cf5cec5..d9b62de8339 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SetDeviceName/SetDeviceNamePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SetDeviceName/SetDeviceNamePostRequestBody.cs index c4fa78eaba6..82a9fa446e9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SetDeviceName/SetDeviceNamePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SetDeviceName/SetDeviceNamePostRequestBody.cs @@ -52,7 +52,7 @@ public SetDeviceNamePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.SetDeviceName.SetDeviceNamePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.SetDeviceName.SetDeviceNamePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceName", DeviceName); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SetDeviceName/SetDeviceNameRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SetDeviceName/SetDeviceNameRequestBuilder.cs index 0c2eac52d95..95e34d9044e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SetDeviceName/SetDeviceNameRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/SetDeviceName/SetDeviceNameRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.SetDeviceName.SetDeviceNamePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.SetDeviceName.SetDeviceNamePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionPostRequestBody.cs index 7345b9584e4..c65c4bec748 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionPostRequestBody.cs @@ -53,7 +53,7 @@ public TriggerConfigurationManagerActionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.TriggerConfigurationManagerAction.TriggerConfigurationManagerActionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.TriggerConfigurationManagerAction.TriggerConfigurationManagerActionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("configurationManagerAction", ConfigurationManagerAction); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionRequestBuilder.cs index abf1462b485..bf9cd3b15b7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.TriggerConfigurationManagerAction.TriggerConfigurationManagerActionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.TriggerConfigurationManagerAction.TriggerConfigurationManagerActionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountPostRequestBody.cs index 1087a07499b..fc918188b91 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountPostRequestBody.cs @@ -53,7 +53,7 @@ public UpdateWindowsDeviceAccountPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.UpdateWindowsDeviceAccount.UpdateWindowsDeviceAccountPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.UpdateWindowsDeviceAccount.UpdateWindowsDeviceAccountPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("updateWindowsDeviceAccountActionParameter", UpdateWindowsDeviceAccountActionParameter); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountRequestBuilder.cs index da3002f4630..5d14cda6961 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.UpdateWindowsDeviceAccount.UpdateWindowsDeviceAccountPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.UpdateWindowsDeviceAccount.UpdateWindowsDeviceAccountPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanPostRequestBody.cs index 3e28635ce32..1cd09c7c663 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanPostRequestBody.cs @@ -42,7 +42,7 @@ public WindowsDefenderScanPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.WindowsDefenderScan.WindowsDefenderScanPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.WindowsDefenderScan.WindowsDefenderScanPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("quickScan", QuickScan); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanRequestBuilder.cs index fd9e324c6a3..bddce79b8ce 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.WindowsDefenderScan.WindowsDefenderScanPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.WindowsDefenderScan.WindowsDefenderScanPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs index c03c9951aa9..2214f3c4b69 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs @@ -93,7 +93,7 @@ public DetectedMalwareStateRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs index 00b3da60cce..437a56d8c5f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs index 01c71bbfafd..83575f0d843 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsProtectionState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsProtectionState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Wipe/WipePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Wipe/WipePostRequestBody.cs index bc532c3dd20..12de0a8257c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Wipe/WipePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Wipe/WipePostRequestBody.cs @@ -83,7 +83,7 @@ public WipePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.Wipe.WipePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.Wipe.WipePostRequestBody(); } /// @@ -108,7 +108,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("keepEnrollmentData", KeepEnrollmentData); writer.WriteBoolValue("keepUserData", KeepUserData); writer.WriteStringValue("macOsUnlockCode", MacOsUnlockCode); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Wipe/WipeRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Wipe/WipeRequestBuilder.cs index f722f991e57..0572c600586 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Wipe/WipeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/Item/Wipe/WipeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.Wipe.WipePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.Item.Wipe.WipePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/ManagedDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/ManagedDevicesRequestBuilder.cs index f29a2d40571..c932741d737 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/ManagedDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/ManagedDevicesRequestBuilder.cs @@ -129,7 +129,7 @@ public ManagedDevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/MoveDevicesToOU/MoveDevicesToOUPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/MoveDevicesToOU/MoveDevicesToOUPostRequestBody.cs index 0d7193c8d3f..731c7906063 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/MoveDevicesToOU/MoveDevicesToOUPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/MoveDevicesToOU/MoveDevicesToOUPostRequestBody.cs @@ -68,7 +68,7 @@ public MoveDevicesToOUPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.MoveDevicesToOU.MoveDevicesToOUPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.MoveDevicesToOU.MoveDevicesToOUPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("deviceIds", DeviceIds); writer.WriteStringValue("organizationalUnitPath", OrganizationalUnitPath); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/MoveDevicesToOU/MoveDevicesToOURequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/MoveDevicesToOU/MoveDevicesToOURequestBuilder.cs index 0b20efa985e..6a8a1511652 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/MoveDevicesToOU/MoveDevicesToOURequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/MoveDevicesToOU/MoveDevicesToOURequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Manage public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.MoveDevicesToOU.MoveDevicesToOUPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.MoveDevicesToOU.MoveDevicesToOUPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse.cs index cf48c33a4ea..330072175e7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse.cs index 5d620337122..f21c118ea12 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse.cs @@ -20,7 +20,7 @@ public partial class RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ManagedDevices.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelConfigurations/Item/MicrosoftTunnelConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelConfigurations/Item/MicrosoftTunnelConfigurationItemRequestBuilder.cs index 9432656f1ad..0f3edd40a30 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelConfigurations/Item/MicrosoftTunnelConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelConfigurations/Item/MicrosoftTunnelConfigurationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelConfigurations/MicrosoftTunnelConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelConfigurations/MicrosoftTunnelConfigurationsRequestBuilder.cs index 149744e3528..0054a5464d5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelConfigurations/MicrosoftTunnelConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelConfigurations/MicrosoftTunnelConfigurationsRequestBuilder.cs @@ -93,7 +93,7 @@ public MicrosoftTunnelConfigurationsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelHealthThresholds/Item/MicrosoftTunnelHealthThresholdItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelHealthThresholds/Item/MicrosoftTunnelHealthThresholdItemRequestBuilder.cs index 57b52212cc6..affd6539e43 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelHealthThresholds/Item/MicrosoftTunnelHealthThresholdItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelHealthThresholds/Item/MicrosoftTunnelHealthThresholdItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelHealthThreshold body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelHealthThreshold body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelHealthThresholds/MicrosoftTunnelHealthThresholdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelHealthThresholds/MicrosoftTunnelHealthThresholdsRequestBuilder.cs index 96909914c69..12efce85651 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelHealthThresholds/MicrosoftTunnelHealthThresholdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelHealthThresholds/MicrosoftTunnelHealthThresholdsRequestBuilder.cs @@ -93,7 +93,7 @@ public MicrosoftTunnelHealthThresholdsRequestBuilder(string rawUrl, IRequestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelHealthThreshold body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelHealthThreshold body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs index 673083ab158..6c54a7ba3db 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs @@ -52,7 +52,7 @@ public CreateDownloadUrlPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelServerLogCollectionResponses.Item.CreateDownloadUrl.CreateDownloadUrlPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelServerLogCollectionResponses.Item.CreateDownloadUrl.CreateDownloadUrlPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs index f920e1704b2..012dfe6a215 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs @@ -20,7 +20,7 @@ public partial class CreateDownloadUrlResponse : global::Microsoft.Graph.Beta.De /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelServerLogCollectionResponses.Item.CreateDownloadUrl.CreateDownloadUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelServerLogCollectionResponses.Item.CreateDownloadUrl.CreateDownloadUrlResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/GenerateDownloadUrl/GenerateDownloadUrlPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/GenerateDownloadUrl/GenerateDownloadUrlPostResponse.cs index b6c707d4cdc..d7000737b48 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/GenerateDownloadUrl/GenerateDownloadUrlPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/GenerateDownloadUrl/GenerateDownloadUrlPostResponse.cs @@ -52,7 +52,7 @@ public GenerateDownloadUrlPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelServerLogCollectionResponses.Item.GenerateDownloadUrl.GenerateDownloadUrlPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelServerLogCollectionResponses.Item.GenerateDownloadUrl.GenerateDownloadUrlPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/GenerateDownloadUrl/GenerateDownloadUrlResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/GenerateDownloadUrl/GenerateDownloadUrlResponse.cs index 369a729283d..4deaf74e3a5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/GenerateDownloadUrl/GenerateDownloadUrlResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/GenerateDownloadUrl/GenerateDownloadUrlResponse.cs @@ -20,7 +20,7 @@ public partial class GenerateDownloadUrlResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelServerLogCollectionResponses.Item.GenerateDownloadUrl.GenerateDownloadUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelServerLogCollectionResponses.Item.GenerateDownloadUrl.GenerateDownloadUrlResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/MicrosoftTunnelServerLogCollectionResponseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/MicrosoftTunnelServerLogCollectionResponseItemRequestBuilder.cs index 8cdfa113fcd..b7365a7330d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/MicrosoftTunnelServerLogCollectionResponseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/Item/MicrosoftTunnelServerLogCollectionResponseItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServerLogCollectionResponse body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServerLogCollectionResponse body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/MicrosoftTunnelServerLogCollectionResponsesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/MicrosoftTunnelServerLogCollectionResponsesRequestBuilder.cs index 3eeb2e8ea52..3e116f0dd4b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/MicrosoftTunnelServerLogCollectionResponsesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelServerLogCollectionResponses/MicrosoftTunnelServerLogCollectionResponsesRequestBuilder.cs @@ -93,7 +93,7 @@ public MicrosoftTunnelServerLogCollectionResponsesRequestBuilder(string rawUrl, public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServerLogCollectionResponse body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServerLogCollectionResponse body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelConfiguration/MicrosoftTunnelConfigurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelConfiguration/MicrosoftTunnelConfigurationRequestBuilder.cs index df3eaf0944e..0e1b2243b57 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelConfiguration/MicrosoftTunnelConfigurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelConfiguration/MicrosoftTunnelConfigurationRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/CreateServerLogCollectionRequest/CreateServerLogCollectionRequestPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/CreateServerLogCollectionRequest/CreateServerLogCollectionRequestPostRequestBody.cs index d2a4e2087af..e496bff70b7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/CreateServerLogCollectionRequest/CreateServerLogCollectionRequestPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/CreateServerLogCollectionRequest/CreateServerLogCollectionRequestPostRequestBody.cs @@ -48,7 +48,7 @@ public CreateServerLogCollectionRequestPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.CreateServerLogCollectionRequest.CreateServerLogCollectionRequestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.CreateServerLogCollectionRequest.CreateServerLogCollectionRequestPostRequestBody(); } /// @@ -69,7 +69,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/CreateServerLogCollectionRequest/CreateServerLogCollectionRequestRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/CreateServerLogCollectionRequest/CreateServerLogCollectionRequestRequestBuilder.cs index fd2b9155ba1..094a13f1da7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/CreateServerLogCollectionRequest/CreateServerLogCollectionRequestRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/CreateServerLogCollectionRequest/CreateServerLogCollectionRequestRequestBuilder.cs @@ -51,7 +51,7 @@ public CreateServerLogCollectionRequestRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.CreateServerLogCollectionRequest.CreateServerLogCollectionRequestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.CreateServerLogCollectionRequest.CreateServerLogCollectionRequestPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GenerateServerLogCollectionRequest/GenerateServerLogCollectionRequestPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GenerateServerLogCollectionRequest/GenerateServerLogCollectionRequestPostRequestBody.cs index f709ee20860..9f9cbb663f6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GenerateServerLogCollectionRequest/GenerateServerLogCollectionRequestPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GenerateServerLogCollectionRequest/GenerateServerLogCollectionRequestPostRequestBody.cs @@ -48,7 +48,7 @@ public GenerateServerLogCollectionRequestPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GenerateServerLogCollectionRequest.GenerateServerLogCollectionRequestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GenerateServerLogCollectionRequest.GenerateServerLogCollectionRequestPostRequestBody(); } /// @@ -69,7 +69,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GenerateServerLogCollectionRequest/GenerateServerLogCollectionRequestRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GenerateServerLogCollectionRequest/GenerateServerLogCollectionRequestRequestBuilder.cs index c908694b1ab..9bc600f7abe 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GenerateServerLogCollectionRequest/GenerateServerLogCollectionRequestRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GenerateServerLogCollectionRequest/GenerateServerLogCollectionRequestRequestBuilder.cs @@ -51,7 +51,7 @@ public GenerateServerLogCollectionRequestRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GenerateServerLogCollectionRequest.GenerateServerLogCollectionRequestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GenerateServerLogCollectionRequest.GenerateServerLogCollectionRequestPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostRequestBody.cs index cdb6484ef4c..7811cba694a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostRequestBody.cs @@ -64,7 +64,7 @@ public GetHealthMetricTimeSeriesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesPostRequestBody(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("metricName", MetricName); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostResponse.cs index 600236c68de..2969281ba36 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetHealthMetricTimeSeriesPostResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesRequestBuilder.cs index 292ec5a0781..ae1814992e1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesRequestBuilder.cs @@ -50,7 +50,7 @@ public GetHealthMetricTimeSeriesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsGetHealthMetricTimeSeriesPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetHealthMetricTimeSeriesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesResponse.cs index ccf9b0b3a3f..14ba78261fa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetricTimeSeries/GetHealthMetricTimeSeriesResponse.cs @@ -20,7 +20,7 @@ public partial class GetHealthMetricTimeSeriesResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetricTimeSeries.GetHealthMetricTimeSeriesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsPostRequestBody.cs index 3a182330878..20983242ad4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsPostRequestBody.cs @@ -52,7 +52,7 @@ public GetHealthMetricsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetrics.GetHealthMetricsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetrics.GetHealthMetricsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("metricNames", MetricNames); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsPostResponse.cs index 0024184e917..0d10d5c0317 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetHealthMetricsPostResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetrics.GetHealthMetricsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetrics.GetHealthMetricsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsRequestBuilder.cs index 6654e544ba3..68a6fe0b248 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetHealthMetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetHealthMetricsPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetrics.GetHealthMetricsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetHealthMetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetrics.GetHealthMetricsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetrics.GetHealthMetricsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsResponse.cs index 9c93b64c146..025f4a929aa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/GetHealthMetrics/GetHealthMetricsResponse.cs @@ -20,7 +20,7 @@ public partial class GetHealthMetricsResponse : global::Microsoft.Graph.Beta.Dev /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetrics.GetHealthMetricsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.MicrosoftTunnelSites.Item.MicrosoftTunnelServers.Item.GetHealthMetrics.GetHealthMetricsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/MicrosoftTunnelServerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/MicrosoftTunnelServerItemRequestBuilder.cs index a3cae9166ce..fa17c08e99c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/MicrosoftTunnelServerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/Item/MicrosoftTunnelServerItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/MicrosoftTunnelServersRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/MicrosoftTunnelServersRequestBuilder.cs index 5f3b5e55bee..b7e150748de 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/MicrosoftTunnelServersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelServers/MicrosoftTunnelServersRequestBuilder.cs @@ -93,7 +93,7 @@ public MicrosoftTunnelServersRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelSiteItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelSiteItemRequestBuilder.cs index fceefe56974..a2ba19d0330 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelSiteItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/Item/MicrosoftTunnelSiteItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelSite body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelSite body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/MicrosoftTunnelSitesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/MicrosoftTunnelSitesRequestBuilder.cs index 03ce3511c8e..e7689d4ef29 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/MicrosoftTunnelSitesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MicrosoftTunnelSites/MicrosoftTunnelSitesRequestBuilder.cs @@ -93,7 +93,7 @@ public MicrosoftTunnelSitesRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelSite body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MicrosoftTunnelSite body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/AppLogCollectionRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/AppLogCollectionRequestsRequestBuilder.cs index b2453d21ade..71dbbd6c176 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/AppLogCollectionRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/AppLogCollectionRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public AppLogCollectionRequestsRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AppLogCollectionRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AppLogCollectionRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Item/AppLogCollectionRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Item/AppLogCollectionRequestItemRequestBuilder.cs index 7e111fee7c7..72856ffd429 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Item/AppLogCollectionRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Item/AppLogCollectionRequestItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AppLogCollectionRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppLogCollectionRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/MobileAppTroubleshootingEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/MobileAppTroubleshootingEventItemRequestBuilder.cs index 740742883fa..9e1c1a12cd6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/MobileAppTroubleshootingEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/Item/MobileAppTroubleshootingEventItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/MobileAppTroubleshootingEventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/MobileAppTroubleshootingEventsRequestBuilder.cs index 67a3026cd89..4471089d526 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/MobileAppTroubleshootingEventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MobileAppTroubleshootingEvents/MobileAppTroubleshootingEventsRequestBuilder.cs @@ -93,7 +93,7 @@ public MobileAppTroubleshootingEventsRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MobileThreatDefenseConnectors/Item/MobileThreatDefenseConnectorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MobileThreatDefenseConnectors/Item/MobileThreatDefenseConnectorItemRequestBuilder.cs index 51677ba0808..14ac231999c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MobileThreatDefenseConnectors/Item/MobileThreatDefenseConnectorItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MobileThreatDefenseConnectors/Item/MobileThreatDefenseConnectorItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileThreatDefenseConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileThreatDefenseConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/MobileThreatDefenseConnectors/MobileThreatDefenseConnectorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/MobileThreatDefenseConnectors/MobileThreatDefenseConnectorsRequestBuilder.cs index 12b4ac70103..d06493a7bca 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/MobileThreatDefenseConnectors/MobileThreatDefenseConnectorsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/MobileThreatDefenseConnectors/MobileThreatDefenseConnectorsRequestBuilder.cs @@ -93,7 +93,7 @@ public MobileThreatDefenseConnectorsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileThreatDefenseConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileThreatDefenseConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/AlertRecordsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/AlertRecordsRequestBuilder.cs index ea12af25ff1..3dafc683efa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/AlertRecordsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/AlertRecordsRequestBuilder.cs @@ -106,7 +106,7 @@ public AlertRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/Item/AlertRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/Item/AlertRecordItemRequestBuilder.cs index aed08112da3..54f1742c9f2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/Item/AlertRecordItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/Item/AlertRecordItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/ChangeAlertRecordsPortalNotificationAsSentPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/ChangeAlertRecordsPortalNotificationAsSentPostRequestBody.cs index 990afa2ccde..e43caf89cb2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/ChangeAlertRecordsPortalNotificationAsSentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/ChangeAlertRecordsPortalNotificationAsSentPostRequestBody.cs @@ -52,7 +52,7 @@ public ChangeAlertRecordsPortalNotificationAsSentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent.ChangeAlertRecordsPortalNotificationAsSentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent.ChangeAlertRecordsPortalNotificationAsSentPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("alertRecordIds", AlertRecordIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSentRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSentRequestBuilder.cs index 989dcc45b12..c793a005ccf 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Monito public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent.ChangeAlertRecordsPortalNotificationAsSentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent.ChangeAlertRecordsPortalNotificationAsSentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsGetResponse.cs index 9c88dd0cdaf..5a4fb3bf7e4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsGetResponse.cs @@ -37,7 +37,7 @@ public partial class GetPortalNotificationsGetResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementGetPortalNotifications.GetPortalNotificationsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementGetPortalNotifications.GetPortalNotificationsGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsResponse.cs index 579c650e5d6..01782b5fd21 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsResponse.cs @@ -20,7 +20,7 @@ public partial class GetPortalNotificationsResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementGetPortalNotifications.GetPortalNotificationsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementGetPortalNotifications.GetPortalNotificationsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRules/AlertRulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRules/AlertRulesRequestBuilder.cs index f723030cca1..f2eba1bce6e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRules/AlertRulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRules/AlertRulesRequestBuilder.cs @@ -95,7 +95,7 @@ public AlertRulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRules/Item/AlertRuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRules/Item/AlertRuleItemRequestBuilder.cs index d2d782f8aca..7a28c69cbf3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRules/Item/AlertRuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/AlertRules/Item/AlertRuleItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/MonitoringRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/MonitoringRequestBuilder.cs index 790e885db28..3b0b852ab07 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/MonitoringRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Monitoring/MonitoringRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagement.Monitoring body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagement.Monitoring body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/NdesConnectors/Item/NdesConnectorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/NdesConnectors/Item/NdesConnectorItemRequestBuilder.cs index 07366d28cdf..57fab35e074 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/NdesConnectors/Item/NdesConnectorItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/NdesConnectors/Item/NdesConnectorItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.NdesConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.NdesConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/NdesConnectors/NdesConnectorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/NdesConnectors/NdesConnectorsRequestBuilder.cs index cfd88f47589..dbe7f2baefb 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/NdesConnectors/NdesConnectorsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/NdesConnectors/NdesConnectorsRequestBuilder.cs @@ -93,7 +93,7 @@ public NdesConnectorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.NdesConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.NdesConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/Item/LocalizedNotificationMessages/Item/LocalizedNotificationMessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/Item/LocalizedNotificationMessages/Item/LocalizedNotificationMessageItemRequestBuilder.cs index 31cc3722eaa..eed519ecaa5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/Item/LocalizedNotificationMessages/Item/LocalizedNotificationMessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/Item/LocalizedNotificationMessages/Item/LocalizedNotificationMessageItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.LocalizedNotificationMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.LocalizedNotificationMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/Item/LocalizedNotificationMessages/LocalizedNotificationMessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/Item/LocalizedNotificationMessages/LocalizedNotificationMessagesRequestBuilder.cs index 4035ca1349b..cde87d2a044 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/Item/LocalizedNotificationMessages/LocalizedNotificationMessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/Item/LocalizedNotificationMessages/LocalizedNotificationMessagesRequestBuilder.cs @@ -93,7 +93,7 @@ public LocalizedNotificationMessagesRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.LocalizedNotificationMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.LocalizedNotificationMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/Item/NotificationMessageTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/Item/NotificationMessageTemplateItemRequestBuilder.cs index 5148d5f44de..f73e34fe2a9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/Item/NotificationMessageTemplateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/Item/NotificationMessageTemplateItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.NotificationMessageTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.NotificationMessageTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/NotificationMessageTemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/NotificationMessageTemplatesRequestBuilder.cs index b654bb2a186..222b554dd1d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/NotificationMessageTemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/NotificationMessageTemplates/NotificationMessageTemplatesRequestBuilder.cs @@ -93,7 +93,7 @@ public NotificationMessageTemplatesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.NotificationMessageTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.NotificationMessageTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/Item/OperationApprovalPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/Item/OperationApprovalPolicyItemRequestBuilder.cs index 571566ab0f6..d0c641f4a8e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/Item/OperationApprovalPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/Item/OperationApprovalPolicyItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OperationApprovalPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OperationApprovalPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/OperationApprovalPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/OperationApprovalPoliciesRequestBuilder.cs index 4aec90d83ae..a7aca1b80af 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/OperationApprovalPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/OperationApprovalPoliciesRequestBuilder.cs @@ -105,7 +105,7 @@ public OperationApprovalPoliciesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OperationApprovalPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OperationApprovalPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveApprovableOperations/RetrieveApprovableOperationsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveApprovableOperations/RetrieveApprovableOperationsGetResponse.cs index 7e631549fa2..dba03271dc7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveApprovableOperations/RetrieveApprovableOperationsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveApprovableOperations/RetrieveApprovableOperationsGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrieveApprovableOperationsGetResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalPolicies.RetrieveApprovableOperations.RetrieveApprovableOperationsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalPolicies.RetrieveApprovableOperations.RetrieveApprovableOperationsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveApprovableOperations/RetrieveApprovableOperationsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveApprovableOperations/RetrieveApprovableOperationsResponse.cs index 709282058a5..c9ef33021ac 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveApprovableOperations/RetrieveApprovableOperationsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveApprovableOperations/RetrieveApprovableOperationsResponse.cs @@ -20,7 +20,7 @@ public partial class RetrieveApprovableOperationsResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalPolicies.RetrieveApprovableOperations.RetrieveApprovableOperationsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalPolicies.RetrieveApprovableOperations.RetrieveApprovableOperationsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveOperationsRequiringApproval/RetrieveOperationsRequiringApprovalGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveOperationsRequiringApproval/RetrieveOperationsRequiringApprovalGetResponse.cs index 4ca9e406886..ad0b0fe414c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveOperationsRequiringApproval/RetrieveOperationsRequiringApprovalGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveOperationsRequiringApproval/RetrieveOperationsRequiringApprovalGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrieveOperationsRequiringApprovalGetResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalPolicies.RetrieveOperationsRequiringApproval.RetrieveOperationsRequiringApprovalGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalPolicies.RetrieveOperationsRequiringApproval.RetrieveOperationsRequiringApprovalGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveOperationsRequiringApproval/RetrieveOperationsRequiringApprovalResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveOperationsRequiringApproval/RetrieveOperationsRequiringApprovalResponse.cs index 0a6ae05b003..efff25d5b94 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveOperationsRequiringApproval/RetrieveOperationsRequiringApprovalResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalPolicies/RetrieveOperationsRequiringApproval/RetrieveOperationsRequiringApprovalResponse.cs @@ -20,7 +20,7 @@ public partial class RetrieveOperationsRequiringApprovalResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalPolicies.RetrieveOperationsRequiringApproval.RetrieveOperationsRequiringApprovalResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalPolicies.RetrieveOperationsRequiringApproval.RetrieveOperationsRequiringApprovalResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/CancelMyRequest/CancelMyRequestPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/CancelMyRequest/CancelMyRequestPostRequestBody.cs index c1a38abd95e..4198838b7ee 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/CancelMyRequest/CancelMyRequestPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/CancelMyRequest/CancelMyRequestPostRequestBody.cs @@ -52,7 +52,7 @@ public CancelMyRequestPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.CancelMyRequest.CancelMyRequestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.CancelMyRequest.CancelMyRequestPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/CancelMyRequest/CancelMyRequestRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/CancelMyRequest/CancelMyRequestRequestBuilder.cs index b8be05b2ad1..39bad5f7c86 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/CancelMyRequest/CancelMyRequestRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/CancelMyRequest/CancelMyRequestRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Operat public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.CancelMyRequest.CancelMyRequestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.CancelMyRequest.CancelMyRequestPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApprovePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApprovePostRequestBody.cs index 375f5afa9f6..b850ae9d8a3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApprovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApprovePostRequestBody.cs @@ -59,7 +59,7 @@ public ApprovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Approve.ApprovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Approve.ApprovePostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("approvalSource", ApprovalSource); writer.WriteStringValue("justification", Justification); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApprovePostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApprovePostResponse.cs index 7dcd4b49745..baebe036205 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApprovePostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApprovePostResponse.cs @@ -52,7 +52,7 @@ public ApprovePostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Approve.ApprovePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Approve.ApprovePostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApproveRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApproveRequestBuilder.cs index bc492612107..862a86e20e0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApproveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApproveRequestBuilder.cs @@ -50,7 +50,7 @@ public ApproveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsApprovePostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Approve.ApprovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public ApproveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Approve.ApprovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Approve.ApprovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApproveResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApproveResponse.cs index 084b616773b..0a9ffaa4cf5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApproveResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Approve/ApproveResponse.cs @@ -20,7 +20,7 @@ public partial class ApproveResponse : global::Microsoft.Graph.Beta.DeviceManage /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Approve.ApproveResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Approve.ApproveResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalPostRequestBody.cs index b75a0bd3800..78ab527d5a9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalPostRequestBody.cs @@ -59,7 +59,7 @@ public CancelApprovalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.CancelApproval.CancelApprovalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.CancelApproval.CancelApprovalPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("approvalSource", ApprovalSource); writer.WriteStringValue("justification", Justification); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalPostResponse.cs index 954f520d82d..e35a2f67ee9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalPostResponse.cs @@ -52,7 +52,7 @@ public CancelApprovalPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.CancelApproval.CancelApprovalPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.CancelApproval.CancelApprovalPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalRequestBuilder.cs index 2802a1e30ed..bfa9fa31bcc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalRequestBuilder.cs @@ -50,7 +50,7 @@ public CancelApprovalRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsCancelApprovalPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.CancelApproval.CancelApprovalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CancelApprovalRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.CancelApproval.CancelApprovalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.CancelApproval.CancelApprovalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalResponse.cs index 7438fe8d9ef..a81f01e50b1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/CancelApproval/CancelApprovalResponse.cs @@ -20,7 +20,7 @@ public partial class CancelApprovalResponse : global::Microsoft.Graph.Beta.Devic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.CancelApproval.CancelApprovalResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.CancelApproval.CancelApprovalResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/OperationApprovalRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/OperationApprovalRequestItemRequestBuilder.cs index 2d17283ad16..37a7b5438df 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/OperationApprovalRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/OperationApprovalRequestItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OperationApprovalRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OperationApprovalRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectPostRequestBody.cs index 0734af7e467..e46381d7a13 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectPostRequestBody.cs @@ -59,7 +59,7 @@ public RejectPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Reject.RejectPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Reject.RejectPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("approvalSource", ApprovalSource); writer.WriteStringValue("justification", Justification); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectPostResponse.cs index b2981083db4..bc469e2ab51 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectPostResponse.cs @@ -52,7 +52,7 @@ public RejectPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Reject.RejectPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Reject.RejectPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectRequestBuilder.cs index aab66e76e2e..29e34e5818d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectRequestBuilder.cs @@ -50,7 +50,7 @@ public RejectRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsRejectPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Reject.RejectPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RejectRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Reject.RejectPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Reject.RejectPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectResponse.cs index 5eadeeb34e0..0d0f4bcc707 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/Item/Reject/RejectResponse.cs @@ -20,7 +20,7 @@ public partial class RejectResponse : global::Microsoft.Graph.Beta.DeviceManagem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Reject.RejectResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.Item.Reject.RejectResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/OperationApprovalRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/OperationApprovalRequestsRequestBuilder.cs index 8bf01b4d385..ee8283ffc66 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/OperationApprovalRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/OperationApprovalRequestsRequestBuilder.cs @@ -112,7 +112,7 @@ public OperationApprovalRequestsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OperationApprovalRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OperationApprovalRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveMyRequests/RetrieveMyRequestsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveMyRequests/RetrieveMyRequestsGetResponse.cs index 8d54ab0f8cf..f41be75e069 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveMyRequests/RetrieveMyRequestsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveMyRequests/RetrieveMyRequestsGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrieveMyRequestsGetResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.RetrieveMyRequests.RetrieveMyRequestsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.RetrieveMyRequests.RetrieveMyRequestsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveMyRequests/RetrieveMyRequestsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveMyRequests/RetrieveMyRequestsResponse.cs index 45b4e02a90f..e7cb118d0e7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveMyRequests/RetrieveMyRequestsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveMyRequests/RetrieveMyRequestsResponse.cs @@ -20,7 +20,7 @@ public partial class RetrieveMyRequestsResponse : global::Microsoft.Graph.Beta.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.RetrieveMyRequests.RetrieveMyRequestsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.RetrieveMyRequests.RetrieveMyRequestsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveRequestStatus/RetrieveRequestStatusPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveRequestStatus/RetrieveRequestStatusPostRequestBody.cs index b2fc0886e26..368c73fd914 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveRequestStatus/RetrieveRequestStatusPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveRequestStatus/RetrieveRequestStatusPostRequestBody.cs @@ -68,7 +68,7 @@ public RetrieveRequestStatusPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.RetrieveRequestStatus.RetrieveRequestStatusPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.RetrieveRequestStatus.RetrieveRequestStatusPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("entityId", EntityId); writer.WriteStringValue("entityType", EntityType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveRequestStatus/RetrieveRequestStatusRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveRequestStatus/RetrieveRequestStatusRequestBuilder.cs index 2ea59cddcdb..f9cb14df038 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveRequestStatus/RetrieveRequestStatusRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/OperationApprovalRequests/RetrieveRequestStatus/RetrieveRequestStatusRequestBuilder.cs @@ -51,7 +51,7 @@ public RetrieveRequestStatusRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.RetrieveRequestStatus.RetrieveRequestStatusPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.OperationApprovalRequests.RetrieveRequestStatus.RetrieveRequestStatusPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/PrivilegeManagementElevations/Item/PrivilegeManagementElevationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/PrivilegeManagementElevations/Item/PrivilegeManagementElevationItemRequestBuilder.cs index a4d0a6ec99a..32d3e9ef675 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/PrivilegeManagementElevations/Item/PrivilegeManagementElevationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/PrivilegeManagementElevations/Item/PrivilegeManagementElevationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/PrivilegeManagementElevations/PrivilegeManagementElevationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/PrivilegeManagementElevations/PrivilegeManagementElevationsRequestBuilder.cs index 8faf18d6743..81619404dd1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/PrivilegeManagementElevations/PrivilegeManagementElevationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/PrivilegeManagementElevations/PrivilegeManagementElevationsRequestBuilder.cs @@ -93,7 +93,7 @@ public PrivilegeManagementElevationsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RemoteActionAudits/Item/RemoteActionAuditItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RemoteActionAudits/Item/RemoteActionAuditItemRequestBuilder.cs index 60b4f251762..8e7709d8b51 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RemoteActionAudits/Item/RemoteActionAuditItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RemoteActionAudits/Item/RemoteActionAuditItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RemoteActionAudit body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RemoteActionAudit body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RemoteActionAudits/RemoteActionAuditsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RemoteActionAudits/RemoteActionAuditsRequestBuilder.cs index 3738d43837e..9c7187e5c24 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RemoteActionAudits/RemoteActionAuditsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RemoteActionAudits/RemoteActionAuditsRequestBuilder.cs @@ -93,7 +93,7 @@ public RemoteActionAuditsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RemoteActionAudit body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RemoteActionAudit body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RemoteAssistancePartners/Item/RemoteAssistancePartnerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RemoteAssistancePartners/Item/RemoteAssistancePartnerItemRequestBuilder.cs index d91f9967221..d67d45ed271 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RemoteAssistancePartners/Item/RemoteAssistancePartnerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RemoteAssistancePartners/Item/RemoteAssistancePartnerItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RemoteAssistancePartner body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RemoteAssistancePartner body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RemoteAssistancePartners/RemoteAssistancePartnersRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RemoteAssistancePartners/RemoteAssistancePartnersRequestBuilder.cs index ebf43cd18d2..77dcbfd5bab 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RemoteAssistancePartners/RemoteAssistancePartnersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RemoteAssistancePartners/RemoteAssistancePartnersRequestBuilder.cs @@ -93,7 +93,7 @@ public RemoteAssistancePartnersRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RemoteAssistancePartner body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RemoteAssistancePartner body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RemoteAssistanceSettings/RemoteAssistanceSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RemoteAssistanceSettings/RemoteAssistanceSettingsRequestBuilder.cs index 46983e83c2b..3af45924eac 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RemoteAssistanceSettings/RemoteAssistanceSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RemoteAssistanceSettings/RemoteAssistanceSettingsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RemoteAssistanceSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RemoteAssistanceSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/CachedReportConfigurations/CachedReportConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/CachedReportConfigurations/CachedReportConfigurationsRequestBuilder.cs index 84085dc37de..c6d19abb2c9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/CachedReportConfigurations/CachedReportConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/CachedReportConfigurations/CachedReportConfigurationsRequestBuilder.cs @@ -93,7 +93,7 @@ public CachedReportConfigurationsRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementCachedReportConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementCachedReportConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/CachedReportConfigurations/Item/DeviceManagementCachedReportConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/CachedReportConfigurations/Item/DeviceManagementCachedReportConfigurationItemRequestBuilder.cs index e8e21b3a849..aded96dd1e2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/CachedReportConfigurations/Item/DeviceManagementCachedReportConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/CachedReportConfigurations/Item/DeviceManagementCachedReportConfigurationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementCachedReportConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementCachedReportConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/ExportJobs/ExportJobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/ExportJobs/ExportJobsRequestBuilder.cs index f12fa153f10..eaaa72dfb31 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/ExportJobs/ExportJobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/ExportJobs/ExportJobsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExportJobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementExportJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementExportJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/ExportJobs/Item/DeviceManagementExportJobItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/ExportJobs/Item/DeviceManagementExportJobItemRequestBuilder.cs index 8636fe6047b..1857186f1fe 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/ExportJobs/Item/DeviceManagementExportJobItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/ExportJobs/Item/DeviceManagementExportJobItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementExportJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementExportJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareReport/GetActiveMalwareReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareReport/GetActiveMalwareReportPostRequestBody.cs index f7e51528b71..f7923f24369 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareReport/GetActiveMalwareReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareReport/GetActiveMalwareReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetActiveMalwareReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetActiveMalwareReport.GetActiveMalwareReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetActiveMalwareReport.GetActiveMalwareReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareReport/GetActiveMalwareReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareReport/GetActiveMalwareReportRequestBuilder.cs index 199f6591652..b1ef17fc569 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareReport/GetActiveMalwareReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareReport/GetActiveMalwareReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetActiveMalwareReportRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetActiveMalwareReport.GetActiveMalwareReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetActiveMalwareReport.GetActiveMalwareReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareSummaryReport/GetActiveMalwareSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareSummaryReport/GetActiveMalwareSummaryReportPostRequestBody.cs index 39210ad7eac..41ae8f644c5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareSummaryReport/GetActiveMalwareSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareSummaryReport/GetActiveMalwareSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetActiveMalwareSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetActiveMalwareSummaryReport.GetActiveMalwareSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetActiveMalwareSummaryReport.GetActiveMalwareSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareSummaryReport/GetActiveMalwareSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareSummaryReport/GetActiveMalwareSummaryReportRequestBuilder.cs index b3ff980b35f..4ee58ed0291 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareSummaryReport/GetActiveMalwareSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetActiveMalwareSummaryReport/GetActiveMalwareSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetActiveMalwareSummaryReportRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetActiveMalwareSummaryReport.GetActiveMalwareSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetActiveMalwareSummaryReport.GetActiveMalwareSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAllCertificatesReport/GetAllCertificatesReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAllCertificatesReport/GetAllCertificatesReportPostRequestBody.cs index b41894a03c5..9d424859eae 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAllCertificatesReport/GetAllCertificatesReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAllCertificatesReport/GetAllCertificatesReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetAllCertificatesReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetAllCertificatesReport.GetAllCertificatesReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetAllCertificatesReport.GetAllCertificatesReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAllCertificatesReport/GetAllCertificatesReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAllCertificatesReport/GetAllCertificatesReportRequestBuilder.cs index 59ac886b6f2..6633f4fae3a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAllCertificatesReport/GetAllCertificatesReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAllCertificatesReport/GetAllCertificatesReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetAllCertificatesReportRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetAllCertificatesReport.GetAllCertificatesReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetAllCertificatesReport.GetAllCertificatesReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppStatusOverviewReport/GetAppStatusOverviewReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppStatusOverviewReport/GetAppStatusOverviewReportPostRequestBody.cs index 26d392251b8..7f00eccc468 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppStatusOverviewReport/GetAppStatusOverviewReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppStatusOverviewReport/GetAppStatusOverviewReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetAppStatusOverviewReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetAppStatusOverviewReport.GetAppStatusOverviewReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetAppStatusOverviewReport.GetAppStatusOverviewReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppStatusOverviewReport/GetAppStatusOverviewReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppStatusOverviewReport/GetAppStatusOverviewReportRequestBuilder.cs index 59fc1d6bc0a..2a578be4ed2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppStatusOverviewReport/GetAppStatusOverviewReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppStatusOverviewReport/GetAppStatusOverviewReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetAppStatusOverviewReportRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetAppStatusOverviewReport.GetAppStatusOverviewReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetAppStatusOverviewReport.GetAppStatusOverviewReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppsInstallSummaryReport/GetAppsInstallSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppsInstallSummaryReport/GetAppsInstallSummaryReportPostRequestBody.cs index 6881e74a80b..143cf0d64bc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppsInstallSummaryReport/GetAppsInstallSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppsInstallSummaryReport/GetAppsInstallSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetAppsInstallSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetAppsInstallSummaryReport.GetAppsInstallSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetAppsInstallSummaryReport.GetAppsInstallSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppsInstallSummaryReport/GetAppsInstallSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppsInstallSummaryReport/GetAppsInstallSummaryReportRequestBuilder.cs index 2fda9361938..511aee5a235 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppsInstallSummaryReport/GetAppsInstallSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetAppsInstallSummaryReport/GetAppsInstallSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetAppsInstallSummaryReportRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetAppsInstallSummaryReport.GetAppsInstallSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetAppsInstallSummaryReport.GetAppsInstallSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCachedReport/GetCachedReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCachedReport/GetCachedReportPostRequestBody.cs index 7681bb05814..0efd22813e6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCachedReport/GetCachedReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCachedReport/GetCachedReportPostRequestBody.cs @@ -128,7 +128,7 @@ public GetCachedReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCachedReport.GetCachedReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCachedReport.GetCachedReportPostRequestBody(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("id", Id); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCachedReport/GetCachedReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCachedReport/GetCachedReportRequestBuilder.cs index 5ca9fc28f1a..cdfdfc255b5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCachedReport/GetCachedReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCachedReport/GetCachedReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetCachedReportRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCachedReport.GetCachedReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCachedReport.GetCachedReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCertificatesReport/GetCertificatesReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCertificatesReport/GetCertificatesReportPostRequestBody.cs index 4e85f5dad55..0fe65babeaa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCertificatesReport/GetCertificatesReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCertificatesReport/GetCertificatesReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetCertificatesReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCertificatesReport.GetCertificatesReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCertificatesReport.GetCertificatesReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCertificatesReport/GetCertificatesReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCertificatesReport/GetCertificatesReportRequestBuilder.cs index acb7fa554bd..2e71a47768b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCertificatesReport/GetCertificatesReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCertificatesReport/GetCertificatesReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetCertificatesReportRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCertificatesReport.GetCertificatesReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCertificatesReport.GetCertificatesReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePoliciesReportForDevice/GetCompliancePoliciesReportForDevicePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePoliciesReportForDevice/GetCompliancePoliciesReportForDevicePostRequestBody.cs index 6f2622800f7..5a82473e7aa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePoliciesReportForDevice/GetCompliancePoliciesReportForDevicePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePoliciesReportForDevice/GetCompliancePoliciesReportForDevicePostRequestBody.cs @@ -160,7 +160,7 @@ public GetCompliancePoliciesReportForDevicePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePoliciesReportForDevice.GetCompliancePoliciesReportForDevicePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePoliciesReportForDevice.GetCompliancePoliciesReportForDevicePostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePoliciesReportForDevice/GetCompliancePoliciesReportForDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePoliciesReportForDevice/GetCompliancePoliciesReportForDeviceRequestBuilder.cs index 012e2f1172a..8744411f2d9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePoliciesReportForDevice/GetCompliancePoliciesReportForDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePoliciesReportForDevice/GetCompliancePoliciesReportForDeviceRequestBuilder.cs @@ -50,7 +50,7 @@ public GetCompliancePoliciesReportForDeviceRequestBuilder(string rawUrl, IReques public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePoliciesReportForDevice.GetCompliancePoliciesReportForDevicePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePoliciesReportForDevice.GetCompliancePoliciesReportForDevicePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDeviceSummaryReport/GetCompliancePolicyDeviceSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDeviceSummaryReport/GetCompliancePolicyDeviceSummaryReportPostRequestBody.cs index 13c73eecebf..f87785b64fa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDeviceSummaryReport/GetCompliancePolicyDeviceSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDeviceSummaryReport/GetCompliancePolicyDeviceSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetCompliancePolicyDeviceSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyDeviceSummaryReport.GetCompliancePolicyDeviceSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyDeviceSummaryReport.GetCompliancePolicyDeviceSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDeviceSummaryReport/GetCompliancePolicyDeviceSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDeviceSummaryReport/GetCompliancePolicyDeviceSummaryReportRequestBuilder.cs index de5ff3b3ad9..b610a646864 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDeviceSummaryReport/GetCompliancePolicyDeviceSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDeviceSummaryReport/GetCompliancePolicyDeviceSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetCompliancePolicyDeviceSummaryReportRequestBuilder(string rawUrl, IRequ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyDeviceSummaryReport.GetCompliancePolicyDeviceSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyDeviceSummaryReport.GetCompliancePolicyDeviceSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDevicesReport/GetCompliancePolicyDevicesReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDevicesReport/GetCompliancePolicyDevicesReportPostRequestBody.cs index 93b8bfae9dd..165b1fd3220 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDevicesReport/GetCompliancePolicyDevicesReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDevicesReport/GetCompliancePolicyDevicesReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetCompliancePolicyDevicesReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyDevicesReport.GetCompliancePolicyDevicesReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyDevicesReport.GetCompliancePolicyDevicesReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDevicesReport/GetCompliancePolicyDevicesReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDevicesReport/GetCompliancePolicyDevicesReportRequestBuilder.cs index 0ce99acfd96..6eccb7073cd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDevicesReport/GetCompliancePolicyDevicesReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyDevicesReport/GetCompliancePolicyDevicesReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetCompliancePolicyDevicesReportRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyDevicesReport.GetCompliancePolicyDevicesReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyDevicesReport.GetCompliancePolicyDevicesReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceReport/GetCompliancePolicyNonComplianceReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceReport/GetCompliancePolicyNonComplianceReportPostRequestBody.cs index f8e61383644..8962a39b875 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceReport/GetCompliancePolicyNonComplianceReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceReport/GetCompliancePolicyNonComplianceReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetCompliancePolicyNonComplianceReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyNonComplianceReport.GetCompliancePolicyNonComplianceReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyNonComplianceReport.GetCompliancePolicyNonComplianceReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceReport/GetCompliancePolicyNonComplianceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceReport/GetCompliancePolicyNonComplianceReportRequestBuilder.cs index d3aac7ab9ef..76faa5cb1cc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceReport/GetCompliancePolicyNonComplianceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceReport/GetCompliancePolicyNonComplianceReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetCompliancePolicyNonComplianceReportRequestBuilder(string rawUrl, IRequ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyNonComplianceReport.GetCompliancePolicyNonComplianceReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyNonComplianceReport.GetCompliancePolicyNonComplianceReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceSummaryReport/GetCompliancePolicyNonComplianceSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceSummaryReport/GetCompliancePolicyNonComplianceSummaryReportPostRequestBody.cs index 8479e3dccf3..f2c9dbdfa80 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceSummaryReport/GetCompliancePolicyNonComplianceSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceSummaryReport/GetCompliancePolicyNonComplianceSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetCompliancePolicyNonComplianceSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyNonComplianceSummaryReport.GetCompliancePolicyNonComplianceSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyNonComplianceSummaryReport.GetCompliancePolicyNonComplianceSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceSummaryReport/GetCompliancePolicyNonComplianceSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceSummaryReport/GetCompliancePolicyNonComplianceSummaryReportRequestBuilder.cs index 0feaae59969..80607a905af 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceSummaryReport/GetCompliancePolicyNonComplianceSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetCompliancePolicyNonComplianceSummaryReport/GetCompliancePolicyNonComplianceSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetCompliancePolicyNonComplianceSummaryReportRequestBuilder(string rawUrl public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyNonComplianceSummaryReport.GetCompliancePolicyNonComplianceSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetCompliancePolicyNonComplianceSummaryReport.GetCompliancePolicyNonComplianceSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingDetailsReport/GetComplianceSettingDetailsReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingDetailsReport/GetComplianceSettingDetailsReportPostRequestBody.cs index 18f0730e03d..576be61a896 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingDetailsReport/GetComplianceSettingDetailsReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingDetailsReport/GetComplianceSettingDetailsReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetComplianceSettingDetailsReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetComplianceSettingDetailsReport.GetComplianceSettingDetailsReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetComplianceSettingDetailsReport.GetComplianceSettingDetailsReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingDetailsReport/GetComplianceSettingDetailsReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingDetailsReport/GetComplianceSettingDetailsReportRequestBuilder.cs index 138ab52aa97..98255d05270 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingDetailsReport/GetComplianceSettingDetailsReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingDetailsReport/GetComplianceSettingDetailsReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetComplianceSettingDetailsReportRequestBuilder(string rawUrl, IRequestAd public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetComplianceSettingDetailsReport.GetComplianceSettingDetailsReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetComplianceSettingDetailsReport.GetComplianceSettingDetailsReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingNonComplianceReport/GetComplianceSettingNonComplianceReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingNonComplianceReport/GetComplianceSettingNonComplianceReportPostRequestBody.cs index 76b0d8b687a..2539101855f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingNonComplianceReport/GetComplianceSettingNonComplianceReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingNonComplianceReport/GetComplianceSettingNonComplianceReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetComplianceSettingNonComplianceReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetComplianceSettingNonComplianceReport.GetComplianceSettingNonComplianceReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetComplianceSettingNonComplianceReport.GetComplianceSettingNonComplianceReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingNonComplianceReport/GetComplianceSettingNonComplianceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingNonComplianceReport/GetComplianceSettingNonComplianceReportRequestBuilder.cs index 035b5c03df7..3abbd703c98 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingNonComplianceReport/GetComplianceSettingNonComplianceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingNonComplianceReport/GetComplianceSettingNonComplianceReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetComplianceSettingNonComplianceReportRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetComplianceSettingNonComplianceReport.GetComplianceSettingNonComplianceReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetComplianceSettingNonComplianceReport.GetComplianceSettingNonComplianceReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingsReport/GetComplianceSettingsReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingsReport/GetComplianceSettingsReportPostRequestBody.cs index f4e72397aa9..c2cb47fe87d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingsReport/GetComplianceSettingsReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingsReport/GetComplianceSettingsReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetComplianceSettingsReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetComplianceSettingsReport.GetComplianceSettingsReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetComplianceSettingsReport.GetComplianceSettingsReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingsReport/GetComplianceSettingsReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingsReport/GetComplianceSettingsReportRequestBuilder.cs index 37cd5a6bb85..c5017cfc76b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingsReport/GetComplianceSettingsReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetComplianceSettingsReport/GetComplianceSettingsReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetComplianceSettingsReportRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetComplianceSettingsReport.GetComplianceSettingsReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetComplianceSettingsReport.GetComplianceSettingsReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigManagerDevicePolicyStatusReport/GetConfigManagerDevicePolicyStatusReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigManagerDevicePolicyStatusReport/GetConfigManagerDevicePolicyStatusReportPostRequestBody.cs index 402cb9de445..7a9700bf27e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigManagerDevicePolicyStatusReport/GetConfigManagerDevicePolicyStatusReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigManagerDevicePolicyStatusReport/GetConfigManagerDevicePolicyStatusReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetConfigManagerDevicePolicyStatusReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigManagerDevicePolicyStatusReport.GetConfigManagerDevicePolicyStatusReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigManagerDevicePolicyStatusReport.GetConfigManagerDevicePolicyStatusReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigManagerDevicePolicyStatusReport/GetConfigManagerDevicePolicyStatusReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigManagerDevicePolicyStatusReport/GetConfigManagerDevicePolicyStatusReportRequestBuilder.cs index 7739402ea6e..e91a1d3b749 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigManagerDevicePolicyStatusReport/GetConfigManagerDevicePolicyStatusReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigManagerDevicePolicyStatusReport/GetConfigManagerDevicePolicyStatusReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetConfigManagerDevicePolicyStatusReportRequestBuilder(string rawUrl, IRe public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigManagerDevicePolicyStatusReport.GetConfigManagerDevicePolicyStatusReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigManagerDevicePolicyStatusReport.GetConfigManagerDevicePolicyStatusReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPoliciesReportForDevice/GetConfigurationPoliciesReportForDevicePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPoliciesReportForDevice/GetConfigurationPoliciesReportForDevicePostRequestBody.cs index d710d30e472..2d19f448cb1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPoliciesReportForDevice/GetConfigurationPoliciesReportForDevicePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPoliciesReportForDevice/GetConfigurationPoliciesReportForDevicePostRequestBody.cs @@ -160,7 +160,7 @@ public GetConfigurationPoliciesReportForDevicePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPoliciesReportForDevice.GetConfigurationPoliciesReportForDevicePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPoliciesReportForDevice.GetConfigurationPoliciesReportForDevicePostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPoliciesReportForDevice/GetConfigurationPoliciesReportForDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPoliciesReportForDevice/GetConfigurationPoliciesReportForDeviceRequestBuilder.cs index 16bdefcd66e..49ec2dc3ee8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPoliciesReportForDevice/GetConfigurationPoliciesReportForDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPoliciesReportForDevice/GetConfigurationPoliciesReportForDeviceRequestBuilder.cs @@ -50,7 +50,7 @@ public GetConfigurationPoliciesReportForDeviceRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPoliciesReportForDevice.GetConfigurationPoliciesReportForDevicePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPoliciesReportForDevice.GetConfigurationPoliciesReportForDevicePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDeviceSummaryReport/GetConfigurationPolicyDeviceSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDeviceSummaryReport/GetConfigurationPolicyDeviceSummaryReportPostRequestBody.cs index 48e5b866abc..a47fef74f7c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDeviceSummaryReport/GetConfigurationPolicyDeviceSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDeviceSummaryReport/GetConfigurationPolicyDeviceSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetConfigurationPolicyDeviceSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyDeviceSummaryReport.GetConfigurationPolicyDeviceSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyDeviceSummaryReport.GetConfigurationPolicyDeviceSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDeviceSummaryReport/GetConfigurationPolicyDeviceSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDeviceSummaryReport/GetConfigurationPolicyDeviceSummaryReportRequestBuilder.cs index 8da09f0439f..5391cb4f248 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDeviceSummaryReport/GetConfigurationPolicyDeviceSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDeviceSummaryReport/GetConfigurationPolicyDeviceSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetConfigurationPolicyDeviceSummaryReportRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyDeviceSummaryReport.GetConfigurationPolicyDeviceSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyDeviceSummaryReport.GetConfigurationPolicyDeviceSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDevicesReport/GetConfigurationPolicyDevicesReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDevicesReport/GetConfigurationPolicyDevicesReportPostRequestBody.cs index ffd249c559d..cd771b21052 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDevicesReport/GetConfigurationPolicyDevicesReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDevicesReport/GetConfigurationPolicyDevicesReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetConfigurationPolicyDevicesReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyDevicesReport.GetConfigurationPolicyDevicesReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyDevicesReport.GetConfigurationPolicyDevicesReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDevicesReport/GetConfigurationPolicyDevicesReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDevicesReport/GetConfigurationPolicyDevicesReportRequestBuilder.cs index fdec6fdb2fa..fbba9aaf27c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDevicesReport/GetConfigurationPolicyDevicesReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyDevicesReport/GetConfigurationPolicyDevicesReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetConfigurationPolicyDevicesReportRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyDevicesReport.GetConfigurationPolicyDevicesReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyDevicesReport.GetConfigurationPolicyDevicesReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceReport/GetConfigurationPolicyNonComplianceReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceReport/GetConfigurationPolicyNonComplianceReportPostRequestBody.cs index eeb18aee012..9dcf5457f5d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceReport/GetConfigurationPolicyNonComplianceReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceReport/GetConfigurationPolicyNonComplianceReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetConfigurationPolicyNonComplianceReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyNonComplianceReport.GetConfigurationPolicyNonComplianceReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyNonComplianceReport.GetConfigurationPolicyNonComplianceReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceReport/GetConfigurationPolicyNonComplianceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceReport/GetConfigurationPolicyNonComplianceReportRequestBuilder.cs index 629bc181d79..8a869a5ab98 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceReport/GetConfigurationPolicyNonComplianceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceReport/GetConfigurationPolicyNonComplianceReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetConfigurationPolicyNonComplianceReportRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyNonComplianceReport.GetConfigurationPolicyNonComplianceReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyNonComplianceReport.GetConfigurationPolicyNonComplianceReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceSummaryReport/GetConfigurationPolicyNonComplianceSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceSummaryReport/GetConfigurationPolicyNonComplianceSummaryReportPostRequestBody.cs index cb1120e987b..712af7b08b1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceSummaryReport/GetConfigurationPolicyNonComplianceSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceSummaryReport/GetConfigurationPolicyNonComplianceSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetConfigurationPolicyNonComplianceSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyNonComplianceSummaryReport.GetConfigurationPolicyNonComplianceSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyNonComplianceSummaryReport.GetConfigurationPolicyNonComplianceSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceSummaryReport/GetConfigurationPolicyNonComplianceSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceSummaryReport/GetConfigurationPolicyNonComplianceSummaryReportRequestBuilder.cs index a3fbda640d6..8f491bf8e56 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceSummaryReport/GetConfigurationPolicyNonComplianceSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicyNonComplianceSummaryReport/GetConfigurationPolicyNonComplianceSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetConfigurationPolicyNonComplianceSummaryReportRequestBuilder(string raw public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyNonComplianceSummaryReport.GetConfigurationPolicyNonComplianceSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicyNonComplianceSummaryReport.GetConfigurationPolicyNonComplianceSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicySettingsDeviceSummaryReport/GetConfigurationPolicySettingsDeviceSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicySettingsDeviceSummaryReport/GetConfigurationPolicySettingsDeviceSummaryReportPostRequestBody.cs index c1ccab327eb..f6387ed030c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicySettingsDeviceSummaryReport/GetConfigurationPolicySettingsDeviceSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicySettingsDeviceSummaryReport/GetConfigurationPolicySettingsDeviceSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetConfigurationPolicySettingsDeviceSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicySettingsDeviceSummaryReport.GetConfigurationPolicySettingsDeviceSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicySettingsDeviceSummaryReport.GetConfigurationPolicySettingsDeviceSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicySettingsDeviceSummaryReport/GetConfigurationPolicySettingsDeviceSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicySettingsDeviceSummaryReport/GetConfigurationPolicySettingsDeviceSummaryReportRequestBuilder.cs index 71a6f4b28d0..de8e6a361bb 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicySettingsDeviceSummaryReport/GetConfigurationPolicySettingsDeviceSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationPolicySettingsDeviceSummaryReport/GetConfigurationPolicySettingsDeviceSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetConfigurationPolicySettingsDeviceSummaryReportRequestBuilder(string ra public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicySettingsDeviceSummaryReport.GetConfigurationPolicySettingsDeviceSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationPolicySettingsDeviceSummaryReport.GetConfigurationPolicySettingsDeviceSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingDetailsReport/GetConfigurationSettingDetailsReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingDetailsReport/GetConfigurationSettingDetailsReportPostRequestBody.cs index 4dcaf600284..95a8fa116ac 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingDetailsReport/GetConfigurationSettingDetailsReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingDetailsReport/GetConfigurationSettingDetailsReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetConfigurationSettingDetailsReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationSettingDetailsReport.GetConfigurationSettingDetailsReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationSettingDetailsReport.GetConfigurationSettingDetailsReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingDetailsReport/GetConfigurationSettingDetailsReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingDetailsReport/GetConfigurationSettingDetailsReportRequestBuilder.cs index 9e3dc95357a..3383e841df8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingDetailsReport/GetConfigurationSettingDetailsReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingDetailsReport/GetConfigurationSettingDetailsReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetConfigurationSettingDetailsReportRequestBuilder(string rawUrl, IReques public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationSettingDetailsReport.GetConfigurationSettingDetailsReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationSettingDetailsReport.GetConfigurationSettingDetailsReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingNonComplianceReport/GetConfigurationSettingNonComplianceReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingNonComplianceReport/GetConfigurationSettingNonComplianceReportPostRequestBody.cs index 671e3ffe013..61ca98e82c8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingNonComplianceReport/GetConfigurationSettingNonComplianceReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingNonComplianceReport/GetConfigurationSettingNonComplianceReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetConfigurationSettingNonComplianceReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationSettingNonComplianceReport.GetConfigurationSettingNonComplianceReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationSettingNonComplianceReport.GetConfigurationSettingNonComplianceReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingNonComplianceReport/GetConfigurationSettingNonComplianceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingNonComplianceReport/GetConfigurationSettingNonComplianceReportRequestBuilder.cs index b6d0af4126f..7d4ea878590 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingNonComplianceReport/GetConfigurationSettingNonComplianceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingNonComplianceReport/GetConfigurationSettingNonComplianceReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetConfigurationSettingNonComplianceReportRequestBuilder(string rawUrl, I public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationSettingNonComplianceReport.GetConfigurationSettingNonComplianceReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationSettingNonComplianceReport.GetConfigurationSettingNonComplianceReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingsReport/GetConfigurationSettingsReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingsReport/GetConfigurationSettingsReportPostRequestBody.cs index e2908bf3409..27ba12b663a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingsReport/GetConfigurationSettingsReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingsReport/GetConfigurationSettingsReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetConfigurationSettingsReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationSettingsReport.GetConfigurationSettingsReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationSettingsReport.GetConfigurationSettingsReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingsReport/GetConfigurationSettingsReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingsReport/GetConfigurationSettingsReportRequestBuilder.cs index 4d91336c3a5..9013b1f28dd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingsReport/GetConfigurationSettingsReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetConfigurationSettingsReport/GetConfigurationSettingsReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetConfigurationSettingsReportRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationSettingsReport.GetConfigurationSettingsReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetConfigurationSettingsReport.GetConfigurationSettingsReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicySettingsSummaryReport/GetDeviceConfigurationPolicySettingsSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicySettingsSummaryReport/GetDeviceConfigurationPolicySettingsSummaryReportPostRequestBody.cs index fffe5a19094..b037154db35 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicySettingsSummaryReport/GetDeviceConfigurationPolicySettingsSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicySettingsSummaryReport/GetDeviceConfigurationPolicySettingsSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetDeviceConfigurationPolicySettingsSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceConfigurationPolicySettingsSummaryReport.GetDeviceConfigurationPolicySettingsSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceConfigurationPolicySettingsSummaryReport.GetDeviceConfigurationPolicySettingsSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicySettingsSummaryReport/GetDeviceConfigurationPolicySettingsSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicySettingsSummaryReport/GetDeviceConfigurationPolicySettingsSummaryReportRequestBuilder.cs index d883b4abdc3..47f4cd122b4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicySettingsSummaryReport/GetDeviceConfigurationPolicySettingsSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicySettingsSummaryReport/GetDeviceConfigurationPolicySettingsSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetDeviceConfigurationPolicySettingsSummaryReportRequestBuilder(string ra public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceConfigurationPolicySettingsSummaryReport.GetDeviceConfigurationPolicySettingsSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceConfigurationPolicySettingsSummaryReport.GetDeviceConfigurationPolicySettingsSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicyStatusSummary/GetDeviceConfigurationPolicyStatusSummaryPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicyStatusSummary/GetDeviceConfigurationPolicyStatusSummaryPostRequestBody.cs index e5d8dfaf495..088b9e72160 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicyStatusSummary/GetDeviceConfigurationPolicyStatusSummaryPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicyStatusSummary/GetDeviceConfigurationPolicyStatusSummaryPostRequestBody.cs @@ -160,7 +160,7 @@ public GetDeviceConfigurationPolicyStatusSummaryPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceConfigurationPolicyStatusSummary.GetDeviceConfigurationPolicyStatusSummaryPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceConfigurationPolicyStatusSummary.GetDeviceConfigurationPolicyStatusSummaryPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicyStatusSummary/GetDeviceConfigurationPolicyStatusSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicyStatusSummary/GetDeviceConfigurationPolicyStatusSummaryRequestBuilder.cs index 531521c67e4..86df9b1b69c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicyStatusSummary/GetDeviceConfigurationPolicyStatusSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceConfigurationPolicyStatusSummary/GetDeviceConfigurationPolicyStatusSummaryRequestBuilder.cs @@ -50,7 +50,7 @@ public GetDeviceConfigurationPolicyStatusSummaryRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceConfigurationPolicyStatusSummary.GetDeviceConfigurationPolicyStatusSummaryPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceConfigurationPolicyStatusSummary.GetDeviceConfigurationPolicyStatusSummaryPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentPerSettingContributingProfiles/GetDeviceManagementIntentPerSettingContributingProfilesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentPerSettingContributingProfiles/GetDeviceManagementIntentPerSettingContributingProfilesPostRequestBody.cs index 10b3d8918e5..d9393b6b5a7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentPerSettingContributingProfiles/GetDeviceManagementIntentPerSettingContributingProfilesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentPerSettingContributingProfiles/GetDeviceManagementIntentPerSettingContributingProfilesPostRequestBody.cs @@ -160,7 +160,7 @@ public GetDeviceManagementIntentPerSettingContributingProfilesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceManagementIntentPerSettingContributingProfiles.GetDeviceManagementIntentPerSettingContributingProfilesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceManagementIntentPerSettingContributingProfiles.GetDeviceManagementIntentPerSettingContributingProfilesPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentPerSettingContributingProfiles/GetDeviceManagementIntentPerSettingContributingProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentPerSettingContributingProfiles/GetDeviceManagementIntentPerSettingContributingProfilesRequestBuilder.cs index bca926b57f2..43c3ada3ac8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentPerSettingContributingProfiles/GetDeviceManagementIntentPerSettingContributingProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentPerSettingContributingProfiles/GetDeviceManagementIntentPerSettingContributingProfilesRequestBuilder.cs @@ -50,7 +50,7 @@ public GetDeviceManagementIntentPerSettingContributingProfilesRequestBuilder(str public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceManagementIntentPerSettingContributingProfiles.GetDeviceManagementIntentPerSettingContributingProfilesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceManagementIntentPerSettingContributingProfiles.GetDeviceManagementIntentPerSettingContributingProfilesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentSettingsReport/GetDeviceManagementIntentSettingsReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentSettingsReport/GetDeviceManagementIntentSettingsReportPostRequestBody.cs index 0c89b5228fe..a6797b23172 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentSettingsReport/GetDeviceManagementIntentSettingsReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentSettingsReport/GetDeviceManagementIntentSettingsReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetDeviceManagementIntentSettingsReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceManagementIntentSettingsReport.GetDeviceManagementIntentSettingsReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceManagementIntentSettingsReport.GetDeviceManagementIntentSettingsReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentSettingsReport/GetDeviceManagementIntentSettingsReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentSettingsReport/GetDeviceManagementIntentSettingsReportRequestBuilder.cs index 390e1caf9aa..00840de4589 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentSettingsReport/GetDeviceManagementIntentSettingsReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceManagementIntentSettingsReport/GetDeviceManagementIntentSettingsReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetDeviceManagementIntentSettingsReportRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceManagementIntentSettingsReport.GetDeviceManagementIntentSettingsReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceManagementIntentSettingsReport.GetDeviceManagementIntentSettingsReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceNonComplianceReport/GetDeviceNonComplianceReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceNonComplianceReport/GetDeviceNonComplianceReportPostRequestBody.cs index ca0fd9e0c1e..d7d893dc4f2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceNonComplianceReport/GetDeviceNonComplianceReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceNonComplianceReport/GetDeviceNonComplianceReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetDeviceNonComplianceReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceNonComplianceReport.GetDeviceNonComplianceReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceNonComplianceReport.GetDeviceNonComplianceReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceNonComplianceReport/GetDeviceNonComplianceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceNonComplianceReport/GetDeviceNonComplianceReportRequestBuilder.cs index 78926d00807..d8f82e792ae 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceNonComplianceReport/GetDeviceNonComplianceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceNonComplianceReport/GetDeviceNonComplianceReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetDeviceNonComplianceReportRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceNonComplianceReport.GetDeviceNonComplianceReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceNonComplianceReport.GetDeviceNonComplianceReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePoliciesComplianceReport/GetDevicePoliciesComplianceReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePoliciesComplianceReport/GetDevicePoliciesComplianceReportPostRequestBody.cs index 6754178e97a..765e217391a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePoliciesComplianceReport/GetDevicePoliciesComplianceReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePoliciesComplianceReport/GetDevicePoliciesComplianceReportPostRequestBody.cs @@ -144,7 +144,7 @@ public GetDevicePoliciesComplianceReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicePoliciesComplianceReport.GetDevicePoliciesComplianceReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicePoliciesComplianceReport.GetDevicePoliciesComplianceReportPostRequestBody(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePoliciesComplianceReport/GetDevicePoliciesComplianceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePoliciesComplianceReport/GetDevicePoliciesComplianceReportRequestBuilder.cs index 828ed74018f..ff54c2b3596 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePoliciesComplianceReport/GetDevicePoliciesComplianceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePoliciesComplianceReport/GetDevicePoliciesComplianceReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetDevicePoliciesComplianceReportRequestBuilder(string rawUrl, IRequestAd public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicePoliciesComplianceReport.GetDevicePoliciesComplianceReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicePoliciesComplianceReport.GetDevicePoliciesComplianceReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePolicySettingsComplianceReport/GetDevicePolicySettingsComplianceReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePolicySettingsComplianceReport/GetDevicePolicySettingsComplianceReportPostRequestBody.cs index cb19e41fcee..9444286dc3a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePolicySettingsComplianceReport/GetDevicePolicySettingsComplianceReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePolicySettingsComplianceReport/GetDevicePolicySettingsComplianceReportPostRequestBody.cs @@ -144,7 +144,7 @@ public GetDevicePolicySettingsComplianceReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicePolicySettingsComplianceReport.GetDevicePolicySettingsComplianceReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicePolicySettingsComplianceReport.GetDevicePolicySettingsComplianceReportPostRequestBody(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePolicySettingsComplianceReport/GetDevicePolicySettingsComplianceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePolicySettingsComplianceReport/GetDevicePolicySettingsComplianceReportRequestBuilder.cs index 5a0b0d9de27..e3ea0edea44 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePolicySettingsComplianceReport/GetDevicePolicySettingsComplianceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicePolicySettingsComplianceReport/GetDevicePolicySettingsComplianceReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetDevicePolicySettingsComplianceReportRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicePolicySettingsComplianceReport.GetDevicePolicySettingsComplianceReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicePolicySettingsComplianceReport.GetDevicePolicySettingsComplianceReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliacePolicyReport/GetDeviceStatusByCompliacePolicyReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliacePolicyReport/GetDeviceStatusByCompliacePolicyReportPostRequestBody.cs index d91c7d2abfe..ee079dfd33e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliacePolicyReport/GetDeviceStatusByCompliacePolicyReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliacePolicyReport/GetDeviceStatusByCompliacePolicyReportPostRequestBody.cs @@ -144,7 +144,7 @@ public GetDeviceStatusByCompliacePolicyReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusByCompliacePolicyReport.GetDeviceStatusByCompliacePolicyReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusByCompliacePolicyReport.GetDeviceStatusByCompliacePolicyReportPostRequestBody(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliacePolicyReport/GetDeviceStatusByCompliacePolicyReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliacePolicyReport/GetDeviceStatusByCompliacePolicyReportRequestBuilder.cs index f831dc94144..769a0c7ad56 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliacePolicyReport/GetDeviceStatusByCompliacePolicyReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliacePolicyReport/GetDeviceStatusByCompliacePolicyReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetDeviceStatusByCompliacePolicyReportRequestBuilder(string rawUrl, IRequ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusByCompliacePolicyReport.GetDeviceStatusByCompliacePolicyReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusByCompliacePolicyReport.GetDeviceStatusByCompliacePolicyReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliancePolicySettingReport/GetDeviceStatusByCompliancePolicySettingReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliancePolicySettingReport/GetDeviceStatusByCompliancePolicySettingReportPostRequestBody.cs index a34cf91f57e..2348188c0ac 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliancePolicySettingReport/GetDeviceStatusByCompliancePolicySettingReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliancePolicySettingReport/GetDeviceStatusByCompliancePolicySettingReportPostRequestBody.cs @@ -144,7 +144,7 @@ public GetDeviceStatusByCompliancePolicySettingReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusByCompliancePolicySettingReport.GetDeviceStatusByCompliancePolicySettingReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusByCompliancePolicySettingReport.GetDeviceStatusByCompliancePolicySettingReportPostRequestBody(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliancePolicySettingReport/GetDeviceStatusByCompliancePolicySettingReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliancePolicySettingReport/GetDeviceStatusByCompliancePolicySettingReportRequestBuilder.cs index 1933dac24d4..be29cf0af99 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliancePolicySettingReport/GetDeviceStatusByCompliancePolicySettingReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusByCompliancePolicySettingReport/GetDeviceStatusByCompliancePolicySettingReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetDeviceStatusByCompliancePolicySettingReportRequestBuilder(string rawUr public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusByCompliancePolicySettingReport.GetDeviceStatusByCompliancePolicySettingReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusByCompliancePolicySettingReport.GetDeviceStatusByCompliancePolicySettingReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliacePolicyReport/GetDeviceStatusSummaryByCompliacePolicyReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliacePolicyReport/GetDeviceStatusSummaryByCompliacePolicyReportPostRequestBody.cs index d8b98bfc09c..885ac51336a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliacePolicyReport/GetDeviceStatusSummaryByCompliacePolicyReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliacePolicyReport/GetDeviceStatusSummaryByCompliacePolicyReportPostRequestBody.cs @@ -144,7 +144,7 @@ public GetDeviceStatusSummaryByCompliacePolicyReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusSummaryByCompliacePolicyReport.GetDeviceStatusSummaryByCompliacePolicyReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusSummaryByCompliacePolicyReport.GetDeviceStatusSummaryByCompliacePolicyReportPostRequestBody(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliacePolicyReport/GetDeviceStatusSummaryByCompliacePolicyReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliacePolicyReport/GetDeviceStatusSummaryByCompliacePolicyReportRequestBuilder.cs index 4a605076fd0..af7f55b7e12 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliacePolicyReport/GetDeviceStatusSummaryByCompliacePolicyReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliacePolicyReport/GetDeviceStatusSummaryByCompliacePolicyReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetDeviceStatusSummaryByCompliacePolicyReportRequestBuilder(string rawUrl public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusSummaryByCompliacePolicyReport.GetDeviceStatusSummaryByCompliacePolicyReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusSummaryByCompliacePolicyReport.GetDeviceStatusSummaryByCompliacePolicyReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliancePolicySettingsReport/GetDeviceStatusSummaryByCompliancePolicySettingsReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliancePolicySettingsReport/GetDeviceStatusSummaryByCompliancePolicySettingsReportPostRequestBody.cs index 1a6bb16b7b3..9a5a83bc4e0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliancePolicySettingsReport/GetDeviceStatusSummaryByCompliancePolicySettingsReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliancePolicySettingsReport/GetDeviceStatusSummaryByCompliancePolicySettingsReportPostRequestBody.cs @@ -144,7 +144,7 @@ public GetDeviceStatusSummaryByCompliancePolicySettingsReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusSummaryByCompliancePolicySettingsReport.GetDeviceStatusSummaryByCompliancePolicySettingsReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusSummaryByCompliancePolicySettingsReport.GetDeviceStatusSummaryByCompliancePolicySettingsReportPostRequestBody(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliancePolicySettingsReport/GetDeviceStatusSummaryByCompliancePolicySettingsReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliancePolicySettingsReport/GetDeviceStatusSummaryByCompliancePolicySettingsReportRequestBuilder.cs index e4347c9c93b..a0fdfc89c0a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliancePolicySettingsReport/GetDeviceStatusSummaryByCompliancePolicySettingsReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDeviceStatusSummaryByCompliancePolicySettingsReport/GetDeviceStatusSummaryByCompliancePolicySettingsReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetDeviceStatusSummaryByCompliancePolicySettingsReportRequestBuilder(stri public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusSummaryByCompliancePolicySettingsReport.GetDeviceStatusSummaryByCompliancePolicySettingsReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDeviceStatusSummaryByCompliancePolicySettingsReport.GetDeviceStatusSummaryByCompliancePolicySettingsReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusByPolicyPlatformComplianceReport/GetDevicesStatusByPolicyPlatformComplianceReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusByPolicyPlatformComplianceReport/GetDevicesStatusByPolicyPlatformComplianceReportPostRequestBody.cs index 160131ac3bf..0363da3bb79 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusByPolicyPlatformComplianceReport/GetDevicesStatusByPolicyPlatformComplianceReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusByPolicyPlatformComplianceReport/GetDevicesStatusByPolicyPlatformComplianceReportPostRequestBody.cs @@ -144,7 +144,7 @@ public GetDevicesStatusByPolicyPlatformComplianceReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicesStatusByPolicyPlatformComplianceReport.GetDevicesStatusByPolicyPlatformComplianceReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicesStatusByPolicyPlatformComplianceReport.GetDevicesStatusByPolicyPlatformComplianceReportPostRequestBody(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusByPolicyPlatformComplianceReport/GetDevicesStatusByPolicyPlatformComplianceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusByPolicyPlatformComplianceReport/GetDevicesStatusByPolicyPlatformComplianceReportRequestBuilder.cs index 34b9553ebf5..524f743c1ce 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusByPolicyPlatformComplianceReport/GetDevicesStatusByPolicyPlatformComplianceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusByPolicyPlatformComplianceReport/GetDevicesStatusByPolicyPlatformComplianceReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetDevicesStatusByPolicyPlatformComplianceReportRequestBuilder(string raw public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicesStatusByPolicyPlatformComplianceReport.GetDevicesStatusByPolicyPlatformComplianceReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicesStatusByPolicyPlatformComplianceReport.GetDevicesStatusByPolicyPlatformComplianceReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusBySettingReport/GetDevicesStatusBySettingReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusBySettingReport/GetDevicesStatusBySettingReportPostRequestBody.cs index 27f1130ff4d..e59ba098cd0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusBySettingReport/GetDevicesStatusBySettingReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusBySettingReport/GetDevicesStatusBySettingReportPostRequestBody.cs @@ -144,7 +144,7 @@ public GetDevicesStatusBySettingReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicesStatusBySettingReport.GetDevicesStatusBySettingReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicesStatusBySettingReport.GetDevicesStatusBySettingReportPostRequestBody(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusBySettingReport/GetDevicesStatusBySettingReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusBySettingReport/GetDevicesStatusBySettingReportRequestBuilder.cs index 304a430f2ff..e7229ff21c4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusBySettingReport/GetDevicesStatusBySettingReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesStatusBySettingReport/GetDevicesStatusBySettingReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetDevicesStatusBySettingReportRequestBuilder(string rawUrl, IRequestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicesStatusBySettingReport.GetDevicesStatusBySettingReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicesStatusBySettingReport.GetDevicesStatusBySettingReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesWithoutCompliancePolicyReport/GetDevicesWithoutCompliancePolicyReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesWithoutCompliancePolicyReport/GetDevicesWithoutCompliancePolicyReportPostRequestBody.cs index 81f5bb314ac..217d94d2386 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesWithoutCompliancePolicyReport/GetDevicesWithoutCompliancePolicyReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesWithoutCompliancePolicyReport/GetDevicesWithoutCompliancePolicyReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetDevicesWithoutCompliancePolicyReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicesWithoutCompliancePolicyReport.GetDevicesWithoutCompliancePolicyReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicesWithoutCompliancePolicyReport.GetDevicesWithoutCompliancePolicyReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesWithoutCompliancePolicyReport/GetDevicesWithoutCompliancePolicyReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesWithoutCompliancePolicyReport/GetDevicesWithoutCompliancePolicyReportRequestBuilder.cs index 9d96315d4e2..8f4ccbd7acc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesWithoutCompliancePolicyReport/GetDevicesWithoutCompliancePolicyReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetDevicesWithoutCompliancePolicyReport/GetDevicesWithoutCompliancePolicyReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetDevicesWithoutCompliancePolicyReportRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicesWithoutCompliancePolicyReport.GetDevicesWithoutCompliancePolicyReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetDevicesWithoutCompliancePolicyReport.GetDevicesWithoutCompliancePolicyReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEncryptionReportForDevices/GetEncryptionReportForDevicesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEncryptionReportForDevices/GetEncryptionReportForDevicesPostRequestBody.cs index a52d205f068..b66eb675537 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEncryptionReportForDevices/GetEncryptionReportForDevicesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEncryptionReportForDevices/GetEncryptionReportForDevicesPostRequestBody.cs @@ -160,7 +160,7 @@ public GetEncryptionReportForDevicesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetEncryptionReportForDevices.GetEncryptionReportForDevicesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetEncryptionReportForDevices.GetEncryptionReportForDevicesPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEncryptionReportForDevices/GetEncryptionReportForDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEncryptionReportForDevices/GetEncryptionReportForDevicesRequestBuilder.cs index a9b51a4d764..ab6136d85aa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEncryptionReportForDevices/GetEncryptionReportForDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEncryptionReportForDevices/GetEncryptionReportForDevicesRequestBuilder.cs @@ -50,7 +50,7 @@ public GetEncryptionReportForDevicesRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetEncryptionReportForDevices.GetEncryptionReportForDevicesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetEncryptionReportForDevices.GetEncryptionReportForDevicesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEnrollmentConfigurationPoliciesByDevice/GetEnrollmentConfigurationPoliciesByDevicePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEnrollmentConfigurationPoliciesByDevice/GetEnrollmentConfigurationPoliciesByDevicePostRequestBody.cs index 980b44e2a20..e7a3445f366 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEnrollmentConfigurationPoliciesByDevice/GetEnrollmentConfigurationPoliciesByDevicePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEnrollmentConfigurationPoliciesByDevice/GetEnrollmentConfigurationPoliciesByDevicePostRequestBody.cs @@ -144,7 +144,7 @@ public GetEnrollmentConfigurationPoliciesByDevicePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetEnrollmentConfigurationPoliciesByDevice.GetEnrollmentConfigurationPoliciesByDevicePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetEnrollmentConfigurationPoliciesByDevice.GetEnrollmentConfigurationPoliciesByDevicePostRequestBody(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEnrollmentConfigurationPoliciesByDevice/GetEnrollmentConfigurationPoliciesByDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEnrollmentConfigurationPoliciesByDevice/GetEnrollmentConfigurationPoliciesByDeviceRequestBuilder.cs index 5a5fa454fea..8c3513a95b8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEnrollmentConfigurationPoliciesByDevice/GetEnrollmentConfigurationPoliciesByDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetEnrollmentConfigurationPoliciesByDevice/GetEnrollmentConfigurationPoliciesByDeviceRequestBuilder.cs @@ -50,7 +50,7 @@ public GetEnrollmentConfigurationPoliciesByDeviceRequestBuilder(string rawUrl, I public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetEnrollmentConfigurationPoliciesByDevice.GetEnrollmentConfigurationPoliciesByDevicePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetEnrollmentConfigurationPoliciesByDevice.GetEnrollmentConfigurationPoliciesByDevicePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsReport/GetFailedMobileAppsReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsReport/GetFailedMobileAppsReportPostRequestBody.cs index 2af598edbe2..e37015f9579 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsReport/GetFailedMobileAppsReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsReport/GetFailedMobileAppsReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetFailedMobileAppsReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetFailedMobileAppsReport.GetFailedMobileAppsReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetFailedMobileAppsReport.GetFailedMobileAppsReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsReport/GetFailedMobileAppsReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsReport/GetFailedMobileAppsReportRequestBuilder.cs index d1bde1ad0f1..b568b38b1c0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsReport/GetFailedMobileAppsReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsReport/GetFailedMobileAppsReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetFailedMobileAppsReportRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetFailedMobileAppsReport.GetFailedMobileAppsReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetFailedMobileAppsReport.GetFailedMobileAppsReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsSummaryReport/GetFailedMobileAppsSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsSummaryReport/GetFailedMobileAppsSummaryReportPostRequestBody.cs index 178f375c18d..6f8948abf80 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsSummaryReport/GetFailedMobileAppsSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsSummaryReport/GetFailedMobileAppsSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetFailedMobileAppsSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetFailedMobileAppsSummaryReport.GetFailedMobileAppsSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetFailedMobileAppsSummaryReport.GetFailedMobileAppsSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsSummaryReport/GetFailedMobileAppsSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsSummaryReport/GetFailedMobileAppsSummaryReportRequestBuilder.cs index 2f653949dfe..22f6b884830 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsSummaryReport/GetFailedMobileAppsSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetFailedMobileAppsSummaryReport/GetFailedMobileAppsSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetFailedMobileAppsSummaryReportRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetFailedMobileAppsSummaryReport.GetFailedMobileAppsSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetFailedMobileAppsSummaryReport.GetFailedMobileAppsSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetGroupPolicySettingsDeviceSettingsReport/GetGroupPolicySettingsDeviceSettingsReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetGroupPolicySettingsDeviceSettingsReport/GetGroupPolicySettingsDeviceSettingsReportPostRequestBody.cs index faa1a033a21..2ce630ac293 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetGroupPolicySettingsDeviceSettingsReport/GetGroupPolicySettingsDeviceSettingsReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetGroupPolicySettingsDeviceSettingsReport/GetGroupPolicySettingsDeviceSettingsReportPostRequestBody.cs @@ -176,7 +176,7 @@ public GetGroupPolicySettingsDeviceSettingsReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetGroupPolicySettingsDeviceSettingsReport.GetGroupPolicySettingsDeviceSettingsReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetGroupPolicySettingsDeviceSettingsReport.GetGroupPolicySettingsDeviceSettingsReportPostRequestBody(); } /// @@ -205,7 +205,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetGroupPolicySettingsDeviceSettingsReport/GetGroupPolicySettingsDeviceSettingsReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetGroupPolicySettingsDeviceSettingsReport/GetGroupPolicySettingsDeviceSettingsReportRequestBuilder.cs index 47a2c8e6b66..d649e88bd44 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetGroupPolicySettingsDeviceSettingsReport/GetGroupPolicySettingsDeviceSettingsReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetGroupPolicySettingsDeviceSettingsReport/GetGroupPolicySettingsDeviceSettingsReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetGroupPolicySettingsDeviceSettingsReportRequestBuilder(string rawUrl, I public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetGroupPolicySettingsDeviceSettingsReport.GetGroupPolicySettingsDeviceSettingsReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetGroupPolicySettingsDeviceSettingsReport.GetGroupPolicySettingsDeviceSettingsReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetHistoricalReport/GetHistoricalReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetHistoricalReport/GetHistoricalReportPostRequestBody.cs index 38cbc9bb832..460d379ffb7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetHistoricalReport/GetHistoricalReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetHistoricalReport/GetHistoricalReportPostRequestBody.cs @@ -144,7 +144,7 @@ public GetHistoricalReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetHistoricalReport.GetHistoricalReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetHistoricalReport.GetHistoricalReportPostRequestBody(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetHistoricalReport/GetHistoricalReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetHistoricalReport/GetHistoricalReportRequestBuilder.cs index c9c56a41be3..1ca98ff27f3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetHistoricalReport/GetHistoricalReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetHistoricalReport/GetHistoricalReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetHistoricalReportRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetHistoricalReport.GetHistoricalReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetHistoricalReport.GetHistoricalReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMalwareSummaryReport/GetMalwareSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMalwareSummaryReport/GetMalwareSummaryReportPostRequestBody.cs index 949d9b915d4..c96b092ac4d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMalwareSummaryReport/GetMalwareSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMalwareSummaryReport/GetMalwareSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetMalwareSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetMalwareSummaryReport.GetMalwareSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetMalwareSummaryReport.GetMalwareSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMalwareSummaryReport/GetMalwareSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMalwareSummaryReport/GetMalwareSummaryReportRequestBuilder.cs index 60856c6c6b6..4eb7bc2ad86 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMalwareSummaryReport/GetMalwareSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMalwareSummaryReport/GetMalwareSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMalwareSummaryReportRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetMalwareSummaryReport.GetMalwareSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetMalwareSummaryReport.GetMalwareSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppConfigurationReport/GetMobileApplicationManagementAppConfigurationReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppConfigurationReport/GetMobileApplicationManagementAppConfigurationReportPostRequestBody.cs index 8e9f32b8755..3f3a5a2f6fa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppConfigurationReport/GetMobileApplicationManagementAppConfigurationReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppConfigurationReport/GetMobileApplicationManagementAppConfigurationReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetMobileApplicationManagementAppConfigurationReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetMobileApplicationManagementAppConfigurationReport.GetMobileApplicationManagementAppConfigurationReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetMobileApplicationManagementAppConfigurationReport.GetMobileApplicationManagementAppConfigurationReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppConfigurationReport/GetMobileApplicationManagementAppConfigurationReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppConfigurationReport/GetMobileApplicationManagementAppConfigurationReportRequestBuilder.cs index c988dbb7318..5573f00f938 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppConfigurationReport/GetMobileApplicationManagementAppConfigurationReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppConfigurationReport/GetMobileApplicationManagementAppConfigurationReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMobileApplicationManagementAppConfigurationReportRequestBuilder(string public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetMobileApplicationManagementAppConfigurationReport.GetMobileApplicationManagementAppConfigurationReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetMobileApplicationManagementAppConfigurationReport.GetMobileApplicationManagementAppConfigurationReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppRegistrationSummaryReport/GetMobileApplicationManagementAppRegistrationSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppRegistrationSummaryReport/GetMobileApplicationManagementAppRegistrationSummaryReportPostRequestBody.cs index 3f79dc0f79f..d758349b3a7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppRegistrationSummaryReport/GetMobileApplicationManagementAppRegistrationSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppRegistrationSummaryReport/GetMobileApplicationManagementAppRegistrationSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetMobileApplicationManagementAppRegistrationSummaryReportPostRequestBody /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetMobileApplicationManagementAppRegistrationSummaryReport.GetMobileApplicationManagementAppRegistrationSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetMobileApplicationManagementAppRegistrationSummaryReport.GetMobileApplicationManagementAppRegistrationSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppRegistrationSummaryReport/GetMobileApplicationManagementAppRegistrationSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppRegistrationSummaryReport/GetMobileApplicationManagementAppRegistrationSummaryReportRequestBuilder.cs index 5304342c63d..91f86c39f4d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppRegistrationSummaryReport/GetMobileApplicationManagementAppRegistrationSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetMobileApplicationManagementAppRegistrationSummaryReport/GetMobileApplicationManagementAppRegistrationSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMobileApplicationManagementAppRegistrationSummaryReportRequestBuilder( public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetMobileApplicationManagementAppRegistrationSummaryReport.GetMobileApplicationManagementAppRegistrationSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetMobileApplicationManagementAppRegistrationSummaryReport.GetMobileApplicationManagementAppRegistrationSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetNoncompliantDevicesAndSettingsReport/GetNoncompliantDevicesAndSettingsReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetNoncompliantDevicesAndSettingsReport/GetNoncompliantDevicesAndSettingsReportPostRequestBody.cs index 4aa0e6b7bf2..285fc593d08 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetNoncompliantDevicesAndSettingsReport/GetNoncompliantDevicesAndSettingsReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetNoncompliantDevicesAndSettingsReport/GetNoncompliantDevicesAndSettingsReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetNoncompliantDevicesAndSettingsReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetNoncompliantDevicesAndSettingsReport.GetNoncompliantDevicesAndSettingsReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetNoncompliantDevicesAndSettingsReport.GetNoncompliantDevicesAndSettingsReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetNoncompliantDevicesAndSettingsReport/GetNoncompliantDevicesAndSettingsReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetNoncompliantDevicesAndSettingsReport/GetNoncompliantDevicesAndSettingsReportRequestBuilder.cs index 1003945d06f..e1caf9ed819 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetNoncompliantDevicesAndSettingsReport/GetNoncompliantDevicesAndSettingsReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetNoncompliantDevicesAndSettingsReport/GetNoncompliantDevicesAndSettingsReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetNoncompliantDevicesAndSettingsReportRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetNoncompliantDevicesAndSettingsReport.GetNoncompliantDevicesAndSettingsReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetNoncompliantDevicesAndSettingsReport.GetNoncompliantDevicesAndSettingsReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceMetadata/GetPolicyNonComplianceMetadataPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceMetadata/GetPolicyNonComplianceMetadataPostRequestBody.cs index 431aac0d062..d92f265c21b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceMetadata/GetPolicyNonComplianceMetadataPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceMetadata/GetPolicyNonComplianceMetadataPostRequestBody.cs @@ -160,7 +160,7 @@ public GetPolicyNonComplianceMetadataPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetPolicyNonComplianceMetadata.GetPolicyNonComplianceMetadataPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetPolicyNonComplianceMetadata.GetPolicyNonComplianceMetadataPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceMetadata/GetPolicyNonComplianceMetadataRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceMetadata/GetPolicyNonComplianceMetadataRequestBuilder.cs index 281c520b600..be104bee35e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceMetadata/GetPolicyNonComplianceMetadataRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceMetadata/GetPolicyNonComplianceMetadataRequestBuilder.cs @@ -50,7 +50,7 @@ public GetPolicyNonComplianceMetadataRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetPolicyNonComplianceMetadata.GetPolicyNonComplianceMetadataPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetPolicyNonComplianceMetadata.GetPolicyNonComplianceMetadataPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceReport/GetPolicyNonComplianceReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceReport/GetPolicyNonComplianceReportPostRequestBody.cs index 30f163a4745..275c94516f4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceReport/GetPolicyNonComplianceReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceReport/GetPolicyNonComplianceReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetPolicyNonComplianceReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetPolicyNonComplianceReport.GetPolicyNonComplianceReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetPolicyNonComplianceReport.GetPolicyNonComplianceReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceReport/GetPolicyNonComplianceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceReport/GetPolicyNonComplianceReportRequestBuilder.cs index 448b1c2c8ff..0665065e14e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceReport/GetPolicyNonComplianceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceReport/GetPolicyNonComplianceReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetPolicyNonComplianceReportRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetPolicyNonComplianceReport.GetPolicyNonComplianceReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetPolicyNonComplianceReport.GetPolicyNonComplianceReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceSummaryReport/GetPolicyNonComplianceSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceSummaryReport/GetPolicyNonComplianceSummaryReportPostRequestBody.cs index d3edd0d0f49..57d085ab44c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceSummaryReport/GetPolicyNonComplianceSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceSummaryReport/GetPolicyNonComplianceSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetPolicyNonComplianceSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetPolicyNonComplianceSummaryReport.GetPolicyNonComplianceSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetPolicyNonComplianceSummaryReport.GetPolicyNonComplianceSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceSummaryReport/GetPolicyNonComplianceSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceSummaryReport/GetPolicyNonComplianceSummaryReportRequestBuilder.cs index 3701b69252e..f06b1141eb3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceSummaryReport/GetPolicyNonComplianceSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetPolicyNonComplianceSummaryReport/GetPolicyNonComplianceSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetPolicyNonComplianceSummaryReportRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetPolicyNonComplianceSummaryReport.GetPolicyNonComplianceSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetPolicyNonComplianceSummaryReport.GetPolicyNonComplianceSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUserSummaryReport/GetQuietTimePolicyUserSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUserSummaryReport/GetQuietTimePolicyUserSummaryReportPostRequestBody.cs index 6d75b0bf997..ff7b6c77c10 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUserSummaryReport/GetQuietTimePolicyUserSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUserSummaryReport/GetQuietTimePolicyUserSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetQuietTimePolicyUserSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetQuietTimePolicyUserSummaryReport.GetQuietTimePolicyUserSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetQuietTimePolicyUserSummaryReport.GetQuietTimePolicyUserSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUserSummaryReport/GetQuietTimePolicyUserSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUserSummaryReport/GetQuietTimePolicyUserSummaryReportRequestBuilder.cs index df672105c37..c8e4db2eba5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUserSummaryReport/GetQuietTimePolicyUserSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUserSummaryReport/GetQuietTimePolicyUserSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetQuietTimePolicyUserSummaryReportRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetQuietTimePolicyUserSummaryReport.GetQuietTimePolicyUserSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetQuietTimePolicyUserSummaryReport.GetQuietTimePolicyUserSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUsersReport/GetQuietTimePolicyUsersReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUsersReport/GetQuietTimePolicyUsersReportPostRequestBody.cs index 34bb071d5fc..c5a8ecdcdea 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUsersReport/GetQuietTimePolicyUsersReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUsersReport/GetQuietTimePolicyUsersReportPostRequestBody.cs @@ -176,7 +176,7 @@ public GetQuietTimePolicyUsersReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetQuietTimePolicyUsersReport.GetQuietTimePolicyUsersReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetQuietTimePolicyUsersReport.GetQuietTimePolicyUsersReportPostRequestBody(); } /// @@ -205,7 +205,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUsersReport/GetQuietTimePolicyUsersReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUsersReport/GetQuietTimePolicyUsersReportRequestBuilder.cs index 8ba7e268180..1add1984f2f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUsersReport/GetQuietTimePolicyUsersReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetQuietTimePolicyUsersReport/GetQuietTimePolicyUsersReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetQuietTimePolicyUsersReportRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetQuietTimePolicyUsersReport.GetQuietTimePolicyUsersReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetQuietTimePolicyUsersReport.GetQuietTimePolicyUsersReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRelatedAppsStatusReport/GetRelatedAppsStatusReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRelatedAppsStatusReport/GetRelatedAppsStatusReportPostRequestBody.cs index 5213054f157..ae4d278234f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRelatedAppsStatusReport/GetRelatedAppsStatusReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRelatedAppsStatusReport/GetRelatedAppsStatusReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetRelatedAppsStatusReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetRelatedAppsStatusReport.GetRelatedAppsStatusReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetRelatedAppsStatusReport.GetRelatedAppsStatusReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRelatedAppsStatusReport/GetRelatedAppsStatusReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRelatedAppsStatusReport/GetRelatedAppsStatusReportRequestBuilder.cs index 569d4b8100d..c4038298864 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRelatedAppsStatusReport/GetRelatedAppsStatusReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRelatedAppsStatusReport/GetRelatedAppsStatusReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetRelatedAppsStatusReportRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetRelatedAppsStatusReport.GetRelatedAppsStatusReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetRelatedAppsStatusReport.GetRelatedAppsStatusReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRemoteAssistanceSessionsReport/GetRemoteAssistanceSessionsReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRemoteAssistanceSessionsReport/GetRemoteAssistanceSessionsReportPostRequestBody.cs index 54eb16094ac..c286d8e42d0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRemoteAssistanceSessionsReport/GetRemoteAssistanceSessionsReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRemoteAssistanceSessionsReport/GetRemoteAssistanceSessionsReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetRemoteAssistanceSessionsReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetRemoteAssistanceSessionsReport.GetRemoteAssistanceSessionsReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetRemoteAssistanceSessionsReport.GetRemoteAssistanceSessionsReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRemoteAssistanceSessionsReport/GetRemoteAssistanceSessionsReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRemoteAssistanceSessionsReport/GetRemoteAssistanceSessionsReportRequestBuilder.cs index 6cec168c743..3e928c37827 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRemoteAssistanceSessionsReport/GetRemoteAssistanceSessionsReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetRemoteAssistanceSessionsReport/GetRemoteAssistanceSessionsReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetRemoteAssistanceSessionsReportRequestBuilder(string rawUrl, IRequestAd public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetRemoteAssistanceSessionsReport.GetRemoteAssistanceSessionsReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetRemoteAssistanceSessionsReport.GetRemoteAssistanceSessionsReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetReportFilters/GetReportFiltersPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetReportFilters/GetReportFiltersPostRequestBody.cs index 83359990a57..7057ef16d7c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetReportFilters/GetReportFiltersPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetReportFilters/GetReportFiltersPostRequestBody.cs @@ -160,7 +160,7 @@ public GetReportFiltersPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetReportFilters.GetReportFiltersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetReportFilters.GetReportFiltersPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetReportFilters/GetReportFiltersRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetReportFilters/GetReportFiltersRequestBuilder.cs index a6a312527a3..aa4315986d9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetReportFilters/GetReportFiltersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetReportFilters/GetReportFiltersRequestBuilder.cs @@ -50,7 +50,7 @@ public GetReportFiltersRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetReportFilters.GetReportFiltersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetReportFilters.GetReportFiltersPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetSettingNonComplianceReport/GetSettingNonComplianceReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetSettingNonComplianceReport/GetSettingNonComplianceReportPostRequestBody.cs index 7fc6c85e346..91c3924d929 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetSettingNonComplianceReport/GetSettingNonComplianceReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetSettingNonComplianceReport/GetSettingNonComplianceReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetSettingNonComplianceReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetSettingNonComplianceReport.GetSettingNonComplianceReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetSettingNonComplianceReport.GetSettingNonComplianceReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetSettingNonComplianceReport/GetSettingNonComplianceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetSettingNonComplianceReport/GetSettingNonComplianceReportRequestBuilder.cs index 53f3607711b..d59dc648564 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetSettingNonComplianceReport/GetSettingNonComplianceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetSettingNonComplianceReport/GetSettingNonComplianceReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetSettingNonComplianceReportRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetSettingNonComplianceReport.GetSettingNonComplianceReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetSettingNonComplianceReport.GetSettingNonComplianceReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyDefenderAgentsReport/GetUnhealthyDefenderAgentsReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyDefenderAgentsReport/GetUnhealthyDefenderAgentsReportPostRequestBody.cs index 682f7fe2546..2ce175695e7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyDefenderAgentsReport/GetUnhealthyDefenderAgentsReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyDefenderAgentsReport/GetUnhealthyDefenderAgentsReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetUnhealthyDefenderAgentsReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUnhealthyDefenderAgentsReport.GetUnhealthyDefenderAgentsReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUnhealthyDefenderAgentsReport.GetUnhealthyDefenderAgentsReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyDefenderAgentsReport/GetUnhealthyDefenderAgentsReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyDefenderAgentsReport/GetUnhealthyDefenderAgentsReportRequestBuilder.cs index b3c28d3e534..6147ff1d823 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyDefenderAgentsReport/GetUnhealthyDefenderAgentsReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyDefenderAgentsReport/GetUnhealthyDefenderAgentsReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetUnhealthyDefenderAgentsReportRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUnhealthyDefenderAgentsReport.GetUnhealthyDefenderAgentsReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUnhealthyDefenderAgentsReport.GetUnhealthyDefenderAgentsReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallReport/GetUnhealthyFirewallReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallReport/GetUnhealthyFirewallReportPostRequestBody.cs index 290b440f87d..f605ab6702b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallReport/GetUnhealthyFirewallReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallReport/GetUnhealthyFirewallReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetUnhealthyFirewallReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUnhealthyFirewallReport.GetUnhealthyFirewallReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUnhealthyFirewallReport.GetUnhealthyFirewallReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallReport/GetUnhealthyFirewallReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallReport/GetUnhealthyFirewallReportRequestBuilder.cs index 32ffa81e60a..9d935913fcc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallReport/GetUnhealthyFirewallReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallReport/GetUnhealthyFirewallReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetUnhealthyFirewallReportRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUnhealthyFirewallReport.GetUnhealthyFirewallReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUnhealthyFirewallReport.GetUnhealthyFirewallReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallSummaryReport/GetUnhealthyFirewallSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallSummaryReport/GetUnhealthyFirewallSummaryReportPostRequestBody.cs index d60a40c6ff5..5c854803c8b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallSummaryReport/GetUnhealthyFirewallSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallSummaryReport/GetUnhealthyFirewallSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetUnhealthyFirewallSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUnhealthyFirewallSummaryReport.GetUnhealthyFirewallSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUnhealthyFirewallSummaryReport.GetUnhealthyFirewallSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallSummaryReport/GetUnhealthyFirewallSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallSummaryReport/GetUnhealthyFirewallSummaryReportRequestBuilder.cs index a58f1af5703..bb06e26c625 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallSummaryReport/GetUnhealthyFirewallSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUnhealthyFirewallSummaryReport/GetUnhealthyFirewallSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetUnhealthyFirewallSummaryReportRequestBuilder(string rawUrl, IRequestAd public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUnhealthyFirewallSummaryReport.GetUnhealthyFirewallSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUnhealthyFirewallSummaryReport.GetUnhealthyFirewallSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUserInstallStatusReport/GetUserInstallStatusReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUserInstallStatusReport/GetUserInstallStatusReportPostRequestBody.cs index 55ef33e5272..f0615fce91f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUserInstallStatusReport/GetUserInstallStatusReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUserInstallStatusReport/GetUserInstallStatusReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetUserInstallStatusReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUserInstallStatusReport.GetUserInstallStatusReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUserInstallStatusReport.GetUserInstallStatusReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUserInstallStatusReport/GetUserInstallStatusReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUserInstallStatusReport/GetUserInstallStatusReportRequestBuilder.cs index 4b6c8734d03..30f3a2a4786 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUserInstallStatusReport/GetUserInstallStatusReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetUserInstallStatusReport/GetUserInstallStatusReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetUserInstallStatusReportRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUserInstallStatusReport.GetUserInstallStatusReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetUserInstallStatusReport.GetUserInstallStatusReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertSummaryReport/GetWindowsDriverUpdateAlertSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertSummaryReport/GetWindowsDriverUpdateAlertSummaryReportPostRequestBody.cs index 019e862da39..34ce44684ea 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertSummaryReport/GetWindowsDriverUpdateAlertSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertSummaryReport/GetWindowsDriverUpdateAlertSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetWindowsDriverUpdateAlertSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsDriverUpdateAlertSummaryReport.GetWindowsDriverUpdateAlertSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsDriverUpdateAlertSummaryReport.GetWindowsDriverUpdateAlertSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertSummaryReport/GetWindowsDriverUpdateAlertSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertSummaryReport/GetWindowsDriverUpdateAlertSummaryReportRequestBuilder.cs index 7459d637045..298f757420a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertSummaryReport/GetWindowsDriverUpdateAlertSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertSummaryReport/GetWindowsDriverUpdateAlertSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetWindowsDriverUpdateAlertSummaryReportRequestBuilder(string rawUrl, IRe public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsDriverUpdateAlertSummaryReport.GetWindowsDriverUpdateAlertSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsDriverUpdateAlertSummaryReport.GetWindowsDriverUpdateAlertSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReport/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReport/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReportPostRequestBody.cs index 53a47f2ca6a..9c41cfd3335 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReport/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReport/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReport.GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReport.GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReport/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReport/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReportRequestBuilder.cs index 81aa8c8761f..6af6a8e7a55 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReport/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReport/GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReportRequestBuilder(string public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReport.GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReport.GetWindowsDriverUpdateAlertsPerPolicyPerDeviceReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertSummaryReport/GetWindowsQualityUpdateAlertSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertSummaryReport/GetWindowsQualityUpdateAlertSummaryReportPostRequestBody.cs index 41d66aada1b..e870cf9d6ed 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertSummaryReport/GetWindowsQualityUpdateAlertSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertSummaryReport/GetWindowsQualityUpdateAlertSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetWindowsQualityUpdateAlertSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsQualityUpdateAlertSummaryReport.GetWindowsQualityUpdateAlertSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsQualityUpdateAlertSummaryReport.GetWindowsQualityUpdateAlertSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertSummaryReport/GetWindowsQualityUpdateAlertSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertSummaryReport/GetWindowsQualityUpdateAlertSummaryReportRequestBuilder.cs index de8d756fe31..38697777f73 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertSummaryReport/GetWindowsQualityUpdateAlertSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertSummaryReport/GetWindowsQualityUpdateAlertSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetWindowsQualityUpdateAlertSummaryReportRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsQualityUpdateAlertSummaryReport.GetWindowsQualityUpdateAlertSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsQualityUpdateAlertSummaryReport.GetWindowsQualityUpdateAlertSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReport/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReport/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReportPostRequestBody.cs index c1fc664c989..3cae3db2189 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReport/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReport/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReport.GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReport.GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReport/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReport/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReportRequestBuilder.cs index 6c2c7b21b57..1d0b4af3380 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReport/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReport/GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReportRequestBuilder(strin public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReport.GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReport.GetWindowsQualityUpdateAlertsPerPolicyPerDeviceReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertSummaryReport/GetWindowsUpdateAlertSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertSummaryReport/GetWindowsUpdateAlertSummaryReportPostRequestBody.cs index 6c9d9c60dac..d6e0172df1c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertSummaryReport/GetWindowsUpdateAlertSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertSummaryReport/GetWindowsUpdateAlertSummaryReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetWindowsUpdateAlertSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsUpdateAlertSummaryReport.GetWindowsUpdateAlertSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsUpdateAlertSummaryReport.GetWindowsUpdateAlertSummaryReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertSummaryReport/GetWindowsUpdateAlertSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertSummaryReport/GetWindowsUpdateAlertSummaryReportRequestBuilder.cs index 2b0d9f9b7d7..e2a7308a7d8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertSummaryReport/GetWindowsUpdateAlertSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertSummaryReport/GetWindowsUpdateAlertSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetWindowsUpdateAlertSummaryReportRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsUpdateAlertSummaryReport.GetWindowsUpdateAlertSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsUpdateAlertSummaryReport.GetWindowsUpdateAlertSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertsPerPolicyPerDeviceReport/GetWindowsUpdateAlertsPerPolicyPerDeviceReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertsPerPolicyPerDeviceReport/GetWindowsUpdateAlertsPerPolicyPerDeviceReportPostRequestBody.cs index 3f6276947ba..3c12da7ec54 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertsPerPolicyPerDeviceReport/GetWindowsUpdateAlertsPerPolicyPerDeviceReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertsPerPolicyPerDeviceReport/GetWindowsUpdateAlertsPerPolicyPerDeviceReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetWindowsUpdateAlertsPerPolicyPerDeviceReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsUpdateAlertsPerPolicyPerDeviceReport.GetWindowsUpdateAlertsPerPolicyPerDeviceReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsUpdateAlertsPerPolicyPerDeviceReport.GetWindowsUpdateAlertsPerPolicyPerDeviceReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertsPerPolicyPerDeviceReport/GetWindowsUpdateAlertsPerPolicyPerDeviceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertsPerPolicyPerDeviceReport/GetWindowsUpdateAlertsPerPolicyPerDeviceReportRequestBuilder.cs index bfafddefd29..ea1a2bc443f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertsPerPolicyPerDeviceReport/GetWindowsUpdateAlertsPerPolicyPerDeviceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetWindowsUpdateAlertsPerPolicyPerDeviceReport/GetWindowsUpdateAlertsPerPolicyPerDeviceReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetWindowsUpdateAlertsPerPolicyPerDeviceReportRequestBuilder(string rawUr public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsUpdateAlertsPerPolicyPerDeviceReport.GetWindowsUpdateAlertsPerPolicyPerDeviceReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetWindowsUpdateAlertsPerPolicyPerDeviceReport.GetWindowsUpdateAlertsPerPolicyPerDeviceReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetZebraFotaDeploymentReport/GetZebraFotaDeploymentReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetZebraFotaDeploymentReport/GetZebraFotaDeploymentReportPostRequestBody.cs index eddceac3efe..cd4e2570795 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetZebraFotaDeploymentReport/GetZebraFotaDeploymentReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetZebraFotaDeploymentReport/GetZebraFotaDeploymentReportPostRequestBody.cs @@ -160,7 +160,7 @@ public GetZebraFotaDeploymentReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetZebraFotaDeploymentReport.GetZebraFotaDeploymentReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetZebraFotaDeploymentReport.GetZebraFotaDeploymentReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetZebraFotaDeploymentReport/GetZebraFotaDeploymentReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetZebraFotaDeploymentReport/GetZebraFotaDeploymentReportRequestBuilder.cs index 81ca247f95d..581f7f4d808 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetZebraFotaDeploymentReport/GetZebraFotaDeploymentReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/GetZebraFotaDeploymentReport/GetZebraFotaDeploymentReportRequestBuilder.cs @@ -50,7 +50,7 @@ public GetZebraFotaDeploymentReportRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetZebraFotaDeploymentReport.GetZebraFotaDeploymentReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.GetZebraFotaDeploymentReport.GetZebraFotaDeploymentReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/ReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/ReportsRequestBuilder.cs index 986ff3fc1d3..7e08f172c6e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/ReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/ReportsRequestBuilder.cs @@ -570,7 +570,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementReports body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -631,7 +631,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementReports body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAndroidWorkProfileDeviceMigrationStatuses/RetrieveAndroidWorkProfileDeviceMigrationStatusesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAndroidWorkProfileDeviceMigrationStatuses/RetrieveAndroidWorkProfileDeviceMigrationStatusesPostRequestBody.cs index d17ce1db81e..7538c7abf92 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAndroidWorkProfileDeviceMigrationStatuses/RetrieveAndroidWorkProfileDeviceMigrationStatusesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAndroidWorkProfileDeviceMigrationStatuses/RetrieveAndroidWorkProfileDeviceMigrationStatusesPostRequestBody.cs @@ -160,7 +160,7 @@ public RetrieveAndroidWorkProfileDeviceMigrationStatusesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveAndroidWorkProfileDeviceMigrationStatuses.RetrieveAndroidWorkProfileDeviceMigrationStatusesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveAndroidWorkProfileDeviceMigrationStatuses.RetrieveAndroidWorkProfileDeviceMigrationStatusesPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAndroidWorkProfileDeviceMigrationStatuses/RetrieveAndroidWorkProfileDeviceMigrationStatusesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAndroidWorkProfileDeviceMigrationStatuses/RetrieveAndroidWorkProfileDeviceMigrationStatusesRequestBuilder.cs index 5df44a434c5..30a24a39620 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAndroidWorkProfileDeviceMigrationStatuses/RetrieveAndroidWorkProfileDeviceMigrationStatusesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAndroidWorkProfileDeviceMigrationStatuses/RetrieveAndroidWorkProfileDeviceMigrationStatusesRequestBuilder.cs @@ -50,7 +50,7 @@ public RetrieveAndroidWorkProfileDeviceMigrationStatusesRequestBuilder(string ra public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveAndroidWorkProfileDeviceMigrationStatuses.RetrieveAndroidWorkProfileDeviceMigrationStatusesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveAndroidWorkProfileDeviceMigrationStatuses.RetrieveAndroidWorkProfileDeviceMigrationStatusesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleDeviceOSUpdateStatus/RetrieveAppleDeviceOSUpdateStatusPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleDeviceOSUpdateStatus/RetrieveAppleDeviceOSUpdateStatusPostRequestBody.cs index 99722f8f1a1..7e635032d9e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleDeviceOSUpdateStatus/RetrieveAppleDeviceOSUpdateStatusPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleDeviceOSUpdateStatus/RetrieveAppleDeviceOSUpdateStatusPostRequestBody.cs @@ -160,7 +160,7 @@ public RetrieveAppleDeviceOSUpdateStatusPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveAppleDeviceOSUpdateStatus.RetrieveAppleDeviceOSUpdateStatusPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveAppleDeviceOSUpdateStatus.RetrieveAppleDeviceOSUpdateStatusPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleDeviceOSUpdateStatus/RetrieveAppleDeviceOSUpdateStatusRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleDeviceOSUpdateStatus/RetrieveAppleDeviceOSUpdateStatusRequestBuilder.cs index 8b30d61ca5e..d86b9203a37 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleDeviceOSUpdateStatus/RetrieveAppleDeviceOSUpdateStatusRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleDeviceOSUpdateStatus/RetrieveAppleDeviceOSUpdateStatusRequestBuilder.cs @@ -50,7 +50,7 @@ public RetrieveAppleDeviceOSUpdateStatusRequestBuilder(string rawUrl, IRequestAd public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveAppleDeviceOSUpdateStatus.RetrieveAppleDeviceOSUpdateStatusPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveAppleDeviceOSUpdateStatus.RetrieveAppleDeviceOSUpdateStatusPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleOSUpdateFailures/RetrieveAppleOSUpdateFailuresPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleOSUpdateFailures/RetrieveAppleOSUpdateFailuresPostRequestBody.cs index b939000352f..3c998f6853b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleOSUpdateFailures/RetrieveAppleOSUpdateFailuresPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleOSUpdateFailures/RetrieveAppleOSUpdateFailuresPostRequestBody.cs @@ -160,7 +160,7 @@ public RetrieveAppleOSUpdateFailuresPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveAppleOSUpdateFailures.RetrieveAppleOSUpdateFailuresPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveAppleOSUpdateFailures.RetrieveAppleOSUpdateFailuresPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleOSUpdateFailures/RetrieveAppleOSUpdateFailuresRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleOSUpdateFailures/RetrieveAppleOSUpdateFailuresRequestBuilder.cs index 07fc400bbf6..56787ea156e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleOSUpdateFailures/RetrieveAppleOSUpdateFailuresRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveAppleOSUpdateFailures/RetrieveAppleOSUpdateFailuresRequestBuilder.cs @@ -50,7 +50,7 @@ public RetrieveAppleOSUpdateFailuresRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveAppleOSUpdateFailures.RetrieveAppleOSUpdateFailuresPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveAppleOSUpdateFailures.RetrieveAppleOSUpdateFailuresPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateReport/RetrieveCloudPkiLeafCertificateReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateReport/RetrieveCloudPkiLeafCertificateReportPostRequestBody.cs index 0fb02d220b4..b92c6489d6c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateReport/RetrieveCloudPkiLeafCertificateReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateReport/RetrieveCloudPkiLeafCertificateReportPostRequestBody.cs @@ -128,7 +128,7 @@ public RetrieveCloudPkiLeafCertificateReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveCloudPkiLeafCertificateReport.RetrieveCloudPkiLeafCertificateReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveCloudPkiLeafCertificateReport.RetrieveCloudPkiLeafCertificateReportPostRequestBody(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("certificationAuthorityId", CertificationAuthorityId); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateReport/RetrieveCloudPkiLeafCertificateReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateReport/RetrieveCloudPkiLeafCertificateReportRequestBuilder.cs index c5888e62e99..0dbb771dac9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateReport/RetrieveCloudPkiLeafCertificateReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateReport/RetrieveCloudPkiLeafCertificateReportRequestBuilder.cs @@ -50,7 +50,7 @@ public RetrieveCloudPkiLeafCertificateReportRequestBuilder(string rawUrl, IReque public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveCloudPkiLeafCertificateReport.RetrieveCloudPkiLeafCertificateReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveCloudPkiLeafCertificateReport.RetrieveCloudPkiLeafCertificateReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateSummaryReport/RetrieveCloudPkiLeafCertificateSummaryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateSummaryReport/RetrieveCloudPkiLeafCertificateSummaryReportPostRequestBody.cs index 7fb477cb3c0..acc75caa39a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateSummaryReport/RetrieveCloudPkiLeafCertificateSummaryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateSummaryReport/RetrieveCloudPkiLeafCertificateSummaryReportPostRequestBody.cs @@ -68,7 +68,7 @@ public RetrieveCloudPkiLeafCertificateSummaryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveCloudPkiLeafCertificateSummaryReport.RetrieveCloudPkiLeafCertificateSummaryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveCloudPkiLeafCertificateSummaryReport.RetrieveCloudPkiLeafCertificateSummaryReportPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("certificationAuthorityId", CertificationAuthorityId); writer.WriteCollectionOfPrimitiveValues("select", Select); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateSummaryReport/RetrieveCloudPkiLeafCertificateSummaryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateSummaryReport/RetrieveCloudPkiLeafCertificateSummaryReportRequestBuilder.cs index 453a64a1161..e371d52b807 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateSummaryReport/RetrieveCloudPkiLeafCertificateSummaryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveCloudPkiLeafCertificateSummaryReport/RetrieveCloudPkiLeafCertificateSummaryReportRequestBuilder.cs @@ -50,7 +50,7 @@ public RetrieveCloudPkiLeafCertificateSummaryReportRequestBuilder(string rawUrl, public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveCloudPkiLeafCertificateSummaryReport.RetrieveCloudPkiLeafCertificateSummaryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveCloudPkiLeafCertificateSummaryReport.RetrieveCloudPkiLeafCertificateSummaryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveDeviceAppInstallationStatusReport/RetrieveDeviceAppInstallationStatusReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveDeviceAppInstallationStatusReport/RetrieveDeviceAppInstallationStatusReportPostRequestBody.cs index 5c79524d7ac..e3cc570fe6f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveDeviceAppInstallationStatusReport/RetrieveDeviceAppInstallationStatusReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveDeviceAppInstallationStatusReport/RetrieveDeviceAppInstallationStatusReportPostRequestBody.cs @@ -160,7 +160,7 @@ public RetrieveDeviceAppInstallationStatusReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveDeviceAppInstallationStatusReport.RetrieveDeviceAppInstallationStatusReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveDeviceAppInstallationStatusReport.RetrieveDeviceAppInstallationStatusReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveDeviceAppInstallationStatusReport/RetrieveDeviceAppInstallationStatusReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveDeviceAppInstallationStatusReport/RetrieveDeviceAppInstallationStatusReportRequestBuilder.cs index 05c9a8789b9..0af28ec6547 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveDeviceAppInstallationStatusReport/RetrieveDeviceAppInstallationStatusReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveDeviceAppInstallationStatusReport/RetrieveDeviceAppInstallationStatusReportRequestBuilder.cs @@ -50,7 +50,7 @@ public RetrieveDeviceAppInstallationStatusReportRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveDeviceAppInstallationStatusReport.RetrieveDeviceAppInstallationStatusReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveDeviceAppInstallationStatusReport.RetrieveDeviceAppInstallationStatusReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveSecurityTaskAppsReport/RetrieveSecurityTaskAppsReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveSecurityTaskAppsReport/RetrieveSecurityTaskAppsReportPostRequestBody.cs index 4b2392a0a02..edb0de888e8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveSecurityTaskAppsReport/RetrieveSecurityTaskAppsReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveSecurityTaskAppsReport/RetrieveSecurityTaskAppsReportPostRequestBody.cs @@ -160,7 +160,7 @@ public RetrieveSecurityTaskAppsReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveSecurityTaskAppsReport.RetrieveSecurityTaskAppsReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveSecurityTaskAppsReport.RetrieveSecurityTaskAppsReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveSecurityTaskAppsReport/RetrieveSecurityTaskAppsReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveSecurityTaskAppsReport/RetrieveSecurityTaskAppsReportRequestBuilder.cs index 9c511b3f94b..62cbc53815f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveSecurityTaskAppsReport/RetrieveSecurityTaskAppsReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveSecurityTaskAppsReport/RetrieveSecurityTaskAppsReportRequestBuilder.cs @@ -50,7 +50,7 @@ public RetrieveSecurityTaskAppsReportRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveSecurityTaskAppsReport.RetrieveSecurityTaskAppsReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveSecurityTaskAppsReport.RetrieveSecurityTaskAppsReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveWin32CatalogAppsUpdateReport/RetrieveWin32CatalogAppsUpdateReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveWin32CatalogAppsUpdateReport/RetrieveWin32CatalogAppsUpdateReportPostRequestBody.cs index 14b565eab74..c6163e477d3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveWin32CatalogAppsUpdateReport/RetrieveWin32CatalogAppsUpdateReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveWin32CatalogAppsUpdateReport/RetrieveWin32CatalogAppsUpdateReportPostRequestBody.cs @@ -160,7 +160,7 @@ public RetrieveWin32CatalogAppsUpdateReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveWin32CatalogAppsUpdateReport.RetrieveWin32CatalogAppsUpdateReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveWin32CatalogAppsUpdateReport.RetrieveWin32CatalogAppsUpdateReportPostRequestBody(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveWin32CatalogAppsUpdateReport/RetrieveWin32CatalogAppsUpdateReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveWin32CatalogAppsUpdateReport/RetrieveWin32CatalogAppsUpdateReportRequestBuilder.cs index 1280d96777c..c486f726e20 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveWin32CatalogAppsUpdateReport/RetrieveWin32CatalogAppsUpdateReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Reports/RetrieveWin32CatalogAppsUpdateReport/RetrieveWin32CatalogAppsUpdateReportRequestBuilder.cs @@ -50,7 +50,7 @@ public RetrieveWin32CatalogAppsUpdateReportRequestBuilder(string rawUrl, IReques public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveWin32CatalogAppsUpdateReport.RetrieveWin32CatalogAppsUpdateReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Reports.RetrieveWin32CatalogAppsUpdateReport.RetrieveWin32CatalogAppsUpdateReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignPostRequestBody.cs index 482eccea714..dadb8de97e2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignPostResponse.cs index b491e275063..5a35fc5a234 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignPostResponse.cs @@ -36,7 +36,7 @@ public partial class AssignPostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.Item.Assign.AssignPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.Item.Assign.AssignPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignRequestBuilder.cs index 95f5d479bdf..c5e698e5f76 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignRequestBuilder.cs @@ -50,7 +50,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsAssignPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignResponse.cs index 16639c5e4df..029a90f2c86 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assign/AssignResponse.cs @@ -20,7 +20,7 @@ public partial class AssignResponse : global::Microsoft.Graph.Beta.DeviceManagem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.Item.Assign.AssignResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.Item.Assign.AssignResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assignments/AssignmentsRequestBuilder.cs index 9c431c885bb..2f6809ce8dc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assignments/Item/DeviceManagementResourceAccessProfileAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assignments/Item/DeviceManagementResourceAccessProfileAssignmentItemRequestBuilder.cs index f94d03e89ab..f8edcbefa0a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assignments/Item/DeviceManagementResourceAccessProfileAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/Assignments/Item/DeviceManagementResourceAccessProfileAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/DeviceManagementResourceAccessProfileBaseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/DeviceManagementResourceAccessProfileBaseItemRequestBuilder.cs index dc96621c1e4..e74391d9044 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/DeviceManagementResourceAccessProfileBaseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/Item/DeviceManagementResourceAccessProfileBaseItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypePostRequestBody.cs index 3c90310fd9f..74c660e3327 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypePostRequestBody.cs @@ -43,7 +43,7 @@ public QueryByPlatformTypePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.QueryByPlatformType.QueryByPlatformTypePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.QueryByPlatformType.QueryByPlatformTypePostRequestBody(); } /// @@ -63,7 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("platformType", PlatformType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypePostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypePostResponse.cs index cea7ffd3ee9..c85b55bcb2a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypePostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypePostResponse.cs @@ -36,7 +36,7 @@ public partial class QueryByPlatformTypePostResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.QueryByPlatformType.QueryByPlatformTypePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.QueryByPlatformType.QueryByPlatformTypePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypeRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypeRequestBuilder.cs index 2f78745b5de..1e137f016ad 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypeRequestBuilder.cs @@ -50,7 +50,7 @@ public QueryByPlatformTypeRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsQueryByPlatformTypePostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.QueryByPlatformType.QueryByPlatformTypePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public QueryByPlatformTypeRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.QueryByPlatformType.QueryByPlatformTypePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.QueryByPlatformType.QueryByPlatformTypePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypeResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypeResponse.cs index 5f91f245777..146867f1e9b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypeResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/QueryByPlatformType/QueryByPlatformTypeResponse.cs @@ -20,7 +20,7 @@ public partial class QueryByPlatformTypeResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.QueryByPlatformType.QueryByPlatformTypeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ResourceAccessProfiles.QueryByPlatformType.QueryByPlatformTypeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/ResourceAccessProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/ResourceAccessProfilesRequestBuilder.cs index 451e2e0a599..a756ffcf2ff 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/ResourceAccessProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceAccessProfiles/ResourceAccessProfilesRequestBuilder.cs @@ -99,7 +99,7 @@ public ResourceAccessProfilesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/Item/GetScopesForUserWithUserid/GetScopesForUserWithUseridGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/Item/GetScopesForUserWithUserid/GetScopesForUserWithUseridGetResponse.cs index 5c112f2a520..d6a440ca991 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/Item/GetScopesForUserWithUserid/GetScopesForUserWithUseridGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/Item/GetScopesForUserWithUserid/GetScopesForUserWithUseridGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ResourceOperations.Item.GetScopesForUserWithUserid.GetScopesForUserWithUseridGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ResourceOperations.Item.GetScopesForUserWithUserid.GetScopesForUserWithUseridGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/Item/GetScopesForUserWithUserid/GetScopesForUserWithUseridResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/Item/GetScopesForUserWithUserid/GetScopesForUserWithUseridResponse.cs index d7dfb519097..497eb1feff2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/Item/GetScopesForUserWithUserid/GetScopesForUserWithUseridResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/Item/GetScopesForUserWithUserid/GetScopesForUserWithUseridResponse.cs @@ -20,7 +20,7 @@ public partial class GetScopesForUserWithUseridResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ResourceOperations.Item.GetScopesForUserWithUserid.GetScopesForUserWithUseridResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ResourceOperations.Item.GetScopesForUserWithUserid.GetScopesForUserWithUseridResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/Item/ResourceOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/Item/ResourceOperationItemRequestBuilder.cs index b73f78212d5..2864168b005 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/Item/ResourceOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/Item/ResourceOperationItemRequestBuilder.cs @@ -107,7 +107,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ResourceOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -168,7 +168,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ResourceOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/ResourceOperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/ResourceOperationsRequestBuilder.cs index f16374dafcb..a1bbef0d9eb 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/ResourceOperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ResourceOperations/ResourceOperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public ResourceOperationsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ResourceOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ResourceOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/DeviceManagementReusablePolicySettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/DeviceManagementReusablePolicySettingItemRequestBuilder.cs index 974da404d8a..816f4bb82d3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/DeviceManagementReusablePolicySettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/DeviceManagementReusablePolicySettingItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementReusablePolicySetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementReusablePolicySetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignPostRequestBody.cs index 0d67f9c29ec..38f5f23a9ad 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignPostResponse.cs index f3a598f35ad..c49f5033c8a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignPostResponse.cs @@ -36,7 +36,7 @@ public partial class AssignPostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.Assign.AssignPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.Assign.AssignPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignRequestBuilder.cs index 2f565d974f7..2535b58a97b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignRequestBuilder.cs @@ -50,7 +50,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsAssignPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignResponse.cs index ac26044f7cc..5ef761e9aa1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assign/AssignResponse.cs @@ -20,7 +20,7 @@ public partial class AssignResponse : global::Microsoft.Graph.Beta.DeviceManagem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.Assign.AssignResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.Assign.AssignResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assignments/AssignmentsRequestBuilder.cs index c634e005417..5da9fabf53b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assignments/Item/DeviceManagementConfigurationPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assignments/Item/DeviceManagementConfigurationPolicyAssignmentItemRequestBuilder.cs index a97bb7d4ea6..254c9f2ec2c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assignments/Item/DeviceManagementConfigurationPolicyAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Assignments/Item/DeviceManagementConfigurationPolicyAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetPostResponse.cs index 751ea4a5d25..0c32e7a8eb4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetPostResponse.cs @@ -42,7 +42,7 @@ public ClearEnrollmentTimeDeviceMembershipTargetPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.ClearEnrollmentTimeDeviceMembershipTarget.ClearEnrollmentTimeDeviceMembershipTargetPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.ClearEnrollmentTimeDeviceMembershipTarget.ClearEnrollmentTimeDeviceMembershipTargetPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetResponse.cs index 256d2dafd3e..3aa745a15fd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/ClearEnrollmentTimeDeviceMembershipTarget/ClearEnrollmentTimeDeviceMembershipTargetResponse.cs @@ -20,7 +20,7 @@ public partial class ClearEnrollmentTimeDeviceMembershipTargetResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.ClearEnrollmentTimeDeviceMembershipTarget.ClearEnrollmentTimeDeviceMembershipTargetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.ClearEnrollmentTimeDeviceMembershipTarget.ClearEnrollmentTimeDeviceMembershipTargetResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/CreateCopy/CreateCopyPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/CreateCopy/CreateCopyPostRequestBody.cs index 54065de0654..b544504e914 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/CreateCopy/CreateCopyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/CreateCopy/CreateCopyPostRequestBody.cs @@ -68,7 +68,7 @@ public CreateCopyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.CreateCopy.CreateCopyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.CreateCopy.CreateCopyPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/CreateCopy/CreateCopyRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/CreateCopy/CreateCopyRequestBuilder.cs index 66a8e6f91a1..370f62fc971 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/CreateCopy/CreateCopyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/CreateCopy/CreateCopyRequestBuilder.cs @@ -51,7 +51,7 @@ public CreateCopyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.CreateCopy.CreateCopyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.CreateCopy.CreateCopyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/DeviceManagementConfigurationPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/DeviceManagementConfigurationPolicyItemRequestBuilder.cs index a4c60776fb3..220106305c1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/DeviceManagementConfigurationPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/DeviceManagementConfigurationPolicyItemRequestBuilder.cs @@ -150,7 +150,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -211,7 +211,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Reorder/ReorderPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Reorder/ReorderPostRequestBody.cs index 52a75bfa101..f88e9fc3082 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Reorder/ReorderPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Reorder/ReorderPostRequestBody.cs @@ -42,7 +42,7 @@ public ReorderPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.Reorder.ReorderPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.Reorder.ReorderPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("priority", Priority); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Reorder/ReorderRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Reorder/ReorderRequestBuilder.cs index 5fdd7b27257..0b9f430beb1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Reorder/ReorderRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Reorder/ReorderRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Reusab public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.Reorder.ReorderPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.Reorder.ReorderPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetPostRequestBody.cs index f5a368b4a04..bcf83e98bec 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetPostRequestBody.cs @@ -53,7 +53,7 @@ public SetEnrollmentTimeDeviceMembershipTargetPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.SetEnrollmentTimeDeviceMembershipTarget.SetEnrollmentTimeDeviceMembershipTargetPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.SetEnrollmentTimeDeviceMembershipTarget.SetEnrollmentTimeDeviceMembershipTargetPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("enrollmentTimeDeviceMembershipTargets", EnrollmentTimeDeviceMembershipTargets); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetRequestBuilder.cs index 9fc2be16930..38302a6fa1c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/SetEnrollmentTimeDeviceMembershipTarget/SetEnrollmentTimeDeviceMembershipTargetRequestBuilder.cs @@ -51,7 +51,7 @@ public SetEnrollmentTimeDeviceMembershipTargetRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.SetEnrollmentTimeDeviceMembershipTarget.SetEnrollmentTimeDeviceMembershipTargetPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.ReusablePolicySettings.Item.ReferencingConfigurationPolicies.Item.SetEnrollmentTimeDeviceMembershipTarget.SetEnrollmentTimeDeviceMembershipTargetPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs index 1034d9d1680..8ea7a715ad7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/Item/DeviceManagementConfigurationSettingItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/SettingsRequestBuilder.cs index d64b1a265fa..b7b166bd55f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/Item/Settings/SettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/ReferencingConfigurationPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/ReferencingConfigurationPoliciesRequestBuilder.cs index 26087060d36..7f0a754e710 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/ReferencingConfigurationPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/Item/ReferencingConfigurationPolicies/ReferencingConfigurationPoliciesRequestBuilder.cs @@ -93,7 +93,7 @@ public ReferencingConfigurationPoliciesRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/ReusablePolicySettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/ReusablePolicySettingsRequestBuilder.cs index aa6df084061..1b68ef5b3b6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/ReusablePolicySettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusablePolicySettings/ReusablePolicySettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public ReusablePolicySettingsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementReusablePolicySetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementReusablePolicySetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusableSettings/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusableSettings/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs index 31e2825f59c..d1a484b506b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusableSettings/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusableSettings/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ReusableSettings/ReusableSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ReusableSettings/ReusableSettingsRequestBuilder.cs index 3217f78b5dc..78a07d53324 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ReusableSettings/ReusableSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ReusableSettings/ReusableSettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public ReusableSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/Item/DeviceAndAppManagementRoleAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/Item/DeviceAndAppManagementRoleAssignmentItemRequestBuilder.cs index ba61a161a40..4a2435a3547 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/Item/DeviceAndAppManagementRoleAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/Item/DeviceAndAppManagementRoleAssignmentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/RoleAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/RoleAssignmentsRequestBuilder.cs index 7ff3d37be9b..c55cd096005 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/RoleAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleAssignments/RoleAssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public RoleAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleAssignments/Item/RoleAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleAssignments/Item/RoleAssignmentItemRequestBuilder.cs index e72181d0988..2718cb24a68 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleAssignments/Item/RoleAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleAssignments/Item/RoleAssignmentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs index 1b30857e203..f74bce6c0ed 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public RoleAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleDefinitionItemRequestBuilder.cs index 5004ea46a9b..42fab74cbf8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/Item/RoleDefinitionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/RoleDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/RoleDefinitionsRequestBuilder.cs index 79ea0bd38cf..a1b73643808 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/RoleDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleDefinitions/RoleDefinitionsRequestBuilder.cs @@ -93,7 +93,7 @@ public RoleDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdPostRequestBody.cs index 8bf5c5e6813..6a29a848c9f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdPostRequestBody.cs @@ -52,7 +52,7 @@ public GetRoleScopeTagsByIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.GetRoleScopeTagsById.GetRoleScopeTagsByIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.GetRoleScopeTagsById.GetRoleScopeTagsByIdPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("roleScopeTagIds", RoleScopeTagIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdPostResponse.cs index ad31aed4673..45db5d4f260 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetRoleScopeTagsByIdPostResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.GetRoleScopeTagsById.GetRoleScopeTagsByIdPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.GetRoleScopeTagsById.GetRoleScopeTagsByIdPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdRequestBuilder.cs index 09245981c94..9c5a44c0cce 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdRequestBuilder.cs @@ -50,7 +50,7 @@ public GetRoleScopeTagsByIdRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsGetRoleScopeTagsByIdPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.GetRoleScopeTagsById.GetRoleScopeTagsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetRoleScopeTagsByIdRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.GetRoleScopeTagsById.GetRoleScopeTagsByIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.GetRoleScopeTagsById.GetRoleScopeTagsByIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdResponse.cs index bbc9aae1da9..c7e460b9d82 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/GetRoleScopeTagsById/GetRoleScopeTagsByIdResponse.cs @@ -20,7 +20,7 @@ public partial class GetRoleScopeTagsByIdResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.GetRoleScopeTagsById.GetRoleScopeTagsByIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.GetRoleScopeTagsById.GetRoleScopeTagsByIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/HasCustomRoleScopeTag/HasCustomRoleScopeTagGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/HasCustomRoleScopeTag/HasCustomRoleScopeTagGetResponse.cs index 6cae5f0d822..4d6eddaf75e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/HasCustomRoleScopeTag/HasCustomRoleScopeTagGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/HasCustomRoleScopeTag/HasCustomRoleScopeTagGetResponse.cs @@ -42,7 +42,7 @@ public HasCustomRoleScopeTagGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.HasCustomRoleScopeTag.HasCustomRoleScopeTagGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.HasCustomRoleScopeTag.HasCustomRoleScopeTagGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/HasCustomRoleScopeTag/HasCustomRoleScopeTagResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/HasCustomRoleScopeTag/HasCustomRoleScopeTagResponse.cs index be506127133..a6ff8d4fe0e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/HasCustomRoleScopeTag/HasCustomRoleScopeTagResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/HasCustomRoleScopeTag/HasCustomRoleScopeTagResponse.cs @@ -20,7 +20,7 @@ public partial class HasCustomRoleScopeTagResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.HasCustomRoleScopeTag.HasCustomRoleScopeTagResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.HasCustomRoleScopeTag.HasCustomRoleScopeTagResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignPostRequestBody.cs index e2e4ecc8873..8ecb0923418 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignPostResponse.cs index a657f9e76c7..7eb7936c589 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignPostResponse.cs @@ -36,7 +36,7 @@ public partial class AssignPostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.Item.Assign.AssignPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.Item.Assign.AssignPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignRequestBuilder.cs index 4b73b6d7617..423fe25d4c7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignRequestBuilder.cs @@ -50,7 +50,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsAssignPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public AssignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignResponse.cs index 04d9cbb4470..488e68e83f4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assign/AssignResponse.cs @@ -20,7 +20,7 @@ public partial class AssignResponse : global::Microsoft.Graph.Beta.DeviceManagem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.Item.Assign.AssignResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.RoleScopeTags.Item.Assign.AssignResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assignments/AssignmentsRequestBuilder.cs index b667eacdec2..317ab9e81b0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RoleScopeTagAutoAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RoleScopeTagAutoAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assignments/Item/RoleScopeTagAutoAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assignments/Item/RoleScopeTagAutoAssignmentItemRequestBuilder.cs index 47a9af21eb2..867c67a9d9b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assignments/Item/RoleScopeTagAutoAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/Assignments/Item/RoleScopeTagAutoAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RoleScopeTagAutoAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RoleScopeTagAutoAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/RoleScopeTagItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/RoleScopeTagItemRequestBuilder.cs index d6a12e48469..4efc6e25147 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/RoleScopeTagItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/Item/RoleScopeTagItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RoleScopeTag body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RoleScopeTag body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/RoleScopeTagsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/RoleScopeTagsRequestBuilder.cs index 34bc4fd228b..4930e53723f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/RoleScopeTagsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/RoleScopeTags/RoleScopeTagsRequestBuilder.cs @@ -105,7 +105,7 @@ public RoleScopeTagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RoleScopeTag body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RoleScopeTag body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ScopedForResourceWithResource/ScopedForResourceWithResourceGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ScopedForResourceWithResource/ScopedForResourceWithResourceGetResponse.cs index c9beaa07990..0190b7b9060 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ScopedForResourceWithResource/ScopedForResourceWithResourceGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ScopedForResourceWithResource/ScopedForResourceWithResourceGetResponse.cs @@ -42,7 +42,7 @@ public ScopedForResourceWithResourceGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ScopedForResourceWithResource.ScopedForResourceWithResourceGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ScopedForResourceWithResource.ScopedForResourceWithResourceGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ScopedForResourceWithResource/ScopedForResourceWithResourceResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ScopedForResourceWithResource/ScopedForResourceWithResourceResponse.cs index 10b702a2205..5c13de80512 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ScopedForResourceWithResource/ScopedForResourceWithResourceResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ScopedForResourceWithResource/ScopedForResourceWithResourceResponse.cs @@ -20,7 +20,7 @@ public partial class ScopedForResourceWithResourceResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ScopedForResourceWithResource.ScopedForResourceWithResourceResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ScopedForResourceWithResource.ScopedForResourceWithResourceResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs index 77b73d2179b..4938a4f03aa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs @@ -84,7 +84,7 @@ public SendCustomNotificationToCompanyPortalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupsToNotify", GroupsToNotify); writer.WriteStringValue("notificationBody", NotificationBody); writer.WriteStringValue("notificationTitle", NotificationTitle); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs index 930cd9ab0ad..2f5e7769d9c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.SendCu public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ServiceNowConnections/Item/ServiceNowConnectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ServiceNowConnections/Item/ServiceNowConnectionItemRequestBuilder.cs index f0f66819788..9d02d26dab2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ServiceNowConnections/Item/ServiceNowConnectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ServiceNowConnections/Item/ServiceNowConnectionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServiceNowConnection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceNowConnection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ServiceNowConnections/ServiceNowConnectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ServiceNowConnections/ServiceNowConnectionsRequestBuilder.cs index ced4dfa6b69..9506772eae7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ServiceNowConnections/ServiceNowConnectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ServiceNowConnections/ServiceNowConnectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ServiceNowConnectionsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ServiceNowConnection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceNowConnection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs index af315feb395..6d081677711 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/SettingDefinitions/SettingDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/SettingDefinitions/SettingDefinitionsRequestBuilder.cs index 18076b3b861..2347eb97cfc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/SettingDefinitions/SettingDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/SettingDefinitions/SettingDefinitionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TelecomExpenseManagementPartners/Item/TelecomExpenseManagementPartnerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TelecomExpenseManagementPartners/Item/TelecomExpenseManagementPartnerItemRequestBuilder.cs index f5681da6008..f27935768f9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TelecomExpenseManagementPartners/Item/TelecomExpenseManagementPartnerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TelecomExpenseManagementPartners/Item/TelecomExpenseManagementPartnerItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TelecomExpenseManagementPartner body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TelecomExpenseManagementPartner body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TelecomExpenseManagementPartners/TelecomExpenseManagementPartnersRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TelecomExpenseManagementPartners/TelecomExpenseManagementPartnersRequestBuilder.cs index dbc7839b965..1fd1e510556 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TelecomExpenseManagementPartners/TelecomExpenseManagementPartnersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TelecomExpenseManagementPartners/TelecomExpenseManagementPartnersRequestBuilder.cs @@ -93,7 +93,7 @@ public TelecomExpenseManagementPartnersRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TelecomExpenseManagementPartner body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TelecomExpenseManagementPartner body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TemplateInsights/Item/DeviceManagementTemplateInsightsDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TemplateInsights/Item/DeviceManagementTemplateInsightsDefinitionItemRequestBuilder.cs index 2201652d58e..169ff91e295 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TemplateInsights/Item/DeviceManagementTemplateInsightsDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TemplateInsights/Item/DeviceManagementTemplateInsightsDefinitionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateInsightsDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateInsightsDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TemplateInsights/TemplateInsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TemplateInsights/TemplateInsightsRequestBuilder.cs index e98bf5c8a45..9369a1e7f5d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TemplateInsights/TemplateInsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TemplateInsights/TemplateInsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public TemplateInsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateInsightsDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateInsightsDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/Item/DeviceManagementConfigurationSettingTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/Item/DeviceManagementConfigurationSettingTemplateItemRequestBuilder.cs index a6741f77c8b..19c2375da6b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/Item/DeviceManagementConfigurationSettingTemplateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/Item/DeviceManagementConfigurationSettingTemplateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs index 680644c3632..ad41642bfea 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/Item/SettingDefinitions/Item/DeviceManagementConfigurationSettingDefinitionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs index 0734c2a4c52..e0119e1bd1b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/TemplateSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/TemplateSettingsRequestBuilder.cs index ae003b313ee..7a43dc9f2ae 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/TemplateSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TemplateSettings/TemplateSettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public TemplateSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesPostResponse.cs index 84efc108b95..a34d5a7d000 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesPostResponse.cs @@ -36,7 +36,7 @@ public partial class ImportOffice365DeviceConfigurationPoliciesPostResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.Templates.ImportOffice365DeviceConfigurationPolicies.ImportOffice365DeviceConfigurationPoliciesPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Templates.ImportOffice365DeviceConfigurationPolicies.ImportOffice365DeviceConfigurationPoliciesPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesResponse.cs index b0df984c0d0..36639b41bde 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesResponse.cs @@ -20,7 +20,7 @@ public partial class ImportOffice365DeviceConfigurationPoliciesResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.Templates.ImportOffice365DeviceConfigurationPolicies.ImportOffice365DeviceConfigurationPoliciesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Templates.ImportOffice365DeviceConfigurationPolicies.ImportOffice365DeviceConfigurationPoliciesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/CategoriesRequestBuilder.cs index 6f3af6d054e..06a1f520381 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/CategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/CategoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateSettingCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateSettingCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/DeviceManagementTemplateSettingCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/DeviceManagementTemplateSettingCategoryItemRequestBuilder.cs index 58175e39973..3324a49b7c2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/DeviceManagementTemplateSettingCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/DeviceManagementTemplateSettingCategoryItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateSettingCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateSettingCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/RecommendedSettings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/RecommendedSettings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs index 22af3b55058..0c5f4967f94 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/RecommendedSettings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/RecommendedSettings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/RecommendedSettings/RecommendedSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/RecommendedSettings/RecommendedSettingsRequestBuilder.cs index 33d86a890a4..ce72ced0a6c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/RecommendedSettings/RecommendedSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/RecommendedSettings/RecommendedSettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public RecommendedSettingsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs index 9ff20c3117b..63609780811 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs index 55e689f2ab7..8dc0b0e1438 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CompareWithTemplateId/CompareWithTemplateIdGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CompareWithTemplateId/CompareWithTemplateIdGetResponse.cs index 3ac17bbd94d..c8781a8f39b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CompareWithTemplateId/CompareWithTemplateIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CompareWithTemplateId/CompareWithTemplateIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class CompareWithTemplateIdGetResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.CompareWithTemplateId.CompareWithTemplateIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.CompareWithTemplateId.CompareWithTemplateIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CompareWithTemplateId/CompareWithTemplateIdResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CompareWithTemplateId/CompareWithTemplateIdResponse.cs index d2d07362b65..4a556fd1e79 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CompareWithTemplateId/CompareWithTemplateIdResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CompareWithTemplateId/CompareWithTemplateIdResponse.cs @@ -20,7 +20,7 @@ public partial class CompareWithTemplateIdResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.CompareWithTemplateId.CompareWithTemplateIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.CompareWithTemplateId.CompareWithTemplateIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CreateInstance/CreateInstancePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CreateInstance/CreateInstancePostRequestBody.cs index 7444f1c1541..578cf748ee3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CreateInstance/CreateInstancePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CreateInstance/CreateInstancePostRequestBody.cs @@ -101,7 +101,7 @@ public CreateInstancePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.CreateInstance.CreateInstancePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.CreateInstance.CreateInstancePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfPrimitiveValues("roleScopeTagIds", RoleScopeTagIds); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CreateInstance/CreateInstanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CreateInstance/CreateInstanceRequestBuilder.cs index 92d185209e0..df9cd9b846e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CreateInstance/CreateInstanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/CreateInstance/CreateInstanceRequestBuilder.cs @@ -51,7 +51,7 @@ public CreateInstanceRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.CreateInstance.CreateInstancePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.CreateInstance.CreateInstancePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/DeviceManagementTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/DeviceManagementTemplateItemRequestBuilder.cs index b7323836e52..987fdb8b261 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/DeviceManagementTemplateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/DeviceManagementTemplateItemRequestBuilder.cs @@ -131,7 +131,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -192,7 +192,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesPostResponse.cs index 12cac597c31..7e6208dd4b9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesPostResponse.cs @@ -36,7 +36,7 @@ public partial class ImportOffice365DeviceConfigurationPoliciesPostResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.MigratableTo.ImportOffice365DeviceConfigurationPolicies.ImportOffice365DeviceConfigurationPoliciesPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.MigratableTo.ImportOffice365DeviceConfigurationPolicies.ImportOffice365DeviceConfigurationPoliciesPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesResponse.cs index befa5a82b73..f3250c4f0d2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/ImportOffice365DeviceConfigurationPolicies/ImportOffice365DeviceConfigurationPoliciesResponse.cs @@ -20,7 +20,7 @@ public partial class ImportOffice365DeviceConfigurationPoliciesResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.MigratableTo.ImportOffice365DeviceConfigurationPolicies.ImportOffice365DeviceConfigurationPoliciesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.MigratableTo.ImportOffice365DeviceConfigurationPolicies.ImportOffice365DeviceConfigurationPoliciesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/CategoriesRequestBuilder.cs index 54e6f06f63e..d0def18f323 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/CategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/CategoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateSettingCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateSettingCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/DeviceManagementTemplateSettingCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/DeviceManagementTemplateSettingCategoryItemRequestBuilder.cs index b56715b7d65..e1b389fc7da 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/DeviceManagementTemplateSettingCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/DeviceManagementTemplateSettingCategoryItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateSettingCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateSettingCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/RecommendedSettings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/RecommendedSettings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs index 5ca0673b9a3..58ff2e7ac22 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/RecommendedSettings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/RecommendedSettings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/RecommendedSettings/RecommendedSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/RecommendedSettings/RecommendedSettingsRequestBuilder.cs index 3857d689171..1020c8149d3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/RecommendedSettings/RecommendedSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/RecommendedSettings/RecommendedSettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public RecommendedSettingsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs index 8790a43c370..24784aae91a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/SettingDefinitions/Item/DeviceManagementSettingDefinitionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs index 3a616a8859d..43259e2a35b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Categories/Item/SettingDefinitions/SettingDefinitionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CompareWithTemplateId/CompareWithTemplateIdGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CompareWithTemplateId/CompareWithTemplateIdGetResponse.cs index 84a7f56ffb8..cf3b7b2ab99 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CompareWithTemplateId/CompareWithTemplateIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CompareWithTemplateId/CompareWithTemplateIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class CompareWithTemplateIdGetResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.MigratableTo.Item.CompareWithTemplateId.CompareWithTemplateIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.MigratableTo.Item.CompareWithTemplateId.CompareWithTemplateIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CompareWithTemplateId/CompareWithTemplateIdResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CompareWithTemplateId/CompareWithTemplateIdResponse.cs index 12e4d0b3e05..6b5d72ee690 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CompareWithTemplateId/CompareWithTemplateIdResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CompareWithTemplateId/CompareWithTemplateIdResponse.cs @@ -20,7 +20,7 @@ public partial class CompareWithTemplateIdResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.MigratableTo.Item.CompareWithTemplateId.CompareWithTemplateIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.MigratableTo.Item.CompareWithTemplateId.CompareWithTemplateIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CreateInstance/CreateInstancePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CreateInstance/CreateInstancePostRequestBody.cs index e0ca86e8779..1f4c7f2dee3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CreateInstance/CreateInstancePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CreateInstance/CreateInstancePostRequestBody.cs @@ -101,7 +101,7 @@ public CreateInstancePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.MigratableTo.Item.CreateInstance.CreateInstancePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.MigratableTo.Item.CreateInstance.CreateInstancePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfPrimitiveValues("roleScopeTagIds", RoleScopeTagIds); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CreateInstance/CreateInstanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CreateInstance/CreateInstanceRequestBuilder.cs index f902d0e79ef..63525b68c94 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CreateInstance/CreateInstanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/CreateInstance/CreateInstanceRequestBuilder.cs @@ -51,7 +51,7 @@ public CreateInstanceRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.MigratableTo.Item.CreateInstance.CreateInstancePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.Templates.Item.MigratableTo.Item.CreateInstance.CreateInstancePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/DeviceManagementTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/DeviceManagementTemplateItemRequestBuilder.cs index b5ea327056b..501f5cf4366 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/DeviceManagementTemplateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/DeviceManagementTemplateItemRequestBuilder.cs @@ -125,7 +125,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -186,7 +186,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs index cdf4e2fe607..1f7188e411a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Settings/SettingsRequestBuilder.cs index 6f06449317a..9d8ea827181 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/Item/Settings/SettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/MigratableToRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/MigratableToRequestBuilder.cs index 351f4d22587..dbc6ee3bc7e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/MigratableToRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/MigratableTo/MigratableToRequestBuilder.cs @@ -99,7 +99,7 @@ public MigratableToRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs index 1f9d98718b5..1e55e403b8a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Settings/Item/DeviceManagementSettingInstanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Settings/SettingsRequestBuilder.cs index e2fd98b160b..eb17bc8c24a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/Item/Settings/SettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/TemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/TemplatesRequestBuilder.cs index 89cadfb8b77..3bd0953a7a2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/Templates/TemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/Templates/TemplatesRequestBuilder.cs @@ -99,7 +99,7 @@ public TemplatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TenantAttachRBAC/Enable/EnablePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TenantAttachRBAC/Enable/EnablePostRequestBody.cs index 1024aa2f1ec..d78990c0f18 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TenantAttachRBAC/Enable/EnablePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TenantAttachRBAC/Enable/EnablePostRequestBody.cs @@ -42,7 +42,7 @@ public EnablePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.TenantAttachRBAC.Enable.EnablePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.TenantAttachRBAC.Enable.EnablePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("enable", Enable); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TenantAttachRBAC/Enable/EnableRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TenantAttachRBAC/Enable/EnableRequestBuilder.cs index 1ad988143ae..7463f9dcd30 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TenantAttachRBAC/Enable/EnableRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TenantAttachRBAC/Enable/EnableRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Tenant public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.TenantAttachRBAC.Enable.EnablePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.TenantAttachRBAC.Enable.EnablePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TenantAttachRBAC/TenantAttachRBACRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TenantAttachRBAC/TenantAttachRBACRequestBuilder.cs index 7d5373b4b5e..aec3cc76487 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TenantAttachRBAC/TenantAttachRBACRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TenantAttachRBAC/TenantAttachRBACRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TenantAttachRBAC body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TenantAttachRBAC body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/AcceptanceStatuses/AcceptanceStatusesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/AcceptanceStatuses/AcceptanceStatusesRequestBuilder.cs index 26c94084761..92bbf40cc99 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/AcceptanceStatuses/AcceptanceStatusesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/AcceptanceStatuses/AcceptanceStatusesRequestBuilder.cs @@ -93,7 +93,7 @@ public AcceptanceStatusesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermsAndConditionsAcceptanceStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermsAndConditionsAcceptanceStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/AcceptanceStatuses/Item/TermsAndConditionsAcceptanceStatusItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/AcceptanceStatuses/Item/TermsAndConditionsAcceptanceStatusItemRequestBuilder.cs index c63538fa1e4..ca111e65239 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/AcceptanceStatuses/Item/TermsAndConditionsAcceptanceStatusItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/AcceptanceStatuses/Item/TermsAndConditionsAcceptanceStatusItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermsAndConditionsAcceptanceStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermsAndConditionsAcceptanceStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/Assignments/AssignmentsRequestBuilder.cs index ad2ff835f53..5384aa2d50a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermsAndConditionsAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermsAndConditionsAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/Assignments/Item/TermsAndConditionsAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/Assignments/Item/TermsAndConditionsAssignmentItemRequestBuilder.cs index f53d9f8285e..2d8b2a55c24 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/Assignments/Item/TermsAndConditionsAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/Assignments/Item/TermsAndConditionsAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermsAndConditionsAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermsAndConditionsAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs index dacc1c37c40..7d1cd37a0f1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/GroupAssignments/GroupAssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermsAndConditionsGroupAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermsAndConditionsGroupAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/GroupAssignments/Item/TermsAndConditionsGroupAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/GroupAssignments/Item/TermsAndConditionsGroupAssignmentItemRequestBuilder.cs index 7194b79fdc3..853f6003507 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/GroupAssignments/Item/TermsAndConditionsGroupAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/GroupAssignments/Item/TermsAndConditionsGroupAssignmentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermsAndConditionsGroupAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermsAndConditionsGroupAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/TermsAndConditionsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/TermsAndConditionsItemRequestBuilder.cs index b368a724a7a..a66f87baa16 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/TermsAndConditionsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/Item/TermsAndConditionsItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermsAndConditions body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermsAndConditions body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/TermsAndConditionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/TermsAndConditionsRequestBuilder.cs index da96ae235bb..79b45e7a2e1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/TermsAndConditionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TermsAndConditions/TermsAndConditionsRequestBuilder.cs @@ -93,7 +93,7 @@ public TermsAndConditionsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermsAndConditions body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermsAndConditions body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TroubleshootingEvents/Item/DeviceManagementTroubleshootingEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TroubleshootingEvents/Item/DeviceManagementTroubleshootingEventItemRequestBuilder.cs index 1acf97013ee..1152881479a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TroubleshootingEvents/Item/DeviceManagementTroubleshootingEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TroubleshootingEvents/Item/DeviceManagementTroubleshootingEventItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/TroubleshootingEvents/TroubleshootingEventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/TroubleshootingEvents/TroubleshootingEventsRequestBuilder.cs index 1b020b307b1..d3defbea0ab 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/TroubleshootingEvents/TroubleshootingEventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/TroubleshootingEvents/TroubleshootingEventsRequestBuilder.cs @@ -93,7 +93,7 @@ public TroubleshootingEventsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomaly/Item/UserExperienceAnalyticsAnomalyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomaly/Item/UserExperienceAnalyticsAnomalyItemRequestBuilder.cs index 4f91f3464b5..5fc75d978cf 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomaly/Item/UserExperienceAnalyticsAnomalyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomaly/Item/UserExperienceAnalyticsAnomalyItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomaly body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomaly body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomaly/UserExperienceAnalyticsAnomalyRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomaly/UserExperienceAnalyticsAnomalyRequestBuilder.cs index 116c0f9c40a..5cccece5e16 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomaly/UserExperienceAnalyticsAnomalyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomaly/UserExperienceAnalyticsAnomalyRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsAnomalyRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomaly body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomaly body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyCorrelationGroupOverview/Item/UserExperienceAnalyticsAnomalyCorrelationGroupOverviewItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyCorrelationGroupOverview/Item/UserExperienceAnalyticsAnomalyCorrelationGroupOverviewItemRequestBuilder.cs index e38a7e7214d..d259906e8d0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyCorrelationGroupOverview/Item/UserExperienceAnalyticsAnomalyCorrelationGroupOverviewItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyCorrelationGroupOverview/Item/UserExperienceAnalyticsAnomalyCorrelationGroupOverviewItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyCorrelationGroupOverview body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyCorrelationGroupOverview body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyCorrelationGroupOverview/UserExperienceAnalyticsAnomalyCorrelationGroupOverviewRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyCorrelationGroupOverview/UserExperienceAnalyticsAnomalyCorrelationGroupOverviewRequestBuilder.cs index 555c6addc2e..b8e38656740 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyCorrelationGroupOverview/UserExperienceAnalyticsAnomalyCorrelationGroupOverviewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyCorrelationGroupOverview/UserExperienceAnalyticsAnomalyCorrelationGroupOverviewRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsAnomalyCorrelationGroupOverviewRequestBuilder(stri public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyCorrelationGroupOverview body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyCorrelationGroupOverview body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyDevice/Item/UserExperienceAnalyticsAnomalyDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyDevice/Item/UserExperienceAnalyticsAnomalyDeviceItemRequestBuilder.cs index 3d44f24dcd5..684ad737207 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyDevice/Item/UserExperienceAnalyticsAnomalyDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyDevice/Item/UserExperienceAnalyticsAnomalyDeviceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyDevice/UserExperienceAnalyticsAnomalyDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyDevice/UserExperienceAnalyticsAnomalyDeviceRequestBuilder.cs index 8ebb8c4b5cc..eb26d2603da 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyDevice/UserExperienceAnalyticsAnomalyDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAnomalyDevice/UserExperienceAnalyticsAnomalyDeviceRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsAnomalyDeviceRequestBuilder(string rawUrl, IReques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/Item/UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/Item/UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder.cs index 6f5fc21246b..e94616c93a8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/Item/UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/Item/UserExperienceAnalyticsAppHealthApplicationPerformanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthApplicationPerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthApplicationPerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder.cs index c539fb13aad..f4ba4e8067f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformance/UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsAppHealthApplicationPerformanceRequestBuilder(stri public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthApplicationPerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthApplicationPerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionItemRequestBuilder.cs index 0ee81c0ef84..9d85de6ed41 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionRequestBuilder.cs index dbd2e707731..1de9e15172b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionRequest public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder.cs index fdada7e35c0..7bec12910cf 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder.cs index fce540cca47..92a539c435f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetailsRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder.cs index 5d45e06a6ce..bfd7fadbb90 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/Item/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder.cs index 1909f35fdbe..f70e0e9ea7a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId/UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceIdRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceI public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/Item/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/Item/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder.cs index 542f7a23865..fd29ad83ec6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/Item/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/Item/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder.cs index ca3e7e73e3a..caae73ecaa4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion/UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersionRequestB public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/Item/UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/Item/UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder.cs index f7636050e2c..485cde8f726 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/Item/UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/Item/UserExperienceAnalyticsAppHealthDeviceModelPerformanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDeviceModelPerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDeviceModelPerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder.cs index c350582c7c9..cbfa5138ce5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDeviceModelPerformance/UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsAppHealthDeviceModelPerformanceRequestBuilder(stri public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDeviceModelPerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDeviceModelPerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/Item/UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/Item/UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder.cs index fc3b7c6c96d..f796c584261 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/Item/UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/Item/UserExperienceAnalyticsAppHealthDevicePerformanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder.cs index 67cc4f1110c..d0e3392568e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformance/UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsAppHealthDevicePerformanceRequestBuilder(string ra public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/Item/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/Item/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder.cs index 60d179cb238..d174bddbab6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/Item/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/Item/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformanceDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformanceDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder.cs index f6aeb4346a3..536f0dcb0f5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthDevicePerformanceDetails/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsAppHealthDevicePerformanceDetailsRequestBuilder(st public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformanceDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformanceDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/Item/UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/Item/UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder.cs index 3664e1c7830..effc00d93cc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/Item/UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/Item/UserExperienceAnalyticsAppHealthOSVersionPerformanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthOSVersionPerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthOSVersionPerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder.cs index 02f6c2b6a20..e1295d9d121 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOSVersionPerformance/UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsAppHealthOSVersionPerformanceRequestBuilder(string public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthOSVersionPerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthOSVersionPerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/Item/UserExperienceAnalyticsMetricItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/Item/UserExperienceAnalyticsMetricItemRequestBuilder.cs index b5024bce183..7ba5dfd1b82 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/Item/UserExperienceAnalyticsMetricItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/Item/UserExperienceAnalyticsMetricItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/MetricValuesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/MetricValuesRequestBuilder.cs index 3a676e57330..ec00705a638 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/MetricValuesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/MetricValues/MetricValuesRequestBuilder.cs @@ -93,7 +93,7 @@ public MetricValuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/UserExperienceAnalyticsAppHealthOverviewRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/UserExperienceAnalyticsAppHealthOverviewRequestBuilder.cs index 174d28ed9e2..43ae4c8f061 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/UserExperienceAnalyticsAppHealthOverviewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsAppHealthOverview/UserExperienceAnalyticsAppHealthOverviewRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/UserExperienceAnalyticsBaselineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/UserExperienceAnalyticsBaselineItemRequestBuilder.cs index 0a207622ff3..dd2d9b3423b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/UserExperienceAnalyticsBaselineItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/Item/UserExperienceAnalyticsBaselineItemRequestBuilder.cs @@ -138,7 +138,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBaseline body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -199,7 +199,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBaseline body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/UserExperienceAnalyticsBaselinesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/UserExperienceAnalyticsBaselinesRequestBuilder.cs index 927e95edf59..4c468cc5220 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/UserExperienceAnalyticsBaselinesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBaselines/UserExperienceAnalyticsBaselinesRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsBaselinesRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBaseline body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBaseline body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthAppImpact/Item/UserExperienceAnalyticsBatteryHealthAppImpactItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthAppImpact/Item/UserExperienceAnalyticsBatteryHealthAppImpactItemRequestBuilder.cs index 6b8df4ecf1e..d427d7ca79f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthAppImpact/Item/UserExperienceAnalyticsBatteryHealthAppImpactItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthAppImpact/Item/UserExperienceAnalyticsBatteryHealthAppImpactItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthAppImpact body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthAppImpact body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthAppImpact/UserExperienceAnalyticsBatteryHealthAppImpactRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthAppImpact/UserExperienceAnalyticsBatteryHealthAppImpactRequestBuilder.cs index f4f77123fba..dca732e994c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthAppImpact/UserExperienceAnalyticsBatteryHealthAppImpactRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthAppImpact/UserExperienceAnalyticsBatteryHealthAppImpactRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsBatteryHealthAppImpactRequestBuilder(string rawUrl public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthAppImpact body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthAppImpact body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthCapacityDetails/UserExperienceAnalyticsBatteryHealthCapacityDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthCapacityDetails/UserExperienceAnalyticsBatteryHealthCapacityDetailsRequestBuilder.cs index 69bd350f6e3..54a3858d7db 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthCapacityDetails/UserExperienceAnalyticsBatteryHealthCapacityDetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthCapacityDetails/UserExperienceAnalyticsBatteryHealthCapacityDetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthCapacityDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthCapacityDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceAppImpact/Item/UserExperienceAnalyticsBatteryHealthDeviceAppImpactItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceAppImpact/Item/UserExperienceAnalyticsBatteryHealthDeviceAppImpactItemRequestBuilder.cs index 1018662882e..91018c7f250 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceAppImpact/Item/UserExperienceAnalyticsBatteryHealthDeviceAppImpactItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceAppImpact/Item/UserExperienceAnalyticsBatteryHealthDeviceAppImpactItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceAppImpact body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceAppImpact body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceAppImpact/UserExperienceAnalyticsBatteryHealthDeviceAppImpactRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceAppImpact/UserExperienceAnalyticsBatteryHealthDeviceAppImpactRequestBuilder.cs index 02218c24fb6..81a7557bdd5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceAppImpact/UserExperienceAnalyticsBatteryHealthDeviceAppImpactRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceAppImpact/UserExperienceAnalyticsBatteryHealthDeviceAppImpactRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsBatteryHealthDeviceAppImpactRequestBuilder(string public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceAppImpact body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceAppImpact body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDevicePerformance/Item/UserExperienceAnalyticsBatteryHealthDevicePerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDevicePerformance/Item/UserExperienceAnalyticsBatteryHealthDevicePerformanceItemRequestBuilder.cs index a7f7a305187..b1ab63ba1b4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDevicePerformance/Item/UserExperienceAnalyticsBatteryHealthDevicePerformanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDevicePerformance/Item/UserExperienceAnalyticsBatteryHealthDevicePerformanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDevicePerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDevicePerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDevicePerformance/UserExperienceAnalyticsBatteryHealthDevicePerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDevicePerformance/UserExperienceAnalyticsBatteryHealthDevicePerformanceRequestBuilder.cs index e11faf979fc..ecb6fa206fc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDevicePerformance/UserExperienceAnalyticsBatteryHealthDevicePerformanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDevicePerformance/UserExperienceAnalyticsBatteryHealthDevicePerformanceRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsBatteryHealthDevicePerformanceRequestBuilder(strin public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDevicePerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDevicePerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory/Item/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory/Item/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryItemRequestBuilder.cs index 6aa678e2d35..80ae7602b67 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory/Item/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory/Item/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryRequestBuilder.cs index df78c28e166..7a8ca3df3dd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryRequestBuilder(st public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthModelPerformance/Item/UserExperienceAnalyticsBatteryHealthModelPerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthModelPerformance/Item/UserExperienceAnalyticsBatteryHealthModelPerformanceItemRequestBuilder.cs index 497bd4c8801..30c99583861 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthModelPerformance/Item/UserExperienceAnalyticsBatteryHealthModelPerformanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthModelPerformance/Item/UserExperienceAnalyticsBatteryHealthModelPerformanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthModelPerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthModelPerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthModelPerformance/UserExperienceAnalyticsBatteryHealthModelPerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthModelPerformance/UserExperienceAnalyticsBatteryHealthModelPerformanceRequestBuilder.cs index cf5a99c5552..19e2c47692d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthModelPerformance/UserExperienceAnalyticsBatteryHealthModelPerformanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthModelPerformance/UserExperienceAnalyticsBatteryHealthModelPerformanceRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsBatteryHealthModelPerformanceRequestBuilder(string public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthModelPerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthModelPerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthOsPerformance/Item/UserExperienceAnalyticsBatteryHealthOsPerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthOsPerformance/Item/UserExperienceAnalyticsBatteryHealthOsPerformanceItemRequestBuilder.cs index 7365d89fd89..6655092b728 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthOsPerformance/Item/UserExperienceAnalyticsBatteryHealthOsPerformanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthOsPerformance/Item/UserExperienceAnalyticsBatteryHealthOsPerformanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthOsPerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthOsPerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthOsPerformance/UserExperienceAnalyticsBatteryHealthOsPerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthOsPerformance/UserExperienceAnalyticsBatteryHealthOsPerformanceRequestBuilder.cs index b46f3227709..e1cd5cf4fd8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthOsPerformance/UserExperienceAnalyticsBatteryHealthOsPerformanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthOsPerformance/UserExperienceAnalyticsBatteryHealthOsPerformanceRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsBatteryHealthOsPerformanceRequestBuilder(string ra public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthOsPerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthOsPerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthRuntimeDetails/UserExperienceAnalyticsBatteryHealthRuntimeDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthRuntimeDetails/UserExperienceAnalyticsBatteryHealthRuntimeDetailsRequestBuilder.cs index 7671d1f8cb7..fc702acdc2c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthRuntimeDetails/UserExperienceAnalyticsBatteryHealthRuntimeDetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsBatteryHealthRuntimeDetails/UserExperienceAnalyticsBatteryHealthRuntimeDetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthRuntimeDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthRuntimeDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/Item/UserExperienceAnalyticsMetricItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/Item/UserExperienceAnalyticsMetricItemRequestBuilder.cs index 851cfd89056..d9ab9303e5a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/Item/UserExperienceAnalyticsMetricItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/Item/UserExperienceAnalyticsMetricItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/MetricValuesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/MetricValuesRequestBuilder.cs index fa9a6b2c92c..a200fde27a8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/MetricValuesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/MetricValues/MetricValuesRequestBuilder.cs @@ -93,7 +93,7 @@ public MetricValuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/UserExperienceAnalyticsCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/UserExperienceAnalyticsCategoryItemRequestBuilder.cs index c8e456b0403..5b47e45a46b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/UserExperienceAnalyticsCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/Item/UserExperienceAnalyticsCategoryItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/UserExperienceAnalyticsCategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/UserExperienceAnalyticsCategoriesRequestBuilder.cs index 93e11a04fd5..caafc1440f4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/UserExperienceAnalyticsCategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsCategories/UserExperienceAnalyticsCategoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsCategoriesRequestBuilder(string rawUrl, IRequestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceMetricHistory/Item/UserExperienceAnalyticsMetricHistoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceMetricHistory/Item/UserExperienceAnalyticsMetricHistoryItemRequestBuilder.cs index 992f0e79aa7..8daa3e841a4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceMetricHistory/Item/UserExperienceAnalyticsMetricHistoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceMetricHistory/Item/UserExperienceAnalyticsMetricHistoryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetricHistory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetricHistory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceMetricHistory/UserExperienceAnalyticsDeviceMetricHistoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceMetricHistory/UserExperienceAnalyticsDeviceMetricHistoryRequestBuilder.cs index 54c35b54242..55d7b58c324 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceMetricHistory/UserExperienceAnalyticsDeviceMetricHistoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceMetricHistory/UserExperienceAnalyticsDeviceMetricHistoryRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsDeviceMetricHistoryRequestBuilder(string rawUrl, I public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetricHistory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetricHistory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/Item/UserExperienceAnalyticsDevicePerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/Item/UserExperienceAnalyticsDevicePerformanceItemRequestBuilder.cs index 8a2c600e02d..fac855b1d56 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/Item/UserExperienceAnalyticsDevicePerformanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/Item/UserExperienceAnalyticsDevicePerformanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDevicePerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDevicePerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/SummarizeDevicePerformanceDevicesWithSummarizeBy/SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/SummarizeDevicePerformanceDevicesWithSummarizeBy/SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse.cs index 7db94200115..b151b66b9c5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/SummarizeDevicePerformanceDevicesWithSummarizeBy/SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/SummarizeDevicePerformanceDevicesWithSummarizeBy/SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse.cs @@ -36,7 +36,7 @@ public partial class SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsDevicePerformance.SummarizeDevicePerformanceDevicesWithSummarizeBy.SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsDevicePerformance.SummarizeDevicePerformanceDevicesWithSummarizeBy.SummarizeDevicePerformanceDevicesWithSummarizeByGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/SummarizeDevicePerformanceDevicesWithSummarizeBy/SummarizeDevicePerformanceDevicesWithSummarizeByResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/SummarizeDevicePerformanceDevicesWithSummarizeBy/SummarizeDevicePerformanceDevicesWithSummarizeByResponse.cs index a6b73d63df7..2c1b6eea5c9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/SummarizeDevicePerformanceDevicesWithSummarizeBy/SummarizeDevicePerformanceDevicesWithSummarizeByResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/SummarizeDevicePerformanceDevicesWithSummarizeBy/SummarizeDevicePerformanceDevicesWithSummarizeByResponse.cs @@ -20,7 +20,7 @@ public partial class SummarizeDevicePerformanceDevicesWithSummarizeByResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsDevicePerformance.SummarizeDevicePerformanceDevicesWithSummarizeBy.SummarizeDevicePerformanceDevicesWithSummarizeByResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsDevicePerformance.SummarizeDevicePerformanceDevicesWithSummarizeBy.SummarizeDevicePerformanceDevicesWithSummarizeByResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/UserExperienceAnalyticsDevicePerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/UserExperienceAnalyticsDevicePerformanceRequestBuilder.cs index 77434742385..51de1999667 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/UserExperienceAnalyticsDevicePerformanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicePerformance/UserExperienceAnalyticsDevicePerformanceRequestBuilder.cs @@ -94,7 +94,7 @@ public UserExperienceAnalyticsDevicePerformanceRequestBuilder(string rawUrl, IRe public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDevicePerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDevicePerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScope/TriggerDeviceScopeAction/TriggerDeviceScopeActionPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScope/TriggerDeviceScopeAction/TriggerDeviceScopeActionPostRequestBody.cs index a909e5198b0..592cec0e92b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScope/TriggerDeviceScopeAction/TriggerDeviceScopeActionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScope/TriggerDeviceScopeAction/TriggerDeviceScopeActionPostRequestBody.cs @@ -68,7 +68,7 @@ public TriggerDeviceScopeActionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsDeviceScope.TriggerDeviceScopeAction.TriggerDeviceScopeActionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsDeviceScope.TriggerDeviceScopeAction.TriggerDeviceScopeActionPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("actionName", ActionName); writer.WriteStringValue("deviceScopeId", DeviceScopeId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScope/TriggerDeviceScopeAction/TriggerDeviceScopeActionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScope/TriggerDeviceScopeAction/TriggerDeviceScopeActionRequestBuilder.cs index 2438a1063e6..20eb5973e02 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScope/TriggerDeviceScopeAction/TriggerDeviceScopeActionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScope/TriggerDeviceScopeAction/TriggerDeviceScopeActionRequestBuilder.cs @@ -51,7 +51,7 @@ public TriggerDeviceScopeActionRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsDeviceScope.TriggerDeviceScopeAction.TriggerDeviceScopeActionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsDeviceScope.TriggerDeviceScopeAction.TriggerDeviceScopeActionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScope/UserExperienceAnalyticsDeviceScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScope/UserExperienceAnalyticsDeviceScopeRequestBuilder.cs index dfb312ce9b7..c15c2063104 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScope/UserExperienceAnalyticsDeviceScopeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScope/UserExperienceAnalyticsDeviceScopeRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/Item/TriggerDeviceScopeAction/TriggerDeviceScopeActionPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/Item/TriggerDeviceScopeAction/TriggerDeviceScopeActionPostRequestBody.cs index 3f5772b0327..054380290e4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/Item/TriggerDeviceScopeAction/TriggerDeviceScopeActionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/Item/TriggerDeviceScopeAction/TriggerDeviceScopeActionPostRequestBody.cs @@ -68,7 +68,7 @@ public TriggerDeviceScopeActionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsDeviceScopes.Item.TriggerDeviceScopeAction.TriggerDeviceScopeActionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsDeviceScopes.Item.TriggerDeviceScopeAction.TriggerDeviceScopeActionPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("actionName", ActionName); writer.WriteStringValue("deviceScopeId", DeviceScopeId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/Item/TriggerDeviceScopeAction/TriggerDeviceScopeActionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/Item/TriggerDeviceScopeAction/TriggerDeviceScopeActionRequestBuilder.cs index 0211ef0b6ee..078804cc5da 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/Item/TriggerDeviceScopeAction/TriggerDeviceScopeActionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/Item/TriggerDeviceScopeAction/TriggerDeviceScopeActionRequestBuilder.cs @@ -51,7 +51,7 @@ public TriggerDeviceScopeActionRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsDeviceScopes.Item.TriggerDeviceScopeAction.TriggerDeviceScopeActionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsDeviceScopes.Item.TriggerDeviceScopeAction.TriggerDeviceScopeActionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/Item/UserExperienceAnalyticsDeviceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/Item/UserExperienceAnalyticsDeviceScopeItemRequestBuilder.cs index 73711e88eb3..638071ee05b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/Item/UserExperienceAnalyticsDeviceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/Item/UserExperienceAnalyticsDeviceScopeItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/UserExperienceAnalyticsDeviceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/UserExperienceAnalyticsDeviceScopesRequestBuilder.cs index ef235597b96..a5eac10b688 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/UserExperienceAnalyticsDeviceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScopes/UserExperienceAnalyticsDeviceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsDeviceScopesRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/Item/UserExperienceAnalyticsDeviceScoresItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/Item/UserExperienceAnalyticsDeviceScoresItemRequestBuilder.cs index 9dff45b27b0..dc97de1b9b0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/Item/UserExperienceAnalyticsDeviceScoresItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/Item/UserExperienceAnalyticsDeviceScoresItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScores body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScores body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/UserExperienceAnalyticsDeviceScoresRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/UserExperienceAnalyticsDeviceScoresRequestBuilder.cs index ed3df51be51..7173d7b5b9b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/UserExperienceAnalyticsDeviceScoresRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceScores/UserExperienceAnalyticsDeviceScoresRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsDeviceScoresRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScores body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScores body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/Item/UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/Item/UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder.cs index 3c2b9d3dce2..d70bcbf4d08 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/Item/UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/Item/UserExperienceAnalyticsDeviceStartupHistoryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupHistory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupHistory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder.cs index 9d1c372a582..5b3e4648f78 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupHistory/UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsDeviceStartupHistoryRequestBuilder(string rawUrl, public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupHistory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupHistory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcessPerformance/Item/UserExperienceAnalyticsDeviceStartupProcessPerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcessPerformance/Item/UserExperienceAnalyticsDeviceStartupProcessPerformanceItemRequestBuilder.cs index 88d15a856e7..93d04b90cac 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcessPerformance/Item/UserExperienceAnalyticsDeviceStartupProcessPerformanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcessPerformance/Item/UserExperienceAnalyticsDeviceStartupProcessPerformanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcessPerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcessPerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcessPerformance/UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcessPerformance/UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder.cs index d18ce2cfc62..0ea979a647d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcessPerformance/UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcessPerformance/UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsDeviceStartupProcessPerformanceRequestBuilder(stri public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcessPerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcessPerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/Item/UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/Item/UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder.cs index 8667f424c04..74bf3b04421 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/Item/UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/Item/UserExperienceAnalyticsDeviceStartupProcessItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcess body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcess body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder.cs index 539996775e0..3d389c88231 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceStartupProcesses/UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsDeviceStartupProcessesRequestBuilder(string rawUrl public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcess body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcess body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceTimelineEvent/Item/UserExperienceAnalyticsDeviceTimelineEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceTimelineEvent/Item/UserExperienceAnalyticsDeviceTimelineEventItemRequestBuilder.cs index ef412355b15..4f7ad7ef504 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceTimelineEvent/Item/UserExperienceAnalyticsDeviceTimelineEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceTimelineEvent/Item/UserExperienceAnalyticsDeviceTimelineEventItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceTimelineEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceTimelineEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceTimelineEvent/UserExperienceAnalyticsDeviceTimelineEventRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceTimelineEvent/UserExperienceAnalyticsDeviceTimelineEventRequestBuilder.cs index e67dbd8a547..96f59754309 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceTimelineEvent/UserExperienceAnalyticsDeviceTimelineEventRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDeviceTimelineEvent/UserExperienceAnalyticsDeviceTimelineEventRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsDeviceTimelineEventRequestBuilder(string rawUrl, I public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceTimelineEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceTimelineEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicesWithoutCloudIdentity/Item/UserExperienceAnalyticsDeviceWithoutCloudIdentityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicesWithoutCloudIdentity/Item/UserExperienceAnalyticsDeviceWithoutCloudIdentityItemRequestBuilder.cs index 67c23512836..c03a2b0dc6a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicesWithoutCloudIdentity/Item/UserExperienceAnalyticsDeviceWithoutCloudIdentityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicesWithoutCloudIdentity/Item/UserExperienceAnalyticsDeviceWithoutCloudIdentityItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceWithoutCloudIdentity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceWithoutCloudIdentity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicesWithoutCloudIdentity/UserExperienceAnalyticsDevicesWithoutCloudIdentityRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicesWithoutCloudIdentity/UserExperienceAnalyticsDevicesWithoutCloudIdentityRequestBuilder.cs index f53c571cee7..1ae07b15569 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicesWithoutCloudIdentity/UserExperienceAnalyticsDevicesWithoutCloudIdentityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsDevicesWithoutCloudIdentity/UserExperienceAnalyticsDevicesWithoutCloudIdentityRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsDevicesWithoutCloudIdentityRequestBuilder(string r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceWithoutCloudIdentity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceWithoutCloudIdentity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsImpactingProcess/Item/UserExperienceAnalyticsImpactingProcessItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsImpactingProcess/Item/UserExperienceAnalyticsImpactingProcessItemRequestBuilder.cs index ca0e7a0536b..2164a89170e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsImpactingProcess/Item/UserExperienceAnalyticsImpactingProcessItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsImpactingProcess/Item/UserExperienceAnalyticsImpactingProcessItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsImpactingProcess body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsImpactingProcess body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsImpactingProcess/UserExperienceAnalyticsImpactingProcessRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsImpactingProcess/UserExperienceAnalyticsImpactingProcessRequestBuilder.cs index b748a03d105..d1142a39ad2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsImpactingProcess/UserExperienceAnalyticsImpactingProcessRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsImpactingProcess/UserExperienceAnalyticsImpactingProcessRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsImpactingProcessRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsImpactingProcess body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsImpactingProcess body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/Item/UserExperienceAnalyticsMetricHistoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/Item/UserExperienceAnalyticsMetricHistoryItemRequestBuilder.cs index aa3daa4e4e1..1ddcc678bb8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/Item/UserExperienceAnalyticsMetricHistoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/Item/UserExperienceAnalyticsMetricHistoryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetricHistory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetricHistory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/UserExperienceAnalyticsMetricHistoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/UserExperienceAnalyticsMetricHistoryRequestBuilder.cs index d5ee41adbbf..27510ec309f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/UserExperienceAnalyticsMetricHistoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsMetricHistory/UserExperienceAnalyticsMetricHistoryRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsMetricHistoryRequestBuilder(string rawUrl, IReques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetricHistory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetricHistory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/Item/UserExperienceAnalyticsModelScoresItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/Item/UserExperienceAnalyticsModelScoresItemRequestBuilder.cs index a4f1d5b0e02..13df914873f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/Item/UserExperienceAnalyticsModelScoresItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/Item/UserExperienceAnalyticsModelScoresItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsModelScores body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsModelScores body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/UserExperienceAnalyticsModelScoresRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/UserExperienceAnalyticsModelScoresRequestBuilder.cs index c427f728214..041e17e7655 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/UserExperienceAnalyticsModelScoresRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsModelScores/UserExperienceAnalyticsModelScoresRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsModelScoresRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsModelScores body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsModelScores body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsNotAutopilotReadyDevice/Item/UserExperienceAnalyticsNotAutopilotReadyDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsNotAutopilotReadyDevice/Item/UserExperienceAnalyticsNotAutopilotReadyDeviceItemRequestBuilder.cs index 8112b18893b..2c47396f88e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsNotAutopilotReadyDevice/Item/UserExperienceAnalyticsNotAutopilotReadyDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsNotAutopilotReadyDevice/Item/UserExperienceAnalyticsNotAutopilotReadyDeviceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsNotAutopilotReadyDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsNotAutopilotReadyDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsNotAutopilotReadyDevice/UserExperienceAnalyticsNotAutopilotReadyDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsNotAutopilotReadyDevice/UserExperienceAnalyticsNotAutopilotReadyDeviceRequestBuilder.cs index 16d349fc050..22e8a023ec7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsNotAutopilotReadyDevice/UserExperienceAnalyticsNotAutopilotReadyDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsNotAutopilotReadyDevice/UserExperienceAnalyticsNotAutopilotReadyDeviceRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsNotAutopilotReadyDeviceRequestBuilder(string rawUr public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsNotAutopilotReadyDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsNotAutopilotReadyDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsOverview/UserExperienceAnalyticsOverviewRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsOverview/UserExperienceAnalyticsOverviewRequestBuilder.cs index 181d54b8ad6..8cd56cdb994 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsOverview/UserExperienceAnalyticsOverviewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsOverview/UserExperienceAnalyticsOverviewRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsOverview body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsOverview body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/Item/UserExperienceAnalyticsRemoteConnectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/Item/UserExperienceAnalyticsRemoteConnectionItemRequestBuilder.cs index cf0342d877e..54af1df6b04 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/Item/UserExperienceAnalyticsRemoteConnectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/Item/UserExperienceAnalyticsRemoteConnectionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsRemoteConnection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsRemoteConnection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/SummarizeDeviceRemoteConnectionWithSummarizeBy/SummarizeDeviceRemoteConnectionWithSummarizeByGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/SummarizeDeviceRemoteConnectionWithSummarizeBy/SummarizeDeviceRemoteConnectionWithSummarizeByGetResponse.cs index 4cc9555bc99..05a1970b7b9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/SummarizeDeviceRemoteConnectionWithSummarizeBy/SummarizeDeviceRemoteConnectionWithSummarizeByGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/SummarizeDeviceRemoteConnectionWithSummarizeBy/SummarizeDeviceRemoteConnectionWithSummarizeByGetResponse.cs @@ -36,7 +36,7 @@ public partial class SummarizeDeviceRemoteConnectionWithSummarizeByGetResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsRemoteConnection.SummarizeDeviceRemoteConnectionWithSummarizeBy.SummarizeDeviceRemoteConnectionWithSummarizeByGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsRemoteConnection.SummarizeDeviceRemoteConnectionWithSummarizeBy.SummarizeDeviceRemoteConnectionWithSummarizeByGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/SummarizeDeviceRemoteConnectionWithSummarizeBy/SummarizeDeviceRemoteConnectionWithSummarizeByResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/SummarizeDeviceRemoteConnectionWithSummarizeBy/SummarizeDeviceRemoteConnectionWithSummarizeByResponse.cs index b27053a5b76..4a246abb790 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/SummarizeDeviceRemoteConnectionWithSummarizeBy/SummarizeDeviceRemoteConnectionWithSummarizeByResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/SummarizeDeviceRemoteConnectionWithSummarizeBy/SummarizeDeviceRemoteConnectionWithSummarizeByResponse.cs @@ -20,7 +20,7 @@ public partial class SummarizeDeviceRemoteConnectionWithSummarizeByResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsRemoteConnection.SummarizeDeviceRemoteConnectionWithSummarizeBy.SummarizeDeviceRemoteConnectionWithSummarizeByResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsRemoteConnection.SummarizeDeviceRemoteConnectionWithSummarizeBy.SummarizeDeviceRemoteConnectionWithSummarizeByResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/UserExperienceAnalyticsRemoteConnectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/UserExperienceAnalyticsRemoteConnectionRequestBuilder.cs index 80ecd38297e..26989e92334 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/UserExperienceAnalyticsRemoteConnectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsRemoteConnection/UserExperienceAnalyticsRemoteConnectionRequestBuilder.cs @@ -94,7 +94,7 @@ public UserExperienceAnalyticsRemoteConnectionRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsRemoteConnection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsRemoteConnection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/Item/UserExperienceAnalyticsResourcePerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/Item/UserExperienceAnalyticsResourcePerformanceItemRequestBuilder.cs index 48fb6675f96..59de06312c9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/Item/UserExperienceAnalyticsResourcePerformanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/Item/UserExperienceAnalyticsResourcePerformanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsResourcePerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsResourcePerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/SummarizeDeviceResourcePerformanceWithSummarizeBy/SummarizeDeviceResourcePerformanceWithSummarizeByGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/SummarizeDeviceResourcePerformanceWithSummarizeBy/SummarizeDeviceResourcePerformanceWithSummarizeByGetResponse.cs index d15c667c44b..11feed81929 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/SummarizeDeviceResourcePerformanceWithSummarizeBy/SummarizeDeviceResourcePerformanceWithSummarizeByGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/SummarizeDeviceResourcePerformanceWithSummarizeBy/SummarizeDeviceResourcePerformanceWithSummarizeByGetResponse.cs @@ -36,7 +36,7 @@ public partial class SummarizeDeviceResourcePerformanceWithSummarizeByGetRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsResourcePerformance.SummarizeDeviceResourcePerformanceWithSummarizeBy.SummarizeDeviceResourcePerformanceWithSummarizeByGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsResourcePerformance.SummarizeDeviceResourcePerformanceWithSummarizeBy.SummarizeDeviceResourcePerformanceWithSummarizeByGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/SummarizeDeviceResourcePerformanceWithSummarizeBy/SummarizeDeviceResourcePerformanceWithSummarizeByResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/SummarizeDeviceResourcePerformanceWithSummarizeBy/SummarizeDeviceResourcePerformanceWithSummarizeByResponse.cs index bd6c3af7a9a..7818325eb33 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/SummarizeDeviceResourcePerformanceWithSummarizeBy/SummarizeDeviceResourcePerformanceWithSummarizeByResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/SummarizeDeviceResourcePerformanceWithSummarizeBy/SummarizeDeviceResourcePerformanceWithSummarizeByResponse.cs @@ -20,7 +20,7 @@ public partial class SummarizeDeviceResourcePerformanceWithSummarizeByResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsResourcePerformance.SummarizeDeviceResourcePerformanceWithSummarizeBy.SummarizeDeviceResourcePerformanceWithSummarizeByResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.UserExperienceAnalyticsResourcePerformance.SummarizeDeviceResourcePerformanceWithSummarizeBy.SummarizeDeviceResourcePerformanceWithSummarizeByResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/UserExperienceAnalyticsResourcePerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/UserExperienceAnalyticsResourcePerformanceRequestBuilder.cs index b76c382ee8c..36a9b7cb029 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/UserExperienceAnalyticsResourcePerformanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsResourcePerformance/UserExperienceAnalyticsResourcePerformanceRequestBuilder.cs @@ -94,7 +94,7 @@ public UserExperienceAnalyticsResourcePerformanceRequestBuilder(string rawUrl, I public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsResourcePerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsResourcePerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/Item/UserExperienceAnalyticsScoreHistoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/Item/UserExperienceAnalyticsScoreHistoryItemRequestBuilder.cs index ec96cf5c895..95d50ba98e6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/Item/UserExperienceAnalyticsScoreHistoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/Item/UserExperienceAnalyticsScoreHistoryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsScoreHistory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsScoreHistory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/UserExperienceAnalyticsScoreHistoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/UserExperienceAnalyticsScoreHistoryRequestBuilder.cs index 9e0b18201bb..c259dc63336 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/UserExperienceAnalyticsScoreHistoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsScoreHistory/UserExperienceAnalyticsScoreHistoryRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsScoreHistoryRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsScoreHistory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsScoreHistory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder.cs index 857e151d508..5515fe10eb4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/Item/UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/Item/UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder.cs index 313c08dc9ae..f1447d36bf2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/Item/UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/Item/UserExperienceAnalyticsWorkFromAnywhereDeviceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/MetricDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/MetricDevicesRequestBuilder.cs index 35b0cf64010..061d577942d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/MetricDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/MetricDevices/MetricDevicesRequestBuilder.cs @@ -93,7 +93,7 @@ public MetricDevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder.cs index 7bca88355af..bfbd979dd93 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/Item/UserExperienceAnalyticsWorkFromAnywhereMetricItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereMetric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereMetric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder.cs index ec7de3ce2ce..a3a17e70b05 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereMetrics/UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsWorkFromAnywhereMetricsRequestBuilder(string rawUr public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereMetric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereMetric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/Item/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/Item/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder.cs index 7b281353b22..7323d64d180 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/Item/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/Item/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereModelPerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereModelPerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder.cs index b2652ff6dd1..231fbd6de7a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserExperienceAnalyticsWorkFromAnywhereModelPerformance/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder.cs @@ -93,7 +93,7 @@ public UserExperienceAnalyticsWorkFromAnywhereModelPerformanceRequestBuilder(str public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereModelPerformance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereModelPerformance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserPfxCertificates/Item/UserPFXCertificateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserPfxCertificates/Item/UserPFXCertificateItemRequestBuilder.cs index 9b0e1b10cb8..d5b04b0ba6f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserPfxCertificates/Item/UserPFXCertificateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserPfxCertificates/Item/UserPFXCertificateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserPFXCertificate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserPFXCertificate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/UserPfxCertificates/UserPfxCertificatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/UserPfxCertificates/UserPfxCertificatesRequestBuilder.cs index 423045b3820..de19dba3941 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/UserPfxCertificates/UserPfxCertificatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/UserPfxCertificates/UserPfxCertificatesRequestBuilder.cs @@ -93,7 +93,7 @@ public UserPfxCertificatesRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserPFXCertificate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserPFXCertificate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VerifyWindowsEnrollmentAutoDiscoveryWithDomainName/VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VerifyWindowsEnrollmentAutoDiscoveryWithDomainName/VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse.cs index 041fc5fb98d..9acf8b909b7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VerifyWindowsEnrollmentAutoDiscoveryWithDomainName/VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VerifyWindowsEnrollmentAutoDiscoveryWithDomainName/VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse.cs @@ -42,7 +42,7 @@ public VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VerifyWindowsEnrollmentAutoDiscoveryWithDomainName.VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VerifyWindowsEnrollmentAutoDiscoveryWithDomainName.VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VerifyWindowsEnrollmentAutoDiscoveryWithDomainName/VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VerifyWindowsEnrollmentAutoDiscoveryWithDomainName/VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse.cs index ed6221c858f..66ec18b622f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VerifyWindowsEnrollmentAutoDiscoveryWithDomainName/VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VerifyWindowsEnrollmentAutoDiscoveryWithDomainName/VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse.cs @@ -20,7 +20,7 @@ public partial class VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VerifyWindowsEnrollmentAutoDiscoveryWithDomainName.VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VerifyWindowsEnrollmentAutoDiscoveryWithDomainName.VerifyWindowsEnrollmentAutoDiscoveryWithDomainNameResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/AuditEventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/AuditEventsRequestBuilder.cs index 67adb37f283..c97bc4d5f6b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/AuditEventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/AuditEventsRequestBuilder.cs @@ -100,7 +100,7 @@ public AuditEventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcAuditEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcAuditEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/GetAuditActivityTypes/GetAuditActivityTypesGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/GetAuditActivityTypes/GetAuditActivityTypesGetResponse.cs index 0d6964ac327..ac4d82b4a68 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/GetAuditActivityTypes/GetAuditActivityTypesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/GetAuditActivityTypes/GetAuditActivityTypesGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.AuditEvents.GetAuditActivityTypes.GetAuditActivityTypesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.AuditEvents.GetAuditActivityTypes.GetAuditActivityTypesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/GetAuditActivityTypes/GetAuditActivityTypesResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/GetAuditActivityTypes/GetAuditActivityTypesResponse.cs index a743b37a6b8..6423d27777b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/GetAuditActivityTypes/GetAuditActivityTypesResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/GetAuditActivityTypes/GetAuditActivityTypesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAuditActivityTypesResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.AuditEvents.GetAuditActivityTypes.GetAuditActivityTypesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.AuditEvents.GetAuditActivityTypes.GetAuditActivityTypesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/Item/CloudPcAuditEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/Item/CloudPcAuditEventItemRequestBuilder.cs index 5e8ffcc0da0..cbe89076817 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/Item/CloudPcAuditEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/AuditEvents/Item/CloudPcAuditEventItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcAuditEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcAuditEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/BulkActionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/BulkActionsRequestBuilder.cs index ad38b4bc189..4ff0cfe2fde 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/BulkActionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/BulkActionsRequestBuilder.cs @@ -95,7 +95,7 @@ public BulkActionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcBulkAction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcBulkAction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/Item/CloudPcBulkActionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/Item/CloudPcBulkActionItemRequestBuilder.cs index 9e3128603ff..dc1fbe5da86 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/Item/CloudPcBulkActionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/Item/CloudPcBulkActionItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcBulkAction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcBulkAction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/Item/Retry/RetryPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/Item/Retry/RetryPostRequestBody.cs index d9c1689ba3a..f0a29c99c08 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/Item/Retry/RetryPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/Item/Retry/RetryPostRequestBody.cs @@ -52,7 +52,7 @@ public RetryPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.BulkActions.Item.Retry.RetryPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.BulkActions.Item.Retry.RetryPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("cloudPcIds", CloudPcIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/Item/Retry/RetryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/Item/Retry/RetryRequestBuilder.cs index dc9047e19d5..16dd9233111 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/Item/Retry/RetryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/BulkActions/Item/Retry/RetryRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.BulkActions.Item.Retry.RetryPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.BulkActions.Item.Retry.RetryPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/CloudAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/CloudAppsRequestBuilder.cs index a9fd282048c..f82b9c86f10 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/CloudAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/CloudAppsRequestBuilder.cs @@ -73,7 +73,8 @@ public CloudAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : { } /// - /// Get cloudApps from deviceManagement + /// List all the cloudPcCloudApp objects filtered by a provision policy ID. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -112,7 +113,7 @@ public CloudAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcCloudApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -131,7 +132,7 @@ public CloudAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId.RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdRequestBuilder(PathParameters, RequestAdapter, sourceId); } /// - /// Get cloudApps from deviceManagement + /// List all the cloudPcCloudApp objects filtered by a provision policy ID. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -164,7 +165,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcCloudApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -181,7 +182,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.CloudAppsRequestBuilder(rawUrl, RequestAdapter); } /// - /// Get cloudApps from deviceManagement + /// List all the cloudPcCloudApp objects filtered by a provision policy ID. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class CloudAppsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Item/CloudPcCloudAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Item/CloudPcCloudAppItemRequestBuilder.cs index c02c997ac63..2f850f73648 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Item/CloudPcCloudAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Item/CloudPcCloudAppItemRequestBuilder.cs @@ -57,7 +57,8 @@ public async Task DeleteAsync(Action - /// Get cloudApps from deviceManagement + /// Read the properties of a specific cloudPcCloudApp object. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -80,7 +81,8 @@ public async Task DeleteAsync(Action(requestInfo, global::Microsoft.Graph.Beta.Models.CloudPcCloudApp.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the navigation property cloudApps in deviceManagement + /// Update the properties of a cloudPcCloudApp object, such as the display name or icon path. + /// Find more info here /// /// A /// The request body @@ -96,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcCloudApp body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -124,7 +126,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Get cloudApps from deviceManagement + /// Read the properties of a specific cloudPcCloudApp object. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -143,7 +145,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the navigation property cloudApps in deviceManagement + /// Update the properties of a cloudPcCloudApp object, such as the display name or icon path. /// /// A /// The request body @@ -157,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcCloudApp body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -182,7 +184,7 @@ public partial class CloudPcCloudAppItemRequestBuilderDeleteRequestConfiguration { } /// - /// Get cloudApps from deviceManagement + /// Read the properties of a specific cloudPcCloudApp object. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class CloudPcCloudAppItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Publish/PublishPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Publish/PublishPostRequestBody.cs index fe01b40a975..c7b4e3cb807 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Publish/PublishPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Publish/PublishPostRequestBody.cs @@ -52,7 +52,7 @@ public PublishPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.Publish.PublishPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.Publish.PublishPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("cloudAppIds", CloudAppIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Publish/PublishRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Publish/PublishRequestBuilder.cs index 877a75108aa..4f11807f008 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Publish/PublishRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Publish/PublishRequestBuilder.cs @@ -34,7 +34,8 @@ public PublishRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba { } /// - /// Invoke action publish + /// Publish a cloudPcCloudApp object to make it available to end users through their portal, such as the Windows App. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -49,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.Publish.PublishPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -58,7 +59,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Invoke action publish + /// Publish a cloudPcCloudApp object to make it available to end users through their portal, such as the Windows App. /// /// A /// The request body @@ -72,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.Publish.PublishPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Reset/ResetPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Reset/ResetPostRequestBody.cs index fe19bb1287f..2f15cddfb61 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Reset/ResetPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Reset/ResetPostRequestBody.cs @@ -52,7 +52,7 @@ public ResetPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.Reset.ResetPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.Reset.ResetPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("cloudAppIds", CloudAppIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Reset/ResetRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Reset/ResetRequestBuilder.cs index cef1c0d2cd0..fbc0fb6d7bf 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Reset/ResetRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Reset/ResetRequestBuilder.cs @@ -34,7 +34,8 @@ public ResetRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base { } /// - /// Invoke action reset + /// Reset the app details of the cloudPcCloudApp object to the app details of the initially discovered app that this cloud app is mapped to. This action requires the Microsoft.CloudPC/CloudApps/Update permission. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -49,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.Reset.ResetPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -58,7 +59,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Invoke action reset + /// Reset the app details of the cloudPcCloudApp object to the app details of the initially discovered app that this cloud app is mapped to. This action requires the Microsoft.CloudPC/CloudApps/Update permission. /// /// A /// The request body @@ -72,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.Reset.ResetPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdGetResponse.cs index a44df8c3496..40d87fa5b46 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId.RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId.RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdRequestBuilder.cs index 3cb4a4bb13d..d03f1580096 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdRequestBuilder.cs @@ -36,7 +36,8 @@ public RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyI { } /// - /// Invoke function retrieveDiscoveredApps + /// Get a list of cloudPcDiscoveredApp objects whose appdetails can be used to map to a cloudPcCloudApp object. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -59,7 +60,8 @@ public RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyI return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId.RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Invoke function retrieveDiscoveredApps + /// Get a list of cloudPcDiscoveredApp objects whose appdetails can be used to map to a cloudPcCloudApp object. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -83,7 +85,7 @@ public RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyI return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId.RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Invoke function retrieveDiscoveredApps + /// Get a list of cloudPcDiscoveredApp objects whose appdetails can be used to map to a cloudPcCloudApp object. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -111,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Invoke function retrieveDiscoveredApps + /// Get a list of cloudPcDiscoveredApp objects whose appdetails can be used to map to a cloudPcCloudApp object. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdResponse.cs index 8dc0478b287..00de67b5f0d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId/RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdResponse.cs @@ -20,7 +20,7 @@ public partial class RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId.RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyId.RetrieveDiscoveredAppsWithSourceIdprovisioningPolicyIdProvisioningPolicyIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Unpublish/UnpublishPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Unpublish/UnpublishPostRequestBody.cs index 54d340c6b82..498f4e8dd2d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Unpublish/UnpublishPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Unpublish/UnpublishPostRequestBody.cs @@ -52,7 +52,7 @@ public UnpublishPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.Unpublish.UnpublishPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.Unpublish.UnpublishPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("cloudAppIds", CloudAppIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Unpublish/UnpublishRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Unpublish/UnpublishRequestBuilder.cs index c57cf83dc25..353fce71381 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Unpublish/UnpublishRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudApps/Unpublish/UnpublishRequestBuilder.cs @@ -34,7 +34,8 @@ public UnpublishRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : { } /// - /// Invoke action unpublish + /// Unpublish a cloudPcCloudApp to remove it from the end-user portal, for example, the Windows App. When a cloud app is unpublished, any changes made to its app details are reverted and reset to the values of the discovered app it's linked to. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -49,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.Unpublish.UnpublishPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -58,7 +59,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Invoke action unpublish + /// Unpublish a cloudPcCloudApp to remove it from the end-user portal, for example, the Windows App. When a cloud app is unpublished, any changes made to its app details are reverted and reset to the values of the discovered app it's linked to. /// /// A /// The request body @@ -72,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudApps.Unpublish.UnpublishPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/CloudPCsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/CloudPCsRequestBuilder.cs index 337fda352bf..3802c5592fe 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/CloudPCsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/CloudPCsRequestBuilder.cs @@ -119,7 +119,7 @@ public CloudPCsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPC body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -161,7 +161,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPC body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdGetResponse.cs index 2727f93e3a6..e11b2103f63 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetProvisionedCloudPCsWithGroupIdWithServicePlanIdGetRespon /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.GetProvisionedCloudPCsWithGroupIdWithServicePlanId.GetProvisionedCloudPCsWithGroupIdWithServicePlanIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.GetProvisionedCloudPCsWithGroupIdWithServicePlanId.GetProvisionedCloudPCsWithGroupIdWithServicePlanIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdResponse.cs index 40425493c5b..847e32d007d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdResponse.cs @@ -20,7 +20,7 @@ public partial class GetProvisionedCloudPCsWithGroupIdWithServicePlanIdResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.GetProvisionedCloudPCsWithGroupIdWithServicePlanId.GetProvisionedCloudPCsWithGroupIdWithServicePlanIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.GetProvisionedCloudPCsWithGroupIdWithServicePlanId.GetProvisionedCloudPCsWithGroupIdWithServicePlanIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypePostRequestBody.cs index 7b6ea37ae67..38639876074 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypePostRequestBody.cs @@ -43,7 +43,7 @@ public ChangeUserAccountTypePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.ChangeUserAccountType.ChangeUserAccountTypePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.ChangeUserAccountType.ChangeUserAccountTypePostRequestBody(); } /// @@ -63,7 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("userAccountType", UserAccountType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypeRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypeRequestBuilder.cs index a0e3f1c1fa8..f6491848734 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.ChangeUserAccountType.ChangeUserAccountTypePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.ChangeUserAccountType.ChangeUserAccountTypePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/CloudPCItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/CloudPCItemRequestBuilder.cs index cad1517f922..6405f85d411 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/CloudPCItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/CloudPCItemRequestBuilder.cs @@ -229,7 +229,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPC body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -290,7 +290,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPC body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/CreateSnapshot/CreateSnapshotPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/CreateSnapshot/CreateSnapshotPostRequestBody.cs index bd28a58f462..25aa8dd6afc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/CreateSnapshot/CreateSnapshotPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/CreateSnapshot/CreateSnapshotPostRequestBody.cs @@ -59,7 +59,7 @@ public CreateSnapshotPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.CreateSnapshot.CreateSnapshotPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.CreateSnapshot.CreateSnapshotPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("accessTier", AccessTier); writer.WriteStringValue("storageAccountId", StorageAccountId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/CreateSnapshot/CreateSnapshotRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/CreateSnapshot/CreateSnapshotRequestBuilder.cs index 0b0d9ad2a99..d8b704d83a3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/CreateSnapshot/CreateSnapshotRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/CreateSnapshot/CreateSnapshotRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.CreateSnapshot.CreateSnapshotPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.CreateSnapshot.CreateSnapshotPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryGetResponse.cs index 2f914b724d2..22ee33a82b7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetCloudPcConnectivityHistoryGetResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.GetCloudPcConnectivityHistory.GetCloudPcConnectivityHistoryGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.GetCloudPcConnectivityHistory.GetCloudPcConnectivityHistoryGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryResponse.cs index 8b3805fb8db..17754d035d2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryResponse.cs @@ -20,7 +20,7 @@ public partial class GetCloudPcConnectivityHistoryResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.GetCloudPcConnectivityHistory.GetCloudPcConnectivityHistoryResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.GetCloudPcConnectivityHistory.GetCloudPcConnectivityHistoryResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetCloudPcLaunchInfo/GetCloudPcLaunchInfoRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetCloudPcLaunchInfo/GetCloudPcLaunchInfoRequestBuilder.cs index 9133dc513ea..be3fd125c5e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetCloudPcLaunchInfo/GetCloudPcLaunchInfoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetCloudPcLaunchInfo/GetCloudPcLaunchInfoRequestBuilder.cs @@ -35,7 +35,7 @@ public GetCloudPcLaunchInfoRequestBuilder(string rawUrl, IRequestAdapter request { } /// - /// Get the cloudPCLaunchInfo for a specific cloudPC. + /// Get the cloudPCLaunchInfo for a specific cloudPC that belongs to the current signed-in user. /// Find more info here /// /// A @@ -59,7 +59,7 @@ public GetCloudPcLaunchInfoRequestBuilder(string rawUrl, IRequestAdapter request return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.CloudPcLaunchInfo.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Get the cloudPCLaunchInfo for a specific cloudPC. + /// Get the cloudPCLaunchInfo for a specific cloudPC that belongs to the current signed-in user. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsGetResponse.cs index 37b702891ef..09693403ed5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetSupportedCloudPcRemoteActionsGetResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.GetSupportedCloudPcRemoteActions.GetSupportedCloudPcRemoteActionsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.GetSupportedCloudPcRemoteActions.GetSupportedCloudPcRemoteActionsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsResponse.cs index a8e22f8570b..2a094b50cc7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsResponse.cs @@ -20,7 +20,7 @@ public partial class GetSupportedCloudPcRemoteActionsResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.GetSupportedCloudPcRemoteActions.GetSupportedCloudPcRemoteActionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.GetSupportedCloudPcRemoteActions.GetSupportedCloudPcRemoteActionsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Rename/RenamePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Rename/RenamePostRequestBody.cs index f357a3dcc53..12f1e7fb838 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Rename/RenamePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Rename/RenamePostRequestBody.cs @@ -52,7 +52,7 @@ public RenamePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Rename.RenamePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Rename.RenamePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Rename/RenameRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Rename/RenameRequestBuilder.cs index d2fedfb4c5d..d8af000e83d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Rename/RenameRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Rename/RenameRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Rename.RenamePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Rename.RenamePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Reprovision/ReprovisionPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Reprovision/ReprovisionPostRequestBody.cs index 477dedd9fa4..58a4d7e94d9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Reprovision/ReprovisionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Reprovision/ReprovisionPostRequestBody.cs @@ -49,7 +49,7 @@ public ReprovisionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Reprovision.ReprovisionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Reprovision.ReprovisionPostRequestBody(); } /// @@ -70,7 +70,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("osVersion", OsVersion); writer.WriteEnumValue("userAccountType", UserAccountType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Reprovision/ReprovisionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Reprovision/ReprovisionRequestBuilder.cs index f1e3ab8e72f..a881f170877 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Reprovision/ReprovisionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Reprovision/ReprovisionRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Reprovision.ReprovisionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Reprovision.ReprovisionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Resize/ResizePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Resize/ResizePostRequestBody.cs index 6111986aa56..7d640831966 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Resize/ResizePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Resize/ResizePostRequestBody.cs @@ -52,7 +52,7 @@ public ResizePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Resize.ResizePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Resize.ResizePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("targetServicePlanId", TargetServicePlanId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Resize/ResizeRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Resize/ResizeRequestBuilder.cs index 1bcf38b973f..0624c71dfe0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Resize/ResizeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Resize/ResizeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Resize.ResizePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Resize.ResizePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Restore/RestorePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Restore/RestorePostRequestBody.cs index 7cc8f488beb..27d1605e56a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Restore/RestorePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Restore/RestorePostRequestBody.cs @@ -52,7 +52,7 @@ public RestorePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Restore.RestorePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Restore.RestorePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("cloudPcSnapshotId", CloudPcSnapshotId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Restore/RestoreRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Restore/RestoreRequestBuilder.cs index 22890c7d470..8bc9e6bfbcf 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Restore/RestoreRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/Restore/RestoreRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Restore.RestorePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.Restore.RestorePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsGetResponse.cs index dc8a78f74e1..997305b6bc1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrieveCloudPCRemoteActionResultsGetResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.RetrieveCloudPCRemoteActionResults.RetrieveCloudPCRemoteActionResultsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.RetrieveCloudPCRemoteActionResults.RetrieveCloudPCRemoteActionResultsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsResponse.cs index 4411a001416..e7aae7fd910 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsResponse.cs @@ -20,7 +20,7 @@ public partial class RetrieveCloudPCRemoteActionResultsResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.RetrieveCloudPCRemoteActionResults.RetrieveCloudPCRemoteActionResultsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.RetrieveCloudPCRemoteActionResults.RetrieveCloudPCRemoteActionResultsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsGetResponse.cs index a5cab0f08c8..2397fa646bd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrieveSnapshotsGetResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.RetrieveSnapshots.RetrieveSnapshotsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.RetrieveSnapshots.RetrieveSnapshotsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsResponse.cs index 64411ae71eb..08f8b3e3730 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsResponse.cs @@ -20,7 +20,7 @@ public partial class RetrieveSnapshotsResponse : global::Microsoft.Graph.Beta.De /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.RetrieveSnapshots.RetrieveSnapshotsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.RetrieveSnapshots.RetrieveSnapshotsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/SetReviewStatus/SetReviewStatusPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/SetReviewStatus/SetReviewStatusPostRequestBody.cs index da0c4d9a675..5e056de88c4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/SetReviewStatus/SetReviewStatusPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/SetReviewStatus/SetReviewStatusPostRequestBody.cs @@ -53,7 +53,7 @@ public SetReviewStatusPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.SetReviewStatus.SetReviewStatusPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.SetReviewStatus.SetReviewStatusPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("reviewStatus", ReviewStatus); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/SetReviewStatus/SetReviewStatusRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/SetReviewStatus/SetReviewStatusRequestBuilder.cs index 23333965f62..a45d79213eb 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/SetReviewStatus/SetReviewStatusRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/Item/SetReviewStatus/SetReviewStatusRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.SetReviewStatus.SetReviewStatusPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.Item.SetReviewStatus.SetReviewStatusPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusGetResponse.cs index 5e773d7eea4..51491944404 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrieveCloudPcCountByStatusGetResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.RetrieveCloudPcCountByStatus.RetrieveCloudPcCountByStatusGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.RetrieveCloudPcCountByStatus.RetrieveCloudPcCountByStatusGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusResponse.cs index 5ac7a89b908..c113bd702f6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusResponse.cs @@ -20,7 +20,7 @@ public partial class RetrieveCloudPcCountByStatusResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.RetrieveCloudPcCountByStatus.RetrieveCloudPcCountByStatusResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.RetrieveCloudPcCountByStatus.RetrieveCloudPcCountByStatusResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizePostRequestBody.cs index 589adf3ef48..d9bcd0fd591 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizePostRequestBody.cs @@ -68,7 +68,7 @@ public ValidateBulkResizePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.ValidateBulkResize.ValidateBulkResizePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.ValidateBulkResize.ValidateBulkResizePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("cloudPcIds", CloudPcIds); writer.WriteStringValue("targetServicePlanId", TargetServicePlanId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizePostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizePostResponse.cs index 493dcf07d26..ed66bd939a4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizePostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizePostResponse.cs @@ -36,7 +36,7 @@ public partial class ValidateBulkResizePostResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.ValidateBulkResize.ValidateBulkResizePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.ValidateBulkResize.ValidateBulkResizePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizeRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizeRequestBuilder.cs index 0037267f909..1fdc8279c9e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizeRequestBuilder.cs @@ -51,7 +51,7 @@ public ValidateBulkResizeRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsValidateBulkResizePostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.ValidateBulkResize.ValidateBulkResizePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public ValidateBulkResizeRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.ValidateBulkResize.ValidateBulkResizePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.ValidateBulkResize.ValidateBulkResizePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizeResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizeResponse.cs index f4f11b888bf..016d414b8a5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizeResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CloudPCs/ValidateBulkResize/ValidateBulkResizeResponse.cs @@ -20,7 +20,7 @@ public partial class ValidateBulkResizeResponse : global::Microsoft.Graph.Beta.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.ValidateBulkResize.ValidateBulkResizeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.CloudPCs.ValidateBulkResize.ValidateBulkResizeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CrossCloudGovernmentOrganizationMapping/CrossCloudGovernmentOrganizationMappingRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CrossCloudGovernmentOrganizationMapping/CrossCloudGovernmentOrganizationMappingRequestBuilder.cs index 4283c780872..405c70b56af 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CrossCloudGovernmentOrganizationMapping/CrossCloudGovernmentOrganizationMappingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/CrossCloudGovernmentOrganizationMapping/CrossCloudGovernmentOrganizationMappingRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcCrossCloudGovernmentOrganizationMapping body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcCrossCloudGovernmentOrganizationMapping body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/DeviceImagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/DeviceImagesRequestBuilder.cs index c3f1fee807c..e615c4f13e5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/DeviceImagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/DeviceImagesRequestBuilder.cs @@ -101,7 +101,7 @@ public DeviceImagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcDeviceImage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcDeviceImage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/GetSourceImages/GetSourceImagesGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/GetSourceImages/GetSourceImagesGetResponse.cs index 4b970072b33..3708483002e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/GetSourceImages/GetSourceImagesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/GetSourceImages/GetSourceImagesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetSourceImagesGetResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.DeviceImages.GetSourceImages.GetSourceImagesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.DeviceImages.GetSourceImages.GetSourceImagesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/GetSourceImages/GetSourceImagesResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/GetSourceImages/GetSourceImagesResponse.cs index cf45468357a..8d8a5d7ed8c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/GetSourceImages/GetSourceImagesResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/GetSourceImages/GetSourceImagesResponse.cs @@ -20,7 +20,7 @@ public partial class GetSourceImagesResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.DeviceImages.GetSourceImages.GetSourceImagesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.DeviceImages.GetSourceImages.GetSourceImagesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/Item/CloudPcDeviceImageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/Item/CloudPcDeviceImageItemRequestBuilder.cs index 3a7bf74933b..d1f883ff949 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/Item/CloudPcDeviceImageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/DeviceImages/Item/CloudPcDeviceImageItemRequestBuilder.cs @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcDeviceImage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcDeviceImage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ExternalPartnerSettings/ExternalPartnerSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ExternalPartnerSettings/ExternalPartnerSettingsRequestBuilder.cs index a2b16dd5139..4d629c9a89e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ExternalPartnerSettings/ExternalPartnerSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ExternalPartnerSettings/ExternalPartnerSettingsRequestBuilder.cs @@ -95,7 +95,7 @@ public ExternalPartnerSettingsRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcExternalPartnerSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcExternalPartnerSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ExternalPartnerSettings/Item/CloudPcExternalPartnerSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ExternalPartnerSettings/Item/CloudPcExternalPartnerSettingItemRequestBuilder.cs index 400c86bf8dd..0cec39c43ee 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ExternalPartnerSettings/Item/CloudPcExternalPartnerSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ExternalPartnerSettings/Item/CloudPcExternalPartnerSettingItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcExternalPartnerSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcExternalPartnerSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/FrontLineServicePlans/FrontLineServicePlansRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/FrontLineServicePlans/FrontLineServicePlansRequestBuilder.cs index b48b3094328..6e42ab3a880 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/FrontLineServicePlans/FrontLineServicePlansRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/FrontLineServicePlans/FrontLineServicePlansRequestBuilder.cs @@ -94,7 +94,7 @@ public FrontLineServicePlansRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcFrontLineServicePlan body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcFrontLineServicePlan body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/FrontLineServicePlans/Item/CloudPcFrontLineServicePlanItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/FrontLineServicePlans/Item/CloudPcFrontLineServicePlanItemRequestBuilder.cs index 76a6ea8ae04..a7a24e6bbdf 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/FrontLineServicePlans/Item/CloudPcFrontLineServicePlanItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/FrontLineServicePlans/Item/CloudPcFrontLineServicePlanItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcFrontLineServicePlan body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcFrontLineServicePlan body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GalleryImages/GalleryImagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GalleryImages/GalleryImagesRequestBuilder.cs index ab0fabe4bc1..362e8fe69ef 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GalleryImages/GalleryImagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GalleryImages/GalleryImagesRequestBuilder.cs @@ -94,7 +94,7 @@ public GalleryImagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcGalleryImage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcGalleryImage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GalleryImages/Item/CloudPcGalleryImageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GalleryImages/Item/CloudPcGalleryImageItemRequestBuilder.cs index 7b009934bec..40ce10340e0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GalleryImages/Item/CloudPcGalleryImageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GalleryImages/Item/CloudPcGalleryImageItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcGalleryImage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcGalleryImage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GetEffectivePermissions/GetEffectivePermissionsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GetEffectivePermissions/GetEffectivePermissionsGetResponse.cs index f6cae9a540f..7ffdbf9c3e1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GetEffectivePermissions/GetEffectivePermissionsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GetEffectivePermissions/GetEffectivePermissionsGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.GetEffectivePermissions.GetEffectivePermissionsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.GetEffectivePermissions.GetEffectivePermissionsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GetEffectivePermissions/GetEffectivePermissionsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GetEffectivePermissions/GetEffectivePermissionsResponse.cs index 946971ff7bd..6ac2394187c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GetEffectivePermissions/GetEffectivePermissionsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/GetEffectivePermissions/GetEffectivePermissionsResponse.cs @@ -20,7 +20,7 @@ public partial class GetEffectivePermissionsResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.GetEffectivePermissions.GetEffectivePermissionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.GetEffectivePermissions.GetEffectivePermissionsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/Item/CloudPcOnPremisesConnectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/Item/CloudPcOnPremisesConnectionItemRequestBuilder.cs index 9834ded0976..5c15e19b363 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/Item/CloudPcOnPremisesConnectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/Item/CloudPcOnPremisesConnectionItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcOnPremisesConnection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcOnPremisesConnection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/Item/UpdateAdDomainPassword/UpdateAdDomainPasswordPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/Item/UpdateAdDomainPassword/UpdateAdDomainPasswordPostRequestBody.cs index ae927e0b2dd..a294898368c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/Item/UpdateAdDomainPassword/UpdateAdDomainPasswordPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/Item/UpdateAdDomainPassword/UpdateAdDomainPasswordPostRequestBody.cs @@ -52,7 +52,7 @@ public UpdateAdDomainPasswordPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.OnPremisesConnections.Item.UpdateAdDomainPassword.UpdateAdDomainPasswordPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.OnPremisesConnections.Item.UpdateAdDomainPassword.UpdateAdDomainPasswordPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("adDomainPassword", AdDomainPassword); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/Item/UpdateAdDomainPassword/UpdateAdDomainPasswordRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/Item/UpdateAdDomainPassword/UpdateAdDomainPasswordRequestBuilder.cs index 1632d77ccd6..48fa2675c66 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/Item/UpdateAdDomainPassword/UpdateAdDomainPasswordRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/Item/UpdateAdDomainPassword/UpdateAdDomainPasswordRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.OnPremisesConnections.Item.UpdateAdDomainPassword.UpdateAdDomainPasswordPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.OnPremisesConnections.Item.UpdateAdDomainPassword.UpdateAdDomainPasswordPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/OnPremisesConnectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/OnPremisesConnectionsRequestBuilder.cs index d90ac521939..0c284def721 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/OnPremisesConnectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OnPremisesConnections/OnPremisesConnectionsRequestBuilder.cs @@ -95,7 +95,7 @@ public OnPremisesConnectionsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcOnPremisesConnection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcOnPremisesConnection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OrganizationSettings/OrganizationSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OrganizationSettings/OrganizationSettingsRequestBuilder.cs index 6520ad11b4f..3d94df59654 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OrganizationSettings/OrganizationSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/OrganizationSettings/OrganizationSettingsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcOrganizationSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcOrganizationSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/ApplyConfig/ApplyConfigPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/ApplyConfig/ApplyConfigPostRequestBody.cs index a776ef3a581..4b5c59a2c7f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/ApplyConfig/ApplyConfigPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/ApplyConfig/ApplyConfigPostRequestBody.cs @@ -59,7 +59,7 @@ public ApplyConfigPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.ApplyConfig.ApplyConfigPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.ApplyConfig.ApplyConfigPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("cloudPcIds", CloudPcIds); writer.WriteEnumValue("policySettings", PolicySettings); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/ApplyConfig/ApplyConfigRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/ApplyConfig/ApplyConfigRequestBuilder.cs index c98605ae0c4..9147c2df4ba 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/ApplyConfig/ApplyConfigRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/ApplyConfig/ApplyConfigRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.ApplyConfig.ApplyConfigPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.ApplyConfig.ApplyConfigPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Apply/ApplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Apply/ApplyPostRequestBody.cs index c46a07ed34f..8034c98a3bd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Apply/ApplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Apply/ApplyPostRequestBody.cs @@ -49,7 +49,7 @@ public ApplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.Item.Apply.ApplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.Item.Apply.ApplyPostRequestBody(); } /// @@ -70,7 +70,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("policySettings", PolicySettings); writer.WriteIntValue("reservePercentage", ReservePercentage); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Apply/ApplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Apply/ApplyRequestBuilder.cs index 00a85c62a55..6b838b5ef5c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Apply/ApplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Apply/ApplyRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.Item.Apply.ApplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.Item.Apply.ApplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assign/AssignPostRequestBody.cs index c0202f31475..b08481df98d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assign/AssignRequestBuilder.cs index 31a3c433beb..970d8ff2981 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assign/AssignRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assignments/AssignmentsRequestBuilder.cs index b9b1ec42686..6e27fac56cc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assignments/Item/AssignedUsers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assignments/Item/AssignedUsers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs index 9ef0336aa9b..09b2ced4fc6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assignments/Item/AssignedUsers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assignments/Item/AssignedUsers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assignments/Item/CloudPcProvisioningPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assignments/Item/CloudPcProvisioningPolicyAssignmentItemRequestBuilder.cs index 090cbae4453..f6587d9f6a1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assignments/Item/CloudPcProvisioningPolicyAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/Assignments/Item/CloudPcProvisioningPolicyAssignmentItemRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -174,7 +174,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/CloudPcProvisioningPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/CloudPcProvisioningPolicyItemRequestBuilder.cs index bd677cefd6c..18ecd75f2fa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/CloudPcProvisioningPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/CloudPcProvisioningPolicyItemRequestBuilder.cs @@ -135,7 +135,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -196,7 +196,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/SchedulePolicyApplyTask/SchedulePolicyApplyTaskPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/SchedulePolicyApplyTask/SchedulePolicyApplyTaskPostRequestBody.cs index e7154bded77..5e7988ddd49 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/SchedulePolicyApplyTask/SchedulePolicyApplyTaskPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/SchedulePolicyApplyTask/SchedulePolicyApplyTaskPostRequestBody.cs @@ -53,7 +53,7 @@ public SchedulePolicyApplyTaskPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.Item.SchedulePolicyApplyTask.SchedulePolicyApplyTaskPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.Item.SchedulePolicyApplyTask.SchedulePolicyApplyTaskPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("scheduledRule", ScheduledRule); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/SchedulePolicyApplyTask/SchedulePolicyApplyTaskRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/SchedulePolicyApplyTask/SchedulePolicyApplyTaskRequestBuilder.cs index 36310bff36a..632a7ff2b79 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/SchedulePolicyApplyTask/SchedulePolicyApplyTaskRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/Item/SchedulePolicyApplyTask/SchedulePolicyApplyTaskRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.Item.SchedulePolicyApplyTask.SchedulePolicyApplyTaskPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.ProvisioningPolicies.Item.SchedulePolicyApplyTask.SchedulePolicyApplyTaskPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/ProvisioningPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/ProvisioningPoliciesRequestBuilder.cs index 29cb90a61de..e8c61306cd6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/ProvisioningPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ProvisioningPolicies/ProvisioningPoliciesRequestBuilder.cs @@ -101,7 +101,7 @@ public ProvisioningPoliciesRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/ExportJobs/ExportJobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/ExportJobs/ExportJobsRequestBuilder.cs index a9f95cf23eb..bfc9624dd10 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/ExportJobs/ExportJobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/ExportJobs/ExportJobsRequestBuilder.cs @@ -94,7 +94,7 @@ public ExportJobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcExportJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcExportJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/ExportJobs/Item/CloudPcExportJobItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/ExportJobs/Item/CloudPcExportJobItemRequestBuilder.cs index c77990b0cd2..4700ced7e2d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/ExportJobs/Item/CloudPcExportJobItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/ExportJobs/Item/CloudPcExportJobItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcExportJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcExportJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetActionStatusReports/GetActionStatusReportsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetActionStatusReports/GetActionStatusReportsPostRequestBody.cs index d12bfc36e28..b065fe6802f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetActionStatusReports/GetActionStatusReportsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetActionStatusReports/GetActionStatusReportsPostRequestBody.cs @@ -128,7 +128,7 @@ public GetActionStatusReportsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetActionStatusReports.GetActionStatusReportsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetActionStatusReports.GetActionStatusReportsPostRequestBody(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetActionStatusReports/GetActionStatusReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetActionStatusReports/GetActionStatusReportsRequestBuilder.cs index 856c19302e3..27080523e48 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetActionStatusReports/GetActionStatusReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetActionStatusReports/GetActionStatusReportsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetActionStatusReportsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetActionStatusReports.GetActionStatusReportsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetActionStatusReports.GetActionStatusReportsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcPerformanceReport/GetCloudPcPerformanceReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcPerformanceReport/GetCloudPcPerformanceReportPostRequestBody.cs index b0fff8c5239..ff6ddc310c1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcPerformanceReport/GetCloudPcPerformanceReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcPerformanceReport/GetCloudPcPerformanceReportPostRequestBody.cs @@ -135,7 +135,7 @@ public GetCloudPcPerformanceReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetCloudPcPerformanceReport.GetCloudPcPerformanceReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetCloudPcPerformanceReport.GetCloudPcPerformanceReportPostRequestBody(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcPerformanceReport/GetCloudPcPerformanceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcPerformanceReport/GetCloudPcPerformanceReportRequestBuilder.cs index af6857d788f..c0b632333d8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcPerformanceReport/GetCloudPcPerformanceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcPerformanceReport/GetCloudPcPerformanceReportRequestBuilder.cs @@ -52,7 +52,7 @@ public GetCloudPcPerformanceReportRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetCloudPcPerformanceReport.GetCloudPcPerformanceReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetCloudPcPerformanceReport.GetCloudPcPerformanceReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcRecommendationReports/GetCloudPcRecommendationReportsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcRecommendationReports/GetCloudPcRecommendationReportsPostRequestBody.cs index 185d6407a7f..6259186e603 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcRecommendationReports/GetCloudPcRecommendationReportsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcRecommendationReports/GetCloudPcRecommendationReportsPostRequestBody.cs @@ -135,7 +135,7 @@ public GetCloudPcRecommendationReportsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetCloudPcRecommendationReports.GetCloudPcRecommendationReportsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetCloudPcRecommendationReports.GetCloudPcRecommendationReportsPostRequestBody(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcRecommendationReports/GetCloudPcRecommendationReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcRecommendationReports/GetCloudPcRecommendationReportsRequestBuilder.cs index 501776caab1..d17ff04f9e7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcRecommendationReports/GetCloudPcRecommendationReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetCloudPcRecommendationReports/GetCloudPcRecommendationReportsRequestBuilder.cs @@ -52,7 +52,7 @@ public GetCloudPcRecommendationReportsRequestBuilder(string rawUrl, IRequestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetCloudPcRecommendationReports.GetCloudPcRecommendationReportsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetCloudPcRecommendationReports.GetCloudPcRecommendationReportsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetConnectionQualityReports/GetConnectionQualityReportsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetConnectionQualityReports/GetConnectionQualityReportsPostRequestBody.cs index d2b48ecd17a..995ee4bd95b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetConnectionQualityReports/GetConnectionQualityReportsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetConnectionQualityReports/GetConnectionQualityReportsPostRequestBody.cs @@ -128,7 +128,7 @@ public GetConnectionQualityReportsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetConnectionQualityReports.GetConnectionQualityReportsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetConnectionQualityReports.GetConnectionQualityReportsPostRequestBody(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetConnectionQualityReports/GetConnectionQualityReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetConnectionQualityReports/GetConnectionQualityReportsRequestBuilder.cs index ba4220087db..785071d8a06 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetConnectionQualityReports/GetConnectionQualityReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetConnectionQualityReports/GetConnectionQualityReportsRequestBuilder.cs @@ -52,7 +52,7 @@ public GetConnectionQualityReportsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetConnectionQualityReports.GetConnectionQualityReportsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetConnectionQualityReports.GetConnectionQualityReportsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetDailyAggregatedRemoteConnectionReports/GetDailyAggregatedRemoteConnectionReportsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetDailyAggregatedRemoteConnectionReports/GetDailyAggregatedRemoteConnectionReportsPostRequestBody.cs index 90184fc2591..cf13fd0fd13 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetDailyAggregatedRemoteConnectionReports/GetDailyAggregatedRemoteConnectionReportsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetDailyAggregatedRemoteConnectionReports/GetDailyAggregatedRemoteConnectionReportsPostRequestBody.cs @@ -128,7 +128,7 @@ public GetDailyAggregatedRemoteConnectionReportsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetDailyAggregatedRemoteConnectionReports.GetDailyAggregatedRemoteConnectionReportsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetDailyAggregatedRemoteConnectionReports.GetDailyAggregatedRemoteConnectionReportsPostRequestBody(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetDailyAggregatedRemoteConnectionReports/GetDailyAggregatedRemoteConnectionReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetDailyAggregatedRemoteConnectionReports/GetDailyAggregatedRemoteConnectionReportsRequestBuilder.cs index f7186fb5ea0..826f16301e2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetDailyAggregatedRemoteConnectionReports/GetDailyAggregatedRemoteConnectionReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetDailyAggregatedRemoteConnectionReports/GetDailyAggregatedRemoteConnectionReportsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetDailyAggregatedRemoteConnectionReportsRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetDailyAggregatedRemoteConnectionReports.GetDailyAggregatedRemoteConnectionReportsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetDailyAggregatedRemoteConnectionReports.GetDailyAggregatedRemoteConnectionReportsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetFrontlineReport/GetFrontlineReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetFrontlineReport/GetFrontlineReportPostRequestBody.cs index 37f7e986c46..c52808e91f0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetFrontlineReport/GetFrontlineReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetFrontlineReport/GetFrontlineReportPostRequestBody.cs @@ -135,7 +135,7 @@ public GetFrontlineReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetFrontlineReport.GetFrontlineReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetFrontlineReport.GetFrontlineReportPostRequestBody(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetFrontlineReport/GetFrontlineReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetFrontlineReport/GetFrontlineReportRequestBuilder.cs index 5c7c27d2384..36cd80c9f97 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetFrontlineReport/GetFrontlineReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetFrontlineReport/GetFrontlineReportRequestBuilder.cs @@ -52,7 +52,7 @@ public GetFrontlineReportRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetFrontlineReport.GetFrontlineReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetFrontlineReport.GetFrontlineReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetInaccessibleCloudPcReports/GetInaccessibleCloudPcReportsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetInaccessibleCloudPcReports/GetInaccessibleCloudPcReportsPostRequestBody.cs index 47f70b648d1..181aa68095d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetInaccessibleCloudPcReports/GetInaccessibleCloudPcReportsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetInaccessibleCloudPcReports/GetInaccessibleCloudPcReportsPostRequestBody.cs @@ -135,7 +135,7 @@ public GetInaccessibleCloudPcReportsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetInaccessibleCloudPcReports.GetInaccessibleCloudPcReportsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetInaccessibleCloudPcReports.GetInaccessibleCloudPcReportsPostRequestBody(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetInaccessibleCloudPcReports/GetInaccessibleCloudPcReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetInaccessibleCloudPcReports/GetInaccessibleCloudPcReportsRequestBuilder.cs index e7d39392ca1..55ade476bae 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetInaccessibleCloudPcReports/GetInaccessibleCloudPcReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetInaccessibleCloudPcReports/GetInaccessibleCloudPcReportsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetInaccessibleCloudPcReportsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetInaccessibleCloudPcReports.GetInaccessibleCloudPcReportsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetInaccessibleCloudPcReports.GetInaccessibleCloudPcReportsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRawRemoteConnectionReports/GetRawRemoteConnectionReportsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRawRemoteConnectionReports/GetRawRemoteConnectionReportsPostRequestBody.cs index 007dbfc3a84..fb2cb5a9c6f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRawRemoteConnectionReports/GetRawRemoteConnectionReportsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRawRemoteConnectionReports/GetRawRemoteConnectionReportsPostRequestBody.cs @@ -128,7 +128,7 @@ public GetRawRemoteConnectionReportsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetRawRemoteConnectionReports.GetRawRemoteConnectionReportsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetRawRemoteConnectionReports.GetRawRemoteConnectionReportsPostRequestBody(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRawRemoteConnectionReports/GetRawRemoteConnectionReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRawRemoteConnectionReports/GetRawRemoteConnectionReportsRequestBuilder.cs index 61437ef1fd5..0a22c75e482 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRawRemoteConnectionReports/GetRawRemoteConnectionReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRawRemoteConnectionReports/GetRawRemoteConnectionReportsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetRawRemoteConnectionReportsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetRawRemoteConnectionReports.GetRawRemoteConnectionReportsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetRawRemoteConnectionReports.GetRawRemoteConnectionReportsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRemoteConnectionHistoricalReports/GetRemoteConnectionHistoricalReportsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRemoteConnectionHistoricalReports/GetRemoteConnectionHistoricalReportsPostRequestBody.cs index 03ab699053e..4e390d254d0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRemoteConnectionHistoricalReports/GetRemoteConnectionHistoricalReportsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRemoteConnectionHistoricalReports/GetRemoteConnectionHistoricalReportsPostRequestBody.cs @@ -128,7 +128,7 @@ public GetRemoteConnectionHistoricalReportsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetRemoteConnectionHistoricalReports.GetRemoteConnectionHistoricalReportsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetRemoteConnectionHistoricalReports.GetRemoteConnectionHistoricalReportsPostRequestBody(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRemoteConnectionHistoricalReports/GetRemoteConnectionHistoricalReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRemoteConnectionHistoricalReports/GetRemoteConnectionHistoricalReportsRequestBuilder.cs index a97622abe43..9b10f17e9df 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRemoteConnectionHistoricalReports/GetRemoteConnectionHistoricalReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetRemoteConnectionHistoricalReports/GetRemoteConnectionHistoricalReportsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetRemoteConnectionHistoricalReportsRequestBuilder(string rawUrl, IReques public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetRemoteConnectionHistoricalReports.GetRemoteConnectionHistoricalReportsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetRemoteConnectionHistoricalReports.GetRemoteConnectionHistoricalReportsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetTotalAggregatedRemoteConnectionReports/GetTotalAggregatedRemoteConnectionReportsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetTotalAggregatedRemoteConnectionReports/GetTotalAggregatedRemoteConnectionReportsPostRequestBody.cs index c372c9022eb..8904d85ec9c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetTotalAggregatedRemoteConnectionReports/GetTotalAggregatedRemoteConnectionReportsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetTotalAggregatedRemoteConnectionReports/GetTotalAggregatedRemoteConnectionReportsPostRequestBody.cs @@ -128,7 +128,7 @@ public GetTotalAggregatedRemoteConnectionReportsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetTotalAggregatedRemoteConnectionReports.GetTotalAggregatedRemoteConnectionReportsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetTotalAggregatedRemoteConnectionReports.GetTotalAggregatedRemoteConnectionReportsPostRequestBody(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetTotalAggregatedRemoteConnectionReports/GetTotalAggregatedRemoteConnectionReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetTotalAggregatedRemoteConnectionReports/GetTotalAggregatedRemoteConnectionReportsRequestBuilder.cs index 2a6c9dd98a4..e66f88e9a2d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetTotalAggregatedRemoteConnectionReports/GetTotalAggregatedRemoteConnectionReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/GetTotalAggregatedRemoteConnectionReports/GetTotalAggregatedRemoteConnectionReportsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetTotalAggregatedRemoteConnectionReportsRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetTotalAggregatedRemoteConnectionReports.GetTotalAggregatedRemoteConnectionReportsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.GetTotalAggregatedRemoteConnectionReports.GetTotalAggregatedRemoteConnectionReportsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/ReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/ReportsRequestBuilder.cs index 8b367d78b48..41ff85278e6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/ReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/ReportsRequestBuilder.cs @@ -226,7 +226,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcReports body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -287,7 +287,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcReports body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveBulkActionStatusReport/RetrieveBulkActionStatusReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveBulkActionStatusReport/RetrieveBulkActionStatusReportPostRequestBody.cs index 072f703c5c4..512ae498949 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveBulkActionStatusReport/RetrieveBulkActionStatusReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveBulkActionStatusReport/RetrieveBulkActionStatusReportPostRequestBody.cs @@ -128,7 +128,7 @@ public RetrieveBulkActionStatusReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveBulkActionStatusReport.RetrieveBulkActionStatusReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveBulkActionStatusReport.RetrieveBulkActionStatusReportPostRequestBody(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveBulkActionStatusReport/RetrieveBulkActionStatusReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveBulkActionStatusReport/RetrieveBulkActionStatusReportRequestBuilder.cs index 31a01596932..341e8a14d4a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveBulkActionStatusReport/RetrieveBulkActionStatusReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveBulkActionStatusReport/RetrieveBulkActionStatusReportRequestBuilder.cs @@ -51,7 +51,7 @@ public RetrieveBulkActionStatusReportRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveBulkActionStatusReport.RetrieveBulkActionStatusReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveBulkActionStatusReport.RetrieveBulkActionStatusReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcRecommendationReports/RetrieveCloudPcRecommendationReportsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcRecommendationReports/RetrieveCloudPcRecommendationReportsPostRequestBody.cs index 58c18693bc6..d2d60889871 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcRecommendationReports/RetrieveCloudPcRecommendationReportsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcRecommendationReports/RetrieveCloudPcRecommendationReportsPostRequestBody.cs @@ -135,7 +135,7 @@ public RetrieveCloudPcRecommendationReportsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCloudPcRecommendationReports.RetrieveCloudPcRecommendationReportsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCloudPcRecommendationReports.RetrieveCloudPcRecommendationReportsPostRequestBody(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcRecommendationReports/RetrieveCloudPcRecommendationReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcRecommendationReports/RetrieveCloudPcRecommendationReportsRequestBuilder.cs index 5b6a21f8dd5..8bbe36dd246 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcRecommendationReports/RetrieveCloudPcRecommendationReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcRecommendationReports/RetrieveCloudPcRecommendationReportsRequestBuilder.cs @@ -50,7 +50,7 @@ public RetrieveCloudPcRecommendationReportsRequestBuilder(string rawUrl, IReques public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCloudPcRecommendationReports.RetrieveCloudPcRecommendationReportsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCloudPcRecommendationReports.RetrieveCloudPcRecommendationReportsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTenantMetricsReport/RetrieveCloudPcTenantMetricsReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTenantMetricsReport/RetrieveCloudPcTenantMetricsReportPostRequestBody.cs index 65cd47ba572..675b7e89365 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTenantMetricsReport/RetrieveCloudPcTenantMetricsReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTenantMetricsReport/RetrieveCloudPcTenantMetricsReportPostRequestBody.cs @@ -135,7 +135,7 @@ public RetrieveCloudPcTenantMetricsReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCloudPcTenantMetricsReport.RetrieveCloudPcTenantMetricsReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCloudPcTenantMetricsReport.RetrieveCloudPcTenantMetricsReportPostRequestBody(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTenantMetricsReport/RetrieveCloudPcTenantMetricsReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTenantMetricsReport/RetrieveCloudPcTenantMetricsReportRequestBuilder.cs index db6eea3497a..dc5b2fba1cd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTenantMetricsReport/RetrieveCloudPcTenantMetricsReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTenantMetricsReport/RetrieveCloudPcTenantMetricsReportRequestBuilder.cs @@ -51,7 +51,7 @@ public RetrieveCloudPcTenantMetricsReportRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCloudPcTenantMetricsReport.RetrieveCloudPcTenantMetricsReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCloudPcTenantMetricsReport.RetrieveCloudPcTenantMetricsReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTroubleshootReports/RetrieveCloudPcTroubleshootReportsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTroubleshootReports/RetrieveCloudPcTroubleshootReportsPostRequestBody.cs index 7bb6c5e8ff0..49cd9eb2119 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTroubleshootReports/RetrieveCloudPcTroubleshootReportsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTroubleshootReports/RetrieveCloudPcTroubleshootReportsPostRequestBody.cs @@ -135,7 +135,7 @@ public RetrieveCloudPcTroubleshootReportsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCloudPcTroubleshootReports.RetrieveCloudPcTroubleshootReportsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCloudPcTroubleshootReports.RetrieveCloudPcTroubleshootReportsPostRequestBody(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTroubleshootReports/RetrieveCloudPcTroubleshootReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTroubleshootReports/RetrieveCloudPcTroubleshootReportsRequestBuilder.cs index 54827b3beca..088c72983ee 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTroubleshootReports/RetrieveCloudPcTroubleshootReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCloudPcTroubleshootReports/RetrieveCloudPcTroubleshootReportsRequestBuilder.cs @@ -51,7 +51,7 @@ public RetrieveCloudPcTroubleshootReportsRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCloudPcTroubleshootReports.RetrieveCloudPcTroubleshootReportsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCloudPcTroubleshootReports.RetrieveCloudPcTroubleshootReportsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveConnectionQualityReports/RetrieveConnectionQualityReportsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveConnectionQualityReports/RetrieveConnectionQualityReportsPostRequestBody.cs index 33240c5377b..e8fc03a611f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveConnectionQualityReports/RetrieveConnectionQualityReportsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveConnectionQualityReports/RetrieveConnectionQualityReportsPostRequestBody.cs @@ -135,7 +135,7 @@ public RetrieveConnectionQualityReportsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveConnectionQualityReports.RetrieveConnectionQualityReportsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveConnectionQualityReports.RetrieveConnectionQualityReportsPostRequestBody(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveConnectionQualityReports/RetrieveConnectionQualityReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveConnectionQualityReports/RetrieveConnectionQualityReportsRequestBuilder.cs index 4f509333003..ee597133127 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveConnectionQualityReports/RetrieveConnectionQualityReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveConnectionQualityReports/RetrieveConnectionQualityReportsRequestBuilder.cs @@ -50,7 +50,7 @@ public RetrieveConnectionQualityReportsRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveConnectionQualityReports.RetrieveConnectionQualityReportsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveConnectionQualityReports.RetrieveConnectionQualityReportsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCrossRegionDisasterRecoveryReport/RetrieveCrossRegionDisasterRecoveryReportPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCrossRegionDisasterRecoveryReport/RetrieveCrossRegionDisasterRecoveryReportPostRequestBody.cs index 0a8a3d634c3..4ff2fa20b0b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCrossRegionDisasterRecoveryReport/RetrieveCrossRegionDisasterRecoveryReportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCrossRegionDisasterRecoveryReport/RetrieveCrossRegionDisasterRecoveryReportPostRequestBody.cs @@ -135,7 +135,7 @@ public RetrieveCrossRegionDisasterRecoveryReportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCrossRegionDisasterRecoveryReport.RetrieveCrossRegionDisasterRecoveryReportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCrossRegionDisasterRecoveryReport.RetrieveCrossRegionDisasterRecoveryReportPostRequestBody(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCrossRegionDisasterRecoveryReport/RetrieveCrossRegionDisasterRecoveryReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCrossRegionDisasterRecoveryReport/RetrieveCrossRegionDisasterRecoveryReportRequestBuilder.cs index 80de9e949e0..e8bb4a0793a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCrossRegionDisasterRecoveryReport/RetrieveCrossRegionDisasterRecoveryReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveCrossRegionDisasterRecoveryReport/RetrieveCrossRegionDisasterRecoveryReportRequestBuilder.cs @@ -51,7 +51,7 @@ public RetrieveCrossRegionDisasterRecoveryReportRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCrossRegionDisasterRecoveryReport.RetrieveCrossRegionDisasterRecoveryReportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveCrossRegionDisasterRecoveryReport.RetrieveCrossRegionDisasterRecoveryReportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveFrontlineReports/RetrieveFrontlineReportsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveFrontlineReports/RetrieveFrontlineReportsPostRequestBody.cs index ca577cd20f7..cb9148bd665 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveFrontlineReports/RetrieveFrontlineReportsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveFrontlineReports/RetrieveFrontlineReportsPostRequestBody.cs @@ -135,7 +135,7 @@ public RetrieveFrontlineReportsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveFrontlineReports.RetrieveFrontlineReportsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveFrontlineReports.RetrieveFrontlineReportsPostRequestBody(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("filter", Filter); writer.WriteCollectionOfPrimitiveValues("groupBy", GroupBy); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveFrontlineReports/RetrieveFrontlineReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveFrontlineReports/RetrieveFrontlineReportsRequestBuilder.cs index 9811508c5a4..49b6f631977 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveFrontlineReports/RetrieveFrontlineReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Reports/RetrieveFrontlineReports/RetrieveFrontlineReportsRequestBuilder.cs @@ -50,7 +50,7 @@ public RetrieveFrontlineReportsRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveFrontlineReports.RetrieveFrontlineReportsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Reports.RetrieveFrontlineReports.RetrieveFrontlineReportsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/RetrieveScopedPermissions/RetrieveScopedPermissionsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/RetrieveScopedPermissions/RetrieveScopedPermissionsGetResponse.cs index 5c33e48cc78..e97ec99dba1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/RetrieveScopedPermissions/RetrieveScopedPermissionsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/RetrieveScopedPermissions/RetrieveScopedPermissionsGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrieveScopedPermissionsGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.RetrieveScopedPermissions.RetrieveScopedPermissionsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.RetrieveScopedPermissions.RetrieveScopedPermissionsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/RetrieveScopedPermissions/RetrieveScopedPermissionsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/RetrieveScopedPermissions/RetrieveScopedPermissionsResponse.cs index 2b75ff01fe2..54c126ace7f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/RetrieveScopedPermissions/RetrieveScopedPermissionsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/RetrieveScopedPermissions/RetrieveScopedPermissionsResponse.cs @@ -20,7 +20,7 @@ public partial class RetrieveScopedPermissionsResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.RetrieveScopedPermissions.RetrieveScopedPermissionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.RetrieveScopedPermissions.RetrieveScopedPermissionsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ServicePlans/Item/CloudPcServicePlanItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ServicePlans/Item/CloudPcServicePlanItemRequestBuilder.cs index 00a44f984fd..acfbf68117e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ServicePlans/Item/CloudPcServicePlanItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ServicePlans/Item/CloudPcServicePlanItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcServicePlan body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcServicePlan body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ServicePlans/ServicePlansRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ServicePlans/ServicePlansRequestBuilder.cs index 1d589943867..5769c64e199 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ServicePlans/ServicePlansRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/ServicePlans/ServicePlansRequestBuilder.cs @@ -94,7 +94,7 @@ public ServicePlansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcServicePlan body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcServicePlan body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetStorageAccountsWithSubscriptionId/GetStorageAccountsWithSubscriptionIdGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetStorageAccountsWithSubscriptionId/GetStorageAccountsWithSubscriptionIdGetResponse.cs index e0cd370199b..363d5f398b9 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetStorageAccountsWithSubscriptionId/GetStorageAccountsWithSubscriptionIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetStorageAccountsWithSubscriptionId/GetStorageAccountsWithSubscriptionIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetStorageAccountsWithSubscriptionIdGetResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Snapshots.GetStorageAccountsWithSubscriptionId.GetStorageAccountsWithSubscriptionIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Snapshots.GetStorageAccountsWithSubscriptionId.GetStorageAccountsWithSubscriptionIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetStorageAccountsWithSubscriptionId/GetStorageAccountsWithSubscriptionIdResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetStorageAccountsWithSubscriptionId/GetStorageAccountsWithSubscriptionIdResponse.cs index 084ba552dab..68802cb3a94 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetStorageAccountsWithSubscriptionId/GetStorageAccountsWithSubscriptionIdResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetStorageAccountsWithSubscriptionId/GetStorageAccountsWithSubscriptionIdResponse.cs @@ -20,7 +20,7 @@ public partial class GetStorageAccountsWithSubscriptionIdResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Snapshots.GetStorageAccountsWithSubscriptionId.GetStorageAccountsWithSubscriptionIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Snapshots.GetStorageAccountsWithSubscriptionId.GetStorageAccountsWithSubscriptionIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetSubscriptions/GetSubscriptionsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetSubscriptions/GetSubscriptionsGetResponse.cs index 163209cea73..7e711abe429 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetSubscriptions/GetSubscriptionsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetSubscriptions/GetSubscriptionsGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetSubscriptionsGetResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Snapshots.GetSubscriptions.GetSubscriptionsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Snapshots.GetSubscriptions.GetSubscriptionsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetSubscriptions/GetSubscriptionsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetSubscriptions/GetSubscriptionsResponse.cs index d2a22017ff8..03e73d3980d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetSubscriptions/GetSubscriptionsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/GetSubscriptions/GetSubscriptionsResponse.cs @@ -20,7 +20,7 @@ public partial class GetSubscriptionsResponse : global::Microsoft.Graph.Beta.Dev /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Snapshots.GetSubscriptions.GetSubscriptionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.Snapshots.GetSubscriptions.GetSubscriptionsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/Item/CloudPcSnapshotItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/Item/CloudPcSnapshotItemRequestBuilder.cs index da33ecf1e42..2fc870a6930 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/Item/CloudPcSnapshotItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/Item/CloudPcSnapshotItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcSnapshot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcSnapshot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/SnapshotsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/SnapshotsRequestBuilder.cs index 21f527eb687..3bbf7e67625 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/SnapshotsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/Snapshots/SnapshotsRequestBuilder.cs @@ -110,7 +110,7 @@ public SnapshotsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcSnapshot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcSnapshot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/SupportedRegions/Item/CloudPcSupportedRegionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/SupportedRegions/Item/CloudPcSupportedRegionItemRequestBuilder.cs index 551c9ad3ea8..b8eeef98240 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/SupportedRegions/Item/CloudPcSupportedRegionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/SupportedRegions/Item/CloudPcSupportedRegionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcSupportedRegion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcSupportedRegion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/SupportedRegions/SupportedRegionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/SupportedRegions/SupportedRegionsRequestBuilder.cs index 0a567815be5..9915cbd39dc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/SupportedRegions/SupportedRegionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/SupportedRegions/SupportedRegionsRequestBuilder.cs @@ -94,7 +94,7 @@ public SupportedRegionsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcSupportedRegion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcSupportedRegion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assign/AssignPostRequestBody.cs index 6d00c2070e5..ce3f88c9b9f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.UserSettings.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.UserSettings.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assign/AssignRequestBuilder.cs index 0c977174d3a..9e38fd1b27e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assign/AssignRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Virtua public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.UserSettings.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.VirtualEndpoint.UserSettings.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assignments/AssignmentsRequestBuilder.cs index a9dfd7ff357..e4accf5bd3a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcUserSettingAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcUserSettingAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assignments/Item/CloudPcUserSettingAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assignments/Item/CloudPcUserSettingAssignmentItemRequestBuilder.cs index 9284223202c..9dd04d1a9ec 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assignments/Item/CloudPcUserSettingAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/Assignments/Item/CloudPcUserSettingAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcUserSettingAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcUserSettingAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/CloudPcUserSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/CloudPcUserSettingItemRequestBuilder.cs index 2a141de8783..fb1e5a73827 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/CloudPcUserSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/Item/CloudPcUserSettingItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPcUserSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcUserSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/UserSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/UserSettingsRequestBuilder.cs index 8a3935c83ac..b92e2059a87 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/UserSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/UserSettings/UserSettingsRequestBuilder.cs @@ -95,7 +95,7 @@ public UserSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPcUserSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPcUserSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/VirtualEndpointRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/VirtualEndpointRequestBuilder.cs index 560ecc0888e..089e9b678b8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/VirtualEndpointRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/VirtualEndpoint/VirtualEndpointRequestBuilder.cs @@ -216,7 +216,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.VirtualEndpoint body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -277,7 +277,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.VirtualEndpoint body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs index 37b8dfda378..0b48703650e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs @@ -52,7 +52,7 @@ public HasPayloadLinksPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.HasPayloadLinks.HasPayloadLinksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.HasPayloadLinks.HasPayloadLinksPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("payloadIds", PayloadIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksPostResponse.cs index 57758fde515..11d31ac9624 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksPostResponse.cs @@ -36,7 +36,7 @@ public partial class HasPayloadLinksPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.HasPayloadLinks.HasPayloadLinksPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.HasPayloadLinks.HasPayloadLinksPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs index 2671e753fff..b5af08eedbc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs @@ -50,7 +50,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsHasPayloadLinksPostResponseAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksResponse.cs index 261f0c1f8db..361e512a47d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/HasPayloadLinks/HasPayloadLinksResponse.cs @@ -20,7 +20,7 @@ public partial class HasPayloadLinksResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.HasPayloadLinks.HasPayloadLinksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.HasPayloadLinks.HasPayloadLinksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assign/AssignPostRequestBody.cs index 3742224ae13..f350daf1bfa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assign/AssignPostRequestBody.cs @@ -52,7 +52,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.Assign.AssignPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("deviceIds", DeviceIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assign/AssignRequestBuilder.cs index 3f91b34c6d8..ff0c5f7584b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Window public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/AssignedDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/AssignedDevicesRequestBuilder.cs index 3a71ff6b447..1d54dfd8eff 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/AssignedDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/AssignedDevicesRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignedDevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeviceIdentity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeviceIdentity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignResourceAccountToDevice/AssignResourceAccountToDevicePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignResourceAccountToDevice/AssignResourceAccountToDevicePostRequestBody.cs index 2e5f40a1f9d..7f27b7c3699 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignResourceAccountToDevice/AssignResourceAccountToDevicePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignResourceAccountToDevice/AssignResourceAccountToDevicePostRequestBody.cs @@ -84,7 +84,7 @@ public AssignResourceAccountToDevicePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.AssignedDevices.Item.AssignResourceAccountToDevice.AssignResourceAccountToDevicePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.AssignedDevices.Item.AssignResourceAccountToDevice.AssignResourceAccountToDevicePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("addressableUserName", AddressableUserName); writer.WriteStringValue("resourceAccountName", ResourceAccountName); writer.WriteStringValue("userPrincipalName", UserPrincipalName); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignResourceAccountToDevice/AssignResourceAccountToDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignResourceAccountToDevice/AssignResourceAccountToDeviceRequestBuilder.cs index 0ecce0d9aa1..49f1fe31c57 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignResourceAccountToDevice/AssignResourceAccountToDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignResourceAccountToDevice/AssignResourceAccountToDeviceRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Window public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.AssignedDevices.Item.AssignResourceAccountToDevice.AssignResourceAccountToDevicePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.AssignedDevices.Item.AssignResourceAccountToDevice.AssignResourceAccountToDevicePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignUserToDevice/AssignUserToDevicePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignUserToDevice/AssignUserToDevicePostRequestBody.cs index 8ca26f68dcc..42f278e7d33 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignUserToDevice/AssignUserToDevicePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignUserToDevice/AssignUserToDevicePostRequestBody.cs @@ -68,7 +68,7 @@ public AssignUserToDevicePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.AssignedDevices.Item.AssignUserToDevice.AssignUserToDevicePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.AssignedDevices.Item.AssignUserToDevice.AssignUserToDevicePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("addressableUserName", AddressableUserName); writer.WriteStringValue("userPrincipalName", UserPrincipalName); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignUserToDevice/AssignUserToDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignUserToDevice/AssignUserToDeviceRequestBuilder.cs index 5481f0cce61..5d3c711c5c6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignUserToDevice/AssignUserToDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/AssignUserToDevice/AssignUserToDeviceRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Window public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.AssignedDevices.Item.AssignUserToDevice.AssignUserToDevicePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.AssignedDevices.Item.AssignUserToDevice.AssignUserToDevicePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/UpdateDeviceProperties/UpdateDevicePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/UpdateDeviceProperties/UpdateDevicePropertiesPostRequestBody.cs index a1bb9d9770d..e02a2b6762a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/UpdateDeviceProperties/UpdateDevicePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/UpdateDeviceProperties/UpdateDevicePropertiesPostRequestBody.cs @@ -148,7 +148,7 @@ public UpdateDevicePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.AssignedDevices.Item.UpdateDeviceProperties.UpdateDevicePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.AssignedDevices.Item.UpdateDeviceProperties.UpdateDevicePropertiesPostRequestBody(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("addressableUserName", AddressableUserName); writer.WriteStringValue("deviceAccountPassword", DeviceAccountPassword); writer.WriteStringValue("deviceAccountUpn", DeviceAccountUpn); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/UpdateDeviceProperties/UpdateDevicePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/UpdateDeviceProperties/UpdateDevicePropertiesRequestBuilder.cs index f083fe84d46..03c5c5d412b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/UpdateDeviceProperties/UpdateDevicePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/UpdateDeviceProperties/UpdateDevicePropertiesRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Window public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.AssignedDevices.Item.UpdateDeviceProperties.UpdateDevicePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeploymentProfiles.Item.AssignedDevices.Item.UpdateDeviceProperties.UpdateDevicePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/WindowsAutopilotDeviceIdentityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/WindowsAutopilotDeviceIdentityItemRequestBuilder.cs index a987d53b816..78ded45f501 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/WindowsAutopilotDeviceIdentityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/AssignedDevices/Item/WindowsAutopilotDeviceIdentityItemRequestBuilder.cs @@ -144,7 +144,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeviceIdentity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -205,7 +205,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeviceIdentity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assignments/AssignmentsRequestBuilder.cs index f62ffed1c38..5ab9192f8ef 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfileAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfileAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assignments/Item/WindowsAutopilotDeploymentProfileAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assignments/Item/WindowsAutopilotDeploymentProfileAssignmentItemRequestBuilder.cs index fb58ffd7181..5be23f45e3d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assignments/Item/WindowsAutopilotDeploymentProfileAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/Assignments/Item/WindowsAutopilotDeploymentProfileAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfileAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfileAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/WindowsAutopilotDeploymentProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/WindowsAutopilotDeploymentProfileItemRequestBuilder.cs index bf75b0acaca..a9db5c36c35 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/WindowsAutopilotDeploymentProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/Item/WindowsAutopilotDeploymentProfileItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/WindowsAutopilotDeploymentProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/WindowsAutopilotDeploymentProfilesRequestBuilder.cs index 1800adb7629..a20182496fa 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/WindowsAutopilotDeploymentProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeploymentProfiles/WindowsAutopilotDeploymentProfilesRequestBuilder.cs @@ -99,7 +99,7 @@ public WindowsAutopilotDeploymentProfilesRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignResourceAccountToDevice/AssignResourceAccountToDevicePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignResourceAccountToDevice/AssignResourceAccountToDevicePostRequestBody.cs index f8c6d103720..f25dfbff4a6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignResourceAccountToDevice/AssignResourceAccountToDevicePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignResourceAccountToDevice/AssignResourceAccountToDevicePostRequestBody.cs @@ -84,7 +84,7 @@ public AssignResourceAccountToDevicePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeviceIdentities.Item.AssignResourceAccountToDevice.AssignResourceAccountToDevicePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeviceIdentities.Item.AssignResourceAccountToDevice.AssignResourceAccountToDevicePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("addressableUserName", AddressableUserName); writer.WriteStringValue("resourceAccountName", ResourceAccountName); writer.WriteStringValue("userPrincipalName", UserPrincipalName); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignResourceAccountToDevice/AssignResourceAccountToDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignResourceAccountToDevice/AssignResourceAccountToDeviceRequestBuilder.cs index a8f823891fa..15cbf7d46ba 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignResourceAccountToDevice/AssignResourceAccountToDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignResourceAccountToDevice/AssignResourceAccountToDeviceRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Window public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeviceIdentities.Item.AssignResourceAccountToDevice.AssignResourceAccountToDevicePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeviceIdentities.Item.AssignResourceAccountToDevice.AssignResourceAccountToDevicePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignUserToDevice/AssignUserToDevicePostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignUserToDevice/AssignUserToDevicePostRequestBody.cs index 5f667ba233a..808d34c42e4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignUserToDevice/AssignUserToDevicePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignUserToDevice/AssignUserToDevicePostRequestBody.cs @@ -68,7 +68,7 @@ public AssignUserToDevicePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeviceIdentities.Item.AssignUserToDevice.AssignUserToDevicePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeviceIdentities.Item.AssignUserToDevice.AssignUserToDevicePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("addressableUserName", AddressableUserName); writer.WriteStringValue("userPrincipalName", UserPrincipalName); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignUserToDevice/AssignUserToDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignUserToDevice/AssignUserToDeviceRequestBuilder.cs index 43d351d8de4..c1ac784bbb0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignUserToDevice/AssignUserToDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/AssignUserToDevice/AssignUserToDeviceRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Window public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeviceIdentities.Item.AssignUserToDevice.AssignUserToDevicePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeviceIdentities.Item.AssignUserToDevice.AssignUserToDevicePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/UpdateDeviceProperties/UpdateDevicePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/UpdateDeviceProperties/UpdateDevicePropertiesPostRequestBody.cs index 20cca4c780b..1d2c24a46c3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/UpdateDeviceProperties/UpdateDevicePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/UpdateDeviceProperties/UpdateDevicePropertiesPostRequestBody.cs @@ -148,7 +148,7 @@ public UpdateDevicePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeviceIdentities.Item.UpdateDeviceProperties.UpdateDevicePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeviceIdentities.Item.UpdateDeviceProperties.UpdateDevicePropertiesPostRequestBody(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("addressableUserName", AddressableUserName); writer.WriteStringValue("deviceAccountPassword", DeviceAccountPassword); writer.WriteStringValue("deviceAccountUpn", DeviceAccountUpn); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/UpdateDeviceProperties/UpdateDevicePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/UpdateDeviceProperties/UpdateDevicePropertiesRequestBuilder.cs index 43d1b59ed39..d2f0ef0063c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/UpdateDeviceProperties/UpdateDevicePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/UpdateDeviceProperties/UpdateDevicePropertiesRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Window public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeviceIdentities.Item.UpdateDeviceProperties.UpdateDevicePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.WindowsAutopilotDeviceIdentities.Item.UpdateDeviceProperties.UpdateDevicePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/WindowsAutopilotDeviceIdentityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/WindowsAutopilotDeviceIdentityItemRequestBuilder.cs index eb7f41cafc2..01cf598a2fe 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/WindowsAutopilotDeviceIdentityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/Item/WindowsAutopilotDeviceIdentityItemRequestBuilder.cs @@ -144,7 +144,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeviceIdentity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -205,7 +205,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeviceIdentity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/WindowsAutopilotDeviceIdentitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/WindowsAutopilotDeviceIdentitiesRequestBuilder.cs index e3a882897c4..13ff545040d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/WindowsAutopilotDeviceIdentitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotDeviceIdentities/WindowsAutopilotDeviceIdentitiesRequestBuilder.cs @@ -93,7 +93,7 @@ public WindowsAutopilotDeviceIdentitiesRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeviceIdentity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeviceIdentity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotSettings/WindowsAutopilotSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotSettings/WindowsAutopilotSettingsRequestBuilder.cs index 3b4c09847ad..75daed066f0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotSettings/WindowsAutopilotSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsAutopilotSettings/WindowsAutopilotSettingsRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsAutopilotSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsAutopilotSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assign/AssignPostRequestBody.cs index 87c50f93f74..ae0bb5514b8 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.WindowsDriverUpdateProfiles.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsDriverUpdateProfiles.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assign/AssignRequestBuilder.cs index 1570a902eb2..f2ebd0e11e4 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Window public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsDriverUpdateProfiles.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.WindowsDriverUpdateProfiles.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assignments/AssignmentsRequestBuilder.cs index 6c7946c24ec..3fdf3a8a103 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfileAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfileAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assignments/Item/WindowsDriverUpdateProfileAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assignments/Item/WindowsDriverUpdateProfileAssignmentItemRequestBuilder.cs index dd81665d7aa..be4ba4d0a11 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assignments/Item/WindowsDriverUpdateProfileAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/Assignments/Item/WindowsDriverUpdateProfileAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfileAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfileAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/DriverInventories/DriverInventoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/DriverInventories/DriverInventoriesRequestBuilder.cs index bf57a33e259..e51a38eab5b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/DriverInventories/DriverInventoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/DriverInventories/DriverInventoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public DriverInventoriesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateInventory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateInventory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/DriverInventories/Item/WindowsDriverUpdateInventoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/DriverInventories/Item/WindowsDriverUpdateInventoryItemRequestBuilder.cs index 3bea488309a..cb3be3f7a8a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/DriverInventories/Item/WindowsDriverUpdateInventoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/DriverInventories/Item/WindowsDriverUpdateInventoryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateInventory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateInventory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/ExecuteAction/ExecuteActionPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/ExecuteAction/ExecuteActionPostRequestBody.cs index 0657c5986ad..0ed52ec2ac3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/ExecuteAction/ExecuteActionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/ExecuteAction/ExecuteActionPostRequestBody.cs @@ -65,7 +65,7 @@ public ExecuteActionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.WindowsDriverUpdateProfiles.Item.ExecuteAction.ExecuteActionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsDriverUpdateProfiles.Item.ExecuteAction.ExecuteActionPostRequestBody(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("actionName", ActionName); writer.WriteDateTimeOffsetValue("deploymentDate", DeploymentDate); writer.WriteCollectionOfPrimitiveValues("driverIds", DriverIds); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/ExecuteAction/ExecuteActionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/ExecuteAction/ExecuteActionRequestBuilder.cs index 0fad52a3a43..13cae049364 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/ExecuteAction/ExecuteActionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/ExecuteAction/ExecuteActionRequestBuilder.cs @@ -51,7 +51,7 @@ public ExecuteActionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsDriverUpdateProfiles.Item.ExecuteAction.ExecuteActionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.WindowsDriverUpdateProfiles.Item.ExecuteAction.ExecuteActionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/WindowsDriverUpdateProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/WindowsDriverUpdateProfileItemRequestBuilder.cs index 91c5384cb3f..92a835ec0b2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/WindowsDriverUpdateProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/Item/WindowsDriverUpdateProfileItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/WindowsDriverUpdateProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/WindowsDriverUpdateProfilesRequestBuilder.cs index f480aac2303..1594a1cee63 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/WindowsDriverUpdateProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsDriverUpdateProfiles/WindowsDriverUpdateProfilesRequestBuilder.cs @@ -93,7 +93,7 @@ public WindowsDriverUpdateProfilesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assign/AssignPostRequestBody.cs index 9f517854905..da514b39d0e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.WindowsFeatureUpdateProfiles.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsFeatureUpdateProfiles.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assign/AssignRequestBuilder.cs index e7f56904a6f..2645bd22a4c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Window public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsFeatureUpdateProfiles.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.WindowsFeatureUpdateProfiles.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assignments/AssignmentsRequestBuilder.cs index 8c9027c5fdc..668be6319fc 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfileAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfileAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assignments/Item/WindowsFeatureUpdateProfileAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assignments/Item/WindowsFeatureUpdateProfileAssignmentItemRequestBuilder.cs index 8578e98e2a2..cbcad855ef6 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assignments/Item/WindowsFeatureUpdateProfileAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/Assignments/Item/WindowsFeatureUpdateProfileAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfileAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfileAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/WindowsFeatureUpdateProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/WindowsFeatureUpdateProfileItemRequestBuilder.cs index 04f09f84643..34a4dac86c2 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/WindowsFeatureUpdateProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/Item/WindowsFeatureUpdateProfileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/WindowsFeatureUpdateProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/WindowsFeatureUpdateProfilesRequestBuilder.cs index 43c6cd418f3..ab5cfa1531b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/WindowsFeatureUpdateProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsFeatureUpdateProfiles/WindowsFeatureUpdateProfilesRequestBuilder.cs @@ -93,7 +93,7 @@ public WindowsFeatureUpdateProfilesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionAppLearningSummaries/Item/WindowsInformationProtectionAppLearningSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionAppLearningSummaries/Item/WindowsInformationProtectionAppLearningSummaryItemRequestBuilder.cs index 4a56ce96ca0..71b073b2178 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionAppLearningSummaries/Item/WindowsInformationProtectionAppLearningSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionAppLearningSummaries/Item/WindowsInformationProtectionAppLearningSummaryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLearningSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLearningSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionAppLearningSummaries/WindowsInformationProtectionAppLearningSummariesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionAppLearningSummaries/WindowsInformationProtectionAppLearningSummariesRequestBuilder.cs index f7e28b92fe1..acebe2e42a1 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionAppLearningSummaries/WindowsInformationProtectionAppLearningSummariesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionAppLearningSummaries/WindowsInformationProtectionAppLearningSummariesRequestBuilder.cs @@ -93,7 +93,7 @@ public WindowsInformationProtectionAppLearningSummariesRequestBuilder(string raw public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLearningSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLearningSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionNetworkLearningSummaries/Item/WindowsInformationProtectionNetworkLearningSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionNetworkLearningSummaries/Item/WindowsInformationProtectionNetworkLearningSummaryItemRequestBuilder.cs index 7868d9df854..fd56269de6d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionNetworkLearningSummaries/Item/WindowsInformationProtectionNetworkLearningSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionNetworkLearningSummaries/Item/WindowsInformationProtectionNetworkLearningSummaryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionNetworkLearningSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionNetworkLearningSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionNetworkLearningSummaries/WindowsInformationProtectionNetworkLearningSummariesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionNetworkLearningSummaries/WindowsInformationProtectionNetworkLearningSummariesRequestBuilder.cs index 27481c7baeb..afea0d2d390 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionNetworkLearningSummaries/WindowsInformationProtectionNetworkLearningSummariesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsInformationProtectionNetworkLearningSummaries/WindowsInformationProtectionNetworkLearningSummariesRequestBuilder.cs @@ -93,7 +93,7 @@ public WindowsInformationProtectionNetworkLearningSummariesRequestBuilder(string public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionNetworkLearningSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionNetworkLearningSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/DeviceMalwareStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/DeviceMalwareStatesRequestBuilder.cs index 9f95b6bafdb..a9b022c290c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/DeviceMalwareStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/DeviceMalwareStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceMalwareStatesRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MalwareStateForWindowsDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MalwareStateForWindowsDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/Item/MalwareStateForWindowsDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/Item/MalwareStateForWindowsDeviceItemRequestBuilder.cs index 8717e6472d2..a42b8866199 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/Item/MalwareStateForWindowsDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/DeviceMalwareStates/Item/MalwareStateForWindowsDeviceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MalwareStateForWindowsDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MalwareStateForWindowsDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/WindowsMalwareInformationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/WindowsMalwareInformationItemRequestBuilder.cs index 0456de231e2..6c65f4f9c44 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/WindowsMalwareInformationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/Item/WindowsMalwareInformationItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsMalwareInformation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsMalwareInformation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/WindowsMalwareInformationRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/WindowsMalwareInformationRequestBuilder.cs index c902f03261e..53a1eb4c871 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/WindowsMalwareInformationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsMalwareInformation/WindowsMalwareInformationRequestBuilder.cs @@ -93,7 +93,7 @@ public WindowsMalwareInformationRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsMalwareInformation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsMalwareInformation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assign/AssignPostRequestBody.cs index b0baa725e06..92740fa2606 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdatePolicies.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdatePolicies.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assign/AssignRequestBuilder.cs index 4300ba8f629..da8a988cfcf 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Window public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdatePolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdatePolicies.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assignments/AssignmentsRequestBuilder.cs index dad029065af..c012de1f932 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assignments/Item/WindowsQualityUpdatePolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assignments/Item/WindowsQualityUpdatePolicyAssignmentItemRequestBuilder.cs index a6d78084fa0..e842ed5610e 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assignments/Item/WindowsQualityUpdatePolicyAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/Assignments/Item/WindowsQualityUpdatePolicyAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/BulkAction/BulkActionPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/BulkAction/BulkActionPostRequestBody.cs index f3504b3debe..557a13911dd 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/BulkAction/BulkActionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/BulkAction/BulkActionPostRequestBody.cs @@ -59,7 +59,7 @@ public BulkActionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdatePolicies.Item.BulkAction.BulkActionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdatePolicies.Item.BulkAction.BulkActionPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/BulkAction/BulkActionRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/BulkAction/BulkActionRequestBuilder.cs index 3293bb61ad8..cffad75a89a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/BulkAction/BulkActionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/BulkAction/BulkActionRequestBuilder.cs @@ -51,7 +51,7 @@ public BulkActionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdatePolicies.Item.BulkAction.BulkActionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdatePolicies.Item.BulkAction.BulkActionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIds/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIdsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIds/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIdsGetResponse.cs index 65a5c550a3d..1e7f031891a 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIds/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIdsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIds/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIdsGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrieveWindowsQualityUpdateCatalogItemDetailsWithIdsGetRes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdatePolicies.Item.RetrieveWindowsQualityUpdateCatalogItemDetailsWithIds.RetrieveWindowsQualityUpdateCatalogItemDetailsWithIdsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdatePolicies.Item.RetrieveWindowsQualityUpdateCatalogItemDetailsWithIds.RetrieveWindowsQualityUpdateCatalogItemDetailsWithIdsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIds/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIdsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIds/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIdsResponse.cs index 37b40d711e7..f8d45108b72 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIds/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIds/RetrieveWindowsQualityUpdateCatalogItemDetailsWithIdsResponse.cs @@ -20,7 +20,7 @@ public partial class RetrieveWindowsQualityUpdateCatalogItemDetailsWithIdsRespon /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdatePolicies.Item.RetrieveWindowsQualityUpdateCatalogItemDetailsWithIds.RetrieveWindowsQualityUpdateCatalogItemDetailsWithIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdatePolicies.Item.RetrieveWindowsQualityUpdateCatalogItemDetailsWithIds.RetrieveWindowsQualityUpdateCatalogItemDetailsWithIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/WindowsQualityUpdatePolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/WindowsQualityUpdatePolicyItemRequestBuilder.cs index 69039402447..2583e52c540 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/WindowsQualityUpdatePolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/Item/WindowsQualityUpdatePolicyItemRequestBuilder.cs @@ -115,7 +115,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -186,7 +186,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/WindowsQualityUpdatePoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/WindowsQualityUpdatePoliciesRequestBuilder.cs index 3922f31ff8a..aef5f44da46 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/WindowsQualityUpdatePoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdatePolicies/WindowsQualityUpdatePoliciesRequestBuilder.cs @@ -93,7 +93,7 @@ public WindowsQualityUpdatePoliciesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assign/AssignPostRequestBody.cs index 19f4241c74e..b7dddd98804 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdateProfiles.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdateProfiles.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assign/AssignRequestBuilder.cs index c404b532449..771335ff40b 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.Window public async Task PostAsync(global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdateProfiles.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DeviceManagement.WindowsQualityUpdateProfiles.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assignments/AssignmentsRequestBuilder.cs index a6bb144382c..978c30ea803 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfileAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfileAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assignments/Item/WindowsQualityUpdateProfileAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assignments/Item/WindowsQualityUpdateProfileAssignmentItemRequestBuilder.cs index cab17a216ff..5397b94a94d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assignments/Item/WindowsQualityUpdateProfileAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/Assignments/Item/WindowsQualityUpdateProfileAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfileAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfileAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/WindowsQualityUpdateProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/WindowsQualityUpdateProfileItemRequestBuilder.cs index 6780eac5a0d..9a4a609f328 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/WindowsQualityUpdateProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/Item/WindowsQualityUpdateProfileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/WindowsQualityUpdateProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/WindowsQualityUpdateProfilesRequestBuilder.cs index ddb108df55e..3148ca55f59 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/WindowsQualityUpdateProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsQualityUpdateProfiles/WindowsQualityUpdateProfilesRequestBuilder.cs @@ -93,7 +93,7 @@ public WindowsQualityUpdateProfilesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsUpdateCatalogItems/Item/WindowsUpdateCatalogItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsUpdateCatalogItems/Item/WindowsUpdateCatalogItemItemRequestBuilder.cs index 22d18c7bcf8..0396360f0ca 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsUpdateCatalogItems/Item/WindowsUpdateCatalogItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsUpdateCatalogItems/Item/WindowsUpdateCatalogItemItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdateCatalogItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdateCatalogItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsUpdateCatalogItems/WindowsUpdateCatalogItemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsUpdateCatalogItems/WindowsUpdateCatalogItemsRequestBuilder.cs index b00f595b0e0..4039cca879c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/WindowsUpdateCatalogItems/WindowsUpdateCatalogItemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/WindowsUpdateCatalogItems/WindowsUpdateCatalogItemsRequestBuilder.cs @@ -93,7 +93,7 @@ public WindowsUpdateCatalogItemsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsUpdateCatalogItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsUpdateCatalogItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaArtifacts/Item/ZebraFotaArtifactItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaArtifacts/Item/ZebraFotaArtifactItemRequestBuilder.cs index b746874972d..49118e7bd1d 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaArtifacts/Item/ZebraFotaArtifactItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaArtifacts/Item/ZebraFotaArtifactItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ZebraFotaArtifact body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ZebraFotaArtifact body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaArtifacts/ZebraFotaArtifactsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaArtifacts/ZebraFotaArtifactsRequestBuilder.cs index 652b554750e..320c7596d30 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaArtifacts/ZebraFotaArtifactsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaArtifacts/ZebraFotaArtifactsRequestBuilder.cs @@ -93,7 +93,7 @@ public ZebraFotaArtifactsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ZebraFotaArtifact body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ZebraFotaArtifact body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/ApproveFotaApps/ApproveFotaAppsPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/ApproveFotaApps/ApproveFotaAppsPostResponse.cs index 42b60c79f6e..710b87bd108 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/ApproveFotaApps/ApproveFotaAppsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/ApproveFotaApps/ApproveFotaAppsPostResponse.cs @@ -42,7 +42,7 @@ public ApproveFotaAppsPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.ApproveFotaApps.ApproveFotaAppsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.ApproveFotaApps.ApproveFotaAppsPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/ApproveFotaApps/ApproveFotaAppsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/ApproveFotaApps/ApproveFotaAppsResponse.cs index 707f7c97f05..b921ee42f57 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/ApproveFotaApps/ApproveFotaAppsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/ApproveFotaApps/ApproveFotaAppsResponse.cs @@ -20,7 +20,7 @@ public partial class ApproveFotaAppsResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.ApproveFotaApps.ApproveFotaAppsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.ApproveFotaApps.ApproveFotaAppsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Connect/ConnectPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Connect/ConnectPostResponse.cs index e6718fc2ed1..bfeaf28d560 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Connect/ConnectPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Connect/ConnectPostResponse.cs @@ -42,7 +42,7 @@ public ConnectPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.Connect.ConnectPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.Connect.ConnectPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Connect/ConnectResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Connect/ConnectResponse.cs index cf545d5ec7e..2bc9c443ae5 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Connect/ConnectResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Connect/ConnectResponse.cs @@ -20,7 +20,7 @@ public partial class ConnectResponse : global::Microsoft.Graph.Beta.DeviceManage /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.Connect.ConnectResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.Connect.ConnectResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Disconnect/DisconnectPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Disconnect/DisconnectPostResponse.cs index 770c969a696..2272469ee13 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Disconnect/DisconnectPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Disconnect/DisconnectPostResponse.cs @@ -42,7 +42,7 @@ public DisconnectPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.Disconnect.DisconnectPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.Disconnect.DisconnectPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Disconnect/DisconnectResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Disconnect/DisconnectResponse.cs index 5546d9cd285..2a4bf528802 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Disconnect/DisconnectResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/Disconnect/DisconnectResponse.cs @@ -20,7 +20,7 @@ public partial class DisconnectResponse : global::Microsoft.Graph.Beta.DeviceMan /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.Disconnect.DisconnectResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.Disconnect.DisconnectResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/HasActiveDeployments/HasActiveDeploymentsPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/HasActiveDeployments/HasActiveDeploymentsPostResponse.cs index e2712533f3a..75baa30b9b3 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/HasActiveDeployments/HasActiveDeploymentsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/HasActiveDeployments/HasActiveDeploymentsPostResponse.cs @@ -42,7 +42,7 @@ public HasActiveDeploymentsPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.HasActiveDeployments.HasActiveDeploymentsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.HasActiveDeployments.HasActiveDeploymentsPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/HasActiveDeployments/HasActiveDeploymentsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/HasActiveDeployments/HasActiveDeploymentsResponse.cs index 1f7246bf5a5..ed78301aa0f 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/HasActiveDeployments/HasActiveDeploymentsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/HasActiveDeployments/HasActiveDeploymentsResponse.cs @@ -20,7 +20,7 @@ public partial class HasActiveDeploymentsResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.HasActiveDeployments.HasActiveDeploymentsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.HasActiveDeployments.HasActiveDeploymentsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/RetrieveZebraFotaDeviceModels/RetrieveZebraFotaDeviceModelsGetResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/RetrieveZebraFotaDeviceModels/RetrieveZebraFotaDeviceModelsGetResponse.cs index 238b5c4a8ac..05cd1f5eac7 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/RetrieveZebraFotaDeviceModels/RetrieveZebraFotaDeviceModelsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/RetrieveZebraFotaDeviceModels/RetrieveZebraFotaDeviceModelsGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.RetrieveZebraFotaDeviceModels.RetrieveZebraFotaDeviceModelsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.RetrieveZebraFotaDeviceModels.RetrieveZebraFotaDeviceModelsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/RetrieveZebraFotaDeviceModels/RetrieveZebraFotaDeviceModelsResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/RetrieveZebraFotaDeviceModels/RetrieveZebraFotaDeviceModelsResponse.cs index 223908bbc24..f02355df58c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/RetrieveZebraFotaDeviceModels/RetrieveZebraFotaDeviceModelsResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/RetrieveZebraFotaDeviceModels/RetrieveZebraFotaDeviceModelsResponse.cs @@ -20,7 +20,7 @@ public partial class RetrieveZebraFotaDeviceModelsResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.RetrieveZebraFotaDeviceModels.RetrieveZebraFotaDeviceModelsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaConnector.RetrieveZebraFotaDeviceModels.RetrieveZebraFotaDeviceModelsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/ZebraFotaConnectorRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/ZebraFotaConnectorRequestBuilder.cs index a838d830ed4..905539cd6c0 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/ZebraFotaConnectorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaConnector/ZebraFotaConnectorRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ZebraFotaConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ZebraFotaConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/Item/Cancel/CancelPostResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/Item/Cancel/CancelPostResponse.cs index e82c3514c7c..d7145980c74 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/Item/Cancel/CancelPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/Item/Cancel/CancelPostResponse.cs @@ -42,7 +42,7 @@ public CancelPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaDeployments.Item.Cancel.CancelPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaDeployments.Item.Cancel.CancelPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/Item/Cancel/CancelResponse.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/Item/Cancel/CancelResponse.cs index d1678a2c480..40daff1ecac 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/Item/Cancel/CancelResponse.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/Item/Cancel/CancelResponse.cs @@ -20,7 +20,7 @@ public partial class CancelResponse : global::Microsoft.Graph.Beta.DeviceManagem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaDeployments.Item.Cancel.CancelResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DeviceManagement.ZebraFotaDeployments.Item.Cancel.CancelResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/Item/ZebraFotaDeploymentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/Item/ZebraFotaDeploymentItemRequestBuilder.cs index b29b0bb8447..f3ccb080791 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/Item/ZebraFotaDeploymentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/Item/ZebraFotaDeploymentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ZebraFotaDeployment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ZebraFotaDeployment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/ZebraFotaDeploymentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/ZebraFotaDeploymentsRequestBuilder.cs index ba962086d9d..07fe07a351c 100644 --- a/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/ZebraFotaDeploymentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DeviceManagement/ZebraFotaDeployments/ZebraFotaDeploymentsRequestBuilder.cs @@ -93,7 +93,7 @@ public ZebraFotaDeploymentsRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ZebraFotaDeployment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ZebraFotaDeployment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Devices/Delta/DeltaGetResponse.cs index 847b6f6218a..e85baa23f01 100644 --- a/src/Microsoft.Graph/Generated/Devices/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Devices/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Devices.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Devices/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Devices/Delta/DeltaResponse.cs index 6884dd57687..c3e294c23dd 100644 --- a/src/Microsoft.Graph/Generated/Devices/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Devices/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Devices.Delta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Devices.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Devices/DevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/DevicesRequestBuilder.cs index c377711f3ad..4968d7bad4f 100644 --- a/src/Microsoft.Graph/Generated/Devices/DevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/DevicesRequestBuilder.cs @@ -119,7 +119,7 @@ public DevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Device body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -161,7 +161,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Device body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsPostRequestBody.cs index c2e7c349527..5135d1e92af 100644 --- a/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetByIdsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Devices.GetByIds.GetByIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.GetByIds.GetByIdsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteCollectionOfPrimitiveValues("types", Types); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsPostResponse.cs b/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsPostResponse.cs index 25698be6c7f..28573ffd517 100644 --- a/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetByIdsPostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Devices.GetByIds.GetByIdsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.GetByIds.GetByIdsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsRequestBuilder.cs index 84d7b37ce80..465d0213cbd 100644 --- a/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsGetByIdsPostResponseAsync(global::Microsoft.Graph.Beta.Devices.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Devices.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Devices.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsResponse.cs b/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsResponse.cs index d3c9cb16175..d777b99df02 100644 --- a/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/Devices/GetByIds/GetByIdsResponse.cs @@ -20,7 +20,7 @@ public partial class GetByIdsResponse : global::Microsoft.Graph.Beta.Devices.Get /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Devices.GetByIds.GetByIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.GetByIds.GetByIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Devices/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Devices/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs index ed6f4c65058..c2369dd5bb1 100644 --- a/src/Microsoft.Graph/Generated/Devices/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Devices/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetUserOwnedObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Devices.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("type", Type); writer.WriteStringValue("userId", UserId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Devices/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs index c66b3a8a4f5..74e4cd37227 100644 --- a/src/Microsoft.Graph/Generated/Devices/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs @@ -52,7 +52,7 @@ public GetUserOwnedObjectsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Devices.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Devices.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs index 20f2a48c004..3d715c99138 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Devices.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs index 2fd868ad27d..4c0c8d487c8 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Devices.Item.CheckMemberGroups.CheckMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.Item.CheckMemberGroups.CheckMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs index 23cac33e1b9..b2edc030e87 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsCheckMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.Devices.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Devices.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Devices.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs index 1e969f7ab31..f5b01ff78e8 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberGroupsResponse : global::Microsoft.Graph.Beta.De /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Devices.Item.CheckMemberGroups.CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.Item.CheckMemberGroups.CheckMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs index 67036b42cf7..660b7e69961 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Devices.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs index f8bca4e925c..db5c9eacf79 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Devices.Item.CheckMemberObjects.CheckMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.Item.CheckMemberObjects.CheckMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs index 539186e7da4..493c318bf0d 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsCheckMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.Devices.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Devices.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Devices.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs index 68e2bed5399..a6ede844105 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberObjectsResponse : global::Microsoft.Graph.Beta.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Devices.Item.CheckMemberObjects.CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.Item.CheckMemberObjects.CheckMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Devices/Item/Commands/CommandsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/Commands/CommandsRequestBuilder.cs index 831800a5b3a..00ff2d6453d 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/Commands/CommandsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/Commands/CommandsRequestBuilder.cs @@ -93,7 +93,7 @@ public CommandsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Command body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Command body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/Commands/Item/CommandItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/Commands/Item/CommandItemRequestBuilder.cs index 6e11776c07e..50d2c54a1bd 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/Commands/Item/CommandItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/Commands/Item/CommandItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Command body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Command body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/DeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/DeviceItemRequestBuilder.cs index 94f1e43078c..9352b58b043 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/DeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/DeviceItemRequestBuilder.cs @@ -177,7 +177,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Device body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -238,7 +238,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Device body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/Extensions/ExtensionsRequestBuilder.cs index eb591d29a2b..1082b5dc182 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 5e1a223cb77..ee5c0e505b7 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs index 3e649674d54..e9559860966 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Devices.Item.GetMemberGroups.GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.Item.GetMemberGroups.GetMemberGroupsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs index 2dc84d3df86..4c9eca8e997 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Devices.Item.GetMemberGroups.GetMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.Item.GetMemberGroups.GetMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs index e7e376d4d0c..ee39dc9ed37 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsGetMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.Devices.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Devices.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Devices.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsResponse.cs index 9a2c5c6222d..99cbbeb7de0 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberGroups/GetMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberGroupsResponse : global::Microsoft.Graph.Beta.Devi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Devices.Item.GetMemberGroups.GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.Item.GetMemberGroups.GetMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs index 7b86ae7d578..15bf62ad01a 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Devices.Item.GetMemberObjects.GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.Item.GetMemberObjects.GetMemberObjectsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs index 8e8d1afefbe..ce69cdca2c2 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Devices.Item.GetMemberObjects.GetMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.Item.GetMemberObjects.GetMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs index 30259b0847c..b544680989f 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.Devices.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Devices.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Devices.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsResponse.cs index 8918b9eaa06..d02ea2a9645 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/GetMemberObjects/GetMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberObjectsResponse : global::Microsoft.Graph.Beta.Dev /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Devices.Item.GetMemberObjects.GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.Item.GetMemberObjects.GetMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Devices/Item/RegisteredOwners/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/RegisteredOwners/Ref/RefRequestBuilder.cs index 2f69234a429..f830c0b7f4f 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/RegisteredOwners/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/RegisteredOwners/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/devices/{device%2Did}/registeredOwners/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/RegisteredUsers/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/RegisteredUsers/Ref/RefRequestBuilder.cs index 9b1b37b7745..544050dbe8d 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/RegisteredUsers/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/RegisteredUsers/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/devices/{device%2Did}/registeredUsers/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/UsageRights/Item/UsageRightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/UsageRights/Item/UsageRightItemRequestBuilder.cs index 29e0e9bd9f9..515e000decb 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/UsageRights/Item/UsageRightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/UsageRights/Item/UsageRightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UsageRight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UsageRight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/Item/UsageRights/UsageRightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/Item/UsageRights/UsageRightsRequestBuilder.cs index 2f0acb523e0..ea49a56b39e 100644 --- a/src/Microsoft.Graph/Generated/Devices/Item/UsageRights/UsageRightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/Item/UsageRights/UsageRightsRequestBuilder.cs @@ -94,7 +94,7 @@ public UsageRightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UsageRight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UsageRight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Devices/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/Devices/ValidateProperties/ValidatePropertiesPostRequestBody.cs index fd363273fb3..4d6164bad48 100644 --- a/src/Microsoft.Graph/Generated/Devices/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Devices/ValidateProperties/ValidatePropertiesPostRequestBody.cs @@ -90,7 +90,7 @@ public ValidatePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Devices.ValidateProperties.ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Devices.ValidateProperties.ValidatePropertiesPostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("entityType", EntityType); writer.WriteStringValue("mailNickname", MailNickname); diff --git a/src/Microsoft.Graph/Generated/Devices/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Devices/ValidateProperties/ValidatePropertiesRequestBuilder.cs index 6bbd9a90690..dadfcaa7353 100644 --- a/src/Microsoft.Graph/Generated/Devices/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Devices/ValidateProperties/ValidatePropertiesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Devices.ValidatePropert public async Task PostAsync(global::Microsoft.Graph.Beta.Devices.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Devices.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DevicesWithDeviceId/DevicesWithDeviceIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/DevicesWithDeviceId/DevicesWithDeviceIdRequestBuilder.cs index 93e14615c68..f6271098310 100644 --- a/src/Microsoft.Graph/Generated/DevicesWithDeviceId/DevicesWithDeviceIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DevicesWithDeviceId/DevicesWithDeviceIdRequestBuilder.cs @@ -101,7 +101,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Device body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Device body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/AdministrativeUnitsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/AdministrativeUnitsRequestBuilder.cs index dd2810cf2be..14304d18565 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/AdministrativeUnitsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/AdministrativeUnitsRequestBuilder.cs @@ -99,7 +99,7 @@ public AdministrativeUnitsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AdministrativeUnit body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AdministrativeUnit body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Delta/DeltaGetResponse.cs index 23c9aee5d89..948d3e541bb 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryNamespace.AdministrativeUnits.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.AdministrativeUnits.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Delta/DeltaResponse.cs index 8a2ac36b9c3..23a535665aa 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.DirectoryNames /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryNamespace.AdministrativeUnits.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.AdministrativeUnits.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/AdministrativeUnitItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/AdministrativeUnitItemRequestBuilder.cs index ab2d6b8f2fc..ae005d4de97 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/AdministrativeUnitItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/AdministrativeUnitItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AdministrativeUnit body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AdministrativeUnit body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Extensions/ExtensionsRequestBuilder.cs index 70b6b6aba9a..828c7b6800d 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index af179476f5a..df8d1395c21 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Members/MembersRequestBuilder.cs index 5e01fd14482..f6709601ca2 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Members/MembersRequestBuilder.cs @@ -135,7 +135,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DirectoryObject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryObject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Members/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Members/Ref/RefRequestBuilder.cs index 4aa2686302c..58322da8051 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Members/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/Members/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/directory/administrativeUnits/{administrativeUnit%2Did}/members/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/ScopedRoleMembers/Item/ScopedRoleMembershipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/ScopedRoleMembers/Item/ScopedRoleMembershipItemRequestBuilder.cs index 6a653943944..e989ea1210d 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/ScopedRoleMembers/Item/ScopedRoleMembershipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/ScopedRoleMembers/Item/ScopedRoleMembershipItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/ScopedRoleMembers/ScopedRoleMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/ScopedRoleMembers/ScopedRoleMembersRequestBuilder.cs index e5f6945946f..3cdc85c68a3 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/ScopedRoleMembers/ScopedRoleMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AdministrativeUnits/Item/ScopedRoleMembers/ScopedRoleMembersRequestBuilder.cs @@ -93,7 +93,7 @@ public ScopedRoleMembersRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AttributeSets/AttributeSetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AttributeSets/AttributeSetsRequestBuilder.cs index a5f2432cc48..62a551e1ccb 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AttributeSets/AttributeSetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AttributeSets/AttributeSetsRequestBuilder.cs @@ -95,7 +95,7 @@ public AttributeSetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AttributeSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AttributeSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AttributeSets/Item/AttributeSetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AttributeSets/Item/AttributeSetItemRequestBuilder.cs index 3d7c0de248a..9aaf7bdb1c9 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AttributeSets/Item/AttributeSetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AttributeSets/Item/AttributeSetItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AttributeSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AttributeSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/AuthenticationMethodDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/AuthenticationMethodDevicesRequestBuilder.cs index 17018f69d5a..9270b2cb2d7 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/AuthenticationMethodDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/AuthenticationMethodDevicesRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/HardwareOathDevices/HardwareOathDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/HardwareOathDevices/HardwareOathDevicesRequestBuilder.cs index a440110e030..e1ee4ceedb8 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/HardwareOathDevices/HardwareOathDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/HardwareOathDevices/HardwareOathDevicesRequestBuilder.cs @@ -95,7 +95,7 @@ public HardwareOathDevicesRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/HardwareOathDevices/Item/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/HardwareOathDevices/Item/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs index 396f650f564..142fb088e24 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/HardwareOathDevices/Item/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/HardwareOathDevices/Item/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/HardwareOathDevices/Item/HardwareOathTokenAuthenticationMethodDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/HardwareOathDevices/Item/HardwareOathTokenAuthenticationMethodDeviceItemRequestBuilder.cs index 1de6d081403..3a1f5d64de4 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/HardwareOathDevices/Item/HardwareOathTokenAuthenticationMethodDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/AuthenticationMethodDevices/HardwareOathDevices/Item/HardwareOathTokenAuthenticationMethodDeviceItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateAuthoritiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateAuthoritiesRequestBuilder.cs index 0c3b79ca6e7..a89c4b326c2 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateAuthoritiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateAuthoritiesRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CertificateAuthorityPath body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateAuthorityPath body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/CertificateBasedApplicationConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/CertificateBasedApplicationConfigurationsRequestBuilder.cs index 4affc95c16c..5cd9b0d3ecc 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/CertificateBasedApplicationConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/CertificateBasedApplicationConfigurationsRequestBuilder.cs @@ -94,7 +94,7 @@ public CertificateBasedApplicationConfigurationsRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CertificateBasedApplicationConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateBasedApplicationConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/CertificateBasedApplicationConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/CertificateBasedApplicationConfigurationItemRequestBuilder.cs index 80dd5f261b3..aaaa13e6218 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/CertificateBasedApplicationConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/CertificateBasedApplicationConfigurationItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CertificateBasedApplicationConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateBasedApplicationConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/Item/CertificateAuthorityAsEntityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/Item/CertificateAuthorityAsEntityItemRequestBuilder.cs index b9074486ea3..403a06f3cf4 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/Item/CertificateAuthorityAsEntityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/Item/CertificateAuthorityAsEntityItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CertificateAuthorityAsEntity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateAuthorityAsEntity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/TrustedCertificateAuthoritiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/TrustedCertificateAuthoritiesRequestBuilder.cs index 71ddb49c895..bb0950468c5 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/TrustedCertificateAuthoritiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/CertificateBasedApplicationConfigurations/Item/TrustedCertificateAuthorities/TrustedCertificateAuthoritiesRequestBuilder.cs @@ -95,7 +95,7 @@ public TrustedCertificateAuthoritiesRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CertificateAuthorityAsEntity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateAuthorityAsEntity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/MutualTlsOauthConfigurations/Item/MutualTlsOauthConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/MutualTlsOauthConfigurations/Item/MutualTlsOauthConfigurationItemRequestBuilder.cs index 33021f9665d..c38f4e19bba 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/MutualTlsOauthConfigurations/Item/MutualTlsOauthConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/MutualTlsOauthConfigurations/Item/MutualTlsOauthConfigurationItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MutualTlsOauthConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MutualTlsOauthConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/MutualTlsOauthConfigurations/MutualTlsOauthConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/MutualTlsOauthConfigurations/MutualTlsOauthConfigurationsRequestBuilder.cs index a735a86f839..2e10485b726 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/MutualTlsOauthConfigurations/MutualTlsOauthConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/CertificateAuthorities/MutualTlsOauthConfigurations/MutualTlsOauthConfigurationsRequestBuilder.cs @@ -95,7 +95,7 @@ public MutualTlsOauthConfigurationsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MutualTlsOauthConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MutualTlsOauthConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/CustomSecurityAttributeDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/CustomSecurityAttributeDefinitionsRequestBuilder.cs index 42480ca7474..e8ca4a96c86 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/CustomSecurityAttributeDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/CustomSecurityAttributeDefinitionsRequestBuilder.cs @@ -95,7 +95,7 @@ public CustomSecurityAttributeDefinitionsRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/Item/AllowedValues/AllowedValuesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/Item/AllowedValues/AllowedValuesRequestBuilder.cs index d11b6a45ae4..2038d2ca686 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/Item/AllowedValues/AllowedValuesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/Item/AllowedValues/AllowedValuesRequestBuilder.cs @@ -95,7 +95,7 @@ public AllowedValuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AllowedValue body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AllowedValue body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/Item/AllowedValues/Item/AllowedValueItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/Item/AllowedValues/Item/AllowedValueItemRequestBuilder.cs index f39b62d6494..e1254b91cd7 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/Item/AllowedValues/Item/AllowedValueItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/Item/AllowedValues/Item/AllowedValueItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AllowedValue body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AllowedValue body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/Item/CustomSecurityAttributeDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/Item/CustomSecurityAttributeDefinitionItemRequestBuilder.cs index 7972ba19fa2..d1db896ffac 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/Item/CustomSecurityAttributeDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/CustomSecurityAttributeDefinitions/Item/CustomSecurityAttributeDefinitionItemRequestBuilder.cs @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsPostRequestBody.cs index 46ac366fea9..6087219c563 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetByIdsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.GetByIds.GetByIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.GetByIds.GetByIdsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteCollectionOfPrimitiveValues("types", Types); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsPostResponse.cs index 028937ad72c..44d4bea2396 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetByIdsPostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.GetByIds.GetByIdsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.GetByIds.GetByIdsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsRequestBuilder.cs index 281fa6ac81e..b53f925a6b5 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsGetByIdsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsResponse.cs index b40b1fe4dfa..e5e12d6f96b 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/GetByIds/GetByIdsResponse.cs @@ -20,7 +20,7 @@ public partial class GetByIdsResponse : global::Microsoft.Graph.Beta.DirectoryNa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.GetByIds.GetByIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.GetByIds.GetByIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs index 3174a54e1d7..bbd49586205 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs index 0dd27653420..e8090ca892d 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberGroups.CheckMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberGroups.CheckMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs index 3b770e3972c..85a4239fdef 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsCheckMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs index 36acbb362a9..1a8451c3bb7 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberGroupsResponse : global::Microsoft.Graph.Beta.Di /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberGroups.CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberGroups.CheckMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs index d15cdf8648b..b9058203b64 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs index 9745b8f2ed3..7127907d0be 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberObjects.CheckMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberObjects.CheckMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs index f9bc59c6045..0371ad49762 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsCheckMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs index 90042e594a0..6fc5ce53cb4 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberObjectsResponse : global::Microsoft.Graph.Beta.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberObjects.CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.CheckMemberObjects.CheckMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs index d68598ce15f..ee71d576954 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberGroups.GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberGroups.GetMemberGroupsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs index a58f718962e..f2e410cb85d 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberGroups.GetMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberGroups.GetMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs index 93f452ce841..c7acf0de34c 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsGetMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsResponse.cs index 2182357156e..afa85fe15c8 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberGroups/GetMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberGroupsResponse : global::Microsoft.Graph.Beta.Dire /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberGroups.GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberGroups.GetMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs index 5480b69ebab..15613924212 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberObjects.GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberObjects.GetMemberObjectsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs index 27c97e10be6..1d7bdae7236 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberObjects.GetMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberObjects.GetMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs index 955e52816d1..e52c37f4bf1 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsResponse.cs index 5080a880453..b3def5ed7d8 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/Item/GetMemberObjects/GetMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberObjectsResponse : global::Microsoft.Graph.Beta.Dir /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberObjects.GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.Item.GetMemberObjects.GetMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/ValidateProperties/ValidatePropertiesPostRequestBody.cs index 25b5fc003d8..a3db9ec9196 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/ValidateProperties/ValidatePropertiesPostRequestBody.cs @@ -90,7 +90,7 @@ public ValidatePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.ValidateProperties.ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.ValidateProperties.ValidatePropertiesPostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("entityType", EntityType); writer.WriteStringValue("mailNickname", MailNickname); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/ValidateProperties/ValidatePropertiesRequestBuilder.cs index af2563524c4..2ad7a720251 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeletedItems/ValidateProperties/ValidatePropertiesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.Dele public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.DeletedItems.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeviceLocalCredentials/DeviceLocalCredentialsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeviceLocalCredentials/DeviceLocalCredentialsRequestBuilder.cs index 16d4f17dcc3..9ed0dd9a5a8 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeviceLocalCredentials/DeviceLocalCredentialsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeviceLocalCredentials/DeviceLocalCredentialsRequestBuilder.cs @@ -94,7 +94,7 @@ public DeviceLocalCredentialsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceLocalCredentialInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceLocalCredentialInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeviceLocalCredentials/Item/DeviceLocalCredentialInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeviceLocalCredentials/Item/DeviceLocalCredentialInfoItemRequestBuilder.cs index 0cf3542abc0..5824ea1800c 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DeviceLocalCredentials/Item/DeviceLocalCredentialInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DeviceLocalCredentials/Item/DeviceLocalCredentialInfoItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceLocalCredentialInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceLocalCredentialInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/DirectoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/DirectoryRequestBuilder.cs index 3bcf5f10f27..7c1c9d71106 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/DirectoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/DirectoryRequestBuilder.cs @@ -202,7 +202,7 @@ public DirectoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.DirectoryObject1 body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -264,7 +264,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryObject1 body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/ExternalUserProfiles/ExternalUserProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/ExternalUserProfiles/ExternalUserProfilesRequestBuilder.cs index a9b2088392b..5240043a127 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/ExternalUserProfiles/ExternalUserProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/ExternalUserProfiles/ExternalUserProfilesRequestBuilder.cs @@ -94,7 +94,7 @@ public ExternalUserProfilesRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExternalUserProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalUserProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/ExternalUserProfiles/Item/ExternalUserProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/ExternalUserProfiles/Item/ExternalUserProfileItemRequestBuilder.cs index c6bf1282dbf..9b6640a625c 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/ExternalUserProfiles/Item/ExternalUserProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/ExternalUserProfiles/Item/ExternalUserProfileItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalUserProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalUserProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/FeatureRolloutPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/FeatureRolloutPoliciesRequestBuilder.cs index 1a6107878c6..855110e5809 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/FeatureRolloutPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/FeatureRolloutPoliciesRequestBuilder.cs @@ -97,7 +97,7 @@ public FeatureRolloutPoliciesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.FeatureRolloutPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.FeatureRolloutPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs index 013acf42240..c4ef82166cb 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs @@ -103,7 +103,7 @@ public AppliesToRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DirectoryObject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryObject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/Item/AppliesTo/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/Item/AppliesTo/Ref/RefRequestBuilder.cs index bac63b464a8..815587b1670 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/Item/AppliesTo/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/Item/AppliesTo/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/directory/featureRolloutPolicies/{featureRolloutPolicy%2Did}/appliesTo/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/Item/FeatureRolloutPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/Item/FeatureRolloutPolicyItemRequestBuilder.cs index 8f57413d8d0..67180d54ea9 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/Item/FeatureRolloutPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/FeatureRolloutPolicies/Item/FeatureRolloutPolicyItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.FeatureRolloutPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.FeatureRolloutPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/AvailableProviderTypes/AvailableProviderTypesGetResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/AvailableProviderTypes/AvailableProviderTypesGetResponse.cs index bb4a9a5a93b..fceb6c1d382 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/AvailableProviderTypes/AvailableProviderTypesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/AvailableProviderTypes/AvailableProviderTypesGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryNamespace.FederationConfigurations.AvailableProviderTypes.AvailableProviderTypesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.FederationConfigurations.AvailableProviderTypes.AvailableProviderTypesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/AvailableProviderTypes/AvailableProviderTypesResponse.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/AvailableProviderTypes/AvailableProviderTypesResponse.cs index f868fd1653f..e5d7147e41e 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/AvailableProviderTypes/AvailableProviderTypesResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/AvailableProviderTypes/AvailableProviderTypesResponse.cs @@ -20,7 +20,7 @@ public partial class AvailableProviderTypesResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryNamespace.FederationConfigurations.AvailableProviderTypes.AvailableProviderTypesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.FederationConfigurations.AvailableProviderTypes.AvailableProviderTypesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/FederationConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/FederationConfigurationsRequestBuilder.cs index df4294d44cc..2c51e8d8b89 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/FederationConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/FederationConfigurationsRequestBuilder.cs @@ -99,7 +99,7 @@ public FederationConfigurationsRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IdentityProviderBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityProviderBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/Item/IdentityProviderBaseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/Item/IdentityProviderBaseItemRequestBuilder.cs index e0081fc57c6..e662eccf5ba 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/Item/IdentityProviderBaseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/FederationConfigurations/Item/IdentityProviderBaseItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityProviderBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityProviderBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/ImpactedResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/ImpactedResourcesRequestBuilder.cs index d5cd9cba629..104f9bcf316 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/ImpactedResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/ImpactedResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public ImpactedResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ImpactedResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ImpactedResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Dismiss/DismissPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Dismiss/DismissPostRequestBody.cs index f55d18bb352..5a07e9a0ce8 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Dismiss/DismissPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Dismiss/DismissPostRequestBody.cs @@ -52,7 +52,7 @@ public DismissPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.ImpactedResources.Item.Dismiss.DismissPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.ImpactedResources.Item.Dismiss.DismissPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("dismissReason", DismissReason); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Dismiss/DismissRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Dismiss/DismissRequestBuilder.cs index 0fcf67ed390..7fd26fb05f3 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Dismiss/DismissRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Dismiss/DismissRequestBuilder.cs @@ -52,7 +52,7 @@ public DismissRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.ImpactedResources.Item.Dismiss.DismissPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.ImpactedResources.Item.Dismiss.DismissPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/ImpactedResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/ImpactedResourceItemRequestBuilder.cs index 0fc1c3a9d0b..37d8620493c 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/ImpactedResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/ImpactedResourceItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ImpactedResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ImpactedResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Postpone/PostponePostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Postpone/PostponePostRequestBody.cs index 2adb6736cb4..c04511260d9 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Postpone/PostponePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Postpone/PostponePostRequestBody.cs @@ -42,7 +42,7 @@ public PostponePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.ImpactedResources.Item.Postpone.PostponePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.ImpactedResources.Item.Postpone.PostponePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("postponeUntilDateTime", PostponeUntilDateTime); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Postpone/PostponeRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Postpone/PostponeRequestBuilder.cs index 1a223972b7b..681cab374dd 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Postpone/PostponeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/ImpactedResources/Item/Postpone/PostponeRequestBuilder.cs @@ -52,7 +52,7 @@ public PostponeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.ImpactedResources.Item.Postpone.PostponePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.ImpactedResources.Item.Postpone.PostponePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/InboundSharedUserProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/InboundSharedUserProfilesRequestBuilder.cs index 5e7677462a0..92d7225f9fe 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/InboundSharedUserProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/InboundSharedUserProfilesRequestBuilder.cs @@ -94,7 +94,7 @@ public InboundSharedUserProfilesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.InboundSharedUserProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.InboundSharedUserProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/Item/ExportPersonalData/ExportPersonalDataPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/Item/ExportPersonalData/ExportPersonalDataPostRequestBody.cs index 87a9816e51e..067c24c9b06 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/Item/ExportPersonalData/ExportPersonalDataPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/Item/ExportPersonalData/ExportPersonalDataPostRequestBody.cs @@ -52,7 +52,7 @@ public ExportPersonalDataPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.InboundSharedUserProfiles.Item.ExportPersonalData.ExportPersonalDataPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.InboundSharedUserProfiles.Item.ExportPersonalData.ExportPersonalDataPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("storageLocation", StorageLocation); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/Item/ExportPersonalData/ExportPersonalDataRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/Item/ExportPersonalData/ExportPersonalDataRequestBuilder.cs index ca1834614dc..f5a5e1c2e39 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/Item/ExportPersonalData/ExportPersonalDataRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/Item/ExportPersonalData/ExportPersonalDataRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.Inbo public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.InboundSharedUserProfiles.Item.ExportPersonalData.ExportPersonalDataPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.InboundSharedUserProfiles.Item.ExportPersonalData.ExportPersonalDataPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/Item/InboundSharedUserProfileUserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/Item/InboundSharedUserProfileUserItemRequestBuilder.cs index 17fad6a96a9..686537f8c7e 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/Item/InboundSharedUserProfileUserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/InboundSharedUserProfiles/Item/InboundSharedUserProfileUserItemRequestBuilder.cs @@ -109,7 +109,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InboundSharedUserProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InboundSharedUserProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/OnPremisesSynchronization/Item/OnPremisesDirectorySynchronizationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/OnPremisesSynchronization/Item/OnPremisesDirectorySynchronizationItemRequestBuilder.cs index d398c36eeb5..476615740a3 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/OnPremisesSynchronization/Item/OnPremisesDirectorySynchronizationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/OnPremisesSynchronization/Item/OnPremisesDirectorySynchronizationItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnPremisesDirectorySynchronization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesDirectorySynchronization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/OnPremisesSynchronization/OnPremisesSynchronizationRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/OnPremisesSynchronization/OnPremisesSynchronizationRequestBuilder.cs index 7c379950139..20ba5692af5 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/OnPremisesSynchronization/OnPremisesSynchronizationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/OnPremisesSynchronization/OnPremisesSynchronizationRequestBuilder.cs @@ -93,7 +93,7 @@ public OnPremisesSynchronizationRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnPremisesDirectorySynchronization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesDirectorySynchronization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/Item/OutboundSharedUserProfileUserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/Item/OutboundSharedUserProfileUserItemRequestBuilder.cs index 4dec9f8c29f..7fb7a0f08fe 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/Item/OutboundSharedUserProfileUserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/Item/OutboundSharedUserProfileUserItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OutboundSharedUserProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OutboundSharedUserProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/Item/Tenants/Item/TenantReferenceTenantItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/Item/Tenants/Item/TenantReferenceTenantItemRequestBuilder.cs index 313730a5d0a..b5c9de1d21c 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/Item/Tenants/Item/TenantReferenceTenantItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/Item/Tenants/Item/TenantReferenceTenantItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TenantReference body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TenantReference body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/Item/Tenants/TenantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/Item/Tenants/TenantsRequestBuilder.cs index 8a1236c9564..8d28e2d97da 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/Item/Tenants/TenantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/Item/Tenants/TenantsRequestBuilder.cs @@ -94,7 +94,7 @@ public TenantsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TenantReference body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TenantReference body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/OutboundSharedUserProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/OutboundSharedUserProfilesRequestBuilder.cs index be2f23c5a46..161157f0680 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/OutboundSharedUserProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/OutboundSharedUserProfiles/OutboundSharedUserProfilesRequestBuilder.cs @@ -94,7 +94,7 @@ public OutboundSharedUserProfilesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OutboundSharedUserProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OutboundSharedUserProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/PendingExternalUserProfiles/Item/PendingExternalUserProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/PendingExternalUserProfiles/Item/PendingExternalUserProfileItemRequestBuilder.cs index 76d8bfe2ca5..6fed634d877 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/PendingExternalUserProfiles/Item/PendingExternalUserProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/PendingExternalUserProfiles/Item/PendingExternalUserProfileItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PendingExternalUserProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PendingExternalUserProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/PendingExternalUserProfiles/PendingExternalUserProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/PendingExternalUserProfiles/PendingExternalUserProfilesRequestBuilder.cs index 291de20dce0..10a6084aa5a 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/PendingExternalUserProfiles/PendingExternalUserProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/PendingExternalUserProfiles/PendingExternalUserProfilesRequestBuilder.cs @@ -95,7 +95,7 @@ public PendingExternalUserProfilesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PendingExternalUserProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PendingExternalUserProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/CertificateBasedAuthConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/CertificateBasedAuthConfigurationsRequestBuilder.cs index 301987d67ea..50520c5bf23 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/CertificateBasedAuthConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/CertificateBasedAuthConfigurationsRequestBuilder.cs @@ -95,7 +95,7 @@ public CertificateBasedAuthConfigurationsRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CertificateBasedAuthPki body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateBasedAuthPki body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/CertificateAuthorities/CertificateAuthoritiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/CertificateAuthorities/CertificateAuthoritiesRequestBuilder.cs index de09208541d..600881ccbdd 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/CertificateAuthorities/CertificateAuthoritiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/CertificateAuthorities/CertificateAuthoritiesRequestBuilder.cs @@ -95,7 +95,7 @@ public CertificateAuthoritiesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CertificateAuthorityDetail body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateAuthorityDetail body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/CertificateAuthorities/Item/CertificateAuthorityDetailItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/CertificateAuthorities/Item/CertificateAuthorityDetailItemRequestBuilder.cs index b0cf1bd7e70..199809c94b5 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/CertificateAuthorities/Item/CertificateAuthorityDetailItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/CertificateAuthorities/Item/CertificateAuthorityDetailItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CertificateAuthorityDetail body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateAuthorityDetail body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/CertificateBasedAuthPkiItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/CertificateBasedAuthPkiItemRequestBuilder.cs index 87e9d5761f0..fdf392a0e74 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/CertificateBasedAuthPkiItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/CertificateBasedAuthPkiItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CertificateBasedAuthPki body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateBasedAuthPki body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/Upload/UploadPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/Upload/UploadPostRequestBody.cs index a9f055159c4..9ecaf767cb7 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/Upload/UploadPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/Upload/UploadPostRequestBody.cs @@ -68,7 +68,7 @@ public UploadPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.PublicKeyInfrastructure.CertificateBasedAuthConfigurations.Item.Upload.UploadPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.PublicKeyInfrastructure.CertificateBasedAuthConfigurations.Item.Upload.UploadPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("sha256FileHash", Sha256FileHash); writer.WriteStringValue("uploadUrl", UploadUrl); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/Upload/UploadRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/Upload/UploadRequestBuilder.cs index c1ad61f0a03..905f0e7a999 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/Upload/UploadRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/CertificateBasedAuthConfigurations/Item/Upload/UploadRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.Publ public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.PublicKeyInfrastructure.CertificateBasedAuthConfigurations.Item.Upload.UploadPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.PublicKeyInfrastructure.CertificateBasedAuthConfigurations.Item.Upload.UploadPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/PublicKeyInfrastructureRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/PublicKeyInfrastructureRequestBuilder.cs index bbfc33f083f..76fe92fb2ec 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/PublicKeyInfrastructureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/PublicKeyInfrastructure/PublicKeyInfrastructureRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PublicKeyInfrastructureRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PublicKeyInfrastructureRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/RecommendationConfiguration/RecommendationConfigurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/RecommendationConfiguration/RecommendationConfigurationRequestBuilder.cs index 5b1e6573a28..ba59ec85f5f 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/RecommendationConfiguration/RecommendationConfigurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/RecommendationConfiguration/RecommendationConfigurationRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RecommendationConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RecommendationConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Dismiss/DismissPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Dismiss/DismissPostRequestBody.cs index b4c26c5aad0..7495520b06c 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Dismiss/DismissPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Dismiss/DismissPostRequestBody.cs @@ -52,7 +52,7 @@ public DismissPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.Dismiss.DismissPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.Dismiss.DismissPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("dismissReason", DismissReason); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Dismiss/DismissRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Dismiss/DismissRequestBuilder.cs index 4ab4a6f80ec..9c63832a44a 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Dismiss/DismissRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Dismiss/DismissRequestBuilder.cs @@ -52,7 +52,7 @@ public DismissRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.Dismiss.DismissPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.Dismiss.DismissPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/ImpactedResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/ImpactedResourcesRequestBuilder.cs index 99f5d8416a0..cbc989be8f6 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/ImpactedResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/ImpactedResourcesRequestBuilder.cs @@ -94,7 +94,7 @@ public ImpactedResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ImpactedResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ImpactedResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Dismiss/DismissPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Dismiss/DismissPostRequestBody.cs index 467fd1783a1..f9be3818fdc 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Dismiss/DismissPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Dismiss/DismissPostRequestBody.cs @@ -52,7 +52,7 @@ public DismissPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.ImpactedResources.Item.Dismiss.DismissPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.ImpactedResources.Item.Dismiss.DismissPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("dismissReason", DismissReason); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Dismiss/DismissRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Dismiss/DismissRequestBuilder.cs index 24dbc884c5c..b27a0f347e6 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Dismiss/DismissRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Dismiss/DismissRequestBuilder.cs @@ -52,7 +52,7 @@ public DismissRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.ImpactedResources.Item.Dismiss.DismissPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.ImpactedResources.Item.Dismiss.DismissPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/ImpactedResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/ImpactedResourceItemRequestBuilder.cs index d0647a8b6fc..d41d50a56c1 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/ImpactedResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/ImpactedResourceItemRequestBuilder.cs @@ -121,7 +121,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ImpactedResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -182,7 +182,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ImpactedResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Postpone/PostponePostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Postpone/PostponePostRequestBody.cs index 79cce4f8f6c..9b6a4f353d1 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Postpone/PostponePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Postpone/PostponePostRequestBody.cs @@ -42,7 +42,7 @@ public PostponePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.ImpactedResources.Item.Postpone.PostponePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.ImpactedResources.Item.Postpone.PostponePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("postponeUntilDateTime", PostponeUntilDateTime); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Postpone/PostponeRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Postpone/PostponeRequestBuilder.cs index 3aad9a46268..d3c5126a52e 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Postpone/PostponeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/ImpactedResources/Item/Postpone/PostponeRequestBuilder.cs @@ -52,7 +52,7 @@ public PostponeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.ImpactedResources.Item.Postpone.PostponePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.ImpactedResources.Item.Postpone.PostponePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Postpone/PostponePostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Postpone/PostponePostRequestBody.cs index 3bb26d4e2d6..34b8e09a4d9 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Postpone/PostponePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Postpone/PostponePostRequestBody.cs @@ -42,7 +42,7 @@ public PostponePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.Postpone.PostponePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.Postpone.PostponePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("postponeUntilDateTime", PostponeUntilDateTime); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Postpone/PostponeRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Postpone/PostponeRequestBuilder.cs index 0397be68133..572757b3e44 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Postpone/PostponeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/Postpone/PostponeRequestBuilder.cs @@ -52,7 +52,7 @@ public PostponeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.Postpone.PostponePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.Recommendations.Item.Postpone.PostponePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/RecommendationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/RecommendationItemRequestBuilder.cs index 5f64735c78d..481be9878be 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/RecommendationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/Item/RecommendationItemRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Recommendation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -188,7 +188,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Recommendation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/RecommendationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/RecommendationsRequestBuilder.cs index 06b42af89d4..760b8308d97 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/RecommendationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Recommendations/RecommendationsRequestBuilder.cs @@ -94,7 +94,7 @@ public RecommendationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Recommendation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Recommendation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/SharedEmailDomains/Item/SharedEmailDomainItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/SharedEmailDomains/Item/SharedEmailDomainItemRequestBuilder.cs index ee9a60f48e4..f5500dce932 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/SharedEmailDomains/Item/SharedEmailDomainItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/SharedEmailDomains/Item/SharedEmailDomainItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SharedEmailDomain body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SharedEmailDomain body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/SharedEmailDomains/SharedEmailDomainsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/SharedEmailDomains/SharedEmailDomainsRequestBuilder.cs index 205c18895bc..4806201282d 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/SharedEmailDomains/SharedEmailDomainsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/SharedEmailDomains/SharedEmailDomainsRequestBuilder.cs @@ -93,7 +93,7 @@ public SharedEmailDomainsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SharedEmailDomain body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SharedEmailDomain body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Subscriptions/Item/CompanySubscriptionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Subscriptions/Item/CompanySubscriptionItemRequestBuilder.cs index 849b5d096f2..21706405a78 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Subscriptions/Item/CompanySubscriptionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Subscriptions/Item/CompanySubscriptionItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CompanySubscription body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CompanySubscription body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Subscriptions/SubscriptionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Subscriptions/SubscriptionsRequestBuilder.cs index 42b8643c077..4ad0651cc5a 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Subscriptions/SubscriptionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Subscriptions/SubscriptionsRequestBuilder.cs @@ -94,7 +94,7 @@ public SubscriptionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CompanySubscription body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CompanySubscription body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/SubscriptionsWithCommerceSubscriptionId/SubscriptionsWithCommerceSubscriptionIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/SubscriptionsWithCommerceSubscriptionId/SubscriptionsWithCommerceSubscriptionIdRequestBuilder.cs index dcf08fdfc35..f73d49ad5a9 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/SubscriptionsWithCommerceSubscriptionId/SubscriptionsWithCommerceSubscriptionIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/SubscriptionsWithCommerceSubscriptionId/SubscriptionsWithCommerceSubscriptionIdRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CompanySubscription body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CompanySubscription body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/SubscriptionsWithOcpSubscriptionId/SubscriptionsWithOcpSubscriptionIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/SubscriptionsWithOcpSubscriptionId/SubscriptionsWithOcpSubscriptionIdRequestBuilder.cs index a158217c1a1..4483aa9fdd8 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/SubscriptionsWithOcpSubscriptionId/SubscriptionsWithOcpSubscriptionIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/SubscriptionsWithOcpSubscriptionId/SubscriptionsWithOcpSubscriptionIdRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CompanySubscription body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CompanySubscription body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/DeviceTemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/DeviceTemplatesRequestBuilder.cs index 82a27fccbd3..4707985ef43 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/DeviceTemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/DeviceTemplatesRequestBuilder.cs @@ -95,7 +95,7 @@ public DeviceTemplatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/Item/CreateDeviceFromTemplate/CreateDeviceFromTemplatePostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/Item/CreateDeviceFromTemplate/CreateDeviceFromTemplatePostRequestBody.cs index ed12cff9d90..186b5c43eaf 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/Item/CreateDeviceFromTemplate/CreateDeviceFromTemplatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/Item/CreateDeviceFromTemplate/CreateDeviceFromTemplatePostRequestBody.cs @@ -123,7 +123,7 @@ public CreateDeviceFromTemplatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryNamespace.Templates.DeviceTemplates.Item.CreateDeviceFromTemplate.CreateDeviceFromTemplatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryNamespace.Templates.DeviceTemplates.Item.CreateDeviceFromTemplate.CreateDeviceFromTemplatePostRequestBody(); } /// @@ -148,7 +148,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("accountEnabled", AccountEnabled); writer.WriteCollectionOfPrimitiveValues("alternativeNames", AlternativeNames); writer.WriteStringValue("externalDeviceId", ExternalDeviceId); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/Item/CreateDeviceFromTemplate/CreateDeviceFromTemplateRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/Item/CreateDeviceFromTemplate/CreateDeviceFromTemplateRequestBuilder.cs index 9cd53519240..2115312d94c 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/Item/CreateDeviceFromTemplate/CreateDeviceFromTemplateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/Item/CreateDeviceFromTemplate/CreateDeviceFromTemplateRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateDeviceFromTemplateRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryNamespace.Templates.DeviceTemplates.Item.CreateDeviceFromTemplate.CreateDeviceFromTemplatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryNamespace.Templates.DeviceTemplates.Item.CreateDeviceFromTemplate.CreateDeviceFromTemplatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/Item/DeviceTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/Item/DeviceTemplateItemRequestBuilder.cs index 98aff2de304..3a98ac2698f 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/Item/DeviceTemplateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/DeviceTemplates/Item/DeviceTemplateItemRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -188,7 +188,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/TemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/TemplatesRequestBuilder.cs index c5e9124c888..24dd15f9299 100644 --- a/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/TemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryNamespace/Templates/TemplatesRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Template body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Template body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Delta/DeltaGetResponse.cs index 369c14ebfa4..75ff4ac7f7b 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryObjects.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Delta/DeltaResponse.cs index 27165177a74..bc7f373d4c1 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.DirectoryObjec /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryObjects.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/DirectoryObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/DirectoryObjectsRequestBuilder.cs index dc2b87a298b..e81b9560ec4 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/DirectoryObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/DirectoryObjectsRequestBuilder.cs @@ -117,7 +117,7 @@ public DirectoryObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DirectoryObject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryObject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsPostRequestBody.cs index 95e1db8c6ca..d384e1766ab 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetByIdsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryObjects.GetByIds.GetByIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.GetByIds.GetByIdsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteCollectionOfPrimitiveValues("types", Types); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsPostResponse.cs index e65d86617b0..039ad5b37a7 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetByIdsPostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryObjects.GetByIds.GetByIdsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.GetByIds.GetByIdsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsRequestBuilder.cs index f392fc5f514..930e8c15a39 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsGetByIdsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryObjects.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryObjects.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryObjects.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsResponse.cs index 47ffdbb8f93..eb9f2ab35ca 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/GetByIds/GetByIdsResponse.cs @@ -20,7 +20,7 @@ public partial class GetByIdsResponse : global::Microsoft.Graph.Beta.DirectoryOb /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryObjects.GetByIds.GetByIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.GetByIds.GetByIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs index a1d016ecc8e..9698423c999 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetUserOwnedObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryObjects.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("type", Type); writer.WriteStringValue("userId", UserId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs index 57c08e3399c..3febeb95945 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs @@ -52,7 +52,7 @@ public GetUserOwnedObjectsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryObjects.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryObjects.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs index ec580d87d40..e142cbc0050 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs index 8509b6c8812..91c836a9b08 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberGroups.CheckMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberGroups.CheckMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs index c10695635e6..f8315f93c79 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsCheckMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs index 00cec2cbafb..39c0006603a 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberGroupsResponse : global::Microsoft.Graph.Beta.Di /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberGroups.CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberGroups.CheckMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs index 6390d31749b..cd066ab1d09 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs index 28f24a5f71e..2bf97c97465 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberObjects.CheckMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberObjects.CheckMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs index 396284aad5f..086da038788 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsCheckMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs index 503594b5560..dcd57c8f5da 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberObjectsResponse : global::Microsoft.Graph.Beta.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberObjects.CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.Item.CheckMemberObjects.CheckMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/DirectoryObjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/DirectoryObjectItemRequestBuilder.cs index 0636d043140..b09a7b72e9c 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/DirectoryObjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/DirectoryObjectItemRequestBuilder.cs @@ -128,7 +128,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DirectoryObject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -189,7 +189,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryObject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs index 03067b6c78b..89b686660ee 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberGroups.GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberGroups.GetMemberGroupsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs index 3ca60f92d1a..87851368912 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberGroups.GetMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberGroups.GetMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs index 96262e29c17..a63b8a174f6 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsGetMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsResponse.cs index f81187b9f62..ec0b7c2d6a1 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberGroups/GetMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberGroupsResponse : global::Microsoft.Graph.Beta.Dire /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberGroups.GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberGroups.GetMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs index 9f1655e144e..7fa6887ad88 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberObjects.GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberObjects.GetMemberObjectsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs index 39904857949..55dad6551b0 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberObjects.GetMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberObjects.GetMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs index 67f1e5e3d53..91a65243d57 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsResponse.cs index c89229425ef..c04da390d29 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/Item/GetMemberObjects/GetMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberObjectsResponse : global::Microsoft.Graph.Beta.Dir /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberObjects.GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.Item.GetMemberObjects.GetMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/ValidateProperties/ValidatePropertiesPostRequestBody.cs index 80cf7cc324b..46da46d66fd 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/ValidateProperties/ValidatePropertiesPostRequestBody.cs @@ -90,7 +90,7 @@ public ValidatePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryObjects.ValidateProperties.ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryObjects.ValidateProperties.ValidatePropertiesPostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("entityType", EntityType); writer.WriteStringValue("mailNickname", MailNickname); diff --git a/src/Microsoft.Graph/Generated/DirectoryObjects/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryObjects/ValidateProperties/ValidatePropertiesRequestBuilder.cs index c66fa22eff2..04c34ccd73c 100644 --- a/src/Microsoft.Graph/Generated/DirectoryObjects/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryObjects/ValidateProperties/ValidatePropertiesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryObjects.Valida public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryObjects.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryObjects.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Delta/DeltaGetResponse.cs index 19b7ea7a30b..092bfc1bdec 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Delta/DeltaResponse.cs index 6fb449fe79c..5f47e30bed7 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.DirectoryRoleT /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/DirectoryRoleTemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/DirectoryRoleTemplatesRequestBuilder.cs index 18e6fc26dfa..edecbd745a4 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/DirectoryRoleTemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/DirectoryRoleTemplatesRequestBuilder.cs @@ -118,7 +118,7 @@ public DirectoryRoleTemplatesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DirectoryRoleTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryRoleTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsPostRequestBody.cs index 5b4b871ebec..e02ea40aed8 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetByIdsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryRoleTemplates.GetByIds.GetByIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.GetByIds.GetByIdsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteCollectionOfPrimitiveValues("types", Types); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsPostResponse.cs index 1f6600811e6..8217ff7afcd 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetByIdsPostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.GetByIds.GetByIdsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.GetByIds.GetByIdsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsRequestBuilder.cs index 76e9ac42821..f34bb207466 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsGetByIdsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsResponse.cs index 7fd524bea25..5e97f0b9abc 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetByIds/GetByIdsResponse.cs @@ -20,7 +20,7 @@ public partial class GetByIdsResponse : global::Microsoft.Graph.Beta.DirectoryRo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.GetByIds.GetByIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.GetByIds.GetByIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs index e161aeaa03e..724031c5cfb 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetUserOwnedObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryRoleTemplates.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("type", Type); writer.WriteStringValue("userId", UserId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs index a7b81f3f29b..5ad41822841 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs @@ -52,7 +52,7 @@ public GetUserOwnedObjectsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs index 0ea2077410e..1571b199ed5 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs index 4d1ae16d13e..97c4f8bee68 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberGroups.CheckMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberGroups.CheckMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs index bf6cc848e17..e2af44f5a29 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsCheckMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs index 4f9949eae59..33242c80117 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberGroupsResponse : global::Microsoft.Graph.Beta.Di /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberGroups.CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberGroups.CheckMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs index 16a5cb64ea8..6577b9afcee 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs index d81355f6198..74e59c58c8c 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberObjects.CheckMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberObjects.CheckMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs index 7f0d486504e..7cd3e7dddc0 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsCheckMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs index 37e39bef470..19e26bd6c7a 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberObjectsResponse : global::Microsoft.Graph.Beta.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberObjects.CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.CheckMemberObjects.CheckMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/DirectoryRoleTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/DirectoryRoleTemplateItemRequestBuilder.cs index 238bdf32c99..75565e5cb2b 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/DirectoryRoleTemplateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/DirectoryRoleTemplateItemRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DirectoryRoleTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -188,7 +188,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryRoleTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs index 94d0996e822..e229f61efa8 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberGroups.GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberGroups.GetMemberGroupsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs index 62acd9fe01e..371ff15fc93 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberGroups.GetMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberGroups.GetMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs index b9e52572055..6ff4a5c4c34 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsGetMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsResponse.cs index ae9cc89e119..9bf0154d4df 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberGroups/GetMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberGroupsResponse : global::Microsoft.Graph.Beta.Dire /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberGroups.GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberGroups.GetMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs index e2a33b90a90..f8aef82717a 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberObjects.GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberObjects.GetMemberObjectsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs index bc0a67c02b9..f50cd6fabd9 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberObjects.GetMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberObjects.GetMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs index 57e24b9af9c..dea02036b0e 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsResponse.cs index 366c35d6539..15d599c36be 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/Item/GetMemberObjects/GetMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberObjectsResponse : global::Microsoft.Graph.Beta.Dir /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberObjects.GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.Item.GetMemberObjects.GetMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/ValidateProperties/ValidatePropertiesPostRequestBody.cs index a0e685b4848..0db78351186 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/ValidateProperties/ValidatePropertiesPostRequestBody.cs @@ -90,7 +90,7 @@ public ValidatePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryRoleTemplates.ValidateProperties.ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoleTemplates.ValidateProperties.ValidatePropertiesPostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("entityType", EntityType); writer.WriteStringValue("mailNickname", MailNickname); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/ValidateProperties/ValidatePropertiesRequestBuilder.cs index 83a21804871..0f886dd69bd 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoleTemplates/ValidateProperties/ValidatePropertiesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoleTemplates. public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryRoleTemplates.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Delta/DeltaGetResponse.cs index c70cb482c2e..61713631a9d 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoles.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Delta/DeltaResponse.cs index e4512234672..b52a089201d 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.DirectoryRoles /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoles.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/DirectoryRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/DirectoryRolesRequestBuilder.cs index 2040295ec05..8f65bfdf593 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/DirectoryRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/DirectoryRolesRequestBuilder.cs @@ -119,7 +119,7 @@ public DirectoryRolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DirectoryRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -161,7 +161,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsPostRequestBody.cs index de34198cac7..e7fd028afca 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetByIdsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryRoles.GetByIds.GetByIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.GetByIds.GetByIdsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteCollectionOfPrimitiveValues("types", Types); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsPostResponse.cs index 6b2164fb401..b77b600ab3f 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetByIdsPostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoles.GetByIds.GetByIdsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.GetByIds.GetByIdsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsRequestBuilder.cs index dd8aa65cc46..6bc31fb6964 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsGetByIdsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryRoles.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoles.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryRoles.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsResponse.cs index 01dd755129d..90c84a51199 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/GetByIds/GetByIdsResponse.cs @@ -20,7 +20,7 @@ public partial class GetByIdsResponse : global::Microsoft.Graph.Beta.DirectoryRo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoles.GetByIds.GetByIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.GetByIds.GetByIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs index 4106b0e57ce..f5547318bf9 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetUserOwnedObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryRoles.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("type", Type); writer.WriteStringValue("userId", UserId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs index 0f0fcc233c9..984dd2ca27a 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs @@ -52,7 +52,7 @@ public GetUserOwnedObjectsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoles.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryRoles.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs index a1ba9d39157..9d1839bdd71 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs index 6c67ab3677e..d5fa271da9c 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberGroups.CheckMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberGroups.CheckMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs index c6f0ae7a65c..d6c144c6be1 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsCheckMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs index 6acf47b31db..97ddfc6c364 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberGroupsResponse : global::Microsoft.Graph.Beta.Di /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberGroups.CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberGroups.CheckMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs index 29344fe9af1..282640d498f 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs index f6bb2c40d9f..b80af6f594a 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberObjects.CheckMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberObjects.CheckMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs index 9e83cb3ccf3..d5e5709e92e 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsCheckMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs index 505377036e0..48d542d6492 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberObjectsResponse : global::Microsoft.Graph.Beta.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberObjects.CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.Item.CheckMemberObjects.CheckMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/DirectoryRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/DirectoryRoleItemRequestBuilder.cs index bd190d6b3b2..b8088f4f6e3 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/DirectoryRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/DirectoryRoleItemRequestBuilder.cs @@ -139,7 +139,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DirectoryRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -200,7 +200,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs index b12adbb33fd..9b3533fb590 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberGroups.GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberGroups.GetMemberGroupsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs index 3e84ec9e8b7..f5a278d7713 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberGroups.GetMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberGroups.GetMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs index 8a191ead3c9..86e4b66a71c 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsGetMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsResponse.cs index d5275e61432..5cb63d8dcc6 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberGroups/GetMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberGroupsResponse : global::Microsoft.Graph.Beta.Dire /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberGroups.GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberGroups.GetMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs index dc4a34785f3..6f613e0cef2 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberObjects.GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberObjects.GetMemberObjectsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs index c6452fc77d9..2181bb4cf45 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberObjects.GetMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberObjects.GetMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs index 1194235cd05..a05eb8e92b4 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsResponse.cs index a3166195e5b..4c7d72e6e94 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/GetMemberObjects/GetMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberObjectsResponse : global::Microsoft.Graph.Beta.Dir /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberObjects.GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.Item.GetMemberObjects.GetMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/Members/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/Members/Ref/RefRequestBuilder.cs index 269eeabaff5..672b76fb463 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/Members/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/Members/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/directoryRoles/{directoryRole%2Did}/members/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/ScopedMembers/Item/ScopedRoleMembershipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/ScopedMembers/Item/ScopedRoleMembershipItemRequestBuilder.cs index a13e94afe76..f186034c47c 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/ScopedMembers/Item/ScopedRoleMembershipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/ScopedMembers/Item/ScopedRoleMembershipItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/ScopedMembers/ScopedMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/ScopedMembers/ScopedMembersRequestBuilder.cs index 012b4e26c38..d698b7e9331 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/Item/ScopedMembers/ScopedMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/Item/ScopedMembers/ScopedMembersRequestBuilder.cs @@ -94,7 +94,7 @@ public ScopedMembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/ValidateProperties/ValidatePropertiesPostRequestBody.cs index 96141777e13..627b6e1874c 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/ValidateProperties/ValidatePropertiesPostRequestBody.cs @@ -90,7 +90,7 @@ public ValidatePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectoryRoles.ValidateProperties.ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectoryRoles.ValidateProperties.ValidatePropertiesPostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("entityType", EntityType); writer.WriteStringValue("mailNickname", MailNickname); diff --git a/src/Microsoft.Graph/Generated/DirectoryRoles/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRoles/ValidateProperties/ValidatePropertiesRequestBuilder.cs index 3a9944b99b6..7c63e689614 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRoles/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRoles/ValidateProperties/ValidatePropertiesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoles.Validate public async Task PostAsync(global::Microsoft.Graph.Beta.DirectoryRoles.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectoryRoles.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectoryRolesWithRoleTemplateId/DirectoryRolesWithRoleTemplateIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectoryRolesWithRoleTemplateId/DirectoryRolesWithRoleTemplateIdRequestBuilder.cs index 570a77fc3eb..45a7d928186 100644 --- a/src/Microsoft.Graph/Generated/DirectoryRolesWithRoleTemplateId/DirectoryRolesWithRoleTemplateIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectoryRolesWithRoleTemplateId/DirectoryRolesWithRoleTemplateIdRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DirectoryRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Delta/DeltaGetResponse.cs index ff9c6c2f6dc..3a765f31f2b 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Delta/DeltaResponse.cs index ef84dcc6719..8e0efc9f57a 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.DirectorySetti /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/DirectorySettingTemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/DirectorySettingTemplatesRequestBuilder.cs index 0fca9adb261..b79e73c47d8 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/DirectorySettingTemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/DirectorySettingTemplatesRequestBuilder.cs @@ -118,7 +118,7 @@ public DirectorySettingTemplatesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DirectorySettingTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DirectorySettingTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsPostRequestBody.cs index f4bda43099c..ed46812d8bd 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetByIdsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectorySettingTemplates.GetByIds.GetByIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.GetByIds.GetByIdsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteCollectionOfPrimitiveValues("types", Types); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsPostResponse.cs index fb74ebda45c..af9068f3050 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetByIdsPostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectorySettingTemplates.GetByIds.GetByIdsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.GetByIds.GetByIdsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsRequestBuilder.cs index cd5b5130240..5216e7a4672 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsGetByIdsPostResponseAsync(global::Microsoft.Graph.Beta.DirectorySettingTemplates.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.DirectorySettingTemplates.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectorySettingTemplates.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsResponse.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsResponse.cs index 9ad9c19bd67..b151f4a5f49 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetByIds/GetByIdsResponse.cs @@ -20,7 +20,7 @@ public partial class GetByIdsResponse : global::Microsoft.Graph.Beta.DirectorySe /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectorySettingTemplates.GetByIds.GetByIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.GetByIds.GetByIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs index 7bfee858a24..9cfd71593a0 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetUserOwnedObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectorySettingTemplates.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("type", Type); writer.WriteStringValue("userId", UserId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs index 14c642e182c..fdb87d6ff03 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs @@ -52,7 +52,7 @@ public GetUserOwnedObjectsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.DirectorySettingTemplates.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectorySettingTemplates.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs index 6bc50f880e7..6959d464c92 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs index 2eaac487419..dc52fd36d38 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberGroups.CheckMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberGroups.CheckMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs index 9df8e9131e8..12dcd94a90d 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsCheckMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs index 867134e4d53..30dfd19e5a6 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberGroupsResponse : global::Microsoft.Graph.Beta.Di /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberGroups.CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberGroups.CheckMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs index 26af2dda7a2..1781bbbf4ea 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs index 90b3f00dae6..25e2e4bdbba 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberObjects.CheckMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberObjects.CheckMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs index 005bda7cbff..fbdf47376cc 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsCheckMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs index fedb705908d..aeede61f2e1 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberObjectsResponse : global::Microsoft.Graph.Beta.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberObjects.CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.CheckMemberObjects.CheckMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/DirectorySettingTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/DirectorySettingTemplateItemRequestBuilder.cs index 48b271c5129..79361c4af4e 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/DirectorySettingTemplateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/DirectorySettingTemplateItemRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DirectorySettingTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -188,7 +188,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DirectorySettingTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs index e4aa5bb70d2..d78be9de0f8 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberGroups.GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberGroups.GetMemberGroupsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs index 060441b0d5b..3a38bc8945f 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberGroups.GetMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberGroups.GetMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs index 54c60754195..b4fad14d76a 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsGetMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsResponse.cs index b1afb388357..c03ab052f40 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberGroups/GetMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberGroupsResponse : global::Microsoft.Graph.Beta.Dire /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberGroups.GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberGroups.GetMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs index 29ecacd74f3..b59e8da5905 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberObjects.GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberObjects.GetMemberObjectsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs index dea95fddb49..d68c797f51c 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberObjects.GetMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberObjects.GetMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs index 5a261c5bae2..ab87cc10ba5 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsResponse.cs index f303aa48b74..591a3916aad 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/Item/GetMemberObjects/GetMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberObjectsResponse : global::Microsoft.Graph.Beta.Dir /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberObjects.GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.Item.GetMemberObjects.GetMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/ValidateProperties/ValidatePropertiesPostRequestBody.cs index 3d3afb28625..768e8c879a1 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/ValidateProperties/ValidatePropertiesPostRequestBody.cs @@ -90,7 +90,7 @@ public ValidatePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.DirectorySettingTemplates.ValidateProperties.ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.DirectorySettingTemplates.ValidateProperties.ValidatePropertiesPostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("entityType", EntityType); writer.WriteStringValue("mailNickname", MailNickname); diff --git a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/ValidateProperties/ValidatePropertiesRequestBuilder.cs index 5c2af961a60..ea54c16d3d8 100644 --- a/src/Microsoft.Graph/Generated/DirectorySettingTemplates/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DirectorySettingTemplates/ValidateProperties/ValidatePropertiesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.DirectorySettingTemplat public async Task PostAsync(global::Microsoft.Graph.Beta.DirectorySettingTemplates.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.DirectorySettingTemplates.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DomainDnsRecords/DomainDnsRecordsRequestBuilder.cs b/src/Microsoft.Graph/Generated/DomainDnsRecords/DomainDnsRecordsRequestBuilder.cs index f29e08ec070..87d729d47b2 100644 --- a/src/Microsoft.Graph/Generated/DomainDnsRecords/DomainDnsRecordsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DomainDnsRecords/DomainDnsRecordsRequestBuilder.cs @@ -93,7 +93,7 @@ public DomainDnsRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DomainDnsRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DomainDnsRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/DomainDnsRecords/Item/DomainDnsRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/DomainDnsRecords/Item/DomainDnsRecordItemRequestBuilder.cs index a4b11ae712b..c7dea91678e 100644 --- a/src/Microsoft.Graph/Generated/DomainDnsRecords/Item/DomainDnsRecordItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/DomainDnsRecords/Item/DomainDnsRecordItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DomainDnsRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DomainDnsRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Domains/DomainsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Domains/DomainsRequestBuilder.cs index db631c2f60c..7dba0fdc3bb 100644 --- a/src/Microsoft.Graph/Generated/Domains/DomainsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Domains/DomainsRequestBuilder.cs @@ -95,7 +95,7 @@ public DomainsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Domain body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Domain body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Domains/Item/DomainItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Domains/Item/DomainItemRequestBuilder.cs index 100ff17d1fd..cf200b1c5b9 100644 --- a/src/Microsoft.Graph/Generated/Domains/Item/DomainItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Domains/Item/DomainItemRequestBuilder.cs @@ -159,7 +159,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Domain body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -220,7 +220,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Domain body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Domains/Item/FederationConfiguration/FederationConfigurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Domains/Item/FederationConfiguration/FederationConfigurationRequestBuilder.cs index 1e53f7038f3..01e45980a98 100644 --- a/src/Microsoft.Graph/Generated/Domains/Item/FederationConfiguration/FederationConfigurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Domains/Item/FederationConfiguration/FederationConfigurationRequestBuilder.cs @@ -95,7 +95,7 @@ public FederationConfigurationRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.InternalDomainFederation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.InternalDomainFederation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Domains/Item/FederationConfiguration/Item/InternalDomainFederationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Domains/Item/FederationConfiguration/Item/InternalDomainFederationItemRequestBuilder.cs index 962ba4944d3..c1cc2e850dd 100644 --- a/src/Microsoft.Graph/Generated/Domains/Item/FederationConfiguration/Item/InternalDomainFederationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Domains/Item/FederationConfiguration/Item/InternalDomainFederationItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InternalDomainFederation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InternalDomainFederation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Domains/Item/ForceDelete/ForceDeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Domains/Item/ForceDelete/ForceDeletePostRequestBody.cs index a24b9bf7665..3e35b2d6bc9 100644 --- a/src/Microsoft.Graph/Generated/Domains/Item/ForceDelete/ForceDeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Domains/Item/ForceDelete/ForceDeletePostRequestBody.cs @@ -42,7 +42,7 @@ public ForceDeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Domains.Item.ForceDelete.ForceDeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Domains.Item.ForceDelete.ForceDeletePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("disableUserAccounts", DisableUserAccounts); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Domains/Item/ForceDelete/ForceDeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Domains/Item/ForceDelete/ForceDeleteRequestBuilder.cs index 89974c25c4f..3558d098a55 100644 --- a/src/Microsoft.Graph/Generated/Domains/Item/ForceDelete/ForceDeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Domains/Item/ForceDelete/ForceDeleteRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Domains.Item.ForceDelet public async Task PostAsync(global::Microsoft.Graph.Beta.Domains.Item.ForceDelete.ForceDeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Domains.Item.ForceDelete.ForceDeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Domains/Item/Promote/PromotePostResponse.cs b/src/Microsoft.Graph/Generated/Domains/Item/Promote/PromotePostResponse.cs index ee6367b794d..c15c577f09e 100644 --- a/src/Microsoft.Graph/Generated/Domains/Item/Promote/PromotePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Domains/Item/Promote/PromotePostResponse.cs @@ -42,7 +42,7 @@ public PromotePostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Domains.Item.Promote.PromotePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Domains.Item.Promote.PromotePostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Domains/Item/Promote/PromoteResponse.cs b/src/Microsoft.Graph/Generated/Domains/Item/Promote/PromoteResponse.cs index 80f5f2dc5a5..4840541b818 100644 --- a/src/Microsoft.Graph/Generated/Domains/Item/Promote/PromoteResponse.cs +++ b/src/Microsoft.Graph/Generated/Domains/Item/Promote/PromoteResponse.cs @@ -20,7 +20,7 @@ public partial class PromoteResponse : global::Microsoft.Graph.Beta.Domains.Item /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Domains.Item.Promote.PromoteResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Domains.Item.Promote.PromoteResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Domains/Item/ServiceConfigurationRecords/Item/DomainDnsRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Domains/Item/ServiceConfigurationRecords/Item/DomainDnsRecordItemRequestBuilder.cs index dc341519439..9847aeb6083 100644 --- a/src/Microsoft.Graph/Generated/Domains/Item/ServiceConfigurationRecords/Item/DomainDnsRecordItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Domains/Item/ServiceConfigurationRecords/Item/DomainDnsRecordItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DomainDnsRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DomainDnsRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Domains/Item/ServiceConfigurationRecords/ServiceConfigurationRecordsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Domains/Item/ServiceConfigurationRecords/ServiceConfigurationRecordsRequestBuilder.cs index a26f2a7e164..cf169c44f96 100644 --- a/src/Microsoft.Graph/Generated/Domains/Item/ServiceConfigurationRecords/ServiceConfigurationRecordsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Domains/Item/ServiceConfigurationRecords/ServiceConfigurationRecordsRequestBuilder.cs @@ -94,7 +94,7 @@ public ServiceConfigurationRecordsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DomainDnsRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DomainDnsRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Domains/Item/SharedEmailDomainInvitations/Item/SharedEmailDomainInvitationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Domains/Item/SharedEmailDomainInvitations/Item/SharedEmailDomainInvitationItemRequestBuilder.cs index 733bd5f1796..05510456c85 100644 --- a/src/Microsoft.Graph/Generated/Domains/Item/SharedEmailDomainInvitations/Item/SharedEmailDomainInvitationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Domains/Item/SharedEmailDomainInvitations/Item/SharedEmailDomainInvitationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SharedEmailDomainInvitation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SharedEmailDomainInvitation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Domains/Item/SharedEmailDomainInvitations/SharedEmailDomainInvitationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Domains/Item/SharedEmailDomainInvitations/SharedEmailDomainInvitationsRequestBuilder.cs index 474aa2fa554..976aaa52c3f 100644 --- a/src/Microsoft.Graph/Generated/Domains/Item/SharedEmailDomainInvitations/SharedEmailDomainInvitationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Domains/Item/SharedEmailDomainInvitations/SharedEmailDomainInvitationsRequestBuilder.cs @@ -93,7 +93,7 @@ public SharedEmailDomainInvitationsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SharedEmailDomainInvitation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SharedEmailDomainInvitation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Domains/Item/VerificationDnsRecords/Item/DomainDnsRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Domains/Item/VerificationDnsRecords/Item/DomainDnsRecordItemRequestBuilder.cs index 4195e13ab02..2824a95ed18 100644 --- a/src/Microsoft.Graph/Generated/Domains/Item/VerificationDnsRecords/Item/DomainDnsRecordItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Domains/Item/VerificationDnsRecords/Item/DomainDnsRecordItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DomainDnsRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DomainDnsRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Domains/Item/VerificationDnsRecords/VerificationDnsRecordsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Domains/Item/VerificationDnsRecords/VerificationDnsRecordsRequestBuilder.cs index c66eb800b2b..16b2b32be58 100644 --- a/src/Microsoft.Graph/Generated/Domains/Item/VerificationDnsRecords/VerificationDnsRecordsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Domains/Item/VerificationDnsRecords/VerificationDnsRecordsRequestBuilder.cs @@ -94,7 +94,7 @@ public VerificationDnsRecordsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DomainDnsRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DomainDnsRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/DrivesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/DrivesRequestBuilder.cs index 597409a6e0e..bd469303835 100644 --- a/src/Microsoft.Graph/Generated/Drives/DrivesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/DrivesRequestBuilder.cs @@ -87,7 +87,7 @@ public DrivesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Drive body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -129,7 +129,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Drive body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Activities/ActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Activities/ActivitiesRequestBuilder.cs index cf03212a3ac..8a39a31d22a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Activities/ActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Activities/ActivitiesRequestBuilder.cs @@ -93,7 +93,7 @@ public ActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs index 7844c0f86d9..cbfb75ab233 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs index 1f979cb4a3f..0d5effcb793 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Activities/Item/ItemActivityOLDItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Activities/Item/ItemActivityOLDItemRequestBuilder.cs index 778e9da90d7..53c793429c3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Activities/Item/ItemActivityOLDItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Activities/Item/ItemActivityOLDItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Bundles/BundlesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Bundles/BundlesRequestBuilder.cs index 69acd3d3f7f..7654f6165af 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Bundles/BundlesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Bundles/BundlesRequestBuilder.cs @@ -93,7 +93,7 @@ public BundlesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DriveItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DriveItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Bundles/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Bundles/Item/Content/ContentRequestBuilder.cs index cd08e012227..959573fb397 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Bundles/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Bundles/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Bundles/Item/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Bundles/Item/ContentStream/ContentStreamRequestBuilder.cs index 2ae78024464..c6bf138ce9e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Bundles/Item/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Bundles/Item/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 6b20c71cf10..8656f5d0de2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/DriveItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/DriveItemRequestBuilder.cs index 27e5711eeba..1bb259ddb2d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/DriveItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/DriveItemRequestBuilder.cs @@ -163,7 +163,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Drive body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -234,7 +234,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Drive body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Following/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Following/Item/Content/ContentRequestBuilder.cs index a63288cb877..24bd952ebcd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Following/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Following/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Following/Item/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Following/Item/ContentStream/ContentStreamRequestBuilder.cs index 9cce965e648..9deaa5669db 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Following/Item/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Following/Item/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/AnalyticsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/AnalyticsRequestBuilder.cs index dddb49e72ba..51df233d950 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/AnalyticsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/AnalyticsRequestBuilder.cs @@ -115,7 +115,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemAnalytics body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -176,7 +176,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemAnalytics body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/ActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/ActivitiesRequestBuilder.cs index 3eb2c452191..5093cde46e9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/ActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/ActivitiesRequestBuilder.cs @@ -93,7 +93,7 @@ public ActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs index 829e71305cb..0dac34593ef 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs index 4f3cd96c968..dd31ee48583 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/Item/ItemActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/Item/ItemActivityItemRequestBuilder.cs index 08dc32a21f0..822a7a1e1bb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/Item/ItemActivityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/Activities/Item/ItemActivityItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/ItemActivityStatItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/ItemActivityStatItemRequestBuilder.cs index 648e2dcda99..a524a240604 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/ItemActivityStatItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/Item/ItemActivityStatItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemActivityStat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivityStat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/ItemActivityStatsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/ItemActivityStatsRequestBuilder.cs index fa38ecd7e23..7f986291289 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/ItemActivityStatsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Analytics/ItemActivityStats/ItemActivityStatsRequestBuilder.cs @@ -93,7 +93,7 @@ public ItemActivityStatsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemActivityStat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivityStat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/AssignSensitivityLabel/AssignSensitivityLabelPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/AssignSensitivityLabel/AssignSensitivityLabelPostRequestBody.cs index 082f85131d2..0f516b2e436 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/AssignSensitivityLabel/AssignSensitivityLabelPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/AssignSensitivityLabel/AssignSensitivityLabelPostRequestBody.cs @@ -75,7 +75,7 @@ public AssignSensitivityLabelPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.AssignSensitivityLabel.AssignSensitivityLabelPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.AssignSensitivityLabel.AssignSensitivityLabelPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("assignmentMethod", AssignmentMethod); writer.WriteStringValue("justificationText", JustificationText); writer.WriteStringValue("sensitivityLabelId", SensitivityLabelId); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/AssignSensitivityLabel/AssignSensitivityLabelRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/AssignSensitivityLabel/AssignSensitivityLabelRequestBuilder.cs index 664e0205fa9..ea2d4440ae2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/AssignSensitivityLabel/AssignSensitivityLabelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/AssignSensitivityLabel/AssignSensitivityLabelRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.AssignSensitivityLabel.AssignSensitivityLabelPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.AssignSensitivityLabel.AssignSensitivityLabelPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Checkin/CheckinPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Checkin/CheckinPostRequestBody.cs index 6c320ce262d..ad4e3c3c8d2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Checkin/CheckinPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Checkin/CheckinPostRequestBody.cs @@ -68,7 +68,7 @@ public CheckinPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Checkin.CheckinPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Checkin.CheckinPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("checkInAs", CheckInAs); writer.WriteStringValue("comment", Comment); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Checkin/CheckinRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Checkin/CheckinRequestBuilder.cs index e5392222be5..ea9afa1422b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Checkin/CheckinRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Checkin/CheckinRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Checkin.CheckinPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Checkin.CheckinPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Children/ChildrenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Children/ChildrenRequestBuilder.cs index 925e07b62f1..328ad4d5f17 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Children/ChildrenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Children/ChildrenRequestBuilder.cs @@ -93,7 +93,7 @@ public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DriveItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DriveItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Children/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Children/Item/Content/ContentRequestBuilder.cs index 0d25a9d3006..9d7a83c23e9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Children/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Children/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Children/Item/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Children/Item/ContentStream/ContentStreamRequestBuilder.cs index 974ca2141a7..123e0eea937 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Children/Item/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Children/Item/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Content/ContentRequestBuilder.cs index 9d9863424c2..da3ea38a040 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/ContentStream/ContentStreamRequestBuilder.cs index d685905c02b..2395584871d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Copy/CopyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Copy/CopyPostRequestBody.cs index 58de5c6d980..b9496e74950 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Copy/CopyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Copy/CopyPostRequestBody.cs @@ -81,7 +81,7 @@ public CopyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Copy.CopyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Copy.CopyPostRequestBody(); } /// @@ -104,7 +104,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("childrenOnly", ChildrenOnly); writer.WriteBoolValue("includeAllVersionHistory", IncludeAllVersionHistory); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Copy/CopyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Copy/CopyRequestBuilder.cs index e87c4ca4ed1..024d259cf2f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Copy/CopyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Copy/CopyRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Copy.CopyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Copy.CopyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateLink/CreateLinkPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateLink/CreateLinkPostRequestBody.cs index 2cdb011d67e..4adcbc53e7f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateLink/CreateLinkPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateLink/CreateLinkPostRequestBody.cs @@ -135,7 +135,7 @@ public CreateLinkPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.CreateLink.CreateLinkPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.CreateLink.CreateLinkPostRequestBody(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteStringValue("message", Message); writer.WriteStringValue("password", Password); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateLink/CreateLinkRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateLink/CreateLinkRequestBuilder.cs index 45125d2994e..4ee38665214 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateLink/CreateLinkRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateLink/CreateLinkRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateLinkRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.CreateLink.CreateLinkPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.CreateLink.CreateLinkPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index c8d8ff20382..801610f5e6c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("item", Item); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 9d83380a0ea..40212949f61 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -51,7 +51,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index a46b1c57a27..0dcc187febb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Delta/DeltaGetResponse.cs index b81ea3abe5d..b0b78f1436e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Delta/DeltaResponse.cs index 2450db4da1a..2055030ca60 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DeltaWithToken/DeltaWithTokenGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DeltaWithToken/DeltaWithTokenGetResponse.cs index fa275c7dfa2..c8a6b4cfd7e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DeltaWithToken/DeltaWithTokenGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DeltaWithToken/DeltaWithTokenGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaWithTokenGetResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.DeltaWithToken.DeltaWithTokenGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.DeltaWithToken.DeltaWithTokenGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DeltaWithToken/DeltaWithTokenResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DeltaWithToken/DeltaWithTokenResponse.cs index 45320668d44..c2ab20bc969 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DeltaWithToken/DeltaWithTokenResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DeltaWithToken/DeltaWithTokenResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaWithTokenResponse : global::Microsoft.Graph.Beta.Drive /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.DeltaWithToken.DeltaWithTokenResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.DeltaWithToken.DeltaWithTokenResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.cs index 426538bc167..135ae9f65d9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/DriveItemItemRequestBuilder.cs @@ -309,7 +309,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DriveItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -380,7 +380,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DriveItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Extensions/ExtensionsRequestBuilder.cs index 11572caa7b4..b8b7cda9ebe 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index b2ce7a5d180..3453e6a9501 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs index 6a970c61494..6f0db56fb47 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWith /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs index 92361eb9c54..e0d259c8f58 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs @@ -20,7 +20,7 @@ public partial class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWith /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InvitePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InvitePostRequestBody.cs index f5b6b09f567..32e4f9713a7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InvitePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InvitePostRequestBody.cs @@ -135,7 +135,7 @@ public InvitePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Invite.InvitePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Invite.InvitePostRequestBody(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("expirationDateTime", ExpirationDateTime); writer.WriteStringValue("message", Message); writer.WriteStringValue("password", Password); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InvitePostResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InvitePostResponse.cs index 737b1957159..d33396e09a2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InvitePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InvitePostResponse.cs @@ -36,7 +36,7 @@ public partial class InvitePostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Invite.InvitePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Invite.InvitePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InviteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InviteRequestBuilder.cs index 535f29870c7..0b499551780 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InviteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InviteRequestBuilder.cs @@ -51,7 +51,7 @@ public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsInvitePostResponseAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Invite.InvitePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Invite.InvitePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Invite.InvitePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InviteResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InviteResponse.cs index 2f1f73a201b..935bcb3a7a4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InviteResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Invite/InviteResponse.cs @@ -20,7 +20,7 @@ public partial class InviteResponse : global::Microsoft.Graph.Beta.Drives.Item.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Invite.InviteResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Invite.InviteResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index d4bc7a7c87b..d103ec34222 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantPostRequestBody.cs index 059fc320213..fe52db3c521 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantPostRequestBody.cs @@ -69,7 +69,7 @@ public GrantPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Permissions.Item.Grant.GrantPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Permissions.Item.Grant.GrantPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("recipients", Recipients); writer.WriteCollectionOfPrimitiveValues("roles", Roles); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantPostResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantPostResponse.cs index 1f588a06c6c..f998ad8fd09 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantPostResponse.cs @@ -36,7 +36,7 @@ public partial class GrantPostResponse : global::Microsoft.Graph.Beta.Models.Bas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Permissions.Item.Grant.GrantPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Permissions.Item.Grant.GrantPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantRequestBuilder.cs index a839cfe6aae..f748aa63adf 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantRequestBuilder.cs @@ -51,7 +51,7 @@ public GrantRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsGrantPostResponseAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GrantRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantResponse.cs index 186a834bbbf..80455f4d2f4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/Grant/GrantResponse.cs @@ -20,7 +20,7 @@ public partial class GrantResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Permissions.Item.Grant.GrantResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Permissions.Item.Grant.GrantResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/PermissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/PermissionItemRequestBuilder.cs index 8d2beb1bf5e..2aaaa7d5cd0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/PermissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/PermissionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs index 6b720661ba6..7aa10c988d3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs @@ -53,7 +53,7 @@ public RevokeGrantsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("grantees", Grantees); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs index 18e5732dcdb..401b34b9183 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs @@ -52,7 +52,7 @@ public RevokeGrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/PermissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/PermissionsRequestBuilder.cs index 98e4d37ce97..7e9012ca5d0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/PermissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Permissions/PermissionsRequestBuilder.cs @@ -93,7 +93,7 @@ public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Preview/PreviewPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Preview/PreviewPostRequestBody.cs index 45551188b43..06e72de6502 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Preview/PreviewPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Preview/PreviewPostRequestBody.cs @@ -86,7 +86,7 @@ public PreviewPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Preview.PreviewPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Preview.PreviewPostRequestBody(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowEdit", AllowEdit); writer.WriteBoolValue("chromeless", Chromeless); writer.WriteStringValue("page", Page); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Preview/PreviewRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Preview/PreviewRequestBuilder.cs index 97cb540eec9..b62a606bc60 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Preview/PreviewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Preview/PreviewRequestBuilder.cs @@ -51,7 +51,7 @@ public PreviewRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Preview.PreviewPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Preview.PreviewPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Restore/RestorePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Restore/RestorePostRequestBody.cs index 3fe5fbc23b0..5d72b84cd2b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Restore/RestorePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Restore/RestorePostRequestBody.cs @@ -69,7 +69,7 @@ public RestorePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Restore.RestorePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Restore.RestorePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteObjectValue("parentReference", ParentReference); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Restore/RestoreRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Restore/RestoreRequestBuilder.cs index 00ada7a475f..eb588f3f089 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Restore/RestoreRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Restore/RestoreRequestBuilder.cs @@ -52,7 +52,7 @@ public RestoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Restore.RestorePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Restore.RestorePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/RetentionLabel/RetentionLabelRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/RetentionLabel/RetentionLabelRequestBuilder.cs index 46069cb2337..759a604edef 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/RetentionLabel/RetentionLabelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/RetentionLabel/RetentionLabelRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemRetentionLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemRetentionLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/SearchWithQ/SearchWithQGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/SearchWithQ/SearchWithQGetResponse.cs index 5911cef834d..b7f81ac1463 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/SearchWithQ/SearchWithQGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/SearchWithQ/SearchWithQGetResponse.cs @@ -36,7 +36,7 @@ public partial class SearchWithQGetResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.SearchWithQ.SearchWithQGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.SearchWithQ.SearchWithQGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/SearchWithQ/SearchWithQResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/SearchWithQ/SearchWithQResponse.cs index fbb2b478558..fc88782e7e4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/SearchWithQ/SearchWithQResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/SearchWithQ/SearchWithQResponse.cs @@ -20,7 +20,7 @@ public partial class SearchWithQResponse : global::Microsoft.Graph.Beta.Drives.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.SearchWithQ.SearchWithQResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.SearchWithQ.SearchWithQResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyGetResponse.cs index 20525f540df..39f41c1fc7c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyGetResponse.cs @@ -52,7 +52,7 @@ public GetVapidPublicKeyGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Subscriptions.GetVapidPublicKey.GetVapidPublicKeyGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Subscriptions.GetVapidPublicKey.GetVapidPublicKeyGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyResponse.cs index 9687511cf49..7bb31eae676 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyResponse.cs @@ -20,7 +20,7 @@ public partial class GetVapidPublicKeyResponse : global::Microsoft.Graph.Beta.Dr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Subscriptions.GetVapidPublicKey.GetVapidPublicKeyResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Subscriptions.GetVapidPublicKey.GetVapidPublicKeyResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/Item/SubscriptionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/Item/SubscriptionItemRequestBuilder.cs index 517902074a8..3dd127636fa 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/Item/SubscriptionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/Item/SubscriptionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Subscription body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Subscription body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/SubscriptionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/SubscriptionsRequestBuilder.cs index 67351dc67f1..91c15e7bae8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/SubscriptionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Subscriptions/SubscriptionsRequestBuilder.cs @@ -99,7 +99,7 @@ public SubscriptionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Subscription body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Subscription body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Thumbnails/Item/ThumbnailSetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Thumbnails/Item/ThumbnailSetItemRequestBuilder.cs index a60af362aa2..84f9d68d6b9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Thumbnails/Item/ThumbnailSetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Thumbnails/Item/ThumbnailSetItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ThumbnailSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ThumbnailSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Thumbnails/ThumbnailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Thumbnails/ThumbnailsRequestBuilder.cs index e386556ca8b..64d6a4c9315 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Thumbnails/ThumbnailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Thumbnails/ThumbnailsRequestBuilder.cs @@ -93,7 +93,7 @@ public ThumbnailsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ThumbnailSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ThumbnailSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/ValidatePermission/ValidatePermissionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/ValidatePermission/ValidatePermissionPostRequestBody.cs index 6623f63c42c..3b05f2cc189 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/ValidatePermission/ValidatePermissionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/ValidatePermission/ValidatePermissionPostRequestBody.cs @@ -68,7 +68,7 @@ public ValidatePermissionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.ValidatePermission.ValidatePermissionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.ValidatePermission.ValidatePermissionPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("challengeToken", ChallengeToken); writer.WriteStringValue("password", Password); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/ValidatePermission/ValidatePermissionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/ValidatePermission/ValidatePermissionRequestBuilder.cs index 2f33cca8e70..590cc6858f1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/ValidatePermission/ValidatePermissionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/ValidatePermission/ValidatePermissionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.ValidatePermission.ValidatePermissionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.ValidatePermission.ValidatePermissionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Versions/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Versions/Item/Content/ContentRequestBuilder.cs index ee9fc6fd286..30b3946ee6e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Versions/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Versions/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Versions/Item/DriveItemVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Versions/Item/DriveItemVersionItemRequestBuilder.cs index f6390c8dd05..cd31060cc9a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Versions/Item/DriveItemVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Versions/Item/DriveItemVersionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DriveItemVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DriveItemVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Versions/VersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Versions/VersionsRequestBuilder.cs index b0c0725fa4a..7bc173adc98 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Versions/VersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Versions/VersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public VersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DriveItemVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DriveItemVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Application/ApplicationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Application/ApplicationRequestBuilder.cs index 31d71300255..20e55886641 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Application/ApplicationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Application/ApplicationRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookApplication body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookApplication body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Application/Calculate/CalculatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Application/Calculate/CalculatePostRequestBody.cs index f4120dc0141..33099080e95 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Application/Calculate/CalculatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Application/Calculate/CalculatePostRequestBody.cs @@ -52,7 +52,7 @@ public CalculatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Application.Calculate.CalculatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Application.Calculate.CalculatePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("calculationType", CalculationType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Application/Calculate/CalculateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Application/Calculate/CalculateRequestBuilder.cs index 14457fc5131..7a8b8d7d174 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Application/Calculate/CalculateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Application/Calculate/CalculateRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Application.Calculate.CalculatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Application.Calculate.CalculatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/CommentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/CommentsRequestBuilder.cs index af259a3468f..bd737f165eb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/CommentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/CommentsRequestBuilder.cs @@ -93,7 +93,7 @@ public CommentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookComment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookComment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs index 8593e607988..588eb1ab3ac 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs @@ -84,7 +84,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.Replies.Item.TaskNamespace.Changes.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.Replies.Item.TaskNamespace.Changes.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -104,7 +104,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/Count/CountGetResponse.cs index a58f3c9ae1c..b304e5183ef 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.Replies.Item.TaskNamespace.Changes.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.Replies.Item.TaskNamespace.Changes.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/Count/CountResponse.cs index a599a72a966..710b32f496a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.Replies.Item.TaskNamespace.Changes.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.Replies.Item.TaskNamespace.Changes.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs index 1c76b46dfad..fd84cffc208 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/CommentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/CommentRequestBuilder.cs index ae42941fae3..25485bc3f1c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/CommentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/CommentRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookComment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookComment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/ChangesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/ChangesRequestBuilder.cs index 4b653e67bd8..7816cfc26e6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/ChangesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/ChangesRequestBuilder.cs @@ -84,7 +84,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.Replies.Item.TaskNamespace.Comment.TaskNamespace.Changes.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.Replies.Item.TaskNamespace.Comment.TaskNamespace.Changes.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -104,7 +104,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/Count/CountGetResponse.cs index cf8e5ae97ca..8e593d1a74a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.Replies.Item.TaskNamespace.Comment.TaskNamespace.Changes.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.Replies.Item.TaskNamespace.Comment.TaskNamespace.Changes.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/Count/CountResponse.cs index 25653cea242..c4dbcec5714 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.Replies.Item.TaskNamespace.Comment.TaskNamespace.Changes.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.Replies.Item.TaskNamespace.Comment.TaskNamespace.Changes.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs index 4031cafb024..e2980dff5f0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/TaskRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/TaskRequestBuilder.cs index 540a35f5f50..48a17c9efad 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/TaskRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/Comment/TaskNamespace/TaskRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/TaskRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/TaskRequestBuilder.cs index 15a15049356..24c7b7b4a63 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/TaskRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/TaskNamespace/TaskRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/WorkbookCommentReplyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/WorkbookCommentReplyItemRequestBuilder.cs index 75e53e83d39..55c0c628632 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/WorkbookCommentReplyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/Item/WorkbookCommentReplyItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookCommentReply body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookCommentReply body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/RepliesRequestBuilder.cs index 28eb6f94bd0..83d3d5f594e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/Replies/RepliesRequestBuilder.cs @@ -93,7 +93,7 @@ public RepliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookCommentReply body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookCommentReply body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs index 992887242df..6afcb3d8f8f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs @@ -84,7 +84,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.TaskNamespace.Changes.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.TaskNamespace.Changes.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -104,7 +104,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/Count/CountGetResponse.cs index ed0bfd8c8b0..b155e12243f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.TaskNamespace.Changes.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.TaskNamespace.Changes.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/Count/CountResponse.cs index 48f87a3d44e..a92cfcb1819 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.TaskNamespace.Changes.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.TaskNamespace.Changes.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs index 88956a70982..109efe0b90b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/CommentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/CommentRequestBuilder.cs index 3a6387956ed..49b69a0dc0d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/CommentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/CommentRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookComment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookComment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs index 7dc7a9ff865..60f35c6a2e3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs @@ -84,7 +84,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.TaskNamespace.Comment.Replies.Item.TaskNamespace.Changes.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.TaskNamespace.Comment.Replies.Item.TaskNamespace.Changes.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -104,7 +104,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/Count/CountGetResponse.cs index 66c6a3e63e8..879b80b3432 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.TaskNamespace.Comment.Replies.Item.TaskNamespace.Changes.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.TaskNamespace.Comment.Replies.Item.TaskNamespace.Changes.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/Count/CountResponse.cs index 4da3abc89ee..3c6bbd4ef53 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.TaskNamespace.Comment.Replies.Item.TaskNamespace.Changes.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Comments.Item.TaskNamespace.Comment.Replies.Item.TaskNamespace.Changes.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs index 06fd80af0f6..c398829716a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/TaskRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/TaskRequestBuilder.cs index 5465bddc132..e0c0a35e2e8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/TaskRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/TaskNamespace/TaskRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/WorkbookCommentReplyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/WorkbookCommentReplyItemRequestBuilder.cs index 84b8a827109..50e5a03d943 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/WorkbookCommentReplyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/Item/WorkbookCommentReplyItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookCommentReply body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookCommentReply body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/RepliesRequestBuilder.cs index 3f4273fe7dd..c848249313e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/Comment/Replies/RepliesRequestBuilder.cs @@ -93,7 +93,7 @@ public RepliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookCommentReply body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookCommentReply body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/TaskRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/TaskRequestBuilder.cs index 5d18bb27468..cacd9a66a85 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/TaskRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/TaskNamespace/TaskRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/WorkbookCommentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/WorkbookCommentItemRequestBuilder.cs index b070c59cae1..bdb20bb7082 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/WorkbookCommentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Comments/Item/WorkbookCommentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookComment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookComment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/CreateSession/CreateSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/CreateSession/CreateSessionPostRequestBody.cs index 5533145e445..56a79bc7fa8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/CreateSession/CreateSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/CreateSession/CreateSessionPostRequestBody.cs @@ -42,7 +42,7 @@ public CreateSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.CreateSession.CreateSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.CreateSession.CreateSessionPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("persistChanges", PersistChanges); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/CreateSession/CreateSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/CreateSession/CreateSessionRequestBuilder.cs index 2cbd1f3556e..a16d49c0a13 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/CreateSession/CreateSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/CreateSession/CreateSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateSessionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.CreateSession.CreateSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.CreateSession.CreateSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Abs/AbsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Abs/AbsPostRequestBody.cs index d389472257b..9edb9102345 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Abs/AbsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Abs/AbsPostRequestBody.cs @@ -52,7 +52,7 @@ public AbsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Abs.AbsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Abs.AbsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Abs/AbsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Abs/AbsRequestBuilder.cs index 9b8794b6876..603b11e78a3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Abs/AbsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Abs/AbsRequestBuilder.cs @@ -51,7 +51,7 @@ public AbsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Abs.AbsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Abs.AbsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrInt/AccrIntPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrInt/AccrIntPostRequestBody.cs index 587db45b67d..c01941d3f4d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrInt/AccrIntPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrInt/AccrIntPostRequestBody.cs @@ -164,7 +164,7 @@ public AccrIntPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AccrInt.AccrIntPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AccrInt.AccrIntPostRequestBody(); } /// @@ -191,7 +191,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("calcMethod", CalcMethod); writer.WriteObjectValue("firstInterest", FirstInterest); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrInt/AccrIntRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrInt/AccrIntRequestBuilder.cs index 90a8b71b83f..002d44af49a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrInt/AccrIntRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrInt/AccrIntRequestBuilder.cs @@ -51,7 +51,7 @@ public AccrIntRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AccrInt.AccrIntPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AccrInt.AccrIntPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrIntM/AccrIntMPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrIntM/AccrIntMPostRequestBody.cs index 78c8ddba7b5..fcec4a8b705 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrIntM/AccrIntMPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrIntM/AccrIntMPostRequestBody.cs @@ -116,7 +116,7 @@ public AccrIntMPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AccrIntM.AccrIntMPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AccrIntM.AccrIntMPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("issue", Issue); writer.WriteObjectValue("par", Par); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrIntM/AccrIntMRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrIntM/AccrIntMRequestBuilder.cs index 4f01ad63b96..3eb19d685b0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrIntM/AccrIntMRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AccrIntM/AccrIntMRequestBuilder.cs @@ -51,7 +51,7 @@ public AccrIntMRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AccrIntM.AccrIntMPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AccrIntM.AccrIntMPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acos/AcosPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acos/AcosPostRequestBody.cs index 6c64175f597..8ec13ca28bc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acos/AcosPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acos/AcosPostRequestBody.cs @@ -52,7 +52,7 @@ public AcosPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acos.AcosPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acos.AcosPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acos/AcosRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acos/AcosRequestBuilder.cs index 5c0164ceccf..bab1867b371 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acos/AcosRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acos/AcosRequestBuilder.cs @@ -51,7 +51,7 @@ public AcosRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acos.AcosPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acos.AcosPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acosh/AcoshPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acosh/AcoshPostRequestBody.cs index 8e959cc06a8..117532fc812 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acosh/AcoshPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acosh/AcoshPostRequestBody.cs @@ -52,7 +52,7 @@ public AcoshPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acosh.AcoshPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acosh.AcoshPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acosh/AcoshRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acosh/AcoshRequestBuilder.cs index 9383ba52d52..09372c3172a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acosh/AcoshRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acosh/AcoshRequestBuilder.cs @@ -51,7 +51,7 @@ public AcoshRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acosh.AcoshPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acosh.AcoshPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acot/AcotPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acot/AcotPostRequestBody.cs index 076ec9cd348..f20975be1ae 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acot/AcotPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acot/AcotPostRequestBody.cs @@ -52,7 +52,7 @@ public AcotPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acot.AcotPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acot.AcotPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acot/AcotRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acot/AcotRequestBuilder.cs index 38e66eaf26f..8588a379115 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acot/AcotRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acot/AcotRequestBuilder.cs @@ -51,7 +51,7 @@ public AcotRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acot.AcotPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acot.AcotPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acoth/AcothPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acoth/AcothPostRequestBody.cs index 479b3330724..888a70844e8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acoth/AcothPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acoth/AcothPostRequestBody.cs @@ -52,7 +52,7 @@ public AcothPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acoth.AcothPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acoth.AcothPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acoth/AcothRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acoth/AcothRequestBuilder.cs index 4cd37e7b240..8a1c9554c2b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acoth/AcothRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Acoth/AcothRequestBuilder.cs @@ -51,7 +51,7 @@ public AcothRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acoth.AcothPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Acoth.AcothPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorDegrc/AmorDegrcPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorDegrc/AmorDegrcPostRequestBody.cs index 4bb9320d6ec..b59c20656b5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorDegrc/AmorDegrcPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorDegrc/AmorDegrcPostRequestBody.cs @@ -148,7 +148,7 @@ public AmorDegrcPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AmorDegrc.AmorDegrcPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AmorDegrc.AmorDegrcPostRequestBody(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("cost", Cost); writer.WriteObjectValue("datePurchased", DatePurchased); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorDegrc/AmorDegrcRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorDegrc/AmorDegrcRequestBuilder.cs index beb8162ce5d..5a38da0b874 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorDegrc/AmorDegrcRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorDegrc/AmorDegrcRequestBuilder.cs @@ -51,7 +51,7 @@ public AmorDegrcRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AmorDegrc.AmorDegrcPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AmorDegrc.AmorDegrcPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorLinc/AmorLincPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorLinc/AmorLincPostRequestBody.cs index 2698fd10d68..c201c7e9308 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorLinc/AmorLincPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorLinc/AmorLincPostRequestBody.cs @@ -148,7 +148,7 @@ public AmorLincPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AmorLinc.AmorLincPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AmorLinc.AmorLincPostRequestBody(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("cost", Cost); writer.WriteObjectValue("datePurchased", DatePurchased); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorLinc/AmorLincRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorLinc/AmorLincRequestBuilder.cs index 047bad4c6ce..b60423c0a35 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorLinc/AmorLincRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AmorLinc/AmorLincRequestBuilder.cs @@ -51,7 +51,7 @@ public AmorLincRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AmorLinc.AmorLincPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AmorLinc.AmorLincPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/And/AndPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/And/AndPostRequestBody.cs index e218b5ef344..025f9e7874a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/And/AndPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/And/AndPostRequestBody.cs @@ -52,7 +52,7 @@ public AndPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.And.AndPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.And.AndPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/And/AndRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/And/AndRequestBuilder.cs index 55284c71b22..ad41d80ee60 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/And/AndRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/And/AndRequestBuilder.cs @@ -51,7 +51,7 @@ public AndRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.And.AndPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.And.AndPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Arabic/ArabicPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Arabic/ArabicPostRequestBody.cs index b1715f7136a..d015a328a6c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Arabic/ArabicPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Arabic/ArabicPostRequestBody.cs @@ -52,7 +52,7 @@ public ArabicPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Arabic.ArabicPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Arabic.ArabicPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Arabic/ArabicRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Arabic/ArabicRequestBuilder.cs index 6f4d6e4fcea..75c85a71c64 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Arabic/ArabicRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Arabic/ArabicRequestBuilder.cs @@ -51,7 +51,7 @@ public ArabicRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Arabic.ArabicPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Arabic.ArabicPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Areas/AreasPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Areas/AreasPostRequestBody.cs index 59e8a7e9981..cfdbe43e88a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Areas/AreasPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Areas/AreasPostRequestBody.cs @@ -52,7 +52,7 @@ public AreasPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Areas.AreasPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Areas.AreasPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("reference", Reference); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Areas/AreasRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Areas/AreasRequestBuilder.cs index a9deec0f2b8..cc16fa97904 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Areas/AreasRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Areas/AreasRequestBuilder.cs @@ -51,7 +51,7 @@ public AreasRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Areas.AreasPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Areas.AreasPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asc/AscPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asc/AscPostRequestBody.cs index 5553e85855c..6b8f1366f05 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asc/AscPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asc/AscPostRequestBody.cs @@ -52,7 +52,7 @@ public AscPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Asc.AscPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Asc.AscPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asc/AscRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asc/AscRequestBuilder.cs index 056eaa3d63c..2bd2c4c993d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asc/AscRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asc/AscRequestBuilder.cs @@ -51,7 +51,7 @@ public AscRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Asc.AscPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Asc.AscPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asin/AsinPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asin/AsinPostRequestBody.cs index f95d00fd9c5..e8716a9c973 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asin/AsinPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asin/AsinPostRequestBody.cs @@ -52,7 +52,7 @@ public AsinPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Asin.AsinPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Asin.AsinPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asin/AsinRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asin/AsinRequestBuilder.cs index 01637385485..1593896cb5e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asin/AsinRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asin/AsinRequestBuilder.cs @@ -51,7 +51,7 @@ public AsinRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Asin.AsinPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Asin.AsinPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asinh/AsinhPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asinh/AsinhPostRequestBody.cs index 86b72b09429..9b99a96d9d8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asinh/AsinhPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asinh/AsinhPostRequestBody.cs @@ -52,7 +52,7 @@ public AsinhPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Asinh.AsinhPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Asinh.AsinhPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asinh/AsinhRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asinh/AsinhRequestBuilder.cs index 4c8aed20fd3..1c31f64b3cc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asinh/AsinhRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Asinh/AsinhRequestBuilder.cs @@ -51,7 +51,7 @@ public AsinhRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Asinh.AsinhPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Asinh.AsinhPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan/AtanPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan/AtanPostRequestBody.cs index d805bb13b03..c00d473c6c1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan/AtanPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan/AtanPostRequestBody.cs @@ -52,7 +52,7 @@ public AtanPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Atan.AtanPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Atan.AtanPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan/AtanRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan/AtanRequestBuilder.cs index 013e5cd1fb6..c26ae7d0a10 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan/AtanRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan/AtanRequestBuilder.cs @@ -51,7 +51,7 @@ public AtanRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Atan.AtanPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Atan.AtanPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan2/Atan2PostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan2/Atan2PostRequestBody.cs index 80e6bb14dbc..5fc8cdd22ff 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan2/Atan2PostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan2/Atan2PostRequestBody.cs @@ -68,7 +68,7 @@ public Atan2PostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Atan2.Atan2PostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Atan2.Atan2PostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("xNum", XNum); writer.WriteObjectValue("yNum", YNum); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan2/Atan2RequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan2/Atan2RequestBuilder.cs index d12de54db87..e19812be741 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan2/Atan2RequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atan2/Atan2RequestBuilder.cs @@ -51,7 +51,7 @@ public Atan2RequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Atan2.Atan2PostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Atan2.Atan2PostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atanh/AtanhPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atanh/AtanhPostRequestBody.cs index e6a2af095a5..e919d843345 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atanh/AtanhPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atanh/AtanhPostRequestBody.cs @@ -52,7 +52,7 @@ public AtanhPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Atanh.AtanhPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Atanh.AtanhPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atanh/AtanhRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atanh/AtanhRequestBuilder.cs index df703270341..30d7cd55dbe 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atanh/AtanhRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Atanh/AtanhRequestBuilder.cs @@ -51,7 +51,7 @@ public AtanhRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Atanh.AtanhPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Atanh.AtanhPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AveDev/AveDevPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AveDev/AveDevPostRequestBody.cs index 822d7723bb8..289d9777fa5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AveDev/AveDevPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AveDev/AveDevPostRequestBody.cs @@ -52,7 +52,7 @@ public AveDevPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AveDev.AveDevPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AveDev.AveDevPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AveDev/AveDevRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AveDev/AveDevRequestBuilder.cs index 5408f12331e..f8bdcc50cc5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AveDev/AveDevRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AveDev/AveDevRequestBuilder.cs @@ -51,7 +51,7 @@ public AveDevRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AveDev.AveDevPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AveDev.AveDevPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Average/AveragePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Average/AveragePostRequestBody.cs index 069a8ad02b2..159eb98ed56 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Average/AveragePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Average/AveragePostRequestBody.cs @@ -52,7 +52,7 @@ public AveragePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Average.AveragePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Average.AveragePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Average/AverageRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Average/AverageRequestBuilder.cs index 6a046b3b69b..9b98fa414f2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Average/AverageRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Average/AverageRequestBuilder.cs @@ -51,7 +51,7 @@ public AverageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Average.AveragePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Average.AveragePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageA/AverageAPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageA/AverageAPostRequestBody.cs index 66de8e129f8..6eeb58b3541 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageA/AverageAPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageA/AverageAPostRequestBody.cs @@ -52,7 +52,7 @@ public AverageAPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AverageA.AverageAPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AverageA.AverageAPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageA/AverageARequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageA/AverageARequestBuilder.cs index 748a8694704..2f75c4dbc3e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageA/AverageARequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageA/AverageARequestBuilder.cs @@ -51,7 +51,7 @@ public AverageARequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AverageA.AverageAPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AverageA.AverageAPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIf/AverageIfPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIf/AverageIfPostRequestBody.cs index 05e422275aa..a3e85072f49 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIf/AverageIfPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIf/AverageIfPostRequestBody.cs @@ -84,7 +84,7 @@ public AverageIfPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AverageIf.AverageIfPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AverageIf.AverageIfPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("averageRange", AverageRange); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("range", Range); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIf/AverageIfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIf/AverageIfRequestBuilder.cs index 08c75149acc..f2cb0bea449 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIf/AverageIfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIf/AverageIfRequestBuilder.cs @@ -51,7 +51,7 @@ public AverageIfRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AverageIf.AverageIfPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AverageIf.AverageIfPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIfs/AverageIfsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIfs/AverageIfsPostRequestBody.cs index 92d2aca6cd2..921bca91623 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIfs/AverageIfsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIfs/AverageIfsPostRequestBody.cs @@ -68,7 +68,7 @@ public AverageIfsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AverageIfs.AverageIfsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AverageIfs.AverageIfsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("averageRange", AverageRange); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIfs/AverageIfsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIfs/AverageIfsRequestBuilder.cs index 12d9e2938d0..f9031869c27 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIfs/AverageIfsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/AverageIfs/AverageIfsRequestBuilder.cs @@ -51,7 +51,7 @@ public AverageIfsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AverageIfs.AverageIfsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.AverageIfs.AverageIfsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BahtText/BahtTextPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BahtText/BahtTextPostRequestBody.cs index b3742c8b76d..219449158ad 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BahtText/BahtTextPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BahtText/BahtTextPostRequestBody.cs @@ -52,7 +52,7 @@ public BahtTextPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BahtText.BahtTextPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BahtText.BahtTextPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BahtText/BahtTextRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BahtText/BahtTextRequestBuilder.cs index 1b6ed6387fc..05451c6ff3a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BahtText/BahtTextRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BahtText/BahtTextRequestBuilder.cs @@ -51,7 +51,7 @@ public BahtTextRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BahtText.BahtTextPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BahtText.BahtTextPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Base/BasePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Base/BasePostRequestBody.cs index 553f894d9eb..98e9d7d2051 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Base/BasePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Base/BasePostRequestBody.cs @@ -84,7 +84,7 @@ public BasePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Base.BasePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Base.BasePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("minLength", MinLength); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("radix", Radix); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Base/BaseRequestBuilderEscaped.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Base/BaseRequestBuilderEscaped.cs index c569a4f65ba..778fec4cbfb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Base/BaseRequestBuilderEscaped.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Base/BaseRequestBuilderEscaped.cs @@ -51,7 +51,7 @@ public BaseRequestBuilderEscaped(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Base.BasePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Base.BasePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselI/BesselIPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselI/BesselIPostRequestBody.cs index 1c0cb0394e2..ea8d8f0920c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselI/BesselIPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselI/BesselIPostRequestBody.cs @@ -68,7 +68,7 @@ public BesselIPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselI.BesselIPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselI.BesselIPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("n", N); writer.WriteObjectValue("x", X); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselI/BesselIRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselI/BesselIRequestBuilder.cs index b662a721b06..db98ebc4f7e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselI/BesselIRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselI/BesselIRequestBuilder.cs @@ -51,7 +51,7 @@ public BesselIRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselI.BesselIPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselI.BesselIPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselJ/BesselJPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselJ/BesselJPostRequestBody.cs index 2c2a80c8ff3..43f4f3616f2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselJ/BesselJPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselJ/BesselJPostRequestBody.cs @@ -68,7 +68,7 @@ public BesselJPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselJ.BesselJPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselJ.BesselJPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("n", N); writer.WriteObjectValue("x", X); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselJ/BesselJRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselJ/BesselJRequestBuilder.cs index 288d3e4c85d..f76ba1b5239 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselJ/BesselJRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselJ/BesselJRequestBuilder.cs @@ -51,7 +51,7 @@ public BesselJRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselJ.BesselJPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselJ.BesselJPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselK/BesselKPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselK/BesselKPostRequestBody.cs index fcaec474539..909072e27ba 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselK/BesselKPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselK/BesselKPostRequestBody.cs @@ -68,7 +68,7 @@ public BesselKPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselK.BesselKPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselK.BesselKPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("n", N); writer.WriteObjectValue("x", X); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselK/BesselKRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselK/BesselKRequestBuilder.cs index 9a4c07e7ab0..b330eda2081 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselK/BesselKRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselK/BesselKRequestBuilder.cs @@ -51,7 +51,7 @@ public BesselKRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselK.BesselKPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselK.BesselKPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselY/BesselYPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselY/BesselYPostRequestBody.cs index f174d6e95c5..d40a54d6d37 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselY/BesselYPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselY/BesselYPostRequestBody.cs @@ -68,7 +68,7 @@ public BesselYPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselY.BesselYPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselY.BesselYPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("n", N); writer.WriteObjectValue("x", X); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselY/BesselYRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselY/BesselYRequestBuilder.cs index 70d42aa1fba..aee863c25fe 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselY/BesselYRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/BesselY/BesselYRequestBuilder.cs @@ -51,7 +51,7 @@ public BesselYRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselY.BesselYPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.BesselY.BesselYPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Dist/Beta_DistPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Dist/Beta_DistPostRequestBody.cs index cb43138f4f4..68d89e4b3c8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Dist/Beta_DistPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Dist/Beta_DistPostRequestBody.cs @@ -132,7 +132,7 @@ public Beta_DistPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Beta_Dist.Beta_DistPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Beta_Dist.Beta_DistPostRequestBody(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("A", A); writer.WriteObjectValue("alpha", Alpha); writer.WriteObjectValue("B", B); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Dist/Beta_DistRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Dist/Beta_DistRequestBuilder.cs index aeb9beff9fe..503229e78c0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Dist/Beta_DistRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Dist/Beta_DistRequestBuilder.cs @@ -51,7 +51,7 @@ public Beta_DistRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Beta_Dist.Beta_DistPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Beta_Dist.Beta_DistPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Inv/Beta_InvPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Inv/Beta_InvPostRequestBody.cs index e453dd46638..813197e4f19 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Inv/Beta_InvPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Inv/Beta_InvPostRequestBody.cs @@ -116,7 +116,7 @@ public Beta_InvPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Beta_Inv.Beta_InvPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Beta_Inv.Beta_InvPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("A", A); writer.WriteObjectValue("alpha", Alpha); writer.WriteObjectValue("B", B); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Inv/Beta_InvRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Inv/Beta_InvRequestBuilder.cs index 8706342863e..04bfeda9c91 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Inv/Beta_InvRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Beta_Inv/Beta_InvRequestBuilder.cs @@ -51,7 +51,7 @@ public Beta_InvRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Beta_Inv.Beta_InvPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Beta_Inv.Beta_InvPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Dec/Bin2DecPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Dec/Bin2DecPostRequestBody.cs index 6dc7ff72a0b..38a9d67e0a2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Dec/Bin2DecPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Dec/Bin2DecPostRequestBody.cs @@ -52,7 +52,7 @@ public Bin2DecPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bin2Dec.Bin2DecPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bin2Dec.Bin2DecPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Dec/Bin2DecRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Dec/Bin2DecRequestBuilder.cs index 362459a67df..48c38fb7373 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Dec/Bin2DecRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Dec/Bin2DecRequestBuilder.cs @@ -51,7 +51,7 @@ public Bin2DecRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bin2Dec.Bin2DecPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bin2Dec.Bin2DecPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Hex/Bin2HexPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Hex/Bin2HexPostRequestBody.cs index 9ace295fedb..654a10eebfc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Hex/Bin2HexPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Hex/Bin2HexPostRequestBody.cs @@ -68,7 +68,7 @@ public Bin2HexPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bin2Hex.Bin2HexPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bin2Hex.Bin2HexPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("places", Places); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Hex/Bin2HexRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Hex/Bin2HexRequestBuilder.cs index 9c4e73878f2..40e23375d36 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Hex/Bin2HexRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Hex/Bin2HexRequestBuilder.cs @@ -51,7 +51,7 @@ public Bin2HexRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bin2Hex.Bin2HexPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bin2Hex.Bin2HexPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Oct/Bin2OctPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Oct/Bin2OctPostRequestBody.cs index 4389822664c..a642ac46d99 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Oct/Bin2OctPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Oct/Bin2OctPostRequestBody.cs @@ -68,7 +68,7 @@ public Bin2OctPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bin2Oct.Bin2OctPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bin2Oct.Bin2OctPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("places", Places); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Oct/Bin2OctRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Oct/Bin2OctRequestBuilder.cs index aadcf3597c4..f3b3e1ae021 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Oct/Bin2OctRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bin2Oct/Bin2OctRequestBuilder.cs @@ -51,7 +51,7 @@ public Bin2OctRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bin2Oct.Bin2OctPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bin2Oct.Bin2OctPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist/Binom_DistPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist/Binom_DistPostRequestBody.cs index 36c04aba648..c0f44517ac4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist/Binom_DistPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist/Binom_DistPostRequestBody.cs @@ -100,7 +100,7 @@ public Binom_DistPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Binom_Dist.Binom_DistPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Binom_Dist.Binom_DistPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cumulative", Cumulative); writer.WriteObjectValue("numberS", NumberS); writer.WriteObjectValue("probabilityS", ProbabilityS); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist/Binom_DistRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist/Binom_DistRequestBuilder.cs index 2e75a0daf46..52368fd111c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist/Binom_DistRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist/Binom_DistRequestBuilder.cs @@ -51,7 +51,7 @@ public Binom_DistRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Binom_Dist.Binom_DistPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Binom_Dist.Binom_DistPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist_Range/Binom_Dist_RangePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist_Range/Binom_Dist_RangePostRequestBody.cs index d1012ad93f7..b0cc45be860 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist_Range/Binom_Dist_RangePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist_Range/Binom_Dist_RangePostRequestBody.cs @@ -100,7 +100,7 @@ public Binom_Dist_RangePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Binom_Dist_Range.Binom_Dist_RangePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Binom_Dist_Range.Binom_Dist_RangePostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("numberS", NumberS); writer.WriteObjectValue("numberS2", NumberS2); writer.WriteObjectValue("probabilityS", ProbabilityS); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist_Range/Binom_Dist_RangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist_Range/Binom_Dist_RangeRequestBuilder.cs index 32e301a5ab7..3ae5b3f1692 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist_Range/Binom_Dist_RangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Dist_Range/Binom_Dist_RangeRequestBuilder.cs @@ -51,7 +51,7 @@ public Binom_Dist_RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Binom_Dist_Range.Binom_Dist_RangePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Binom_Dist_Range.Binom_Dist_RangePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Inv/Binom_InvPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Inv/Binom_InvPostRequestBody.cs index 6ebd1afb41d..c8257694bee 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Inv/Binom_InvPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Inv/Binom_InvPostRequestBody.cs @@ -84,7 +84,7 @@ public Binom_InvPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Binom_Inv.Binom_InvPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Binom_Inv.Binom_InvPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("alpha", Alpha); writer.WriteObjectValue("probabilityS", ProbabilityS); writer.WriteObjectValue("trials", Trials); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Inv/Binom_InvRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Inv/Binom_InvRequestBuilder.cs index 819982dfcc5..3127d531219 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Inv/Binom_InvRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Binom_Inv/Binom_InvRequestBuilder.cs @@ -51,7 +51,7 @@ public Binom_InvRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Binom_Inv.Binom_InvPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Binom_Inv.Binom_InvPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitand/BitandPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitand/BitandPostRequestBody.cs index def615fcd0d..2c8c5451fa6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitand/BitandPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitand/BitandPostRequestBody.cs @@ -68,7 +68,7 @@ public BitandPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitand.BitandPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitand.BitandPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number1", Number1); writer.WriteObjectValue("number2", Number2); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitand/BitandRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitand/BitandRequestBuilder.cs index 48aa388be58..e63bb6dc5f7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitand/BitandRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitand/BitandRequestBuilder.cs @@ -51,7 +51,7 @@ public BitandRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitand.BitandPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitand.BitandPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitlshift/BitlshiftPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitlshift/BitlshiftPostRequestBody.cs index 491e45769fc..36664560bbb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitlshift/BitlshiftPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitlshift/BitlshiftPostRequestBody.cs @@ -68,7 +68,7 @@ public BitlshiftPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitlshift.BitlshiftPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitlshift.BitlshiftPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("shiftAmount", ShiftAmount); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitlshift/BitlshiftRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitlshift/BitlshiftRequestBuilder.cs index 315bb9a7274..7143d16dbf0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitlshift/BitlshiftRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitlshift/BitlshiftRequestBuilder.cs @@ -51,7 +51,7 @@ public BitlshiftRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitlshift.BitlshiftPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitlshift.BitlshiftPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitor/BitorPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitor/BitorPostRequestBody.cs index 5faacc24032..e1df3c22fb3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitor/BitorPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitor/BitorPostRequestBody.cs @@ -68,7 +68,7 @@ public BitorPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitor.BitorPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitor.BitorPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number1", Number1); writer.WriteObjectValue("number2", Number2); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitor/BitorRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitor/BitorRequestBuilder.cs index 7bbe5877bcd..c64786c658d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitor/BitorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitor/BitorRequestBuilder.cs @@ -51,7 +51,7 @@ public BitorRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitor.BitorPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitor.BitorPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitrshift/BitrshiftPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitrshift/BitrshiftPostRequestBody.cs index b181d35f861..a2e04b6277d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitrshift/BitrshiftPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitrshift/BitrshiftPostRequestBody.cs @@ -68,7 +68,7 @@ public BitrshiftPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitrshift.BitrshiftPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitrshift.BitrshiftPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("shiftAmount", ShiftAmount); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitrshift/BitrshiftRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitrshift/BitrshiftRequestBuilder.cs index 84382eef6ab..cc9d9549f7f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitrshift/BitrshiftRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitrshift/BitrshiftRequestBuilder.cs @@ -51,7 +51,7 @@ public BitrshiftRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitrshift.BitrshiftPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitrshift.BitrshiftPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitxor/BitxorPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitxor/BitxorPostRequestBody.cs index e7351182dcc..727a3518c4e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitxor/BitxorPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitxor/BitxorPostRequestBody.cs @@ -68,7 +68,7 @@ public BitxorPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitxor.BitxorPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitxor.BitxorPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number1", Number1); writer.WriteObjectValue("number2", Number2); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitxor/BitxorRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitxor/BitxorRequestBuilder.cs index 568588467a8..9fb67dc494c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitxor/BitxorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Bitxor/BitxorRequestBuilder.cs @@ -51,7 +51,7 @@ public BitxorRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitxor.BitxorPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Bitxor.BitxorPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Math/Ceiling_MathPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Math/Ceiling_MathPostRequestBody.cs index c9566f1ff11..a7594d5c327 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Math/Ceiling_MathPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Math/Ceiling_MathPostRequestBody.cs @@ -84,7 +84,7 @@ public Ceiling_MathPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ceiling_Math.Ceiling_MathPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ceiling_Math.Ceiling_MathPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("mode", Mode); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("significance", Significance); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Math/Ceiling_MathRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Math/Ceiling_MathRequestBuilder.cs index 987281f8d74..21f7782ac54 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Math/Ceiling_MathRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Math/Ceiling_MathRequestBuilder.cs @@ -51,7 +51,7 @@ public Ceiling_MathRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ceiling_Math.Ceiling_MathPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ceiling_Math.Ceiling_MathPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Precise/Ceiling_PrecisePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Precise/Ceiling_PrecisePostRequestBody.cs index 4a5cf918ac0..d50d218f34c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Precise/Ceiling_PrecisePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Precise/Ceiling_PrecisePostRequestBody.cs @@ -68,7 +68,7 @@ public Ceiling_PrecisePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ceiling_Precise.Ceiling_PrecisePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ceiling_Precise.Ceiling_PrecisePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("significance", Significance); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Precise/Ceiling_PreciseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Precise/Ceiling_PreciseRequestBuilder.cs index 8b7b2fe0291..e9bb84e68ce 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Precise/Ceiling_PreciseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ceiling_Precise/Ceiling_PreciseRequestBuilder.cs @@ -51,7 +51,7 @@ public Ceiling_PreciseRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ceiling_Precise.Ceiling_PrecisePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ceiling_Precise.Ceiling_PrecisePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CharNamespace/CharPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CharNamespace/CharPostRequestBody.cs index 9b392ab8270..3b93328cb6f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CharNamespace/CharPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CharNamespace/CharPostRequestBody.cs @@ -52,7 +52,7 @@ public CharPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CharNamespace.CharPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CharNamespace.CharPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CharNamespace/CharRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CharNamespace/CharRequestBuilder.cs index b40e7dabbdd..abf15276875 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CharNamespace/CharRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CharNamespace/CharRequestBuilder.cs @@ -51,7 +51,7 @@ public CharRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CharNamespace.CharPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CharNamespace.CharPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist/ChiSq_DistPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist/ChiSq_DistPostRequestBody.cs index 0f2ec05a7b5..6faef57450d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist/ChiSq_DistPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist/ChiSq_DistPostRequestBody.cs @@ -84,7 +84,7 @@ public ChiSq_DistPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Dist.ChiSq_DistPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Dist.ChiSq_DistPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cumulative", Cumulative); writer.WriteObjectValue("degFreedom", DegFreedom); writer.WriteObjectValue("x", X); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist/ChiSq_DistRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist/ChiSq_DistRequestBuilder.cs index 344b68a26fc..788b2198f59 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist/ChiSq_DistRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist/ChiSq_DistRequestBuilder.cs @@ -51,7 +51,7 @@ public ChiSq_DistRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Dist.ChiSq_DistPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Dist.ChiSq_DistPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist_RT/ChiSq_Dist_RTPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist_RT/ChiSq_Dist_RTPostRequestBody.cs index 3ad17b691b9..47380cc97fa 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist_RT/ChiSq_Dist_RTPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist_RT/ChiSq_Dist_RTPostRequestBody.cs @@ -68,7 +68,7 @@ public ChiSq_Dist_RTPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Dist_RT.ChiSq_Dist_RTPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Dist_RT.ChiSq_Dist_RTPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("degFreedom", DegFreedom); writer.WriteObjectValue("x", X); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist_RT/ChiSq_Dist_RTRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist_RT/ChiSq_Dist_RTRequestBuilder.cs index f45338bdf8a..b876b53c9de 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist_RT/ChiSq_Dist_RTRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Dist_RT/ChiSq_Dist_RTRequestBuilder.cs @@ -51,7 +51,7 @@ public ChiSq_Dist_RTRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Dist_RT.ChiSq_Dist_RTPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Dist_RT.ChiSq_Dist_RTPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv/ChiSq_InvPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv/ChiSq_InvPostRequestBody.cs index 4f2919880f3..77863e54bba 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv/ChiSq_InvPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv/ChiSq_InvPostRequestBody.cs @@ -68,7 +68,7 @@ public ChiSq_InvPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Inv.ChiSq_InvPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Inv.ChiSq_InvPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("degFreedom", DegFreedom); writer.WriteObjectValue("probability", Probability); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv/ChiSq_InvRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv/ChiSq_InvRequestBuilder.cs index ca5becd3ce9..58179dbf88f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv/ChiSq_InvRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv/ChiSq_InvRequestBuilder.cs @@ -51,7 +51,7 @@ public ChiSq_InvRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Inv.ChiSq_InvPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Inv.ChiSq_InvPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv_RT/ChiSq_Inv_RTPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv_RT/ChiSq_Inv_RTPostRequestBody.cs index 6ecb5db7ff8..d8067a5f500 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv_RT/ChiSq_Inv_RTPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv_RT/ChiSq_Inv_RTPostRequestBody.cs @@ -68,7 +68,7 @@ public ChiSq_Inv_RTPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Inv_RT.ChiSq_Inv_RTPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Inv_RT.ChiSq_Inv_RTPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("degFreedom", DegFreedom); writer.WriteObjectValue("probability", Probability); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv_RT/ChiSq_Inv_RTRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv_RT/ChiSq_Inv_RTRequestBuilder.cs index 8afe14cd7f7..2b1d012365b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv_RT/ChiSq_Inv_RTRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ChiSq_Inv_RT/ChiSq_Inv_RTRequestBuilder.cs @@ -51,7 +51,7 @@ public ChiSq_Inv_RTRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Inv_RT.ChiSq_Inv_RTPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ChiSq_Inv_RT.ChiSq_Inv_RTPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Choose/ChoosePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Choose/ChoosePostRequestBody.cs index e9d7fa5d2fc..66887bb7418 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Choose/ChoosePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Choose/ChoosePostRequestBody.cs @@ -68,7 +68,7 @@ public ChoosePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Choose.ChoosePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Choose.ChoosePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("indexNum", IndexNum); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Choose/ChooseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Choose/ChooseRequestBuilder.cs index 7bfed6601eb..63dc358f449 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Choose/ChooseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Choose/ChooseRequestBuilder.cs @@ -51,7 +51,7 @@ public ChooseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Choose.ChoosePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Choose.ChoosePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Clean/CleanPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Clean/CleanPostRequestBody.cs index 266fccaaaea..d8a86ccb619 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Clean/CleanPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Clean/CleanPostRequestBody.cs @@ -52,7 +52,7 @@ public CleanPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Clean.CleanPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Clean.CleanPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Clean/CleanRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Clean/CleanRequestBuilder.cs index 1f7f9b4eb3f..5c894cb873e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Clean/CleanRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Clean/CleanRequestBuilder.cs @@ -51,7 +51,7 @@ public CleanRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Clean.CleanPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Clean.CleanPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Code/CodePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Code/CodePostRequestBody.cs index 62fffd17a69..fab005a4dec 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Code/CodePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Code/CodePostRequestBody.cs @@ -52,7 +52,7 @@ public CodePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Code.CodePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Code.CodePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Code/CodeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Code/CodeRequestBuilder.cs index 142dfb7cd67..18bc5e3ead1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Code/CodeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Code/CodeRequestBuilder.cs @@ -51,7 +51,7 @@ public CodeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Code.CodePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Code.CodePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Columns/ColumnsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Columns/ColumnsPostRequestBody.cs index 0d1dadc8c5a..740324b94fa 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Columns/ColumnsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Columns/ColumnsPostRequestBody.cs @@ -52,7 +52,7 @@ public ColumnsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Columns.ColumnsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Columns.ColumnsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("array", Array); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Columns/ColumnsRequestBuilder.cs index 2f3d1ce11d9..14fb8160655 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Columns/ColumnsRequestBuilder.cs @@ -51,7 +51,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Columns.ColumnsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Columns.ColumnsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combin/CombinPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combin/CombinPostRequestBody.cs index 30b4501a30a..b7f003f4d2b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combin/CombinPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combin/CombinPostRequestBody.cs @@ -68,7 +68,7 @@ public CombinPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Combin.CombinPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Combin.CombinPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("numberChosen", NumberChosen); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combin/CombinRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combin/CombinRequestBuilder.cs index 76fff342d83..45b62c37e68 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combin/CombinRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combin/CombinRequestBuilder.cs @@ -51,7 +51,7 @@ public CombinRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Combin.CombinPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Combin.CombinPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combina/CombinaPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combina/CombinaPostRequestBody.cs index d048a92574d..b749ba8e5aa 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combina/CombinaPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combina/CombinaPostRequestBody.cs @@ -68,7 +68,7 @@ public CombinaPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Combina.CombinaPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Combina.CombinaPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("numberChosen", NumberChosen); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combina/CombinaRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combina/CombinaRequestBuilder.cs index 5c2297c0203..0004309c6df 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combina/CombinaRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Combina/CombinaRequestBuilder.cs @@ -51,7 +51,7 @@ public CombinaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Combina.CombinaPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Combina.CombinaPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Complex/ComplexPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Complex/ComplexPostRequestBody.cs index 235f81622c5..86f9d0d4b24 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Complex/ComplexPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Complex/ComplexPostRequestBody.cs @@ -84,7 +84,7 @@ public ComplexPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Complex.ComplexPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Complex.ComplexPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("iNum", INum); writer.WriteObjectValue("realNum", RealNum); writer.WriteObjectValue("suffix", Suffix); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Complex/ComplexRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Complex/ComplexRequestBuilder.cs index 2807022779a..cfc5e6d055b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Complex/ComplexRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Complex/ComplexRequestBuilder.cs @@ -51,7 +51,7 @@ public ComplexRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Complex.ComplexPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Complex.ComplexPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Concatenate/ConcatenatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Concatenate/ConcatenatePostRequestBody.cs index 1825a3a4f4c..2f595cf1149 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Concatenate/ConcatenatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Concatenate/ConcatenatePostRequestBody.cs @@ -52,7 +52,7 @@ public ConcatenatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Concatenate.ConcatenatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Concatenate.ConcatenatePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Concatenate/ConcatenateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Concatenate/ConcatenateRequestBuilder.cs index edfdaf80657..ff20b5ef611 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Concatenate/ConcatenateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Concatenate/ConcatenateRequestBuilder.cs @@ -51,7 +51,7 @@ public ConcatenateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Concatenate.ConcatenatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Concatenate.ConcatenatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_Norm/Confidence_NormPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_Norm/Confidence_NormPostRequestBody.cs index f14ebb7ff72..345a0368de4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_Norm/Confidence_NormPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_Norm/Confidence_NormPostRequestBody.cs @@ -84,7 +84,7 @@ public Confidence_NormPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Confidence_Norm.Confidence_NormPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Confidence_Norm.Confidence_NormPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("alpha", Alpha); writer.WriteObjectValue("size", Size); writer.WriteObjectValue("standardDev", StandardDev); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_Norm/Confidence_NormRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_Norm/Confidence_NormRequestBuilder.cs index 7439dd09804..40a0bc634e6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_Norm/Confidence_NormRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_Norm/Confidence_NormRequestBuilder.cs @@ -51,7 +51,7 @@ public Confidence_NormRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Confidence_Norm.Confidence_NormPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Confidence_Norm.Confidence_NormPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_T/Confidence_TPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_T/Confidence_TPostRequestBody.cs index aef25fe7f36..e7968e3e00a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_T/Confidence_TPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_T/Confidence_TPostRequestBody.cs @@ -84,7 +84,7 @@ public Confidence_TPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Confidence_T.Confidence_TPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Confidence_T.Confidence_TPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("alpha", Alpha); writer.WriteObjectValue("size", Size); writer.WriteObjectValue("standardDev", StandardDev); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_T/Confidence_TRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_T/Confidence_TRequestBuilder.cs index 2d6fd9d4469..a037a911b12 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_T/Confidence_TRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Confidence_T/Confidence_TRequestBuilder.cs @@ -51,7 +51,7 @@ public Confidence_TRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Confidence_T.Confidence_TPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Confidence_T.Confidence_TPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ConvertNamespace/ConvertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ConvertNamespace/ConvertPostRequestBody.cs index 5f70e57d215..1e9550faeec 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ConvertNamespace/ConvertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ConvertNamespace/ConvertPostRequestBody.cs @@ -84,7 +84,7 @@ public ConvertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ConvertNamespace.ConvertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ConvertNamespace.ConvertPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fromUnit", FromUnit); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("toUnit", ToUnit); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ConvertNamespace/ConvertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ConvertNamespace/ConvertRequestBuilder.cs index 5cfaff91077..eecb18c7d1f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ConvertNamespace/ConvertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ConvertNamespace/ConvertRequestBuilder.cs @@ -51,7 +51,7 @@ public ConvertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ConvertNamespace.ConvertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ConvertNamespace.ConvertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cos/CosPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cos/CosPostRequestBody.cs index ed46ffddacc..d7b65f8bc0e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cos/CosPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cos/CosPostRequestBody.cs @@ -52,7 +52,7 @@ public CosPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Cos.CosPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Cos.CosPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cos/CosRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cos/CosRequestBuilder.cs index b52807bb2e4..58e67dbb8fa 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cos/CosRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cos/CosRequestBuilder.cs @@ -51,7 +51,7 @@ public CosRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Cos.CosPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Cos.CosPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cosh/CoshPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cosh/CoshPostRequestBody.cs index 3781703997a..4cc9b361643 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cosh/CoshPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cosh/CoshPostRequestBody.cs @@ -52,7 +52,7 @@ public CoshPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Cosh.CoshPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Cosh.CoshPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cosh/CoshRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cosh/CoshRequestBuilder.cs index e88698439e6..a78839767ca 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cosh/CoshRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cosh/CoshRequestBuilder.cs @@ -51,7 +51,7 @@ public CoshRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Cosh.CoshPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Cosh.CoshPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cot/CotPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cot/CotPostRequestBody.cs index df683adcf00..37ef5fd313e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cot/CotPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cot/CotPostRequestBody.cs @@ -52,7 +52,7 @@ public CotPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Cot.CotPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Cot.CotPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cot/CotRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cot/CotRequestBuilder.cs index 085911df11a..ddbcfeffb74 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cot/CotRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Cot/CotRequestBuilder.cs @@ -51,7 +51,7 @@ public CotRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Cot.CotPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Cot.CotPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Coth/CothPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Coth/CothPostRequestBody.cs index 9e157a08f19..d954904e1d5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Coth/CothPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Coth/CothPostRequestBody.cs @@ -52,7 +52,7 @@ public CothPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Coth.CothPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Coth.CothPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Coth/CothRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Coth/CothRequestBuilder.cs index 5d8fd8da52b..2642469c335 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Coth/CothRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Coth/CothRequestBuilder.cs @@ -51,7 +51,7 @@ public CothRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Coth.CothPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Coth.CothPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Count/CountPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Count/CountPostRequestBody.cs index 3225fbf9de5..0f507a21e79 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Count/CountPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Count/CountPostRequestBody.cs @@ -52,7 +52,7 @@ public CountPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Count.CountPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Count.CountPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Count/CountRequestBuilder.cs index 2bdaaa80ca3..7701878f773 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Count/CountRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Count/CountRequestBuilder.cs @@ -51,7 +51,7 @@ public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Count.CountPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Count.CountPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountA/CountAPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountA/CountAPostRequestBody.cs index 39e5a3eba9e..27cf55b7865 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountA/CountAPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountA/CountAPostRequestBody.cs @@ -52,7 +52,7 @@ public CountAPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountA.CountAPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountA.CountAPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountA/CountARequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountA/CountARequestBuilder.cs index c2657d31385..64c0ef440f5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountA/CountARequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountA/CountARequestBuilder.cs @@ -51,7 +51,7 @@ public CountARequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountA.CountAPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountA.CountAPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountBlank/CountBlankPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountBlank/CountBlankPostRequestBody.cs index 4ea7f5984e2..fd351729210 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountBlank/CountBlankPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountBlank/CountBlankPostRequestBody.cs @@ -52,7 +52,7 @@ public CountBlankPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountBlank.CountBlankPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountBlank.CountBlankPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("range", Range); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountBlank/CountBlankRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountBlank/CountBlankRequestBuilder.cs index c37ed0cf06c..aa07c5aab7e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountBlank/CountBlankRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountBlank/CountBlankRequestBuilder.cs @@ -51,7 +51,7 @@ public CountBlankRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountBlank.CountBlankPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountBlank.CountBlankPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIf/CountIfPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIf/CountIfPostRequestBody.cs index 0566daff989..11f40a7c2e3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIf/CountIfPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIf/CountIfPostRequestBody.cs @@ -68,7 +68,7 @@ public CountIfPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountIf.CountIfPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountIf.CountIfPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("range", Range); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIf/CountIfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIf/CountIfRequestBuilder.cs index 7e469d985f7..1bfb09206e1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIf/CountIfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIf/CountIfRequestBuilder.cs @@ -51,7 +51,7 @@ public CountIfRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountIf.CountIfPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountIf.CountIfPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIfs/CountIfsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIfs/CountIfsPostRequestBody.cs index e9716a4a461..820b5de26d9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIfs/CountIfsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIfs/CountIfsPostRequestBody.cs @@ -52,7 +52,7 @@ public CountIfsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountIfs.CountIfsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountIfs.CountIfsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIfs/CountIfsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIfs/CountIfsRequestBuilder.cs index 3032ad4d197..2a04dd00bf0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIfs/CountIfsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CountIfs/CountIfsRequestBuilder.cs @@ -51,7 +51,7 @@ public CountIfsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountIfs.CountIfsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CountIfs.CountIfsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDayBs/CoupDayBsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDayBs/CoupDayBsPostRequestBody.cs index 127b68881e2..442c6be11df 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDayBs/CoupDayBsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDayBs/CoupDayBsPostRequestBody.cs @@ -100,7 +100,7 @@ public CoupDayBsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupDayBs.CoupDayBsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupDayBs.CoupDayBsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("frequency", Frequency); writer.WriteObjectValue("maturity", Maturity); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDayBs/CoupDayBsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDayBs/CoupDayBsRequestBuilder.cs index 58c4b0a2de7..e78d8f672f9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDayBs/CoupDayBsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDayBs/CoupDayBsRequestBuilder.cs @@ -51,7 +51,7 @@ public CoupDayBsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupDayBs.CoupDayBsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupDayBs.CoupDayBsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDays/CoupDaysPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDays/CoupDaysPostRequestBody.cs index 29dde5e91d6..57f296e0cdb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDays/CoupDaysPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDays/CoupDaysPostRequestBody.cs @@ -100,7 +100,7 @@ public CoupDaysPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupDays.CoupDaysPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupDays.CoupDaysPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("frequency", Frequency); writer.WriteObjectValue("maturity", Maturity); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDays/CoupDaysRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDays/CoupDaysRequestBuilder.cs index 4f65212fd0d..8a7d885db7d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDays/CoupDaysRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDays/CoupDaysRequestBuilder.cs @@ -51,7 +51,7 @@ public CoupDaysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupDays.CoupDaysPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupDays.CoupDaysPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDaysNc/CoupDaysNcPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDaysNc/CoupDaysNcPostRequestBody.cs index acb7df73a1e..3f78279de01 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDaysNc/CoupDaysNcPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDaysNc/CoupDaysNcPostRequestBody.cs @@ -100,7 +100,7 @@ public CoupDaysNcPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupDaysNc.CoupDaysNcPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupDaysNc.CoupDaysNcPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("frequency", Frequency); writer.WriteObjectValue("maturity", Maturity); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDaysNc/CoupDaysNcRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDaysNc/CoupDaysNcRequestBuilder.cs index c166feb0802..973c517ff1c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDaysNc/CoupDaysNcRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupDaysNc/CoupDaysNcRequestBuilder.cs @@ -51,7 +51,7 @@ public CoupDaysNcRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupDaysNc.CoupDaysNcPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupDaysNc.CoupDaysNcPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNcd/CoupNcdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNcd/CoupNcdPostRequestBody.cs index b8d3de818e6..c36c3cd9cf4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNcd/CoupNcdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNcd/CoupNcdPostRequestBody.cs @@ -100,7 +100,7 @@ public CoupNcdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupNcd.CoupNcdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupNcd.CoupNcdPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("frequency", Frequency); writer.WriteObjectValue("maturity", Maturity); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNcd/CoupNcdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNcd/CoupNcdRequestBuilder.cs index 29fb8cfd794..54395415eae 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNcd/CoupNcdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNcd/CoupNcdRequestBuilder.cs @@ -51,7 +51,7 @@ public CoupNcdRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupNcd.CoupNcdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupNcd.CoupNcdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNum/CoupNumPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNum/CoupNumPostRequestBody.cs index 9f3196ca4aa..60294c0d18b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNum/CoupNumPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNum/CoupNumPostRequestBody.cs @@ -100,7 +100,7 @@ public CoupNumPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupNum.CoupNumPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupNum.CoupNumPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("frequency", Frequency); writer.WriteObjectValue("maturity", Maturity); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNum/CoupNumRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNum/CoupNumRequestBuilder.cs index 764c2d7d42e..52639e0638a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNum/CoupNumRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupNum/CoupNumRequestBuilder.cs @@ -51,7 +51,7 @@ public CoupNumRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupNum.CoupNumPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupNum.CoupNumPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupPcd/CoupPcdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupPcd/CoupPcdPostRequestBody.cs index 2860a7c1778..110822b6a15 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupPcd/CoupPcdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupPcd/CoupPcdPostRequestBody.cs @@ -100,7 +100,7 @@ public CoupPcdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupPcd.CoupPcdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupPcd.CoupPcdPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("frequency", Frequency); writer.WriteObjectValue("maturity", Maturity); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupPcd/CoupPcdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupPcd/CoupPcdRequestBuilder.cs index 09915a29f16..5a69cc2420a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupPcd/CoupPcdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CoupPcd/CoupPcdRequestBuilder.cs @@ -51,7 +51,7 @@ public CoupPcdRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupPcd.CoupPcdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CoupPcd.CoupPcdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csc/CscPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csc/CscPostRequestBody.cs index ea16fb6f39c..be2f06f2f2c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csc/CscPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csc/CscPostRequestBody.cs @@ -52,7 +52,7 @@ public CscPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Csc.CscPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Csc.CscPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csc/CscRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csc/CscRequestBuilder.cs index d880c71c110..06fdcd40ac3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csc/CscRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csc/CscRequestBuilder.cs @@ -51,7 +51,7 @@ public CscRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Csc.CscPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Csc.CscPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csch/CschPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csch/CschPostRequestBody.cs index 3a734e4c5db..eae6269d148 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csch/CschPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csch/CschPostRequestBody.cs @@ -52,7 +52,7 @@ public CschPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Csch.CschPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Csch.CschPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csch/CschRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csch/CschRequestBuilder.cs index 9f44a63d7e6..ef888d47b5c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csch/CschRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Csch/CschRequestBuilder.cs @@ -51,7 +51,7 @@ public CschRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Csch.CschPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Csch.CschPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumIPmt/CumIPmtPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumIPmt/CumIPmtPostRequestBody.cs index a8cdbfa5a06..a7d1051294b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumIPmt/CumIPmtPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumIPmt/CumIPmtPostRequestBody.cs @@ -132,7 +132,7 @@ public CumIPmtPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CumIPmt.CumIPmtPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CumIPmt.CumIPmtPostRequestBody(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("endPeriod", EndPeriod); writer.WriteObjectValue("nper", Nper); writer.WriteObjectValue("pv", Pv); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumIPmt/CumIPmtRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumIPmt/CumIPmtRequestBuilder.cs index 0f7f5426380..8e8ad6adba2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumIPmt/CumIPmtRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumIPmt/CumIPmtRequestBuilder.cs @@ -51,7 +51,7 @@ public CumIPmtRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CumIPmt.CumIPmtPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CumIPmt.CumIPmtPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumPrinc/CumPrincPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumPrinc/CumPrincPostRequestBody.cs index 7a97aa1c458..03d560a6b7a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumPrinc/CumPrincPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumPrinc/CumPrincPostRequestBody.cs @@ -132,7 +132,7 @@ public CumPrincPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CumPrinc.CumPrincPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CumPrinc.CumPrincPostRequestBody(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("endPeriod", EndPeriod); writer.WriteObjectValue("nper", Nper); writer.WriteObjectValue("pv", Pv); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumPrinc/CumPrincRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumPrinc/CumPrincRequestBuilder.cs index 98ee1605857..7bac86a6db7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumPrinc/CumPrincRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/CumPrinc/CumPrincRequestBuilder.cs @@ -51,7 +51,7 @@ public CumPrincRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CumPrinc.CumPrincPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.CumPrinc.CumPrincPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DateNamespace/DatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DateNamespace/DatePostRequestBody.cs index 14764ad2b19..c7c0f2da9ed 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DateNamespace/DatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DateNamespace/DatePostRequestBody.cs @@ -84,7 +84,7 @@ public DatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DateNamespace.DatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DateNamespace.DatePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("day", Day); writer.WriteObjectValue("month", Month); writer.WriteObjectValue("year", Year); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DateNamespace/DateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DateNamespace/DateRequestBuilder.cs index 57748d5ee5a..8ac8eebb1ac 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DateNamespace/DateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DateNamespace/DateRequestBuilder.cs @@ -51,7 +51,7 @@ public DateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DateNamespace.DatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DateNamespace.DatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Datevalue/DatevaluePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Datevalue/DatevaluePostRequestBody.cs index d8cc6f25ea1..e508645a800 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Datevalue/DatevaluePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Datevalue/DatevaluePostRequestBody.cs @@ -52,7 +52,7 @@ public DatevaluePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Datevalue.DatevaluePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Datevalue.DatevaluePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("dateText", DateText); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Datevalue/DatevalueRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Datevalue/DatevalueRequestBuilder.cs index 34e077310d1..9ed0c164066 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Datevalue/DatevalueRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Datevalue/DatevalueRequestBuilder.cs @@ -51,7 +51,7 @@ public DatevalueRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Datevalue.DatevaluePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Datevalue.DatevaluePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Daverage/DaveragePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Daverage/DaveragePostRequestBody.cs index fea4a550cb0..da0da7e2f87 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Daverage/DaveragePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Daverage/DaveragePostRequestBody.cs @@ -84,7 +84,7 @@ public DaveragePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Daverage.DaveragePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Daverage.DaveragePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("database", Database); writer.WriteObjectValue("field", Field); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Daverage/DaverageRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Daverage/DaverageRequestBuilder.cs index 6fdec739c81..38857ca7bb7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Daverage/DaverageRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Daverage/DaverageRequestBuilder.cs @@ -51,7 +51,7 @@ public DaverageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Daverage.DaveragePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Daverage.DaveragePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Day/DayPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Day/DayPostRequestBody.cs index c6024746352..0b6841d2daf 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Day/DayPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Day/DayPostRequestBody.cs @@ -52,7 +52,7 @@ public DayPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Day.DayPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Day.DayPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("serialNumber", SerialNumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Day/DayRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Day/DayRequestBuilder.cs index a43d7875976..57a95caca1a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Day/DayRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Day/DayRequestBuilder.cs @@ -51,7 +51,7 @@ public DayRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Day.DayPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Day.DayPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days/DaysPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days/DaysPostRequestBody.cs index c7276b88ecc..03df44bee62 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days/DaysPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days/DaysPostRequestBody.cs @@ -68,7 +68,7 @@ public DaysPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Days.DaysPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Days.DaysPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("endDate", EndDate); writer.WriteObjectValue("startDate", StartDate); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days/DaysRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days/DaysRequestBuilder.cs index 05a87b088f1..2b5c99fe727 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days/DaysRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days/DaysRequestBuilder.cs @@ -51,7 +51,7 @@ public DaysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Days.DaysPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Days.DaysPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days360/Days360PostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days360/Days360PostRequestBody.cs index 7b9b9286d3c..e97bbc832de 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days360/Days360PostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days360/Days360PostRequestBody.cs @@ -84,7 +84,7 @@ public Days360PostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Days360.Days360PostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Days360.Days360PostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("endDate", EndDate); writer.WriteObjectValue("method", Method); writer.WriteObjectValue("startDate", StartDate); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days360/Days360RequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days360/Days360RequestBuilder.cs index c91e716f017..5a69f71b91c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days360/Days360RequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Days360/Days360RequestBuilder.cs @@ -51,7 +51,7 @@ public Days360RequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Days360.Days360PostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Days360.Days360PostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Db/DbPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Db/DbPostRequestBody.cs index f3bfc3f7c17..5a12e490be7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Db/DbPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Db/DbPostRequestBody.cs @@ -116,7 +116,7 @@ public DbPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Db.DbPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Db.DbPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cost", Cost); writer.WriteObjectValue("life", Life); writer.WriteObjectValue("month", Month); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Db/DbRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Db/DbRequestBuilder.cs index 5c6a5538e8e..b1f82c7664d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Db/DbRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Db/DbRequestBuilder.cs @@ -51,7 +51,7 @@ public DbRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(re public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Db.DbPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Db.DbPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dbcs/DbcsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dbcs/DbcsPostRequestBody.cs index 6a8b00a20e0..5fda934e6b4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dbcs/DbcsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dbcs/DbcsPostRequestBody.cs @@ -52,7 +52,7 @@ public DbcsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dbcs.DbcsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dbcs.DbcsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dbcs/DbcsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dbcs/DbcsRequestBuilder.cs index a71abe7a6c4..a732b871e5a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dbcs/DbcsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dbcs/DbcsRequestBuilder.cs @@ -51,7 +51,7 @@ public DbcsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dbcs.DbcsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dbcs.DbcsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dcount/DcountPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dcount/DcountPostRequestBody.cs index 41770086869..9f9cb306000 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dcount/DcountPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dcount/DcountPostRequestBody.cs @@ -84,7 +84,7 @@ public DcountPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dcount.DcountPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dcount.DcountPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("database", Database); writer.WriteObjectValue("field", Field); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dcount/DcountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dcount/DcountRequestBuilder.cs index ab957098286..f77a84c6f3c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dcount/DcountRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dcount/DcountRequestBuilder.cs @@ -51,7 +51,7 @@ public DcountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dcount.DcountPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dcount.DcountPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DcountA/DcountAPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DcountA/DcountAPostRequestBody.cs index 843b444c227..68348e32693 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DcountA/DcountAPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DcountA/DcountAPostRequestBody.cs @@ -84,7 +84,7 @@ public DcountAPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DcountA.DcountAPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DcountA.DcountAPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("database", Database); writer.WriteObjectValue("field", Field); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DcountA/DcountARequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DcountA/DcountARequestBuilder.cs index a4866f690ca..554cb1719f3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DcountA/DcountARequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DcountA/DcountARequestBuilder.cs @@ -51,7 +51,7 @@ public DcountARequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DcountA.DcountAPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DcountA.DcountAPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ddb/DdbPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ddb/DdbPostRequestBody.cs index 78b553f28bd..dda20a7a19b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ddb/DdbPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ddb/DdbPostRequestBody.cs @@ -116,7 +116,7 @@ public DdbPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ddb.DdbPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ddb.DdbPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cost", Cost); writer.WriteObjectValue("factor", Factor); writer.WriteObjectValue("life", Life); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ddb/DdbRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ddb/DdbRequestBuilder.cs index 72d554887a4..a9d0dce197a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ddb/DdbRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ddb/DdbRequestBuilder.cs @@ -51,7 +51,7 @@ public DdbRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ddb.DdbPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ddb.DdbPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Bin/Dec2BinPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Bin/Dec2BinPostRequestBody.cs index 03250090757..a7c0896216f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Bin/Dec2BinPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Bin/Dec2BinPostRequestBody.cs @@ -68,7 +68,7 @@ public Dec2BinPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dec2Bin.Dec2BinPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dec2Bin.Dec2BinPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("places", Places); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Bin/Dec2BinRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Bin/Dec2BinRequestBuilder.cs index f11f4704ff5..fccfa8bbab5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Bin/Dec2BinRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Bin/Dec2BinRequestBuilder.cs @@ -51,7 +51,7 @@ public Dec2BinRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dec2Bin.Dec2BinPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dec2Bin.Dec2BinPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Hex/Dec2HexPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Hex/Dec2HexPostRequestBody.cs index c00497f6419..95c522cdff0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Hex/Dec2HexPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Hex/Dec2HexPostRequestBody.cs @@ -68,7 +68,7 @@ public Dec2HexPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dec2Hex.Dec2HexPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dec2Hex.Dec2HexPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("places", Places); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Hex/Dec2HexRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Hex/Dec2HexRequestBuilder.cs index 6e3f3622daf..e0b2a765b47 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Hex/Dec2HexRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Hex/Dec2HexRequestBuilder.cs @@ -51,7 +51,7 @@ public Dec2HexRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dec2Hex.Dec2HexPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dec2Hex.Dec2HexPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Oct/Dec2OctPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Oct/Dec2OctPostRequestBody.cs index 7240e27393b..6e687a084b0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Oct/Dec2OctPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Oct/Dec2OctPostRequestBody.cs @@ -68,7 +68,7 @@ public Dec2OctPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dec2Oct.Dec2OctPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dec2Oct.Dec2OctPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("places", Places); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Oct/Dec2OctRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Oct/Dec2OctRequestBuilder.cs index 0b3970d271c..85904d7fb02 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Oct/Dec2OctRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dec2Oct/Dec2OctRequestBuilder.cs @@ -51,7 +51,7 @@ public Dec2OctRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dec2Oct.Dec2OctPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dec2Oct.Dec2OctPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DecimalNamespace/DecimalPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DecimalNamespace/DecimalPostRequestBody.cs index 02a27a88e54..43d1de2e374 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DecimalNamespace/DecimalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DecimalNamespace/DecimalPostRequestBody.cs @@ -68,7 +68,7 @@ public DecimalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DecimalNamespace.DecimalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DecimalNamespace.DecimalPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("radix", Radix); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DecimalNamespace/DecimalRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DecimalNamespace/DecimalRequestBuilder.cs index a16769e682a..c8da7669b1b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DecimalNamespace/DecimalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DecimalNamespace/DecimalRequestBuilder.cs @@ -51,7 +51,7 @@ public DecimalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DecimalNamespace.DecimalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DecimalNamespace.DecimalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Degrees/DegreesPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Degrees/DegreesPostRequestBody.cs index 78010256985..e3d181c1d49 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Degrees/DegreesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Degrees/DegreesPostRequestBody.cs @@ -52,7 +52,7 @@ public DegreesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Degrees.DegreesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Degrees.DegreesPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("angle", Angle); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Degrees/DegreesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Degrees/DegreesRequestBuilder.cs index 0839429427b..8deece6a144 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Degrees/DegreesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Degrees/DegreesRequestBuilder.cs @@ -51,7 +51,7 @@ public DegreesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Degrees.DegreesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Degrees.DegreesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Delta/DeltaPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Delta/DeltaPostRequestBody.cs index 27666c94190..6298af62ee3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Delta/DeltaPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Delta/DeltaPostRequestBody.cs @@ -68,7 +68,7 @@ public DeltaPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Delta.DeltaPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Delta.DeltaPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number1", Number1); writer.WriteObjectValue("number2", Number2); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Delta/DeltaRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Delta/DeltaRequestBuilder.cs index 8302310fb40..a2f5bb380b7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Delta/DeltaRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Delta/DeltaRequestBuilder.cs @@ -51,7 +51,7 @@ public DeltaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Delta.DeltaPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Delta.DeltaPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DevSq/DevSqPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DevSq/DevSqPostRequestBody.cs index 35e2b51c1a6..eb443fbc2f3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DevSq/DevSqPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DevSq/DevSqPostRequestBody.cs @@ -52,7 +52,7 @@ public DevSqPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DevSq.DevSqPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DevSq.DevSqPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DevSq/DevSqRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DevSq/DevSqRequestBuilder.cs index 2a6d2657ce0..e29236da3a5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DevSq/DevSqRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DevSq/DevSqRequestBuilder.cs @@ -51,7 +51,7 @@ public DevSqRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DevSq.DevSqPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DevSq.DevSqPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dget/DgetPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dget/DgetPostRequestBody.cs index d33ef21c0a4..64872c46cac 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dget/DgetPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dget/DgetPostRequestBody.cs @@ -84,7 +84,7 @@ public DgetPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dget.DgetPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dget.DgetPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("database", Database); writer.WriteObjectValue("field", Field); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dget/DgetRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dget/DgetRequestBuilder.cs index c4d6b881ad3..1bfe3b2bc45 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dget/DgetRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dget/DgetRequestBuilder.cs @@ -51,7 +51,7 @@ public DgetRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dget.DgetPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dget.DgetPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Disc/DiscPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Disc/DiscPostRequestBody.cs index 70d13b5d2f2..58841a6ee66 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Disc/DiscPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Disc/DiscPostRequestBody.cs @@ -116,7 +116,7 @@ public DiscPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Disc.DiscPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Disc.DiscPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("maturity", Maturity); writer.WriteObjectValue("pr", Pr); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Disc/DiscRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Disc/DiscRequestBuilder.cs index 1d89299385f..e48a6d8dc60 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Disc/DiscRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Disc/DiscRequestBuilder.cs @@ -51,7 +51,7 @@ public DiscRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Disc.DiscPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Disc.DiscPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmax/DmaxPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmax/DmaxPostRequestBody.cs index da83b71a610..80a8fff6def 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmax/DmaxPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmax/DmaxPostRequestBody.cs @@ -84,7 +84,7 @@ public DmaxPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dmax.DmaxPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dmax.DmaxPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("database", Database); writer.WriteObjectValue("field", Field); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmax/DmaxRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmax/DmaxRequestBuilder.cs index e2e7678ae58..231e3674705 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmax/DmaxRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmax/DmaxRequestBuilder.cs @@ -51,7 +51,7 @@ public DmaxRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dmax.DmaxPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dmax.DmaxPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmin/DminPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmin/DminPostRequestBody.cs index aaf91e20172..21963305ea6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmin/DminPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmin/DminPostRequestBody.cs @@ -84,7 +84,7 @@ public DminPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dmin.DminPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dmin.DminPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("database", Database); writer.WriteObjectValue("field", Field); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmin/DminRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmin/DminRequestBuilder.cs index 417a136adb4..e6a6f575025 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmin/DminRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dmin/DminRequestBuilder.cs @@ -51,7 +51,7 @@ public DminRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dmin.DminPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dmin.DminPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dollar/DollarPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dollar/DollarPostRequestBody.cs index ae952b131f9..0c9e46b4eca 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dollar/DollarPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dollar/DollarPostRequestBody.cs @@ -68,7 +68,7 @@ public DollarPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dollar.DollarPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dollar.DollarPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("decimals", Decimals); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dollar/DollarRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dollar/DollarRequestBuilder.cs index 2753420dd19..21d306e5522 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dollar/DollarRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dollar/DollarRequestBuilder.cs @@ -51,7 +51,7 @@ public DollarRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dollar.DollarPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dollar.DollarPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarDe/DollarDePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarDe/DollarDePostRequestBody.cs index e18226327dd..52cd4678dc1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarDe/DollarDePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarDe/DollarDePostRequestBody.cs @@ -68,7 +68,7 @@ public DollarDePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DollarDe.DollarDePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DollarDe.DollarDePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fraction", Fraction); writer.WriteObjectValue("fractionalDollar", FractionalDollar); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarDe/DollarDeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarDe/DollarDeRequestBuilder.cs index 3a31ebf9b85..77b1c707138 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarDe/DollarDeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarDe/DollarDeRequestBuilder.cs @@ -51,7 +51,7 @@ public DollarDeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DollarDe.DollarDePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DollarDe.DollarDePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarFr/DollarFrPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarFr/DollarFrPostRequestBody.cs index a080ec5f6af..f1ffabc3238 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarFr/DollarFrPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarFr/DollarFrPostRequestBody.cs @@ -68,7 +68,7 @@ public DollarFrPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DollarFr.DollarFrPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DollarFr.DollarFrPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("decimalDollar", DecimalDollar); writer.WriteObjectValue("fraction", Fraction); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarFr/DollarFrRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarFr/DollarFrRequestBuilder.cs index 97fd9f85a2e..285800c9900 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarFr/DollarFrRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DollarFr/DollarFrRequestBuilder.cs @@ -51,7 +51,7 @@ public DollarFrRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DollarFr.DollarFrPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DollarFr.DollarFrPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dproduct/DproductPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dproduct/DproductPostRequestBody.cs index 020f7d63f29..f91eb253bf3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dproduct/DproductPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dproduct/DproductPostRequestBody.cs @@ -84,7 +84,7 @@ public DproductPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dproduct.DproductPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dproduct.DproductPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("database", Database); writer.WriteObjectValue("field", Field); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dproduct/DproductRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dproduct/DproductRequestBuilder.cs index 34ec9113b92..e6a89bc633c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dproduct/DproductRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dproduct/DproductRequestBuilder.cs @@ -51,7 +51,7 @@ public DproductRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dproduct.DproductPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dproduct.DproductPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDev/DstDevPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDev/DstDevPostRequestBody.cs index afe3bdbe5ed..b84c3c99c2b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDev/DstDevPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDev/DstDevPostRequestBody.cs @@ -84,7 +84,7 @@ public DstDevPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DstDev.DstDevPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DstDev.DstDevPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("database", Database); writer.WriteObjectValue("field", Field); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDev/DstDevRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDev/DstDevRequestBuilder.cs index b67210d9bd0..433059ef528 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDev/DstDevRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDev/DstDevRequestBuilder.cs @@ -51,7 +51,7 @@ public DstDevRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DstDev.DstDevPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DstDev.DstDevPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDevP/DstDevPPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDevP/DstDevPPostRequestBody.cs index ebeb434e099..0a34a67f7d6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDevP/DstDevPPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDevP/DstDevPPostRequestBody.cs @@ -84,7 +84,7 @@ public DstDevPPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DstDevP.DstDevPPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DstDevP.DstDevPPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("database", Database); writer.WriteObjectValue("field", Field); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDevP/DstDevPRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDevP/DstDevPRequestBuilder.cs index ee69143b77e..569825a5e63 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDevP/DstDevPRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DstDevP/DstDevPRequestBuilder.cs @@ -51,7 +51,7 @@ public DstDevPRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DstDevP.DstDevPPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DstDevP.DstDevPPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dsum/DsumPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dsum/DsumPostRequestBody.cs index 9e8c4a21b93..3fcbcf4edaa 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dsum/DsumPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dsum/DsumPostRequestBody.cs @@ -84,7 +84,7 @@ public DsumPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dsum.DsumPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dsum.DsumPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("database", Database); writer.WriteObjectValue("field", Field); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dsum/DsumRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dsum/DsumRequestBuilder.cs index 8a0a94e0e63..95d3ca3cd21 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dsum/DsumRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dsum/DsumRequestBuilder.cs @@ -51,7 +51,7 @@ public DsumRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dsum.DsumPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dsum.DsumPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Duration/DurationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Duration/DurationPostRequestBody.cs index 030b8c1017f..0bbf7958ffc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Duration/DurationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Duration/DurationPostRequestBody.cs @@ -132,7 +132,7 @@ public DurationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Duration.DurationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Duration.DurationPostRequestBody(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("coupon", Coupon); writer.WriteObjectValue("frequency", Frequency); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Duration/DurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Duration/DurationRequestBuilder.cs index 37dbe90d088..95c72b3b14e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Duration/DurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Duration/DurationRequestBuilder.cs @@ -51,7 +51,7 @@ public DurationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Duration.DurationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Duration.DurationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dvar/DvarPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dvar/DvarPostRequestBody.cs index 3e0860b8411..45163efb2a5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dvar/DvarPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dvar/DvarPostRequestBody.cs @@ -84,7 +84,7 @@ public DvarPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dvar.DvarPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dvar.DvarPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("database", Database); writer.WriteObjectValue("field", Field); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dvar/DvarRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dvar/DvarRequestBuilder.cs index b991c0f1c4f..b5c46ae2a3a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dvar/DvarRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Dvar/DvarRequestBuilder.cs @@ -51,7 +51,7 @@ public DvarRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dvar.DvarPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Dvar.DvarPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DvarP/DvarPPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DvarP/DvarPPostRequestBody.cs index 9ff54a87514..0ab7b84f111 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DvarP/DvarPPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DvarP/DvarPPostRequestBody.cs @@ -84,7 +84,7 @@ public DvarPPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DvarP.DvarPPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DvarP.DvarPPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("database", Database); writer.WriteObjectValue("field", Field); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DvarP/DvarPRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DvarP/DvarPRequestBuilder.cs index 19e24acf345..89995e2b33d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DvarP/DvarPRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/DvarP/DvarPRequestBuilder.cs @@ -51,7 +51,7 @@ public DvarPRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DvarP.DvarPPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.DvarP.DvarPPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ecma_Ceiling/Ecma_CeilingPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ecma_Ceiling/Ecma_CeilingPostRequestBody.cs index a653cc9771d..244141015ca 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ecma_Ceiling/Ecma_CeilingPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ecma_Ceiling/Ecma_CeilingPostRequestBody.cs @@ -68,7 +68,7 @@ public Ecma_CeilingPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ecma_Ceiling.Ecma_CeilingPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ecma_Ceiling.Ecma_CeilingPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("significance", Significance); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ecma_Ceiling/Ecma_CeilingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ecma_Ceiling/Ecma_CeilingRequestBuilder.cs index a6e81769682..503392d1d9f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ecma_Ceiling/Ecma_CeilingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ecma_Ceiling/Ecma_CeilingRequestBuilder.cs @@ -51,7 +51,7 @@ public Ecma_CeilingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ecma_Ceiling.Ecma_CeilingPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ecma_Ceiling.Ecma_CeilingPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Edate/EdatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Edate/EdatePostRequestBody.cs index f791dacf592..61d8b3b2e5f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Edate/EdatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Edate/EdatePostRequestBody.cs @@ -68,7 +68,7 @@ public EdatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Edate.EdatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Edate.EdatePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("months", Months); writer.WriteObjectValue("startDate", StartDate); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Edate/EdateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Edate/EdateRequestBuilder.cs index fc4d967f90d..e1b3d5e074a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Edate/EdateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Edate/EdateRequestBuilder.cs @@ -51,7 +51,7 @@ public EdateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Edate.EdatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Edate.EdatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Effect/EffectPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Effect/EffectPostRequestBody.cs index 3b774bf6dc1..e3443f8f48e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Effect/EffectPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Effect/EffectPostRequestBody.cs @@ -68,7 +68,7 @@ public EffectPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Effect.EffectPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Effect.EffectPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("nominalRate", NominalRate); writer.WriteObjectValue("npery", Npery); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Effect/EffectRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Effect/EffectRequestBuilder.cs index a15eeca07dc..39bfbd22842 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Effect/EffectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Effect/EffectRequestBuilder.cs @@ -51,7 +51,7 @@ public EffectRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Effect.EffectPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Effect.EffectPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/EoMonth/EoMonthPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/EoMonth/EoMonthPostRequestBody.cs index 2fd327cff6d..d8eb9866293 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/EoMonth/EoMonthPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/EoMonth/EoMonthPostRequestBody.cs @@ -68,7 +68,7 @@ public EoMonthPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.EoMonth.EoMonthPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.EoMonth.EoMonthPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("months", Months); writer.WriteObjectValue("startDate", StartDate); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/EoMonth/EoMonthRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/EoMonth/EoMonthRequestBuilder.cs index 8773e1744b2..db20432ab32 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/EoMonth/EoMonthRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/EoMonth/EoMonthRequestBuilder.cs @@ -51,7 +51,7 @@ public EoMonthRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.EoMonth.EoMonthPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.EoMonth.EoMonthPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf/ErfPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf/ErfPostRequestBody.cs index e1729a17d1d..b48ad4c5d30 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf/ErfPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf/ErfPostRequestBody.cs @@ -68,7 +68,7 @@ public ErfPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Erf.ErfPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Erf.ErfPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("lowerLimit", LowerLimit); writer.WriteObjectValue("upperLimit", UpperLimit); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf/ErfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf/ErfRequestBuilder.cs index 4ae839a176b..f1af230d850 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf/ErfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf/ErfRequestBuilder.cs @@ -51,7 +51,7 @@ public ErfRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Erf.ErfPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Erf.ErfPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC/ErfCPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC/ErfCPostRequestBody.cs index b52a8074b89..d0aa3d2c7fd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC/ErfCPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC/ErfCPostRequestBody.cs @@ -52,7 +52,7 @@ public ErfCPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ErfC.ErfCPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ErfC.ErfCPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("x", X); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC/ErfCRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC/ErfCRequestBuilder.cs index 9f8ae27ae29..3abdbfbce47 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC/ErfCRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC/ErfCRequestBuilder.cs @@ -51,7 +51,7 @@ public ErfCRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ErfC.ErfCPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ErfC.ErfCPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC_Precise/ErfC_PrecisePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC_Precise/ErfC_PrecisePostRequestBody.cs index 866c32a7205..750d16af77f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC_Precise/ErfC_PrecisePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC_Precise/ErfC_PrecisePostRequestBody.cs @@ -52,7 +52,7 @@ public ErfC_PrecisePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ErfC_Precise.ErfC_PrecisePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ErfC_Precise.ErfC_PrecisePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("X", X); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC_Precise/ErfC_PreciseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC_Precise/ErfC_PreciseRequestBuilder.cs index e350c90db43..b7901f96986 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC_Precise/ErfC_PreciseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ErfC_Precise/ErfC_PreciseRequestBuilder.cs @@ -51,7 +51,7 @@ public ErfC_PreciseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ErfC_Precise.ErfC_PrecisePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ErfC_Precise.ErfC_PrecisePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf_Precise/Erf_PrecisePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf_Precise/Erf_PrecisePostRequestBody.cs index ba4b31e5557..78e73cd3211 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf_Precise/Erf_PrecisePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf_Precise/Erf_PrecisePostRequestBody.cs @@ -52,7 +52,7 @@ public Erf_PrecisePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Erf_Precise.Erf_PrecisePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Erf_Precise.Erf_PrecisePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("X", X); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf_Precise/Erf_PreciseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf_Precise/Erf_PreciseRequestBuilder.cs index a81584ffa45..ef58ee4495e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf_Precise/Erf_PreciseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Erf_Precise/Erf_PreciseRequestBuilder.cs @@ -51,7 +51,7 @@ public Erf_PreciseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Erf_Precise.Erf_PrecisePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Erf_Precise.Erf_PrecisePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Error_Type/Error_TypePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Error_Type/Error_TypePostRequestBody.cs index 93bea4937d8..b4b8ad0f6cb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Error_Type/Error_TypePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Error_Type/Error_TypePostRequestBody.cs @@ -52,7 +52,7 @@ public Error_TypePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Error_Type.Error_TypePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Error_Type.Error_TypePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("errorVal", ErrorVal); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Error_Type/Error_TypeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Error_Type/Error_TypeRequestBuilder.cs index 35d8c3c1b96..6efd3682b85 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Error_Type/Error_TypeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Error_Type/Error_TypeRequestBuilder.cs @@ -51,7 +51,7 @@ public Error_TypeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Error_Type.Error_TypePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Error_Type.Error_TypePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Even/EvenPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Even/EvenPostRequestBody.cs index 640db6bd96b..d51dfed11b8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Even/EvenPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Even/EvenPostRequestBody.cs @@ -52,7 +52,7 @@ public EvenPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Even.EvenPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Even.EvenPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Even/EvenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Even/EvenRequestBuilder.cs index 42d6b2fb597..5222637f9e6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Even/EvenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Even/EvenRequestBuilder.cs @@ -51,7 +51,7 @@ public EvenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Even.EvenPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Even.EvenPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exact/ExactPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exact/ExactPostRequestBody.cs index 52f6b5d4dce..09d07794f30 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exact/ExactPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exact/ExactPostRequestBody.cs @@ -68,7 +68,7 @@ public ExactPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Exact.ExactPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Exact.ExactPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("text1", Text1); writer.WriteObjectValue("text2", Text2); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exact/ExactRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exact/ExactRequestBuilder.cs index 1dfc2bd18a0..0bc536168b2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exact/ExactRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exact/ExactRequestBuilder.cs @@ -51,7 +51,7 @@ public ExactRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Exact.ExactPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Exact.ExactPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exp/ExpPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exp/ExpPostRequestBody.cs index b0c1b466993..bb41bae272f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exp/ExpPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exp/ExpPostRequestBody.cs @@ -52,7 +52,7 @@ public ExpPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Exp.ExpPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Exp.ExpPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exp/ExpRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exp/ExpRequestBuilder.cs index f825fcc2ed1..398f410588a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exp/ExpRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Exp/ExpRequestBuilder.cs @@ -51,7 +51,7 @@ public ExpRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Exp.ExpPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Exp.ExpPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Expon_Dist/Expon_DistPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Expon_Dist/Expon_DistPostRequestBody.cs index 2324b66416a..00075e063ad 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Expon_Dist/Expon_DistPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Expon_Dist/Expon_DistPostRequestBody.cs @@ -84,7 +84,7 @@ public Expon_DistPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Expon_Dist.Expon_DistPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Expon_Dist.Expon_DistPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cumulative", Cumulative); writer.WriteObjectValue("lambda", Lambda); writer.WriteObjectValue("x", X); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Expon_Dist/Expon_DistRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Expon_Dist/Expon_DistRequestBuilder.cs index 7c8275fab23..ce9d8b81306 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Expon_Dist/Expon_DistRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Expon_Dist/Expon_DistRequestBuilder.cs @@ -51,7 +51,7 @@ public Expon_DistRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Expon_Dist.Expon_DistPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Expon_Dist.Expon_DistPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist/F_DistPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist/F_DistPostRequestBody.cs index f96f66d7ecf..9e55988ce5a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist/F_DistPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist/F_DistPostRequestBody.cs @@ -100,7 +100,7 @@ public F_DistPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Dist.F_DistPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Dist.F_DistPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cumulative", Cumulative); writer.WriteObjectValue("degFreedom1", DegFreedom1); writer.WriteObjectValue("degFreedom2", DegFreedom2); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist/F_DistRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist/F_DistRequestBuilder.cs index d9b6e8ac129..7bf216d62ef 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist/F_DistRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist/F_DistRequestBuilder.cs @@ -51,7 +51,7 @@ public F_DistRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Dist.F_DistPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Dist.F_DistPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist_RT/F_Dist_RTPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist_RT/F_Dist_RTPostRequestBody.cs index b7ab5905882..fc09cf492d7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist_RT/F_Dist_RTPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist_RT/F_Dist_RTPostRequestBody.cs @@ -84,7 +84,7 @@ public F_Dist_RTPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Dist_RT.F_Dist_RTPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Dist_RT.F_Dist_RTPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("degFreedom1", DegFreedom1); writer.WriteObjectValue("degFreedom2", DegFreedom2); writer.WriteObjectValue("x", X); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist_RT/F_Dist_RTRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist_RT/F_Dist_RTRequestBuilder.cs index b216409d789..7682d134f56 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist_RT/F_Dist_RTRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Dist_RT/F_Dist_RTRequestBuilder.cs @@ -51,7 +51,7 @@ public F_Dist_RTRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Dist_RT.F_Dist_RTPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Dist_RT.F_Dist_RTPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv/F_InvPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv/F_InvPostRequestBody.cs index 53424a547b4..1391951df4f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv/F_InvPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv/F_InvPostRequestBody.cs @@ -84,7 +84,7 @@ public F_InvPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Inv.F_InvPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Inv.F_InvPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("degFreedom1", DegFreedom1); writer.WriteObjectValue("degFreedom2", DegFreedom2); writer.WriteObjectValue("probability", Probability); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv/F_InvRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv/F_InvRequestBuilder.cs index d9cbf36b294..e5af588729c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv/F_InvRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv/F_InvRequestBuilder.cs @@ -51,7 +51,7 @@ public F_InvRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Inv.F_InvPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Inv.F_InvPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv_RT/F_Inv_RTPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv_RT/F_Inv_RTPostRequestBody.cs index 1be426a5e15..a2946b525d6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv_RT/F_Inv_RTPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv_RT/F_Inv_RTPostRequestBody.cs @@ -84,7 +84,7 @@ public F_Inv_RTPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Inv_RT.F_Inv_RTPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Inv_RT.F_Inv_RTPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("degFreedom1", DegFreedom1); writer.WriteObjectValue("degFreedom2", DegFreedom2); writer.WriteObjectValue("probability", Probability); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv_RT/F_Inv_RTRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv_RT/F_Inv_RTRequestBuilder.cs index 23e411aaf59..0a69a508da1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv_RT/F_Inv_RTRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/F_Inv_RT/F_Inv_RTRequestBuilder.cs @@ -51,7 +51,7 @@ public F_Inv_RTRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Inv_RT.F_Inv_RTPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.F_Inv_RT.F_Inv_RTPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fact/FactPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fact/FactPostRequestBody.cs index 253a30b6d15..826ce10cee9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fact/FactPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fact/FactPostRequestBody.cs @@ -52,7 +52,7 @@ public FactPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fact.FactPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fact.FactPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fact/FactRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fact/FactRequestBuilder.cs index 9cf6ebb4342..776139dd173 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fact/FactRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fact/FactRequestBuilder.cs @@ -51,7 +51,7 @@ public FactRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fact.FactPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fact.FactPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FactDouble/FactDoublePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FactDouble/FactDoublePostRequestBody.cs index 9c7486c83fb..3a48fd06e94 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FactDouble/FactDoublePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FactDouble/FactDoublePostRequestBody.cs @@ -52,7 +52,7 @@ public FactDoublePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.FactDouble.FactDoublePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.FactDouble.FactDoublePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FactDouble/FactDoubleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FactDouble/FactDoubleRequestBuilder.cs index 042d6eac80a..4c2b370ab4b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FactDouble/FactDoubleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FactDouble/FactDoubleRequestBuilder.cs @@ -51,7 +51,7 @@ public FactDoubleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.FactDouble.FactDoublePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.FactDouble.FactDoublePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Find/FindPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Find/FindPostRequestBody.cs index 50564a6d36a..96a2902b3e3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Find/FindPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Find/FindPostRequestBody.cs @@ -84,7 +84,7 @@ public FindPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Find.FindPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Find.FindPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("findText", FindText); writer.WriteObjectValue("startNum", StartNum); writer.WriteObjectValue("withinText", WithinText); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Find/FindRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Find/FindRequestBuilder.cs index 03d8101db55..7b8191edd91 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Find/FindRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Find/FindRequestBuilder.cs @@ -51,7 +51,7 @@ public FindRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Find.FindPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Find.FindPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FindB/FindBPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FindB/FindBPostRequestBody.cs index a2b2c438792..379513962b1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FindB/FindBPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FindB/FindBPostRequestBody.cs @@ -84,7 +84,7 @@ public FindBPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.FindB.FindBPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.FindB.FindBPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("findText", FindText); writer.WriteObjectValue("startNum", StartNum); writer.WriteObjectValue("withinText", WithinText); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FindB/FindBRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FindB/FindBRequestBuilder.cs index c94892f0fd6..03fc380c214 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FindB/FindBRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FindB/FindBRequestBuilder.cs @@ -51,7 +51,7 @@ public FindBRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.FindB.FindBPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.FindB.FindBPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fisher/FisherPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fisher/FisherPostRequestBody.cs index cc2a8788f9c..3e570b75ec8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fisher/FisherPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fisher/FisherPostRequestBody.cs @@ -52,7 +52,7 @@ public FisherPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fisher.FisherPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fisher.FisherPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("x", X); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fisher/FisherRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fisher/FisherRequestBuilder.cs index f8e1b2c3fac..f15aec5c59b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fisher/FisherRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fisher/FisherRequestBuilder.cs @@ -51,7 +51,7 @@ public FisherRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fisher.FisherPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fisher.FisherPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FisherInv/FisherInvPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FisherInv/FisherInvPostRequestBody.cs index 29553a18548..f40115b5a18 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FisherInv/FisherInvPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FisherInv/FisherInvPostRequestBody.cs @@ -52,7 +52,7 @@ public FisherInvPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.FisherInv.FisherInvPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.FisherInv.FisherInvPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("y", Y); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FisherInv/FisherInvRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FisherInv/FisherInvRequestBuilder.cs index a71db9028a8..3351768ab7c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FisherInv/FisherInvRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FisherInv/FisherInvRequestBuilder.cs @@ -51,7 +51,7 @@ public FisherInvRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.FisherInv.FisherInvPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.FisherInv.FisherInvPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fixed/FixedPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fixed/FixedPostRequestBody.cs index 1cfde95c5a5..65237b4b4ad 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fixed/FixedPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fixed/FixedPostRequestBody.cs @@ -84,7 +84,7 @@ public FixedPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fixed.FixedPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fixed.FixedPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("decimals", Decimals); writer.WriteObjectValue("noCommas", NoCommas); writer.WriteObjectValue("number", Number); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fixed/FixedRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fixed/FixedRequestBuilder.cs index d668b3631bb..9769d32dec5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fixed/FixedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fixed/FixedRequestBuilder.cs @@ -51,7 +51,7 @@ public FixedRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fixed.FixedPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fixed.FixedPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Math/Floor_MathPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Math/Floor_MathPostRequestBody.cs index 09307ec9c77..e1d5439d384 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Math/Floor_MathPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Math/Floor_MathPostRequestBody.cs @@ -84,7 +84,7 @@ public Floor_MathPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Floor_Math.Floor_MathPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Floor_Math.Floor_MathPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("mode", Mode); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("significance", Significance); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Math/Floor_MathRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Math/Floor_MathRequestBuilder.cs index ac369301d50..182ebdee183 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Math/Floor_MathRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Math/Floor_MathRequestBuilder.cs @@ -51,7 +51,7 @@ public Floor_MathRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Floor_Math.Floor_MathPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Floor_Math.Floor_MathPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Precise/Floor_PrecisePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Precise/Floor_PrecisePostRequestBody.cs index 6638a8c0dd8..4bfa954e26b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Precise/Floor_PrecisePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Precise/Floor_PrecisePostRequestBody.cs @@ -68,7 +68,7 @@ public Floor_PrecisePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Floor_Precise.Floor_PrecisePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Floor_Precise.Floor_PrecisePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("significance", Significance); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Precise/Floor_PreciseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Precise/Floor_PreciseRequestBuilder.cs index f92c2c5c985..dc30284eca5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Precise/Floor_PreciseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Floor_Precise/Floor_PreciseRequestBuilder.cs @@ -51,7 +51,7 @@ public Floor_PreciseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Floor_Precise.Floor_PrecisePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Floor_Precise.Floor_PrecisePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FunctionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FunctionsRequestBuilder.cs index 0f6c851fabb..573e734a0fe 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FunctionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/FunctionsRequestBuilder.cs @@ -2292,7 +2292,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookFunctions body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -2353,7 +2353,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookFunctions body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fv/FvPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fv/FvPostRequestBody.cs index aceeb325f7c..ace3da85fd8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fv/FvPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fv/FvPostRequestBody.cs @@ -116,7 +116,7 @@ public FvPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fv.FvPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fv.FvPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("nper", Nper); writer.WriteObjectValue("pmt", Pmt); writer.WriteObjectValue("pv", Pv); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fv/FvRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fv/FvRequestBuilder.cs index 30082061885..c5c7a02b1da 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fv/FvRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fv/FvRequestBuilder.cs @@ -51,7 +51,7 @@ public FvRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(re public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fv.FvPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fv.FvPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fvschedule/FvschedulePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fvschedule/FvschedulePostRequestBody.cs index 200f780a84f..d4919ed6074 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fvschedule/FvschedulePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fvschedule/FvschedulePostRequestBody.cs @@ -68,7 +68,7 @@ public FvschedulePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fvschedule.FvschedulePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fvschedule.FvschedulePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("principal", Principal); writer.WriteObjectValue("schedule", Schedule); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fvschedule/FvscheduleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fvschedule/FvscheduleRequestBuilder.cs index d13ce21fa47..01f07ab63c9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fvschedule/FvscheduleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Fvschedule/FvscheduleRequestBuilder.cs @@ -51,7 +51,7 @@ public FvscheduleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fvschedule.FvschedulePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Fvschedule.FvschedulePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma/GammaPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma/GammaPostRequestBody.cs index e9870c9be84..2cda3473d87 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma/GammaPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma/GammaPostRequestBody.cs @@ -52,7 +52,7 @@ public GammaPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gamma.GammaPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gamma.GammaPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("x", X); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma/GammaRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma/GammaRequestBuilder.cs index a4354d22245..e364c11239f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma/GammaRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma/GammaRequestBuilder.cs @@ -51,7 +51,7 @@ public GammaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gamma.GammaPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gamma.GammaPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn/GammaLnPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn/GammaLnPostRequestBody.cs index 299f786554d..b5ca25b3e06 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn/GammaLnPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn/GammaLnPostRequestBody.cs @@ -52,7 +52,7 @@ public GammaLnPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GammaLn.GammaLnPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GammaLn.GammaLnPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("x", X); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn/GammaLnRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn/GammaLnRequestBuilder.cs index 8ab8b347d13..a1242b77ac7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn/GammaLnRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn/GammaLnRequestBuilder.cs @@ -51,7 +51,7 @@ public GammaLnRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GammaLn.GammaLnPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GammaLn.GammaLnPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn_Precise/GammaLn_PrecisePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn_Precise/GammaLn_PrecisePostRequestBody.cs index b4875569811..56f6c10135b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn_Precise/GammaLn_PrecisePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn_Precise/GammaLn_PrecisePostRequestBody.cs @@ -52,7 +52,7 @@ public GammaLn_PrecisePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GammaLn_Precise.GammaLn_PrecisePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GammaLn_Precise.GammaLn_PrecisePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("x", X); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn_Precise/GammaLn_PreciseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn_Precise/GammaLn_PreciseRequestBuilder.cs index e52b708e7c5..77b6ee04f21 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn_Precise/GammaLn_PreciseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GammaLn_Precise/GammaLn_PreciseRequestBuilder.cs @@ -51,7 +51,7 @@ public GammaLn_PreciseRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GammaLn_Precise.GammaLn_PrecisePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GammaLn_Precise.GammaLn_PrecisePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Dist/Gamma_DistPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Dist/Gamma_DistPostRequestBody.cs index 150f28fc42c..5007983ded2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Dist/Gamma_DistPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Dist/Gamma_DistPostRequestBody.cs @@ -100,7 +100,7 @@ public Gamma_DistPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gamma_Dist.Gamma_DistPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gamma_Dist.Gamma_DistPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("alpha", Alpha); writer.WriteObjectValue("beta", Beta); writer.WriteObjectValue("cumulative", Cumulative); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Dist/Gamma_DistRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Dist/Gamma_DistRequestBuilder.cs index 5fe9af844e0..218a994c850 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Dist/Gamma_DistRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Dist/Gamma_DistRequestBuilder.cs @@ -51,7 +51,7 @@ public Gamma_DistRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gamma_Dist.Gamma_DistPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gamma_Dist.Gamma_DistPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Inv/Gamma_InvPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Inv/Gamma_InvPostRequestBody.cs index d141c7ed8c6..a4a63a864f8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Inv/Gamma_InvPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Inv/Gamma_InvPostRequestBody.cs @@ -84,7 +84,7 @@ public Gamma_InvPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gamma_Inv.Gamma_InvPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gamma_Inv.Gamma_InvPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("alpha", Alpha); writer.WriteObjectValue("beta", Beta); writer.WriteObjectValue("probability", Probability); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Inv/Gamma_InvRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Inv/Gamma_InvRequestBuilder.cs index 415e2d9f012..f3c99255ae7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Inv/Gamma_InvRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gamma_Inv/Gamma_InvRequestBuilder.cs @@ -51,7 +51,7 @@ public Gamma_InvRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gamma_Inv.Gamma_InvPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gamma_Inv.Gamma_InvPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gauss/GaussPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gauss/GaussPostRequestBody.cs index c118be4ebeb..f89b8e3ac3e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gauss/GaussPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gauss/GaussPostRequestBody.cs @@ -52,7 +52,7 @@ public GaussPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gauss.GaussPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gauss.GaussPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("x", X); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gauss/GaussRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gauss/GaussRequestBuilder.cs index 8bbc8f408b2..257fe47ab3f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gauss/GaussRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gauss/GaussRequestBuilder.cs @@ -51,7 +51,7 @@ public GaussRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gauss.GaussPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gauss.GaussPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gcd/GcdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gcd/GcdPostRequestBody.cs index 1ca90075b42..075f8f2e967 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gcd/GcdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gcd/GcdPostRequestBody.cs @@ -52,7 +52,7 @@ public GcdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gcd.GcdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gcd.GcdPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gcd/GcdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gcd/GcdRequestBuilder.cs index c9439a331c0..9a94e42a420 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gcd/GcdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Gcd/GcdRequestBuilder.cs @@ -51,7 +51,7 @@ public GcdRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gcd.GcdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Gcd.GcdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeStep/GeStepPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeStep/GeStepPostRequestBody.cs index 8b1b4a82382..91f7ed4f9cd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeStep/GeStepPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeStep/GeStepPostRequestBody.cs @@ -68,7 +68,7 @@ public GeStepPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GeStep.GeStepPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GeStep.GeStepPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("step", Step); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeStep/GeStepRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeStep/GeStepRequestBuilder.cs index e6b6abc4eb9..cead0c8ebde 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeStep/GeStepRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeStep/GeStepRequestBuilder.cs @@ -51,7 +51,7 @@ public GeStepRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GeStep.GeStepPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GeStep.GeStepPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeoMean/GeoMeanPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeoMean/GeoMeanPostRequestBody.cs index 6fa59abb475..3fa36f29bc4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeoMean/GeoMeanPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeoMean/GeoMeanPostRequestBody.cs @@ -52,7 +52,7 @@ public GeoMeanPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GeoMean.GeoMeanPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GeoMean.GeoMeanPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeoMean/GeoMeanRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeoMean/GeoMeanRequestBuilder.cs index 9116416cb66..e7ae4b7bb19 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeoMean/GeoMeanRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/GeoMean/GeoMeanRequestBuilder.cs @@ -51,7 +51,7 @@ public GeoMeanRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GeoMean.GeoMeanPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.GeoMean.GeoMeanPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HarMean/HarMeanPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HarMean/HarMeanPostRequestBody.cs index 076bb9c77d6..d98fe1307cd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HarMean/HarMeanPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HarMean/HarMeanPostRequestBody.cs @@ -52,7 +52,7 @@ public HarMeanPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.HarMean.HarMeanPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.HarMean.HarMeanPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HarMean/HarMeanRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HarMean/HarMeanRequestBuilder.cs index 05ada1f637b..a54d7fb123f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HarMean/HarMeanRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HarMean/HarMeanRequestBuilder.cs @@ -51,7 +51,7 @@ public HarMeanRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.HarMean.HarMeanPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.HarMean.HarMeanPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Bin/Hex2BinPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Bin/Hex2BinPostRequestBody.cs index e11eb427060..dd6bfc7743e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Bin/Hex2BinPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Bin/Hex2BinPostRequestBody.cs @@ -68,7 +68,7 @@ public Hex2BinPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hex2Bin.Hex2BinPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hex2Bin.Hex2BinPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("places", Places); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Bin/Hex2BinRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Bin/Hex2BinRequestBuilder.cs index de44364b995..cf8be6c9cbd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Bin/Hex2BinRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Bin/Hex2BinRequestBuilder.cs @@ -51,7 +51,7 @@ public Hex2BinRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hex2Bin.Hex2BinPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hex2Bin.Hex2BinPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Dec/Hex2DecPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Dec/Hex2DecPostRequestBody.cs index 1e17ff06c1d..ad166f44271 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Dec/Hex2DecPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Dec/Hex2DecPostRequestBody.cs @@ -52,7 +52,7 @@ public Hex2DecPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hex2Dec.Hex2DecPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hex2Dec.Hex2DecPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Dec/Hex2DecRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Dec/Hex2DecRequestBuilder.cs index c3e023264e9..a05e33b1ed9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Dec/Hex2DecRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Dec/Hex2DecRequestBuilder.cs @@ -51,7 +51,7 @@ public Hex2DecRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hex2Dec.Hex2DecPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hex2Dec.Hex2DecPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Oct/Hex2OctPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Oct/Hex2OctPostRequestBody.cs index b9d3689ef5d..816b3a00b6a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Oct/Hex2OctPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Oct/Hex2OctPostRequestBody.cs @@ -68,7 +68,7 @@ public Hex2OctPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hex2Oct.Hex2OctPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hex2Oct.Hex2OctPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("places", Places); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Oct/Hex2OctRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Oct/Hex2OctRequestBuilder.cs index 14a2813fbc4..1e54bf09731 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Oct/Hex2OctRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hex2Oct/Hex2OctRequestBuilder.cs @@ -51,7 +51,7 @@ public Hex2OctRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hex2Oct.Hex2OctPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hex2Oct.Hex2OctPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hlookup/HlookupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hlookup/HlookupPostRequestBody.cs index 4565989d85a..7c0ecce6b27 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hlookup/HlookupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hlookup/HlookupPostRequestBody.cs @@ -100,7 +100,7 @@ public HlookupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hlookup.HlookupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hlookup.HlookupPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("lookupValue", LookupValue); writer.WriteObjectValue("rangeLookup", RangeLookup); writer.WriteObjectValue("rowIndexNum", RowIndexNum); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hlookup/HlookupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hlookup/HlookupRequestBuilder.cs index e5af004497b..8a42c1b939a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hlookup/HlookupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hlookup/HlookupRequestBuilder.cs @@ -51,7 +51,7 @@ public HlookupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hlookup.HlookupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hlookup.HlookupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hour/HourPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hour/HourPostRequestBody.cs index 588cf1a052e..f1e7822cc3e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hour/HourPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hour/HourPostRequestBody.cs @@ -52,7 +52,7 @@ public HourPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hour.HourPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hour.HourPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("serialNumber", SerialNumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hour/HourRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hour/HourRequestBuilder.cs index 650e7eac0a7..60c39b61cc4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hour/HourRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hour/HourRequestBuilder.cs @@ -51,7 +51,7 @@ public HourRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hour.HourPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hour.HourPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HypGeom_Dist/HypGeom_DistPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HypGeom_Dist/HypGeom_DistPostRequestBody.cs index 656da87d304..49de9a6836e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HypGeom_Dist/HypGeom_DistPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HypGeom_Dist/HypGeom_DistPostRequestBody.cs @@ -116,7 +116,7 @@ public HypGeom_DistPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.HypGeom_Dist.HypGeom_DistPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.HypGeom_Dist.HypGeom_DistPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cumulative", Cumulative); writer.WriteObjectValue("numberPop", NumberPop); writer.WriteObjectValue("numberSample", NumberSample); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HypGeom_Dist/HypGeom_DistRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HypGeom_Dist/HypGeom_DistRequestBuilder.cs index 8e02c6819a9..8bb3c4b95ec 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HypGeom_Dist/HypGeom_DistRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/HypGeom_Dist/HypGeom_DistRequestBuilder.cs @@ -51,7 +51,7 @@ public HypGeom_DistRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.HypGeom_Dist.HypGeom_DistPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.HypGeom_Dist.HypGeom_DistPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hyperlink/HyperlinkPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hyperlink/HyperlinkPostRequestBody.cs index 7334b6e1bbc..f1b6428d6e7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hyperlink/HyperlinkPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hyperlink/HyperlinkPostRequestBody.cs @@ -68,7 +68,7 @@ public HyperlinkPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hyperlink.HyperlinkPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hyperlink.HyperlinkPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("friendlyName", FriendlyName); writer.WriteObjectValue("linkLocation", LinkLocation); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hyperlink/HyperlinkRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hyperlink/HyperlinkRequestBuilder.cs index d1f8085b117..1500fc66b3b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hyperlink/HyperlinkRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Hyperlink/HyperlinkRequestBuilder.cs @@ -51,7 +51,7 @@ public HyperlinkRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hyperlink.HyperlinkPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Hyperlink.HyperlinkPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/If/IfPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/If/IfPostRequestBody.cs index 046ba248d43..3a2b2652e38 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/If/IfPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/If/IfPostRequestBody.cs @@ -84,7 +84,7 @@ public IfPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.If.IfPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.If.IfPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("logicalTest", LogicalTest); writer.WriteObjectValue("valueIfFalse", ValueIfFalse); writer.WriteObjectValue("valueIfTrue", ValueIfTrue); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/If/IfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/If/IfRequestBuilder.cs index dfcbc87e95d..9f3179406a4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/If/IfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/If/IfRequestBuilder.cs @@ -51,7 +51,7 @@ public IfRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(re public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.If.IfPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.If.IfPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImAbs/ImAbsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImAbs/ImAbsPostRequestBody.cs index 9601a1c7359..15a87cdd79e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImAbs/ImAbsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImAbs/ImAbsPostRequestBody.cs @@ -52,7 +52,7 @@ public ImAbsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImAbs.ImAbsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImAbs.ImAbsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImAbs/ImAbsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImAbs/ImAbsRequestBuilder.cs index 1fe34187fd6..52d1cede55e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImAbs/ImAbsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImAbs/ImAbsRequestBuilder.cs @@ -51,7 +51,7 @@ public ImAbsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImAbs.ImAbsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImAbs.ImAbsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImArgument/ImArgumentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImArgument/ImArgumentPostRequestBody.cs index 156ea974187..f3ad9d8ba28 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImArgument/ImArgumentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImArgument/ImArgumentPostRequestBody.cs @@ -52,7 +52,7 @@ public ImArgumentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImArgument.ImArgumentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImArgument.ImArgumentPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImArgument/ImArgumentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImArgument/ImArgumentRequestBuilder.cs index 515bdd20a78..3aab3c43a0e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImArgument/ImArgumentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImArgument/ImArgumentRequestBuilder.cs @@ -51,7 +51,7 @@ public ImArgumentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImArgument.ImArgumentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImArgument.ImArgumentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImConjugate/ImConjugatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImConjugate/ImConjugatePostRequestBody.cs index 74a4604c229..760cf139ebc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImConjugate/ImConjugatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImConjugate/ImConjugatePostRequestBody.cs @@ -52,7 +52,7 @@ public ImConjugatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImConjugate.ImConjugatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImConjugate.ImConjugatePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImConjugate/ImConjugateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImConjugate/ImConjugateRequestBuilder.cs index 497a1c786fe..5263b1ab441 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImConjugate/ImConjugateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImConjugate/ImConjugateRequestBuilder.cs @@ -51,7 +51,7 @@ public ImConjugateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImConjugate.ImConjugatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImConjugate.ImConjugatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCos/ImCosPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCos/ImCosPostRequestBody.cs index 3f1ea7c6d71..c429db49aca 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCos/ImCosPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCos/ImCosPostRequestBody.cs @@ -52,7 +52,7 @@ public ImCosPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCos.ImCosPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCos.ImCosPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCos/ImCosRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCos/ImCosRequestBuilder.cs index 4fc99275a42..32afd54c358 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCos/ImCosRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCos/ImCosRequestBuilder.cs @@ -51,7 +51,7 @@ public ImCosRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCos.ImCosPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCos.ImCosPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCosh/ImCoshPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCosh/ImCoshPostRequestBody.cs index cdc1917f954..55c16736e7d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCosh/ImCoshPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCosh/ImCoshPostRequestBody.cs @@ -52,7 +52,7 @@ public ImCoshPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCosh.ImCoshPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCosh.ImCoshPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCosh/ImCoshRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCosh/ImCoshRequestBuilder.cs index 45c1d1e8d4e..c29038ad153 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCosh/ImCoshRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCosh/ImCoshRequestBuilder.cs @@ -51,7 +51,7 @@ public ImCoshRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCosh.ImCoshPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCosh.ImCoshPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCot/ImCotPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCot/ImCotPostRequestBody.cs index 5300db7bcda..67a63c1852a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCot/ImCotPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCot/ImCotPostRequestBody.cs @@ -52,7 +52,7 @@ public ImCotPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCot.ImCotPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCot.ImCotPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCot/ImCotRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCot/ImCotRequestBuilder.cs index fcf4f7b7828..4287d07123e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCot/ImCotRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCot/ImCotRequestBuilder.cs @@ -51,7 +51,7 @@ public ImCotRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCot.ImCotPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCot.ImCotPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsc/ImCscPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsc/ImCscPostRequestBody.cs index 546b002d89f..98186aa3316 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsc/ImCscPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsc/ImCscPostRequestBody.cs @@ -52,7 +52,7 @@ public ImCscPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCsc.ImCscPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCsc.ImCscPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsc/ImCscRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsc/ImCscRequestBuilder.cs index bb60b7d5057..ff8b51b9ac2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsc/ImCscRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsc/ImCscRequestBuilder.cs @@ -51,7 +51,7 @@ public ImCscRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCsc.ImCscPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCsc.ImCscPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsch/ImCschPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsch/ImCschPostRequestBody.cs index 28c50e1fea4..c2d05caf141 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsch/ImCschPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsch/ImCschPostRequestBody.cs @@ -52,7 +52,7 @@ public ImCschPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCsch.ImCschPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCsch.ImCschPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsch/ImCschRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsch/ImCschRequestBuilder.cs index c560870d4b1..5f9a4488b91 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsch/ImCschRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImCsch/ImCschRequestBuilder.cs @@ -51,7 +51,7 @@ public ImCschRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCsch.ImCschPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImCsch.ImCschPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImDiv/ImDivPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImDiv/ImDivPostRequestBody.cs index 6d47c272831..eda9d2c267a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImDiv/ImDivPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImDiv/ImDivPostRequestBody.cs @@ -68,7 +68,7 @@ public ImDivPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImDiv.ImDivPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImDiv.ImDivPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber1", Inumber1); writer.WriteObjectValue("inumber2", Inumber2); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImDiv/ImDivRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImDiv/ImDivRequestBuilder.cs index ae89d3ad906..43d2999d06f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImDiv/ImDivRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImDiv/ImDivRequestBuilder.cs @@ -51,7 +51,7 @@ public ImDivRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImDiv.ImDivPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImDiv.ImDivPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImExp/ImExpPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImExp/ImExpPostRequestBody.cs index 184aab8e290..62d88dc3043 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImExp/ImExpPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImExp/ImExpPostRequestBody.cs @@ -52,7 +52,7 @@ public ImExpPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImExp.ImExpPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImExp.ImExpPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImExp/ImExpRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImExp/ImExpRequestBuilder.cs index 4321ec6b026..bef3bda5fee 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImExp/ImExpRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImExp/ImExpRequestBuilder.cs @@ -51,7 +51,7 @@ public ImExpRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImExp.ImExpPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImExp.ImExpPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLn/ImLnPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLn/ImLnPostRequestBody.cs index 54f142b9dbf..f9ab0cb507c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLn/ImLnPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLn/ImLnPostRequestBody.cs @@ -52,7 +52,7 @@ public ImLnPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImLn.ImLnPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImLn.ImLnPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLn/ImLnRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLn/ImLnRequestBuilder.cs index 591f49b4ec5..f174652659a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLn/ImLnRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLn/ImLnRequestBuilder.cs @@ -51,7 +51,7 @@ public ImLnRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImLn.ImLnPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImLn.ImLnPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog10/ImLog10PostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog10/ImLog10PostRequestBody.cs index 56093f05eb2..5a926f11324 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog10/ImLog10PostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog10/ImLog10PostRequestBody.cs @@ -52,7 +52,7 @@ public ImLog10PostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImLog10.ImLog10PostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImLog10.ImLog10PostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog10/ImLog10RequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog10/ImLog10RequestBuilder.cs index 252dd2ad539..58d70dd97ad 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog10/ImLog10RequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog10/ImLog10RequestBuilder.cs @@ -51,7 +51,7 @@ public ImLog10RequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImLog10.ImLog10PostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImLog10.ImLog10PostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog2/ImLog2PostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog2/ImLog2PostRequestBody.cs index 0986f42389c..6c12c218360 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog2/ImLog2PostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog2/ImLog2PostRequestBody.cs @@ -52,7 +52,7 @@ public ImLog2PostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImLog2.ImLog2PostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImLog2.ImLog2PostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog2/ImLog2RequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog2/ImLog2RequestBuilder.cs index bb5094b30f4..a779af0fe43 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog2/ImLog2RequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImLog2/ImLog2RequestBuilder.cs @@ -51,7 +51,7 @@ public ImLog2RequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImLog2.ImLog2PostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImLog2.ImLog2PostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImPower/ImPowerPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImPower/ImPowerPostRequestBody.cs index a668e3e234a..1a4593a1f5f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImPower/ImPowerPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImPower/ImPowerPostRequestBody.cs @@ -68,7 +68,7 @@ public ImPowerPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImPower.ImPowerPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImPower.ImPowerPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImPower/ImPowerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImPower/ImPowerRequestBuilder.cs index de98e62f0f8..07c77361bf7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImPower/ImPowerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImPower/ImPowerRequestBuilder.cs @@ -51,7 +51,7 @@ public ImPowerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImPower.ImPowerPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImPower.ImPowerPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImProduct/ImProductPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImProduct/ImProductPostRequestBody.cs index a798a7fe0ff..30be563f56a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImProduct/ImProductPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImProduct/ImProductPostRequestBody.cs @@ -52,7 +52,7 @@ public ImProductPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImProduct.ImProductPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImProduct.ImProductPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImProduct/ImProductRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImProduct/ImProductRequestBuilder.cs index deebc228f19..369b363ecb1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImProduct/ImProductRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImProduct/ImProductRequestBuilder.cs @@ -51,7 +51,7 @@ public ImProductRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImProduct.ImProductPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImProduct.ImProductPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImReal/ImRealPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImReal/ImRealPostRequestBody.cs index 4ab62ab66fa..f4c44005ff3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImReal/ImRealPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImReal/ImRealPostRequestBody.cs @@ -52,7 +52,7 @@ public ImRealPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImReal.ImRealPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImReal.ImRealPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImReal/ImRealRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImReal/ImRealRequestBuilder.cs index d3031d0d819..1677d53a5be 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImReal/ImRealRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImReal/ImRealRequestBuilder.cs @@ -51,7 +51,7 @@ public ImRealRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImReal.ImRealPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImReal.ImRealPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSec/ImSecPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSec/ImSecPostRequestBody.cs index 26bc351f202..9d954ffdc36 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSec/ImSecPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSec/ImSecPostRequestBody.cs @@ -52,7 +52,7 @@ public ImSecPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSec.ImSecPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSec.ImSecPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSec/ImSecRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSec/ImSecRequestBuilder.cs index 68d5caff1bb..d1ea0cea432 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSec/ImSecRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSec/ImSecRequestBuilder.cs @@ -51,7 +51,7 @@ public ImSecRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSec.ImSecPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSec.ImSecPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSech/ImSechPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSech/ImSechPostRequestBody.cs index d0db4fe4161..f5b40e47f35 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSech/ImSechPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSech/ImSechPostRequestBody.cs @@ -52,7 +52,7 @@ public ImSechPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSech.ImSechPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSech.ImSechPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSech/ImSechRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSech/ImSechRequestBuilder.cs index 21506e20268..24cb659b9af 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSech/ImSechRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSech/ImSechRequestBuilder.cs @@ -51,7 +51,7 @@ public ImSechRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSech.ImSechPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSech.ImSechPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSin/ImSinPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSin/ImSinPostRequestBody.cs index c3559695dd1..60f80d2d2b9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSin/ImSinPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSin/ImSinPostRequestBody.cs @@ -52,7 +52,7 @@ public ImSinPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSin.ImSinPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSin.ImSinPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSin/ImSinRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSin/ImSinRequestBuilder.cs index baa886b5a37..9122ca54ddc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSin/ImSinRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSin/ImSinRequestBuilder.cs @@ -51,7 +51,7 @@ public ImSinRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSin.ImSinPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSin.ImSinPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSinh/ImSinhPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSinh/ImSinhPostRequestBody.cs index e117f6d270a..43dbca8d28f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSinh/ImSinhPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSinh/ImSinhPostRequestBody.cs @@ -52,7 +52,7 @@ public ImSinhPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSinh.ImSinhPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSinh.ImSinhPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSinh/ImSinhRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSinh/ImSinhRequestBuilder.cs index 189a03d2f96..8e9733d4c56 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSinh/ImSinhRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSinh/ImSinhRequestBuilder.cs @@ -51,7 +51,7 @@ public ImSinhRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSinh.ImSinhPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSinh.ImSinhPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSqrt/ImSqrtPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSqrt/ImSqrtPostRequestBody.cs index 1d976c3bb21..3bc7bcb45fe 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSqrt/ImSqrtPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSqrt/ImSqrtPostRequestBody.cs @@ -52,7 +52,7 @@ public ImSqrtPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSqrt.ImSqrtPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSqrt.ImSqrtPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSqrt/ImSqrtRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSqrt/ImSqrtRequestBuilder.cs index 92168eb7a1d..693d843aa19 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSqrt/ImSqrtRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSqrt/ImSqrtRequestBuilder.cs @@ -51,7 +51,7 @@ public ImSqrtRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSqrt.ImSqrtPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSqrt.ImSqrtPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSub/ImSubPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSub/ImSubPostRequestBody.cs index 6feecb9f2ed..b6bdac2f078 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSub/ImSubPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSub/ImSubPostRequestBody.cs @@ -68,7 +68,7 @@ public ImSubPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSub.ImSubPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSub.ImSubPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber1", Inumber1); writer.WriteObjectValue("inumber2", Inumber2); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSub/ImSubRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSub/ImSubRequestBuilder.cs index 93ccc9a3f6b..3fd90362fb5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSub/ImSubRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSub/ImSubRequestBuilder.cs @@ -51,7 +51,7 @@ public ImSubRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSub.ImSubPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSub.ImSubPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSum/ImSumPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSum/ImSumPostRequestBody.cs index 1dcb8485c80..0943fc2f83d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSum/ImSumPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSum/ImSumPostRequestBody.cs @@ -52,7 +52,7 @@ public ImSumPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSum.ImSumPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSum.ImSumPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSum/ImSumRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSum/ImSumRequestBuilder.cs index d3001e33a3a..bae40151c65 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSum/ImSumRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImSum/ImSumRequestBuilder.cs @@ -51,7 +51,7 @@ public ImSumRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSum.ImSumPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImSum.ImSumPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImTan/ImTanPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImTan/ImTanPostRequestBody.cs index a719832930b..ec91df975f9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImTan/ImTanPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImTan/ImTanPostRequestBody.cs @@ -52,7 +52,7 @@ public ImTanPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImTan.ImTanPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImTan.ImTanPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImTan/ImTanRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImTan/ImTanRequestBuilder.cs index 4695ba25935..9d23b4066b2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImTan/ImTanRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ImTan/ImTanRequestBuilder.cs @@ -51,7 +51,7 @@ public ImTanRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImTan.ImTanPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ImTan.ImTanPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Imaginary/ImaginaryPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Imaginary/ImaginaryPostRequestBody.cs index ffb4605ed70..97861c7dea5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Imaginary/ImaginaryPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Imaginary/ImaginaryPostRequestBody.cs @@ -52,7 +52,7 @@ public ImaginaryPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Imaginary.ImaginaryPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Imaginary.ImaginaryPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("inumber", Inumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Imaginary/ImaginaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Imaginary/ImaginaryRequestBuilder.cs index 815429a8063..9feecbd0c16 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Imaginary/ImaginaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Imaginary/ImaginaryRequestBuilder.cs @@ -51,7 +51,7 @@ public ImaginaryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Imaginary.ImaginaryPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Imaginary.ImaginaryPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Int/IntPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Int/IntPostRequestBody.cs index 3c5125f1df3..1a2708bc938 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Int/IntPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Int/IntPostRequestBody.cs @@ -52,7 +52,7 @@ public IntPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Int.IntPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Int.IntPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Int/IntRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Int/IntRequestBuilder.cs index 7af309b26de..c9e9074c94d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Int/IntRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Int/IntRequestBuilder.cs @@ -51,7 +51,7 @@ public IntRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Int.IntPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Int.IntPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IntRate/IntRatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IntRate/IntRatePostRequestBody.cs index d7761b0e87b..b69ac497c39 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IntRate/IntRatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IntRate/IntRatePostRequestBody.cs @@ -116,7 +116,7 @@ public IntRatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IntRate.IntRatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IntRate.IntRatePostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("investment", Investment); writer.WriteObjectValue("maturity", Maturity); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IntRate/IntRateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IntRate/IntRateRequestBuilder.cs index c50c42af238..417666aab78 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IntRate/IntRateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IntRate/IntRateRequestBuilder.cs @@ -51,7 +51,7 @@ public IntRateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IntRate.IntRatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IntRate.IntRatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ipmt/IpmtPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ipmt/IpmtPostRequestBody.cs index 35370009c2d..d08765c7812 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ipmt/IpmtPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ipmt/IpmtPostRequestBody.cs @@ -132,7 +132,7 @@ public IpmtPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ipmt.IpmtPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ipmt.IpmtPostRequestBody(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fv", Fv); writer.WriteObjectValue("nper", Nper); writer.WriteObjectValue("per", Per); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ipmt/IpmtRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ipmt/IpmtRequestBuilder.cs index 6262b95ff54..8e552a2c9c7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ipmt/IpmtRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ipmt/IpmtRequestBuilder.cs @@ -51,7 +51,7 @@ public IpmtRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ipmt.IpmtPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ipmt.IpmtPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Irr/IrrPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Irr/IrrPostRequestBody.cs index 2b1c279bd74..8f4984e92cc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Irr/IrrPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Irr/IrrPostRequestBody.cs @@ -68,7 +68,7 @@ public IrrPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Irr.IrrPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Irr.IrrPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("guess", Guess); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Irr/IrrRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Irr/IrrRequestBuilder.cs index eb043699efd..fda54f1eb7f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Irr/IrrRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Irr/IrrRequestBuilder.cs @@ -51,7 +51,7 @@ public IrrRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Irr.IrrPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Irr.IrrPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsErr/IsErrPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsErr/IsErrPostRequestBody.cs index 01f49fb7c98..c944faa0219 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsErr/IsErrPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsErr/IsErrPostRequestBody.cs @@ -52,7 +52,7 @@ public IsErrPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsErr.IsErrPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsErr.IsErrPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsErr/IsErrRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsErr/IsErrRequestBuilder.cs index 859f2a417d3..0918462c92c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsErr/IsErrRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsErr/IsErrRequestBuilder.cs @@ -51,7 +51,7 @@ public IsErrRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsErr.IsErrPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsErr.IsErrPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsError/IsErrorPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsError/IsErrorPostRequestBody.cs index 03020c743f0..a7155b48814 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsError/IsErrorPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsError/IsErrorPostRequestBody.cs @@ -52,7 +52,7 @@ public IsErrorPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsError.IsErrorPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsError.IsErrorPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsError/IsErrorRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsError/IsErrorRequestBuilder.cs index e5b08adfe65..fdc963e3f13 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsError/IsErrorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsError/IsErrorRequestBuilder.cs @@ -51,7 +51,7 @@ public IsErrorRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsError.IsErrorPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsError.IsErrorPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsEven/IsEvenPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsEven/IsEvenPostRequestBody.cs index 2ee249dfdf9..c0485f446f7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsEven/IsEvenPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsEven/IsEvenPostRequestBody.cs @@ -52,7 +52,7 @@ public IsEvenPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsEven.IsEvenPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsEven.IsEvenPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsEven/IsEvenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsEven/IsEvenRequestBuilder.cs index 20859332839..9fa92cee0b2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsEven/IsEvenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsEven/IsEvenRequestBuilder.cs @@ -51,7 +51,7 @@ public IsEvenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsEven.IsEvenPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsEven.IsEvenPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsFormula/IsFormulaPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsFormula/IsFormulaPostRequestBody.cs index 79c43a232a5..b90eae9a4cf 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsFormula/IsFormulaPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsFormula/IsFormulaPostRequestBody.cs @@ -52,7 +52,7 @@ public IsFormulaPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsFormula.IsFormulaPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsFormula.IsFormulaPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("reference", Reference); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsFormula/IsFormulaRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsFormula/IsFormulaRequestBuilder.cs index 1386a04f4e5..994baae467d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsFormula/IsFormulaRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsFormula/IsFormulaRequestBuilder.cs @@ -51,7 +51,7 @@ public IsFormulaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsFormula.IsFormulaPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsFormula.IsFormulaPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsLogical/IsLogicalPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsLogical/IsLogicalPostRequestBody.cs index 8c4d5d6aae6..d6face44d19 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsLogical/IsLogicalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsLogical/IsLogicalPostRequestBody.cs @@ -52,7 +52,7 @@ public IsLogicalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsLogical.IsLogicalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsLogical.IsLogicalPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsLogical/IsLogicalRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsLogical/IsLogicalRequestBuilder.cs index 47529398740..3acfc775f6a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsLogical/IsLogicalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsLogical/IsLogicalRequestBuilder.cs @@ -51,7 +51,7 @@ public IsLogicalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsLogical.IsLogicalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsLogical.IsLogicalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNA/IsNAPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNA/IsNAPostRequestBody.cs index 61fdf68fd35..44b1ea5d776 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNA/IsNAPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNA/IsNAPostRequestBody.cs @@ -52,7 +52,7 @@ public IsNAPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsNA.IsNAPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsNA.IsNAPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNA/IsNARequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNA/IsNARequestBuilder.cs index 069e7d1fab0..b0862e5cfe8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNA/IsNARequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNA/IsNARequestBuilder.cs @@ -51,7 +51,7 @@ public IsNARequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsNA.IsNAPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsNA.IsNAPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNonText/IsNonTextPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNonText/IsNonTextPostRequestBody.cs index 205118270d3..78b3357c09d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNonText/IsNonTextPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNonText/IsNonTextPostRequestBody.cs @@ -52,7 +52,7 @@ public IsNonTextPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsNonText.IsNonTextPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsNonText.IsNonTextPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNonText/IsNonTextRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNonText/IsNonTextRequestBuilder.cs index ad21c4bf9ff..0678a252113 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNonText/IsNonTextRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNonText/IsNonTextRequestBuilder.cs @@ -51,7 +51,7 @@ public IsNonTextRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsNonText.IsNonTextPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsNonText.IsNonTextPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNumber/IsNumberPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNumber/IsNumberPostRequestBody.cs index 3cbc62de7d6..771ca8e7af9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNumber/IsNumberPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNumber/IsNumberPostRequestBody.cs @@ -52,7 +52,7 @@ public IsNumberPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsNumber.IsNumberPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsNumber.IsNumberPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNumber/IsNumberRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNumber/IsNumberRequestBuilder.cs index 1810f72bab6..65f7c798bc1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNumber/IsNumberRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsNumber/IsNumberRequestBuilder.cs @@ -51,7 +51,7 @@ public IsNumberRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsNumber.IsNumberPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsNumber.IsNumberPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsOdd/IsOddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsOdd/IsOddPostRequestBody.cs index 00f7e13a2dc..dcaf800d444 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsOdd/IsOddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsOdd/IsOddPostRequestBody.cs @@ -52,7 +52,7 @@ public IsOddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsOdd.IsOddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsOdd.IsOddPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsOdd/IsOddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsOdd/IsOddRequestBuilder.cs index 70a4632fcdd..7b3cb1af194 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsOdd/IsOddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsOdd/IsOddRequestBuilder.cs @@ -51,7 +51,7 @@ public IsOddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsOdd.IsOddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsOdd.IsOddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsText/IsTextPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsText/IsTextPostRequestBody.cs index 322e1562f4e..9374b976e53 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsText/IsTextPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsText/IsTextPostRequestBody.cs @@ -52,7 +52,7 @@ public IsTextPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsText.IsTextPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsText.IsTextPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsText/IsTextRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsText/IsTextRequestBuilder.cs index 166092fa0fb..28b962b462a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsText/IsTextRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsText/IsTextRequestBuilder.cs @@ -51,7 +51,7 @@ public IsTextRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsText.IsTextPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsText.IsTextPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsoWeekNum/IsoWeekNumPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsoWeekNum/IsoWeekNumPostRequestBody.cs index 9c01658bda5..670c5dcee97 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsoWeekNum/IsoWeekNumPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsoWeekNum/IsoWeekNumPostRequestBody.cs @@ -52,7 +52,7 @@ public IsoWeekNumPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsoWeekNum.IsoWeekNumPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsoWeekNum.IsoWeekNumPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("date", Date); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsoWeekNum/IsoWeekNumRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsoWeekNum/IsoWeekNumRequestBuilder.cs index 1721f4a56d8..01352b84d05 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsoWeekNum/IsoWeekNumRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/IsoWeekNum/IsoWeekNumRequestBuilder.cs @@ -51,7 +51,7 @@ public IsoWeekNumRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsoWeekNum.IsoWeekNumPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.IsoWeekNum.IsoWeekNumPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Iso_Ceiling/Iso_CeilingPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Iso_Ceiling/Iso_CeilingPostRequestBody.cs index 4d57fe65777..a01b4065211 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Iso_Ceiling/Iso_CeilingPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Iso_Ceiling/Iso_CeilingPostRequestBody.cs @@ -68,7 +68,7 @@ public Iso_CeilingPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Iso_Ceiling.Iso_CeilingPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Iso_Ceiling.Iso_CeilingPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("significance", Significance); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Iso_Ceiling/Iso_CeilingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Iso_Ceiling/Iso_CeilingRequestBuilder.cs index f310115a022..e3539443aea 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Iso_Ceiling/Iso_CeilingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Iso_Ceiling/Iso_CeilingRequestBuilder.cs @@ -51,7 +51,7 @@ public Iso_CeilingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Iso_Ceiling.Iso_CeilingPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Iso_Ceiling.Iso_CeilingPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ispmt/IspmtPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ispmt/IspmtPostRequestBody.cs index d606cc9bdb8..d0b3b8018a3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ispmt/IspmtPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ispmt/IspmtPostRequestBody.cs @@ -100,7 +100,7 @@ public IspmtPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ispmt.IspmtPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ispmt.IspmtPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("nper", Nper); writer.WriteObjectValue("per", Per); writer.WriteObjectValue("pv", Pv); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ispmt/IspmtRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ispmt/IspmtRequestBuilder.cs index 6edbb7b4ce2..0fcc85a2ac0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ispmt/IspmtRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ispmt/IspmtRequestBuilder.cs @@ -51,7 +51,7 @@ public IspmtRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ispmt.IspmtPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ispmt.IspmtPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Isref/IsrefPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Isref/IsrefPostRequestBody.cs index b4de4879042..470f1e17f9f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Isref/IsrefPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Isref/IsrefPostRequestBody.cs @@ -52,7 +52,7 @@ public IsrefPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Isref.IsrefPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Isref.IsrefPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Isref/IsrefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Isref/IsrefRequestBuilder.cs index 8d037fb788b..4c25b344310 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Isref/IsrefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Isref/IsrefRequestBuilder.cs @@ -51,7 +51,7 @@ public IsrefRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Isref.IsrefPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Isref.IsrefPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Kurt/KurtPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Kurt/KurtPostRequestBody.cs index f699101e1d3..8affad7c0cd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Kurt/KurtPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Kurt/KurtPostRequestBody.cs @@ -52,7 +52,7 @@ public KurtPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Kurt.KurtPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Kurt.KurtPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Kurt/KurtRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Kurt/KurtRequestBuilder.cs index 3f558df85a1..aecca4e0714 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Kurt/KurtRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Kurt/KurtRequestBuilder.cs @@ -51,7 +51,7 @@ public KurtRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Kurt.KurtPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Kurt.KurtPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Large/LargePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Large/LargePostRequestBody.cs index 49ab2621f61..fbefba5211a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Large/LargePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Large/LargePostRequestBody.cs @@ -68,7 +68,7 @@ public LargePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Large.LargePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Large.LargePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("array", Array); writer.WriteObjectValue("k", K); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Large/LargeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Large/LargeRequestBuilder.cs index 126cf53886a..2d2e9bfbfe8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Large/LargeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Large/LargeRequestBuilder.cs @@ -51,7 +51,7 @@ public LargeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Large.LargePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Large.LargePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lcm/LcmPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lcm/LcmPostRequestBody.cs index 6f23667ac17..98cdbcef9a6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lcm/LcmPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lcm/LcmPostRequestBody.cs @@ -52,7 +52,7 @@ public LcmPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lcm.LcmPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lcm.LcmPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lcm/LcmRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lcm/LcmRequestBuilder.cs index adfdd96a44c..296e5e8b6b5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lcm/LcmRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lcm/LcmRequestBuilder.cs @@ -51,7 +51,7 @@ public LcmRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lcm.LcmPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lcm.LcmPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Left/LeftPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Left/LeftPostRequestBody.cs index da5ea89ff7b..f6cc6e982bb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Left/LeftPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Left/LeftPostRequestBody.cs @@ -68,7 +68,7 @@ public LeftPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Left.LeftPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Left.LeftPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("numChars", NumChars); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Left/LeftRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Left/LeftRequestBuilder.cs index 8a5ff74ca51..bb7b5af0920 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Left/LeftRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Left/LeftRequestBuilder.cs @@ -51,7 +51,7 @@ public LeftRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Left.LeftPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Left.LeftPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Leftb/LeftbPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Leftb/LeftbPostRequestBody.cs index 43a837c94e8..2e4bf2fd163 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Leftb/LeftbPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Leftb/LeftbPostRequestBody.cs @@ -68,7 +68,7 @@ public LeftbPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Leftb.LeftbPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Leftb.LeftbPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("numBytes", NumBytes); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Leftb/LeftbRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Leftb/LeftbRequestBuilder.cs index 598a9b1adc6..317927ea125 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Leftb/LeftbRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Leftb/LeftbRequestBuilder.cs @@ -51,7 +51,7 @@ public LeftbRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Leftb.LeftbPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Leftb.LeftbPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Len/LenPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Len/LenPostRequestBody.cs index 03be6395de3..2f00cad61e1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Len/LenPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Len/LenPostRequestBody.cs @@ -52,7 +52,7 @@ public LenPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Len.LenPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Len.LenPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Len/LenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Len/LenRequestBuilder.cs index b0a99eef12d..599b231212b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Len/LenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Len/LenRequestBuilder.cs @@ -51,7 +51,7 @@ public LenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Len.LenPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Len.LenPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lenb/LenbPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lenb/LenbPostRequestBody.cs index 4f69cf22940..9173564a0e4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lenb/LenbPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lenb/LenbPostRequestBody.cs @@ -52,7 +52,7 @@ public LenbPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lenb.LenbPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lenb.LenbPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lenb/LenbRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lenb/LenbRequestBuilder.cs index 80659d9b282..5fdfba5eca4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lenb/LenbRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lenb/LenbRequestBuilder.cs @@ -51,7 +51,7 @@ public LenbRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lenb.LenbPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lenb.LenbPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ln/LnPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ln/LnPostRequestBody.cs index 3ed87cb900a..5e188d1f11c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ln/LnPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ln/LnPostRequestBody.cs @@ -52,7 +52,7 @@ public LnPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ln.LnPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ln.LnPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ln/LnRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ln/LnRequestBuilder.cs index a10fe006b93..f0345adc2d4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ln/LnRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ln/LnRequestBuilder.cs @@ -51,7 +51,7 @@ public LnRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(re public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ln.LnPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ln.LnPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log/LogPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log/LogPostRequestBody.cs index 57a9f2632d4..71769e3d051 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log/LogPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log/LogPostRequestBody.cs @@ -68,7 +68,7 @@ public LogPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Log.LogPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Log.LogPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("base", Base); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log/LogRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log/LogRequestBuilder.cs index 479c894542a..2425d0a790a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log/LogRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log/LogRequestBuilder.cs @@ -51,7 +51,7 @@ public LogRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Log.LogPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Log.LogPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log10/Log10PostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log10/Log10PostRequestBody.cs index 8c6f75c422e..8832d2f67c4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log10/Log10PostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log10/Log10PostRequestBody.cs @@ -52,7 +52,7 @@ public Log10PostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Log10.Log10PostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Log10.Log10PostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log10/Log10RequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log10/Log10RequestBuilder.cs index 51e74759eac..d8abf006d72 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log10/Log10RequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Log10/Log10RequestBuilder.cs @@ -51,7 +51,7 @@ public Log10RequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Log10.Log10PostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Log10.Log10PostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Dist/LogNorm_DistPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Dist/LogNorm_DistPostRequestBody.cs index 70add92e481..9c10473a374 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Dist/LogNorm_DistPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Dist/LogNorm_DistPostRequestBody.cs @@ -100,7 +100,7 @@ public LogNorm_DistPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.LogNorm_Dist.LogNorm_DistPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.LogNorm_Dist.LogNorm_DistPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cumulative", Cumulative); writer.WriteObjectValue("mean", Mean); writer.WriteObjectValue("standardDev", StandardDev); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Dist/LogNorm_DistRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Dist/LogNorm_DistRequestBuilder.cs index a43ca64b2d8..688d1d95335 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Dist/LogNorm_DistRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Dist/LogNorm_DistRequestBuilder.cs @@ -51,7 +51,7 @@ public LogNorm_DistRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.LogNorm_Dist.LogNorm_DistPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.LogNorm_Dist.LogNorm_DistPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Inv/LogNorm_InvPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Inv/LogNorm_InvPostRequestBody.cs index f19b33e8bd5..f388dafa7cc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Inv/LogNorm_InvPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Inv/LogNorm_InvPostRequestBody.cs @@ -84,7 +84,7 @@ public LogNorm_InvPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.LogNorm_Inv.LogNorm_InvPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.LogNorm_Inv.LogNorm_InvPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("mean", Mean); writer.WriteObjectValue("probability", Probability); writer.WriteObjectValue("standardDev", StandardDev); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Inv/LogNorm_InvRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Inv/LogNorm_InvRequestBuilder.cs index 29d4fc0b8ab..4dcabed076b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Inv/LogNorm_InvRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/LogNorm_Inv/LogNorm_InvRequestBuilder.cs @@ -51,7 +51,7 @@ public LogNorm_InvRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.LogNorm_Inv.LogNorm_InvPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.LogNorm_Inv.LogNorm_InvPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lookup/LookupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lookup/LookupPostRequestBody.cs index 1ee3d3a938b..235cc4953c9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lookup/LookupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lookup/LookupPostRequestBody.cs @@ -84,7 +84,7 @@ public LookupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lookup.LookupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lookup.LookupPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("lookupValue", LookupValue); writer.WriteObjectValue("lookupVector", LookupVector); writer.WriteObjectValue("resultVector", ResultVector); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lookup/LookupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lookup/LookupRequestBuilder.cs index f03aa08d9da..fd15d9c94e5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lookup/LookupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lookup/LookupRequestBuilder.cs @@ -51,7 +51,7 @@ public LookupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lookup.LookupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lookup.LookupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lower/LowerPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lower/LowerPostRequestBody.cs index 6e1b837b984..94ec26a99b1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lower/LowerPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lower/LowerPostRequestBody.cs @@ -52,7 +52,7 @@ public LowerPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lower.LowerPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lower.LowerPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lower/LowerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lower/LowerRequestBuilder.cs index 1335ddfd31d..75e78bc9943 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lower/LowerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Lower/LowerRequestBuilder.cs @@ -51,7 +51,7 @@ public LowerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lower.LowerPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Lower.LowerPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Match/MatchPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Match/MatchPostRequestBody.cs index 2e9ce534f5f..fbf104c6483 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Match/MatchPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Match/MatchPostRequestBody.cs @@ -84,7 +84,7 @@ public MatchPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Match.MatchPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Match.MatchPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("lookupArray", LookupArray); writer.WriteObjectValue("lookupValue", LookupValue); writer.WriteObjectValue("matchType", MatchType); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Match/MatchRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Match/MatchRequestBuilder.cs index a2fc70c31b9..f7a3604fd94 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Match/MatchRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Match/MatchRequestBuilder.cs @@ -51,7 +51,7 @@ public MatchRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Match.MatchPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Match.MatchPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Max/MaxPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Max/MaxPostRequestBody.cs index a0947a5a94b..396ffb10d9b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Max/MaxPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Max/MaxPostRequestBody.cs @@ -52,7 +52,7 @@ public MaxPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Max.MaxPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Max.MaxPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Max/MaxRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Max/MaxRequestBuilder.cs index b2b3be02e2c..789a7ea9c2e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Max/MaxRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Max/MaxRequestBuilder.cs @@ -51,7 +51,7 @@ public MaxRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Max.MaxPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Max.MaxPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MaxA/MaxAPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MaxA/MaxAPostRequestBody.cs index 0cd694df76c..5c5e1c0be5d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MaxA/MaxAPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MaxA/MaxAPostRequestBody.cs @@ -52,7 +52,7 @@ public MaxAPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.MaxA.MaxAPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.MaxA.MaxAPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MaxA/MaxARequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MaxA/MaxARequestBuilder.cs index a5311769124..eb02eee9194 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MaxA/MaxARequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MaxA/MaxARequestBuilder.cs @@ -51,7 +51,7 @@ public MaxARequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.MaxA.MaxAPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.MaxA.MaxAPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mduration/MdurationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mduration/MdurationPostRequestBody.cs index 1cdd3968b33..dae9ce1d948 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mduration/MdurationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mduration/MdurationPostRequestBody.cs @@ -132,7 +132,7 @@ public MdurationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mduration.MdurationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mduration.MdurationPostRequestBody(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("coupon", Coupon); writer.WriteObjectValue("frequency", Frequency); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mduration/MdurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mduration/MdurationRequestBuilder.cs index 50ddee42de5..5d2e604f914 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mduration/MdurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mduration/MdurationRequestBuilder.cs @@ -51,7 +51,7 @@ public MdurationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mduration.MdurationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mduration.MdurationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Median/MedianPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Median/MedianPostRequestBody.cs index 810499aa69c..b90bf273be4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Median/MedianPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Median/MedianPostRequestBody.cs @@ -52,7 +52,7 @@ public MedianPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Median.MedianPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Median.MedianPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Median/MedianRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Median/MedianRequestBuilder.cs index cd822a9c17d..b214107469f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Median/MedianRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Median/MedianRequestBuilder.cs @@ -51,7 +51,7 @@ public MedianRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Median.MedianPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Median.MedianPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mid/MidPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mid/MidPostRequestBody.cs index 8a1b0fa4837..aa85314ec87 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mid/MidPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mid/MidPostRequestBody.cs @@ -84,7 +84,7 @@ public MidPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mid.MidPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mid.MidPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("numChars", NumChars); writer.WriteObjectValue("startNum", StartNum); writer.WriteObjectValue("text", Text); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mid/MidRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mid/MidRequestBuilder.cs index 7135ec57f90..bc45dd80ea7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mid/MidRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mid/MidRequestBuilder.cs @@ -51,7 +51,7 @@ public MidRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mid.MidPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mid.MidPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Midb/MidbPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Midb/MidbPostRequestBody.cs index 645ca2e0e78..e19b62a0a97 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Midb/MidbPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Midb/MidbPostRequestBody.cs @@ -84,7 +84,7 @@ public MidbPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Midb.MidbPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Midb.MidbPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("numBytes", NumBytes); writer.WriteObjectValue("startNum", StartNum); writer.WriteObjectValue("text", Text); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Midb/MidbRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Midb/MidbRequestBuilder.cs index 97a0e93ea87..435a4c9fcf7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Midb/MidbRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Midb/MidbRequestBuilder.cs @@ -51,7 +51,7 @@ public MidbRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Midb.MidbPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Midb.MidbPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Min/MinPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Min/MinPostRequestBody.cs index a4fea5ff3cf..7f1107094ba 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Min/MinPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Min/MinPostRequestBody.cs @@ -52,7 +52,7 @@ public MinPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Min.MinPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Min.MinPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Min/MinRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Min/MinRequestBuilder.cs index c935c791ab3..5744bfb29d7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Min/MinRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Min/MinRequestBuilder.cs @@ -51,7 +51,7 @@ public MinRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Min.MinPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Min.MinPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MinA/MinAPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MinA/MinAPostRequestBody.cs index 6df788cd0c4..8c829b988e3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MinA/MinAPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MinA/MinAPostRequestBody.cs @@ -52,7 +52,7 @@ public MinAPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.MinA.MinAPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.MinA.MinAPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MinA/MinARequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MinA/MinARequestBuilder.cs index cebeb73d6f7..46d01d13d3f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MinA/MinARequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MinA/MinARequestBuilder.cs @@ -51,7 +51,7 @@ public MinARequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.MinA.MinAPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.MinA.MinAPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Minute/MinutePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Minute/MinutePostRequestBody.cs index 04eaf8a5ccf..8bd238f4728 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Minute/MinutePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Minute/MinutePostRequestBody.cs @@ -52,7 +52,7 @@ public MinutePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Minute.MinutePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Minute.MinutePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("serialNumber", SerialNumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Minute/MinuteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Minute/MinuteRequestBuilder.cs index 3ae06a58c14..d71cfdd1490 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Minute/MinuteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Minute/MinuteRequestBuilder.cs @@ -51,7 +51,7 @@ public MinuteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Minute.MinutePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Minute.MinutePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mirr/MirrPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mirr/MirrPostRequestBody.cs index f68add11be3..8aec843f4a1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mirr/MirrPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mirr/MirrPostRequestBody.cs @@ -84,7 +84,7 @@ public MirrPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mirr.MirrPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mirr.MirrPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("financeRate", FinanceRate); writer.WriteObjectValue("reinvestRate", ReinvestRate); writer.WriteObjectValue("values", Values); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mirr/MirrRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mirr/MirrRequestBuilder.cs index 6de2be7e6cb..0a0dc89d0e7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mirr/MirrRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mirr/MirrRequestBuilder.cs @@ -51,7 +51,7 @@ public MirrRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mirr.MirrPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mirr.MirrPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mod/ModPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mod/ModPostRequestBody.cs index 8313bafb7b7..130f060d136 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mod/ModPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mod/ModPostRequestBody.cs @@ -68,7 +68,7 @@ public ModPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mod.ModPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mod.ModPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("divisor", Divisor); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mod/ModRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mod/ModRequestBuilder.cs index a0c539f912c..6eeb8ed367d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mod/ModRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mod/ModRequestBuilder.cs @@ -51,7 +51,7 @@ public ModRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mod.ModPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mod.ModPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Month/MonthPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Month/MonthPostRequestBody.cs index c6128d9e178..13aa6f134cd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Month/MonthPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Month/MonthPostRequestBody.cs @@ -52,7 +52,7 @@ public MonthPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Month.MonthPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Month.MonthPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("serialNumber", SerialNumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Month/MonthRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Month/MonthRequestBuilder.cs index 7053398f459..120f08106c2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Month/MonthRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Month/MonthRequestBuilder.cs @@ -51,7 +51,7 @@ public MonthRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Month.MonthPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Month.MonthPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mround/MroundPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mround/MroundPostRequestBody.cs index a93feeb6417..85b1c55512e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mround/MroundPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mround/MroundPostRequestBody.cs @@ -68,7 +68,7 @@ public MroundPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mround.MroundPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mround.MroundPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("multiple", Multiple); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mround/MroundRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mround/MroundRequestBuilder.cs index e8d40acd560..aac011c2c4f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mround/MroundRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Mround/MroundRequestBuilder.cs @@ -51,7 +51,7 @@ public MroundRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mround.MroundPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Mround.MroundPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MultiNomial/MultiNomialPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MultiNomial/MultiNomialPostRequestBody.cs index d84def4e621..58426f2a192 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MultiNomial/MultiNomialPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MultiNomial/MultiNomialPostRequestBody.cs @@ -52,7 +52,7 @@ public MultiNomialPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.MultiNomial.MultiNomialPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.MultiNomial.MultiNomialPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MultiNomial/MultiNomialRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MultiNomial/MultiNomialRequestBuilder.cs index 06e12218d27..40c76ff45ba 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MultiNomial/MultiNomialRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/MultiNomial/MultiNomialRequestBuilder.cs @@ -51,7 +51,7 @@ public MultiNomialRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.MultiNomial.MultiNomialPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.MultiNomial.MultiNomialPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/N/NPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/N/NPostRequestBody.cs index 113cfcfa025..a880a4d4384 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/N/NPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/N/NPostRequestBody.cs @@ -52,7 +52,7 @@ public NPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.N.NPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.N.NPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/N/NRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/N/NRequestBuilder.cs index 156c14b53ea..d51bae22ee9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/N/NRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/N/NRequestBuilder.cs @@ -51,7 +51,7 @@ public NRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(req public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.N.NPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.N.NPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NegBinom_Dist/NegBinom_DistPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NegBinom_Dist/NegBinom_DistPostRequestBody.cs index c30544addc2..489f82869cc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NegBinom_Dist/NegBinom_DistPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NegBinom_Dist/NegBinom_DistPostRequestBody.cs @@ -100,7 +100,7 @@ public NegBinom_DistPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NegBinom_Dist.NegBinom_DistPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NegBinom_Dist.NegBinom_DistPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cumulative", Cumulative); writer.WriteObjectValue("numberF", NumberF); writer.WriteObjectValue("numberS", NumberS); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NegBinom_Dist/NegBinom_DistRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NegBinom_Dist/NegBinom_DistRequestBuilder.cs index 9325f4a91a2..4d641e7cbaf 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NegBinom_Dist/NegBinom_DistRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NegBinom_Dist/NegBinom_DistRequestBuilder.cs @@ -51,7 +51,7 @@ public NegBinom_DistRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NegBinom_Dist.NegBinom_DistPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NegBinom_Dist.NegBinom_DistPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays/NetworkDaysPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays/NetworkDaysPostRequestBody.cs index 9d149954b42..c83e7d1ded8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays/NetworkDaysPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays/NetworkDaysPostRequestBody.cs @@ -84,7 +84,7 @@ public NetworkDaysPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NetworkDays.NetworkDaysPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NetworkDays.NetworkDaysPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("endDate", EndDate); writer.WriteObjectValue("holidays", Holidays); writer.WriteObjectValue("startDate", StartDate); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays/NetworkDaysRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays/NetworkDaysRequestBuilder.cs index 38c8e8d3ab0..6529bc75eb9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays/NetworkDaysRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays/NetworkDaysRequestBuilder.cs @@ -51,7 +51,7 @@ public NetworkDaysRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NetworkDays.NetworkDaysPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NetworkDays.NetworkDaysPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays_Intl/NetworkDays_IntlPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays_Intl/NetworkDays_IntlPostRequestBody.cs index 6eaece84110..40ee4b6b593 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays_Intl/NetworkDays_IntlPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays_Intl/NetworkDays_IntlPostRequestBody.cs @@ -100,7 +100,7 @@ public NetworkDays_IntlPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NetworkDays_Intl.NetworkDays_IntlPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NetworkDays_Intl.NetworkDays_IntlPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("endDate", EndDate); writer.WriteObjectValue("holidays", Holidays); writer.WriteObjectValue("startDate", StartDate); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays_Intl/NetworkDays_IntlRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays_Intl/NetworkDays_IntlRequestBuilder.cs index 9994e09a060..971035c48b5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays_Intl/NetworkDays_IntlRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NetworkDays_Intl/NetworkDays_IntlRequestBuilder.cs @@ -51,7 +51,7 @@ public NetworkDays_IntlRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NetworkDays_Intl.NetworkDays_IntlPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NetworkDays_Intl.NetworkDays_IntlPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nominal/NominalPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nominal/NominalPostRequestBody.cs index bc5e8c35d65..a2a89f68257 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nominal/NominalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nominal/NominalPostRequestBody.cs @@ -68,7 +68,7 @@ public NominalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Nominal.NominalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Nominal.NominalPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("effectRate", EffectRate); writer.WriteObjectValue("npery", Npery); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nominal/NominalRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nominal/NominalRequestBuilder.cs index f0c1a4f3d0d..f4259c28a4c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nominal/NominalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nominal/NominalRequestBuilder.cs @@ -51,7 +51,7 @@ public NominalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Nominal.NominalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Nominal.NominalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Dist/Norm_DistPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Dist/Norm_DistPostRequestBody.cs index 3f7b5a57099..f255dfac1d9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Dist/Norm_DistPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Dist/Norm_DistPostRequestBody.cs @@ -100,7 +100,7 @@ public Norm_DistPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_Dist.Norm_DistPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_Dist.Norm_DistPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cumulative", Cumulative); writer.WriteObjectValue("mean", Mean); writer.WriteObjectValue("standardDev", StandardDev); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Dist/Norm_DistRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Dist/Norm_DistRequestBuilder.cs index ebc552927b0..d5eba34935c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Dist/Norm_DistRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Dist/Norm_DistRequestBuilder.cs @@ -51,7 +51,7 @@ public Norm_DistRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_Dist.Norm_DistPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_Dist.Norm_DistPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Inv/Norm_InvPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Inv/Norm_InvPostRequestBody.cs index 266014abe2f..de7c07c0d7c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Inv/Norm_InvPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Inv/Norm_InvPostRequestBody.cs @@ -84,7 +84,7 @@ public Norm_InvPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_Inv.Norm_InvPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_Inv.Norm_InvPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("mean", Mean); writer.WriteObjectValue("probability", Probability); writer.WriteObjectValue("standardDev", StandardDev); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Inv/Norm_InvRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Inv/Norm_InvRequestBuilder.cs index 2b0bb4d7074..1b3773bffa1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Inv/Norm_InvRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_Inv/Norm_InvRequestBuilder.cs @@ -51,7 +51,7 @@ public Norm_InvRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_Inv.Norm_InvPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_Inv.Norm_InvPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Dist/Norm_S_DistPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Dist/Norm_S_DistPostRequestBody.cs index 23eec3117f0..3b4915ae8f5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Dist/Norm_S_DistPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Dist/Norm_S_DistPostRequestBody.cs @@ -68,7 +68,7 @@ public Norm_S_DistPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_S_Dist.Norm_S_DistPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_S_Dist.Norm_S_DistPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cumulative", Cumulative); writer.WriteObjectValue("z", Z); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Dist/Norm_S_DistRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Dist/Norm_S_DistRequestBuilder.cs index c53b9c4855a..153c8982264 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Dist/Norm_S_DistRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Dist/Norm_S_DistRequestBuilder.cs @@ -51,7 +51,7 @@ public Norm_S_DistRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_S_Dist.Norm_S_DistPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_S_Dist.Norm_S_DistPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Inv/Norm_S_InvPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Inv/Norm_S_InvPostRequestBody.cs index c199bd2db36..573a3d7fa34 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Inv/Norm_S_InvPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Inv/Norm_S_InvPostRequestBody.cs @@ -52,7 +52,7 @@ public Norm_S_InvPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_S_Inv.Norm_S_InvPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_S_Inv.Norm_S_InvPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("probability", Probability); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Inv/Norm_S_InvRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Inv/Norm_S_InvRequestBuilder.cs index e0960bf1713..a75bd865813 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Inv/Norm_S_InvRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Norm_S_Inv/Norm_S_InvRequestBuilder.cs @@ -51,7 +51,7 @@ public Norm_S_InvRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_S_Inv.Norm_S_InvPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Norm_S_Inv.Norm_S_InvPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Not/NotPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Not/NotPostRequestBody.cs index 420ba04e01f..9f45db9ce95 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Not/NotPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Not/NotPostRequestBody.cs @@ -52,7 +52,7 @@ public NotPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Not.NotPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Not.NotPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("logical", Logical); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Not/NotRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Not/NotRequestBuilder.cs index 4596d4e3313..e6364433569 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Not/NotRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Not/NotRequestBuilder.cs @@ -51,7 +51,7 @@ public NotRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Not.NotPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Not.NotPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nper/NperPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nper/NperPostRequestBody.cs index 4c96974e2f8..694c6ec308f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nper/NperPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nper/NperPostRequestBody.cs @@ -116,7 +116,7 @@ public NperPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Nper.NperPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Nper.NperPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fv", Fv); writer.WriteObjectValue("pmt", Pmt); writer.WriteObjectValue("pv", Pv); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nper/NperRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nper/NperRequestBuilder.cs index 62d4d39f117..a56e1fce9c3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nper/NperRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Nper/NperRequestBuilder.cs @@ -51,7 +51,7 @@ public NperRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Nper.NperPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Nper.NperPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Npv/NpvPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Npv/NpvPostRequestBody.cs index f38c8646c26..a1cda044457 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Npv/NpvPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Npv/NpvPostRequestBody.cs @@ -68,7 +68,7 @@ public NpvPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Npv.NpvPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Npv.NpvPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("rate", Rate); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Npv/NpvRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Npv/NpvRequestBuilder.cs index e6182fa7a8c..b50747fe1e5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Npv/NpvRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Npv/NpvRequestBuilder.cs @@ -51,7 +51,7 @@ public NpvRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Npv.NpvPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Npv.NpvPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NumberValue/NumberValuePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NumberValue/NumberValuePostRequestBody.cs index c7e9912f7e0..1435ed27e4d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NumberValue/NumberValuePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NumberValue/NumberValuePostRequestBody.cs @@ -84,7 +84,7 @@ public NumberValuePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NumberValue.NumberValuePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NumberValue.NumberValuePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("decimalSeparator", DecimalSeparator); writer.WriteObjectValue("groupSeparator", GroupSeparator); writer.WriteObjectValue("text", Text); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NumberValue/NumberValueRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NumberValue/NumberValueRequestBuilder.cs index 6eacfcde208..1ea08e0dfd7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NumberValue/NumberValueRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/NumberValue/NumberValueRequestBuilder.cs @@ -51,7 +51,7 @@ public NumberValueRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NumberValue.NumberValuePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.NumberValue.NumberValuePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Bin/Oct2BinPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Bin/Oct2BinPostRequestBody.cs index afda57c8472..67dc1094151 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Bin/Oct2BinPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Bin/Oct2BinPostRequestBody.cs @@ -68,7 +68,7 @@ public Oct2BinPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Oct2Bin.Oct2BinPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Oct2Bin.Oct2BinPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("places", Places); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Bin/Oct2BinRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Bin/Oct2BinRequestBuilder.cs index 72193b3469e..987efa13b8b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Bin/Oct2BinRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Bin/Oct2BinRequestBuilder.cs @@ -51,7 +51,7 @@ public Oct2BinRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Oct2Bin.Oct2BinPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Oct2Bin.Oct2BinPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Dec/Oct2DecPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Dec/Oct2DecPostRequestBody.cs index 4748f8054c7..ae02244016c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Dec/Oct2DecPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Dec/Oct2DecPostRequestBody.cs @@ -52,7 +52,7 @@ public Oct2DecPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Oct2Dec.Oct2DecPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Oct2Dec.Oct2DecPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Dec/Oct2DecRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Dec/Oct2DecRequestBuilder.cs index 5a0a446ce2d..7133ad8048a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Dec/Oct2DecRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Dec/Oct2DecRequestBuilder.cs @@ -51,7 +51,7 @@ public Oct2DecRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Oct2Dec.Oct2DecPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Oct2Dec.Oct2DecPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Hex/Oct2HexPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Hex/Oct2HexPostRequestBody.cs index d4b40139537..a3d5bc42280 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Hex/Oct2HexPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Hex/Oct2HexPostRequestBody.cs @@ -68,7 +68,7 @@ public Oct2HexPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Oct2Hex.Oct2HexPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Oct2Hex.Oct2HexPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("places", Places); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Hex/Oct2HexRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Hex/Oct2HexRequestBuilder.cs index dd51bf579dd..59044483198 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Hex/Oct2HexRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Oct2Hex/Oct2HexRequestBuilder.cs @@ -51,7 +51,7 @@ public Oct2HexRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Oct2Hex.Oct2HexPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Oct2Hex.Oct2HexPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Odd/OddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Odd/OddPostRequestBody.cs index 5cda636ff23..6cf23840089 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Odd/OddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Odd/OddPostRequestBody.cs @@ -52,7 +52,7 @@ public OddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Odd.OddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Odd.OddPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Odd/OddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Odd/OddRequestBuilder.cs index d4d01274b6e..31e0d8d8b74 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Odd/OddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Odd/OddRequestBuilder.cs @@ -51,7 +51,7 @@ public OddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Odd.OddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Odd.OddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFPrice/OddFPricePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFPrice/OddFPricePostRequestBody.cs index cb2e2611e0b..0aa96c8b2af 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFPrice/OddFPricePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFPrice/OddFPricePostRequestBody.cs @@ -180,7 +180,7 @@ public OddFPricePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddFPrice.OddFPricePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddFPrice.OddFPricePostRequestBody(); } /// @@ -208,7 +208,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("firstCoupon", FirstCoupon); writer.WriteObjectValue("frequency", Frequency); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFPrice/OddFPriceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFPrice/OddFPriceRequestBuilder.cs index a997280292c..a4d8e80737a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFPrice/OddFPriceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFPrice/OddFPriceRequestBuilder.cs @@ -51,7 +51,7 @@ public OddFPriceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddFPrice.OddFPricePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddFPrice.OddFPricePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFYield/OddFYieldPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFYield/OddFYieldPostRequestBody.cs index 5e5bfa29636..997f663ef0d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFYield/OddFYieldPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFYield/OddFYieldPostRequestBody.cs @@ -180,7 +180,7 @@ public OddFYieldPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddFYield.OddFYieldPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddFYield.OddFYieldPostRequestBody(); } /// @@ -208,7 +208,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("firstCoupon", FirstCoupon); writer.WriteObjectValue("frequency", Frequency); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFYield/OddFYieldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFYield/OddFYieldRequestBuilder.cs index 53a7be1cddf..b7564d8d20e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFYield/OddFYieldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddFYield/OddFYieldRequestBuilder.cs @@ -51,7 +51,7 @@ public OddFYieldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddFYield.OddFYieldPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddFYield.OddFYieldPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLPrice/OddLPricePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLPrice/OddLPricePostRequestBody.cs index 329892f6657..88a20c937e5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLPrice/OddLPricePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLPrice/OddLPricePostRequestBody.cs @@ -164,7 +164,7 @@ public OddLPricePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddLPrice.OddLPricePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddLPrice.OddLPricePostRequestBody(); } /// @@ -191,7 +191,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("frequency", Frequency); writer.WriteObjectValue("lastInterest", LastInterest); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLPrice/OddLPriceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLPrice/OddLPriceRequestBuilder.cs index 078ae751d71..ae3708332cd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLPrice/OddLPriceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLPrice/OddLPriceRequestBuilder.cs @@ -51,7 +51,7 @@ public OddLPriceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddLPrice.OddLPricePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddLPrice.OddLPricePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLYield/OddLYieldPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLYield/OddLYieldPostRequestBody.cs index d75d827fcc9..d756b58463f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLYield/OddLYieldPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLYield/OddLYieldPostRequestBody.cs @@ -164,7 +164,7 @@ public OddLYieldPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddLYield.OddLYieldPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddLYield.OddLYieldPostRequestBody(); } /// @@ -191,7 +191,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("frequency", Frequency); writer.WriteObjectValue("lastInterest", LastInterest); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLYield/OddLYieldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLYield/OddLYieldRequestBuilder.cs index 09f974a812f..175d04c5eff 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLYield/OddLYieldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/OddLYield/OddLYieldRequestBuilder.cs @@ -51,7 +51,7 @@ public OddLYieldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddLYield.OddLYieldPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.OddLYield.OddLYieldPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Or/OrPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Or/OrPostRequestBody.cs index f22da00789b..5dbb5735d8a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Or/OrPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Or/OrPostRequestBody.cs @@ -52,7 +52,7 @@ public OrPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Or.OrPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Or.OrPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Or/OrRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Or/OrRequestBuilder.cs index 092a6546e61..2f0d39517e8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Or/OrRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Or/OrRequestBuilder.cs @@ -51,7 +51,7 @@ public OrRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(re public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Or.OrPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Or.OrPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pduration/PdurationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pduration/PdurationPostRequestBody.cs index c404b95c6a7..5ea08ccc590 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pduration/PdurationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pduration/PdurationPostRequestBody.cs @@ -84,7 +84,7 @@ public PdurationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Pduration.PdurationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Pduration.PdurationPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fv", Fv); writer.WriteObjectValue("pv", Pv); writer.WriteObjectValue("rate", Rate); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pduration/PdurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pduration/PdurationRequestBuilder.cs index 6ae7b706787..058d0a7f129 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pduration/PdurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pduration/PdurationRequestBuilder.cs @@ -51,7 +51,7 @@ public PdurationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Pduration.PdurationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Pduration.PdurationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Exc/PercentRank_ExcPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Exc/PercentRank_ExcPostRequestBody.cs index b5cc5bf5337..1919b85d7ca 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Exc/PercentRank_ExcPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Exc/PercentRank_ExcPostRequestBody.cs @@ -84,7 +84,7 @@ public PercentRank_ExcPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PercentRank_Exc.PercentRank_ExcPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PercentRank_Exc.PercentRank_ExcPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("array", Array); writer.WriteObjectValue("significance", Significance); writer.WriteObjectValue("x", X); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Exc/PercentRank_ExcRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Exc/PercentRank_ExcRequestBuilder.cs index daef27825d3..03062491da8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Exc/PercentRank_ExcRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Exc/PercentRank_ExcRequestBuilder.cs @@ -51,7 +51,7 @@ public PercentRank_ExcRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PercentRank_Exc.PercentRank_ExcPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PercentRank_Exc.PercentRank_ExcPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Inc/PercentRank_IncPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Inc/PercentRank_IncPostRequestBody.cs index 27feffdb704..d95af3a9fba 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Inc/PercentRank_IncPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Inc/PercentRank_IncPostRequestBody.cs @@ -84,7 +84,7 @@ public PercentRank_IncPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PercentRank_Inc.PercentRank_IncPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PercentRank_Inc.PercentRank_IncPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("array", Array); writer.WriteObjectValue("significance", Significance); writer.WriteObjectValue("x", X); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Inc/PercentRank_IncRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Inc/PercentRank_IncRequestBuilder.cs index 9b0226f9672..ebe4c9b0a69 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Inc/PercentRank_IncRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PercentRank_Inc/PercentRank_IncRequestBuilder.cs @@ -51,7 +51,7 @@ public PercentRank_IncRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PercentRank_Inc.PercentRank_IncPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PercentRank_Inc.PercentRank_IncPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Exc/Percentile_ExcPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Exc/Percentile_ExcPostRequestBody.cs index 645cbe248e6..6fd4af625ab 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Exc/Percentile_ExcPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Exc/Percentile_ExcPostRequestBody.cs @@ -68,7 +68,7 @@ public Percentile_ExcPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Percentile_Exc.Percentile_ExcPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Percentile_Exc.Percentile_ExcPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("array", Array); writer.WriteObjectValue("k", K); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Exc/Percentile_ExcRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Exc/Percentile_ExcRequestBuilder.cs index 009757ebeab..3ca1469fe2b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Exc/Percentile_ExcRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Exc/Percentile_ExcRequestBuilder.cs @@ -51,7 +51,7 @@ public Percentile_ExcRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Percentile_Exc.Percentile_ExcPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Percentile_Exc.Percentile_ExcPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Inc/Percentile_IncPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Inc/Percentile_IncPostRequestBody.cs index 774047e04f7..56e36b88d44 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Inc/Percentile_IncPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Inc/Percentile_IncPostRequestBody.cs @@ -68,7 +68,7 @@ public Percentile_IncPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Percentile_Inc.Percentile_IncPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Percentile_Inc.Percentile_IncPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("array", Array); writer.WriteObjectValue("k", K); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Inc/Percentile_IncRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Inc/Percentile_IncRequestBuilder.cs index 84810d99f87..93960484b3e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Inc/Percentile_IncRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Percentile_Inc/Percentile_IncRequestBuilder.cs @@ -51,7 +51,7 @@ public Percentile_IncRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Percentile_Inc.Percentile_IncPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Percentile_Inc.Percentile_IncPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permut/PermutPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permut/PermutPostRequestBody.cs index edec2427938..2a0eae58215 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permut/PermutPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permut/PermutPostRequestBody.cs @@ -68,7 +68,7 @@ public PermutPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Permut.PermutPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Permut.PermutPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("numberChosen", NumberChosen); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permut/PermutRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permut/PermutRequestBuilder.cs index a3d78b9d3a3..dc49a3c76dd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permut/PermutRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permut/PermutRequestBuilder.cs @@ -51,7 +51,7 @@ public PermutRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Permut.PermutPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Permut.PermutPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permutationa/PermutationaPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permutationa/PermutationaPostRequestBody.cs index 96d338f2166..cd748c67fec 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permutationa/PermutationaPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permutationa/PermutationaPostRequestBody.cs @@ -68,7 +68,7 @@ public PermutationaPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Permutationa.PermutationaPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Permutationa.PermutationaPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("numberChosen", NumberChosen); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permutationa/PermutationaRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permutationa/PermutationaRequestBuilder.cs index ee9dfaadd4c..dd967188d1b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permutationa/PermutationaRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Permutationa/PermutationaRequestBuilder.cs @@ -51,7 +51,7 @@ public PermutationaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Permutationa.PermutationaPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Permutationa.PermutationaPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Phi/PhiPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Phi/PhiPostRequestBody.cs index d7d99518d55..65d9e08aab1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Phi/PhiPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Phi/PhiPostRequestBody.cs @@ -52,7 +52,7 @@ public PhiPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Phi.PhiPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Phi.PhiPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("x", X); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Phi/PhiRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Phi/PhiRequestBuilder.cs index bc8c5601cab..8f838330219 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Phi/PhiRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Phi/PhiRequestBuilder.cs @@ -51,7 +51,7 @@ public PhiRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Phi.PhiPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Phi.PhiPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pmt/PmtPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pmt/PmtPostRequestBody.cs index 8c5b6f76f9b..8481901192b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pmt/PmtPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pmt/PmtPostRequestBody.cs @@ -116,7 +116,7 @@ public PmtPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Pmt.PmtPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Pmt.PmtPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fv", Fv); writer.WriteObjectValue("nper", Nper); writer.WriteObjectValue("pv", Pv); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pmt/PmtRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pmt/PmtRequestBuilder.cs index 45b33724a65..61de7a1abbd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pmt/PmtRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pmt/PmtRequestBuilder.cs @@ -51,7 +51,7 @@ public PmtRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Pmt.PmtPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Pmt.PmtPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Poisson_Dist/Poisson_DistPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Poisson_Dist/Poisson_DistPostRequestBody.cs index a9a6f866bba..304658658a6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Poisson_Dist/Poisson_DistPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Poisson_Dist/Poisson_DistPostRequestBody.cs @@ -84,7 +84,7 @@ public Poisson_DistPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Poisson_Dist.Poisson_DistPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Poisson_Dist.Poisson_DistPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cumulative", Cumulative); writer.WriteObjectValue("mean", Mean); writer.WriteObjectValue("x", X); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Poisson_Dist/Poisson_DistRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Poisson_Dist/Poisson_DistRequestBuilder.cs index 5325029b8aa..44fa1a3f60d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Poisson_Dist/Poisson_DistRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Poisson_Dist/Poisson_DistRequestBuilder.cs @@ -51,7 +51,7 @@ public Poisson_DistRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Poisson_Dist.Poisson_DistPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Poisson_Dist.Poisson_DistPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Power/PowerPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Power/PowerPostRequestBody.cs index c266d801a34..0e876b40a15 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Power/PowerPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Power/PowerPostRequestBody.cs @@ -68,7 +68,7 @@ public PowerPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Power.PowerPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Power.PowerPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("power", Power); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Power/PowerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Power/PowerRequestBuilder.cs index 9eab02af590..c297cbcc443 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Power/PowerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Power/PowerRequestBuilder.cs @@ -51,7 +51,7 @@ public PowerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Power.PowerPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Power.PowerPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ppmt/PpmtPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ppmt/PpmtPostRequestBody.cs index f3b3c316a79..b1ca6c0106d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ppmt/PpmtPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ppmt/PpmtPostRequestBody.cs @@ -132,7 +132,7 @@ public PpmtPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ppmt.PpmtPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ppmt.PpmtPostRequestBody(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fv", Fv); writer.WriteObjectValue("nper", Nper); writer.WriteObjectValue("per", Per); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ppmt/PpmtRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ppmt/PpmtRequestBuilder.cs index a748c95f23a..57c4b72f4ed 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ppmt/PpmtRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Ppmt/PpmtRequestBuilder.cs @@ -51,7 +51,7 @@ public PpmtRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ppmt.PpmtPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Ppmt.PpmtPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Price/PricePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Price/PricePostRequestBody.cs index 81d5f84bc4f..23c20091a38 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Price/PricePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Price/PricePostRequestBody.cs @@ -148,7 +148,7 @@ public PricePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Price.PricePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Price.PricePostRequestBody(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("frequency", Frequency); writer.WriteObjectValue("maturity", Maturity); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Price/PriceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Price/PriceRequestBuilder.cs index e569869db41..c48a46bf558 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Price/PriceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Price/PriceRequestBuilder.cs @@ -51,7 +51,7 @@ public PriceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Price.PricePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Price.PricePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceDisc/PriceDiscPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceDisc/PriceDiscPostRequestBody.cs index 5936706be23..3a51a120df4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceDisc/PriceDiscPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceDisc/PriceDiscPostRequestBody.cs @@ -116,7 +116,7 @@ public PriceDiscPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PriceDisc.PriceDiscPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PriceDisc.PriceDiscPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("discount", Discount); writer.WriteObjectValue("maturity", Maturity); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceDisc/PriceDiscRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceDisc/PriceDiscRequestBuilder.cs index e136790cd76..d44307e4012 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceDisc/PriceDiscRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceDisc/PriceDiscRequestBuilder.cs @@ -51,7 +51,7 @@ public PriceDiscRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PriceDisc.PriceDiscPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PriceDisc.PriceDiscPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceMat/PriceMatPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceMat/PriceMatPostRequestBody.cs index f36a44b8eaa..68aba5d1d61 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceMat/PriceMatPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceMat/PriceMatPostRequestBody.cs @@ -132,7 +132,7 @@ public PriceMatPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PriceMat.PriceMatPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PriceMat.PriceMatPostRequestBody(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("issue", Issue); writer.WriteObjectValue("maturity", Maturity); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceMat/PriceMatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceMat/PriceMatRequestBuilder.cs index 8feaf401937..57117e33500 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceMat/PriceMatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/PriceMat/PriceMatRequestBuilder.cs @@ -51,7 +51,7 @@ public PriceMatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PriceMat.PriceMatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.PriceMat.PriceMatPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Product/ProductPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Product/ProductPostRequestBody.cs index 592f8f980b4..6d38151889e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Product/ProductPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Product/ProductPostRequestBody.cs @@ -52,7 +52,7 @@ public ProductPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Product.ProductPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Product.ProductPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Product/ProductRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Product/ProductRequestBuilder.cs index 26c35e069e7..288de886322 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Product/ProductRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Product/ProductRequestBuilder.cs @@ -51,7 +51,7 @@ public ProductRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Product.ProductPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Product.ProductPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Proper/ProperPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Proper/ProperPostRequestBody.cs index bf58ee8186a..b959e8d0ecb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Proper/ProperPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Proper/ProperPostRequestBody.cs @@ -52,7 +52,7 @@ public ProperPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Proper.ProperPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Proper.ProperPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Proper/ProperRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Proper/ProperRequestBuilder.cs index 7dae90b3367..3227e7597fb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Proper/ProperRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Proper/ProperRequestBuilder.cs @@ -51,7 +51,7 @@ public ProperRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Proper.ProperPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Proper.ProperPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pv/PvPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pv/PvPostRequestBody.cs index 2b89748f403..e84adcaf66a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pv/PvPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pv/PvPostRequestBody.cs @@ -116,7 +116,7 @@ public PvPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Pv.PvPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Pv.PvPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fv", Fv); writer.WriteObjectValue("nper", Nper); writer.WriteObjectValue("pmt", Pmt); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pv/PvRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pv/PvRequestBuilder.cs index 02dd8bfe542..2623413abb4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pv/PvRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Pv/PvRequestBuilder.cs @@ -51,7 +51,7 @@ public PvRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(re public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Pv.PvPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Pv.PvPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Exc/Quartile_ExcPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Exc/Quartile_ExcPostRequestBody.cs index dd49d7edc6e..168d7cfe0ed 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Exc/Quartile_ExcPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Exc/Quartile_ExcPostRequestBody.cs @@ -68,7 +68,7 @@ public Quartile_ExcPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Quartile_Exc.Quartile_ExcPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Quartile_Exc.Quartile_ExcPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("array", Array); writer.WriteObjectValue("quart", Quart); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Exc/Quartile_ExcRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Exc/Quartile_ExcRequestBuilder.cs index c1ad330feab..bce195ed929 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Exc/Quartile_ExcRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Exc/Quartile_ExcRequestBuilder.cs @@ -51,7 +51,7 @@ public Quartile_ExcRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Quartile_Exc.Quartile_ExcPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Quartile_Exc.Quartile_ExcPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Inc/Quartile_IncPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Inc/Quartile_IncPostRequestBody.cs index d3b2d903245..d331f2d2aa6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Inc/Quartile_IncPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Inc/Quartile_IncPostRequestBody.cs @@ -68,7 +68,7 @@ public Quartile_IncPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Quartile_Inc.Quartile_IncPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Quartile_Inc.Quartile_IncPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("array", Array); writer.WriteObjectValue("quart", Quart); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Inc/Quartile_IncRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Inc/Quartile_IncRequestBuilder.cs index 3328eb7739f..3e46e5e6c5e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Inc/Quartile_IncRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quartile_Inc/Quartile_IncRequestBuilder.cs @@ -51,7 +51,7 @@ public Quartile_IncRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Quartile_Inc.Quartile_IncPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Quartile_Inc.Quartile_IncPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quotient/QuotientPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quotient/QuotientPostRequestBody.cs index d51737444d8..671682acf37 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quotient/QuotientPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quotient/QuotientPostRequestBody.cs @@ -68,7 +68,7 @@ public QuotientPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Quotient.QuotientPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Quotient.QuotientPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("denominator", Denominator); writer.WriteObjectValue("numerator", Numerator); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quotient/QuotientRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quotient/QuotientRequestBuilder.cs index 702765c1bbc..5657e63b5e7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quotient/QuotientRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Quotient/QuotientRequestBuilder.cs @@ -51,7 +51,7 @@ public QuotientRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Quotient.QuotientPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Quotient.QuotientPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Radians/RadiansPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Radians/RadiansPostRequestBody.cs index 107760a9956..d4702a6fce6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Radians/RadiansPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Radians/RadiansPostRequestBody.cs @@ -52,7 +52,7 @@ public RadiansPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Radians.RadiansPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Radians.RadiansPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("angle", Angle); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Radians/RadiansRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Radians/RadiansRequestBuilder.cs index 0560f42302e..b87bc849575 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Radians/RadiansRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Radians/RadiansRequestBuilder.cs @@ -51,7 +51,7 @@ public RadiansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Radians.RadiansPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Radians.RadiansPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RandBetween/RandBetweenPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RandBetween/RandBetweenPostRequestBody.cs index bcfa238f721..b10fb59a11a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RandBetween/RandBetweenPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RandBetween/RandBetweenPostRequestBody.cs @@ -68,7 +68,7 @@ public RandBetweenPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.RandBetween.RandBetweenPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.RandBetween.RandBetweenPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("bottom", Bottom); writer.WriteObjectValue("top", Top); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RandBetween/RandBetweenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RandBetween/RandBetweenRequestBuilder.cs index ec8392c7b6e..a4804f919d0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RandBetween/RandBetweenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RandBetween/RandBetweenRequestBuilder.cs @@ -51,7 +51,7 @@ public RandBetweenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.RandBetween.RandBetweenPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.RandBetween.RandBetweenPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Avg/Rank_AvgPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Avg/Rank_AvgPostRequestBody.cs index 7e4c32c1803..2eb9b0575a0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Avg/Rank_AvgPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Avg/Rank_AvgPostRequestBody.cs @@ -84,7 +84,7 @@ public Rank_AvgPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rank_Avg.Rank_AvgPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rank_Avg.Rank_AvgPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("order", Order); writer.WriteObjectValue("ref", Ref); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Avg/Rank_AvgRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Avg/Rank_AvgRequestBuilder.cs index 0a18d7c79da..553ed13b90c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Avg/Rank_AvgRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Avg/Rank_AvgRequestBuilder.cs @@ -51,7 +51,7 @@ public Rank_AvgRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rank_Avg.Rank_AvgPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rank_Avg.Rank_AvgPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Eq/Rank_EqPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Eq/Rank_EqPostRequestBody.cs index 3e3b1d89c74..052b8c38c85 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Eq/Rank_EqPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Eq/Rank_EqPostRequestBody.cs @@ -84,7 +84,7 @@ public Rank_EqPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rank_Eq.Rank_EqPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rank_Eq.Rank_EqPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("order", Order); writer.WriteObjectValue("ref", Ref); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Eq/Rank_EqRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Eq/Rank_EqRequestBuilder.cs index a76d7966c80..dedb2492d29 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Eq/Rank_EqRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rank_Eq/Rank_EqRequestBuilder.cs @@ -51,7 +51,7 @@ public Rank_EqRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rank_Eq.Rank_EqPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rank_Eq.Rank_EqPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rate/RatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rate/RatePostRequestBody.cs index f777bb08932..22bed9bf072 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rate/RatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rate/RatePostRequestBody.cs @@ -132,7 +132,7 @@ public RatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rate.RatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rate.RatePostRequestBody(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fv", Fv); writer.WriteObjectValue("guess", Guess); writer.WriteObjectValue("nper", Nper); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rate/RateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rate/RateRequestBuilder.cs index 9ab4ea8f033..a2b6725f657 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rate/RateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rate/RateRequestBuilder.cs @@ -51,7 +51,7 @@ public RateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rate.RatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rate.RatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Received/ReceivedPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Received/ReceivedPostRequestBody.cs index d69311ffc7a..41a0036262d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Received/ReceivedPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Received/ReceivedPostRequestBody.cs @@ -116,7 +116,7 @@ public ReceivedPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Received.ReceivedPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Received.ReceivedPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("discount", Discount); writer.WriteObjectValue("investment", Investment); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Received/ReceivedRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Received/ReceivedRequestBuilder.cs index 9024294c30d..913d706214a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Received/ReceivedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Received/ReceivedRequestBuilder.cs @@ -51,7 +51,7 @@ public ReceivedRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Received.ReceivedPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Received.ReceivedPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Replace/ReplacePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Replace/ReplacePostRequestBody.cs index cfe5d149a2b..48b8b74dc9e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Replace/ReplacePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Replace/ReplacePostRequestBody.cs @@ -100,7 +100,7 @@ public ReplacePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Replace.ReplacePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Replace.ReplacePostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("newText", NewText); writer.WriteObjectValue("numChars", NumChars); writer.WriteObjectValue("oldText", OldText); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Replace/ReplaceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Replace/ReplaceRequestBuilder.cs index 93ba31a68d3..5d0f65ec13d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Replace/ReplaceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Replace/ReplaceRequestBuilder.cs @@ -51,7 +51,7 @@ public ReplaceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Replace.ReplacePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Replace.ReplacePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ReplaceB/ReplaceBPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ReplaceB/ReplaceBPostRequestBody.cs index 0876eeab73f..cff1ab175f6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ReplaceB/ReplaceBPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ReplaceB/ReplaceBPostRequestBody.cs @@ -100,7 +100,7 @@ public ReplaceBPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ReplaceB.ReplaceBPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ReplaceB.ReplaceBPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("newText", NewText); writer.WriteObjectValue("numBytes", NumBytes); writer.WriteObjectValue("oldText", OldText); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ReplaceB/ReplaceBRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ReplaceB/ReplaceBRequestBuilder.cs index 0f32d92803e..43caa321f8c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ReplaceB/ReplaceBRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/ReplaceB/ReplaceBRequestBuilder.cs @@ -51,7 +51,7 @@ public ReplaceBRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ReplaceB.ReplaceBPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.ReplaceB.ReplaceBPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rept/ReptPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rept/ReptPostRequestBody.cs index 4059059d557..ec4745f7568 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rept/ReptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rept/ReptPostRequestBody.cs @@ -68,7 +68,7 @@ public ReptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rept.ReptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rept.ReptPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("numberTimes", NumberTimes); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rept/ReptRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rept/ReptRequestBuilder.cs index a4df3748c3d..6e65ef3ed92 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rept/ReptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rept/ReptRequestBuilder.cs @@ -51,7 +51,7 @@ public ReptRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rept.ReptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rept.ReptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Right/RightPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Right/RightPostRequestBody.cs index 5354d2db013..0a11f053a1d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Right/RightPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Right/RightPostRequestBody.cs @@ -68,7 +68,7 @@ public RightPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Right.RightPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Right.RightPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("numChars", NumChars); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Right/RightRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Right/RightRequestBuilder.cs index f033eb1146a..389df2787e1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Right/RightRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Right/RightRequestBuilder.cs @@ -51,7 +51,7 @@ public RightRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Right.RightPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Right.RightPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rightb/RightbPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rightb/RightbPostRequestBody.cs index e87a164a204..901ebea85f7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rightb/RightbPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rightb/RightbPostRequestBody.cs @@ -68,7 +68,7 @@ public RightbPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rightb.RightbPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rightb.RightbPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("numBytes", NumBytes); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rightb/RightbRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rightb/RightbRequestBuilder.cs index f504c3a7c7b..5eeb288ce0d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rightb/RightbRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rightb/RightbRequestBuilder.cs @@ -51,7 +51,7 @@ public RightbRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rightb.RightbPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rightb.RightbPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Roman/RomanPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Roman/RomanPostRequestBody.cs index 078b2a0cfa1..29092294016 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Roman/RomanPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Roman/RomanPostRequestBody.cs @@ -68,7 +68,7 @@ public RomanPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Roman.RomanPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Roman.RomanPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("form", Form); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Roman/RomanRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Roman/RomanRequestBuilder.cs index 6de90674e9e..b94ac9da668 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Roman/RomanRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Roman/RomanRequestBuilder.cs @@ -51,7 +51,7 @@ public RomanRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Roman.RomanPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Roman.RomanPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Round/RoundPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Round/RoundPostRequestBody.cs index 452aaaf137a..925f7590651 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Round/RoundPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Round/RoundPostRequestBody.cs @@ -68,7 +68,7 @@ public RoundPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Round.RoundPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Round.RoundPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("numDigits", NumDigits); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Round/RoundRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Round/RoundRequestBuilder.cs index b01fc73ba4b..11725bf0dcb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Round/RoundRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Round/RoundRequestBuilder.cs @@ -51,7 +51,7 @@ public RoundRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Round.RoundPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Round.RoundPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundDown/RoundDownPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundDown/RoundDownPostRequestBody.cs index 52e876a3556..a8ef4e200e3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundDown/RoundDownPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundDown/RoundDownPostRequestBody.cs @@ -68,7 +68,7 @@ public RoundDownPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.RoundDown.RoundDownPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.RoundDown.RoundDownPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("numDigits", NumDigits); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundDown/RoundDownRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundDown/RoundDownRequestBuilder.cs index 62028c56dc3..4a5821d6e25 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundDown/RoundDownRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundDown/RoundDownRequestBuilder.cs @@ -51,7 +51,7 @@ public RoundDownRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.RoundDown.RoundDownPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.RoundDown.RoundDownPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundUp/RoundUpPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundUp/RoundUpPostRequestBody.cs index 8750105c52b..64bf753d255 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundUp/RoundUpPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundUp/RoundUpPostRequestBody.cs @@ -68,7 +68,7 @@ public RoundUpPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.RoundUp.RoundUpPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.RoundUp.RoundUpPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("numDigits", NumDigits); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundUp/RoundUpRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundUp/RoundUpRequestBuilder.cs index 224b345c6df..0aad95a93ec 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundUp/RoundUpRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/RoundUp/RoundUpRequestBuilder.cs @@ -51,7 +51,7 @@ public RoundUpRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.RoundUp.RoundUpPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.RoundUp.RoundUpPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rows/RowsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rows/RowsPostRequestBody.cs index 8582cbaa87f..75887e7473c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rows/RowsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rows/RowsPostRequestBody.cs @@ -52,7 +52,7 @@ public RowsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rows.RowsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rows.RowsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("array", Array); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rows/RowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rows/RowsRequestBuilder.cs index e5772b6a0a8..00479a435b8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rows/RowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rows/RowsRequestBuilder.cs @@ -51,7 +51,7 @@ public RowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rows.RowsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rows.RowsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rri/RriPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rri/RriPostRequestBody.cs index 011733aa03e..651581f36db 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rri/RriPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rri/RriPostRequestBody.cs @@ -84,7 +84,7 @@ public RriPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rri.RriPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rri.RriPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fv", Fv); writer.WriteObjectValue("nper", Nper); writer.WriteObjectValue("pv", Pv); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rri/RriRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rri/RriRequestBuilder.cs index 191eb583448..0df2fdc3b0b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rri/RriRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Rri/RriRequestBuilder.cs @@ -51,7 +51,7 @@ public RriRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rri.RriPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Rri.RriPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sec/SecPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sec/SecPostRequestBody.cs index 1b9ebf26391..37ccc9ab8d1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sec/SecPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sec/SecPostRequestBody.cs @@ -52,7 +52,7 @@ public SecPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sec.SecPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sec.SecPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sec/SecRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sec/SecRequestBuilder.cs index da3083a1fab..b3a42675319 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sec/SecRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sec/SecRequestBuilder.cs @@ -51,7 +51,7 @@ public SecRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sec.SecPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sec.SecPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sech/SechPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sech/SechPostRequestBody.cs index cad5b995269..dac99290936 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sech/SechPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sech/SechPostRequestBody.cs @@ -52,7 +52,7 @@ public SechPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sech.SechPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sech.SechPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sech/SechRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sech/SechRequestBuilder.cs index 5a917318851..f6f6eb7019a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sech/SechRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sech/SechRequestBuilder.cs @@ -51,7 +51,7 @@ public SechRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sech.SechPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sech.SechPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Second/SecondPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Second/SecondPostRequestBody.cs index ae40e8ecbd2..601065993c6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Second/SecondPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Second/SecondPostRequestBody.cs @@ -52,7 +52,7 @@ public SecondPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Second.SecondPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Second.SecondPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("serialNumber", SerialNumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Second/SecondRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Second/SecondRequestBuilder.cs index a7ce12bdf7f..e373c3f4c67 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Second/SecondRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Second/SecondRequestBuilder.cs @@ -51,7 +51,7 @@ public SecondRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Second.SecondPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Second.SecondPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SeriesSum/SeriesSumPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SeriesSum/SeriesSumPostRequestBody.cs index d895f6c6f3d..669794e251f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SeriesSum/SeriesSumPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SeriesSum/SeriesSumPostRequestBody.cs @@ -100,7 +100,7 @@ public SeriesSumPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SeriesSum.SeriesSumPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SeriesSum.SeriesSumPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("coefficients", Coefficients); writer.WriteObjectValue("m", M); writer.WriteObjectValue("n", N); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SeriesSum/SeriesSumRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SeriesSum/SeriesSumRequestBuilder.cs index 5a6d9141efb..c8e797637f1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SeriesSum/SeriesSumRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SeriesSum/SeriesSumRequestBuilder.cs @@ -51,7 +51,7 @@ public SeriesSumRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SeriesSum.SeriesSumPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SeriesSum.SeriesSumPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheet/SheetPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheet/SheetPostRequestBody.cs index 0a08879c8ac..964f381d4d3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheet/SheetPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheet/SheetPostRequestBody.cs @@ -52,7 +52,7 @@ public SheetPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sheet.SheetPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sheet.SheetPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheet/SheetRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheet/SheetRequestBuilder.cs index a4b542078aa..3c8f52dfed8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheet/SheetRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheet/SheetRequestBuilder.cs @@ -51,7 +51,7 @@ public SheetRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sheet.SheetPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sheet.SheetPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheets/SheetsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheets/SheetsPostRequestBody.cs index bca2d8b4db4..a3616f50cab 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheets/SheetsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheets/SheetsPostRequestBody.cs @@ -52,7 +52,7 @@ public SheetsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sheets.SheetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sheets.SheetsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("reference", Reference); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheets/SheetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheets/SheetsRequestBuilder.cs index 9ead160c55c..ebf55dde06a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheets/SheetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sheets/SheetsRequestBuilder.cs @@ -51,7 +51,7 @@ public SheetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sheets.SheetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sheets.SheetsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sign/SignPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sign/SignPostRequestBody.cs index f258e7ad844..e553d2a3b28 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sign/SignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sign/SignPostRequestBody.cs @@ -52,7 +52,7 @@ public SignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sign.SignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sign.SignPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sign/SignRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sign/SignRequestBuilder.cs index fbe2a3c63a8..af6d9463a0d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sign/SignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sign/SignRequestBuilder.cs @@ -51,7 +51,7 @@ public SignRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sign.SignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sign.SignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sin/SinPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sin/SinPostRequestBody.cs index f78c3b224a2..a35ced11ae4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sin/SinPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sin/SinPostRequestBody.cs @@ -52,7 +52,7 @@ public SinPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sin.SinPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sin.SinPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sin/SinRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sin/SinRequestBuilder.cs index b74b08bace0..52deeab32dc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sin/SinRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sin/SinRequestBuilder.cs @@ -51,7 +51,7 @@ public SinRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sin.SinPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sin.SinPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sinh/SinhPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sinh/SinhPostRequestBody.cs index 6bde383f031..86de1432f61 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sinh/SinhPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sinh/SinhPostRequestBody.cs @@ -52,7 +52,7 @@ public SinhPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sinh.SinhPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sinh.SinhPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sinh/SinhRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sinh/SinhRequestBuilder.cs index 491e8ec163c..8a69cfab724 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sinh/SinhRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sinh/SinhRequestBuilder.cs @@ -51,7 +51,7 @@ public SinhRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sinh.SinhPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sinh.SinhPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew/SkewPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew/SkewPostRequestBody.cs index a9ea981a390..3c88d6145f4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew/SkewPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew/SkewPostRequestBody.cs @@ -52,7 +52,7 @@ public SkewPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Skew.SkewPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Skew.SkewPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew/SkewRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew/SkewRequestBuilder.cs index 808d91a79f1..0712e4028d0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew/SkewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew/SkewRequestBuilder.cs @@ -51,7 +51,7 @@ public SkewRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Skew.SkewPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Skew.SkewPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew_p/Skew_pPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew_p/Skew_pPostRequestBody.cs index cc108c47f63..323663f008c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew_p/Skew_pPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew_p/Skew_pPostRequestBody.cs @@ -52,7 +52,7 @@ public Skew_pPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Skew_p.Skew_pPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Skew_p.Skew_pPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew_p/Skew_pRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew_p/Skew_pRequestBuilder.cs index bd41944cb64..214ec20bb82 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew_p/Skew_pRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Skew_p/Skew_pRequestBuilder.cs @@ -51,7 +51,7 @@ public Skew_pRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Skew_p.Skew_pPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Skew_p.Skew_pPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sln/SlnPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sln/SlnPostRequestBody.cs index 5b74b2c427a..92e402a6154 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sln/SlnPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sln/SlnPostRequestBody.cs @@ -84,7 +84,7 @@ public SlnPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sln.SlnPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sln.SlnPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cost", Cost); writer.WriteObjectValue("life", Life); writer.WriteObjectValue("salvage", Salvage); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sln/SlnRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sln/SlnRequestBuilder.cs index 624d19080af..7e51580949a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sln/SlnRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sln/SlnRequestBuilder.cs @@ -51,7 +51,7 @@ public SlnRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sln.SlnPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sln.SlnPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Small/SmallPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Small/SmallPostRequestBody.cs index 82b346a859d..9164f3d22d6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Small/SmallPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Small/SmallPostRequestBody.cs @@ -68,7 +68,7 @@ public SmallPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Small.SmallPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Small.SmallPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("array", Array); writer.WriteObjectValue("k", K); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Small/SmallRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Small/SmallRequestBuilder.cs index 92dce27198a..0a5e878acc8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Small/SmallRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Small/SmallRequestBuilder.cs @@ -51,7 +51,7 @@ public SmallRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Small.SmallPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Small.SmallPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sqrt/SqrtPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sqrt/SqrtPostRequestBody.cs index a06fc5f7ca9..e9a6ba0375f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sqrt/SqrtPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sqrt/SqrtPostRequestBody.cs @@ -52,7 +52,7 @@ public SqrtPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sqrt.SqrtPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sqrt.SqrtPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sqrt/SqrtRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sqrt/SqrtRequestBuilder.cs index bbe7a7c18c0..8a8f03a1f8d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sqrt/SqrtRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sqrt/SqrtRequestBuilder.cs @@ -51,7 +51,7 @@ public SqrtRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sqrt.SqrtPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sqrt.SqrtPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SqrtPi/SqrtPiPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SqrtPi/SqrtPiPostRequestBody.cs index 9e6956fb949..bd470b0d524 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SqrtPi/SqrtPiPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SqrtPi/SqrtPiPostRequestBody.cs @@ -52,7 +52,7 @@ public SqrtPiPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SqrtPi.SqrtPiPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SqrtPi.SqrtPiPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SqrtPi/SqrtPiRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SqrtPi/SqrtPiRequestBuilder.cs index 5b8a8a1bb7f..ca26fe1be5f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SqrtPi/SqrtPiRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SqrtPi/SqrtPiRequestBuilder.cs @@ -51,7 +51,7 @@ public SqrtPiRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SqrtPi.SqrtPiPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SqrtPi.SqrtPiPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevA/StDevAPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevA/StDevAPostRequestBody.cs index b022de61aba..bc8fdfcbdc7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevA/StDevAPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevA/StDevAPostRequestBody.cs @@ -52,7 +52,7 @@ public StDevAPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDevA.StDevAPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDevA.StDevAPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevA/StDevARequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevA/StDevARequestBuilder.cs index 1bfa20d7e75..57daf9846d2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevA/StDevARequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevA/StDevARequestBuilder.cs @@ -51,7 +51,7 @@ public StDevARequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDevA.StDevAPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDevA.StDevAPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevPA/StDevPAPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevPA/StDevPAPostRequestBody.cs index cb9ab7c8a2b..aeb58611340 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevPA/StDevPAPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevPA/StDevPAPostRequestBody.cs @@ -52,7 +52,7 @@ public StDevPAPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDevPA.StDevPAPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDevPA.StDevPAPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevPA/StDevPARequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevPA/StDevPARequestBuilder.cs index 578515ec289..a1289d4fb37 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevPA/StDevPARequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDevPA/StDevPARequestBuilder.cs @@ -51,7 +51,7 @@ public StDevPARequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDevPA.StDevPAPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDevPA.StDevPAPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_P/StDev_PPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_P/StDev_PPostRequestBody.cs index cc5603d3f25..a378c72dc28 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_P/StDev_PPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_P/StDev_PPostRequestBody.cs @@ -52,7 +52,7 @@ public StDev_PPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDev_P.StDev_PPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDev_P.StDev_PPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_P/StDev_PRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_P/StDev_PRequestBuilder.cs index 670189c2e93..31b4022e47c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_P/StDev_PRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_P/StDev_PRequestBuilder.cs @@ -51,7 +51,7 @@ public StDev_PRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDev_P.StDev_PPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDev_P.StDev_PPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_S/StDev_SPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_S/StDev_SPostRequestBody.cs index fc4b4fedc8e..2f8f9c04525 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_S/StDev_SPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_S/StDev_SPostRequestBody.cs @@ -52,7 +52,7 @@ public StDev_SPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDev_S.StDev_SPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDev_S.StDev_SPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_S/StDev_SRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_S/StDev_SRequestBuilder.cs index 49d6817cf15..529d3fdc957 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_S/StDev_SRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/StDev_S/StDev_SRequestBuilder.cs @@ -51,7 +51,7 @@ public StDev_SRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDev_S.StDev_SPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.StDev_S.StDev_SPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Standardize/StandardizePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Standardize/StandardizePostRequestBody.cs index ab4b09de33d..aa686f7ee1f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Standardize/StandardizePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Standardize/StandardizePostRequestBody.cs @@ -84,7 +84,7 @@ public StandardizePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Standardize.StandardizePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Standardize.StandardizePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("mean", Mean); writer.WriteObjectValue("standardDev", StandardDev); writer.WriteObjectValue("x", X); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Standardize/StandardizeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Standardize/StandardizeRequestBuilder.cs index e2b1ddd8d82..c5c74cb5aa6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Standardize/StandardizeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Standardize/StandardizeRequestBuilder.cs @@ -51,7 +51,7 @@ public StandardizeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Standardize.StandardizePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Standardize.StandardizePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Substitute/SubstitutePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Substitute/SubstitutePostRequestBody.cs index 9010c476f75..d38573b2890 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Substitute/SubstitutePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Substitute/SubstitutePostRequestBody.cs @@ -100,7 +100,7 @@ public SubstitutePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Substitute.SubstitutePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Substitute.SubstitutePostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("instanceNum", InstanceNum); writer.WriteObjectValue("newText", NewText); writer.WriteObjectValue("oldText", OldText); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Substitute/SubstituteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Substitute/SubstituteRequestBuilder.cs index 62b96d03803..d4082ecf137 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Substitute/SubstituteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Substitute/SubstituteRequestBuilder.cs @@ -51,7 +51,7 @@ public SubstituteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Substitute.SubstitutePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Substitute.SubstitutePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Subtotal/SubtotalPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Subtotal/SubtotalPostRequestBody.cs index a3e98081e9c..d60dc768849 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Subtotal/SubtotalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Subtotal/SubtotalPostRequestBody.cs @@ -68,7 +68,7 @@ public SubtotalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Subtotal.SubtotalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Subtotal.SubtotalPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("functionNum", FunctionNum); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Subtotal/SubtotalRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Subtotal/SubtotalRequestBuilder.cs index f7fe3268c26..1063985e077 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Subtotal/SubtotalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Subtotal/SubtotalRequestBuilder.cs @@ -51,7 +51,7 @@ public SubtotalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Subtotal.SubtotalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Subtotal.SubtotalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sum/SumPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sum/SumPostRequestBody.cs index 50c49b30aa1..6f552774267 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sum/SumPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sum/SumPostRequestBody.cs @@ -52,7 +52,7 @@ public SumPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sum.SumPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sum.SumPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sum/SumRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sum/SumRequestBuilder.cs index 52fa6e2935d..ee81957dcad 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sum/SumRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Sum/SumRequestBuilder.cs @@ -51,7 +51,7 @@ public SumRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sum.SumPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Sum.SumPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIf/SumIfPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIf/SumIfPostRequestBody.cs index cd586c28b03..91e6a8571df 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIf/SumIfPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIf/SumIfPostRequestBody.cs @@ -84,7 +84,7 @@ public SumIfPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SumIf.SumIfPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SumIf.SumIfPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteObjectValue("range", Range); writer.WriteObjectValue("sumRange", SumRange); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIf/SumIfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIf/SumIfRequestBuilder.cs index 5511a28099d..0c10c92540e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIf/SumIfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIf/SumIfRequestBuilder.cs @@ -51,7 +51,7 @@ public SumIfRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SumIf.SumIfPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SumIf.SumIfPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIfs/SumIfsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIfs/SumIfsPostRequestBody.cs index 534f4093943..1040250f04e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIfs/SumIfsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIfs/SumIfsPostRequestBody.cs @@ -68,7 +68,7 @@ public SumIfsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SumIfs.SumIfsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SumIfs.SumIfsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("sumRange", SumRange); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIfs/SumIfsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIfs/SumIfsRequestBuilder.cs index aecb154c1f4..23febc65750 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIfs/SumIfsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumIfs/SumIfsRequestBuilder.cs @@ -51,7 +51,7 @@ public SumIfsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SumIfs.SumIfsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SumIfs.SumIfsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumSq/SumSqPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumSq/SumSqPostRequestBody.cs index 3d2ec58f420..4a5b7e99a8a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumSq/SumSqPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumSq/SumSqPostRequestBody.cs @@ -52,7 +52,7 @@ public SumSqPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SumSq.SumSqPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SumSq.SumSqPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumSq/SumSqRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumSq/SumSqRequestBuilder.cs index f20fb3ec838..c46528e5b32 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumSq/SumSqRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/SumSq/SumSqRequestBuilder.cs @@ -51,7 +51,7 @@ public SumSqRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SumSq.SumSqPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.SumSq.SumSqPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Syd/SydPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Syd/SydPostRequestBody.cs index 8dd7162584d..df848cafe1a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Syd/SydPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Syd/SydPostRequestBody.cs @@ -100,7 +100,7 @@ public SydPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Syd.SydPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Syd.SydPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cost", Cost); writer.WriteObjectValue("life", Life); writer.WriteObjectValue("per", Per); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Syd/SydRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Syd/SydRequestBuilder.cs index b56a67c1b48..65d31f4c3d8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Syd/SydRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Syd/SydRequestBuilder.cs @@ -51,7 +51,7 @@ public SydRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Syd.SydPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Syd.SydPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T/TPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T/TPostRequestBody.cs index d47030d7d11..e4f45e66a33 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T/TPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T/TPostRequestBody.cs @@ -52,7 +52,7 @@ public TPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T.TPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T.TPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T/TRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T/TRequestBuilder.cs index e6e33006e14..7c116930e8d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T/TRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T/TRequestBuilder.cs @@ -51,7 +51,7 @@ public TRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(req public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T.TPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T.TPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist/T_DistPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist/T_DistPostRequestBody.cs index 2180ccd80a3..00bc670d3a7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist/T_DistPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist/T_DistPostRequestBody.cs @@ -84,7 +84,7 @@ public T_DistPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Dist.T_DistPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Dist.T_DistPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cumulative", Cumulative); writer.WriteObjectValue("degFreedom", DegFreedom); writer.WriteObjectValue("x", X); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist/T_DistRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist/T_DistRequestBuilder.cs index 3473b315334..ac3eefded07 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist/T_DistRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist/T_DistRequestBuilder.cs @@ -51,7 +51,7 @@ public T_DistRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Dist.T_DistPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Dist.T_DistPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_2T/T_Dist_2TPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_2T/T_Dist_2TPostRequestBody.cs index 5457bdc903e..f09a654843f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_2T/T_Dist_2TPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_2T/T_Dist_2TPostRequestBody.cs @@ -68,7 +68,7 @@ public T_Dist_2TPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Dist_2T.T_Dist_2TPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Dist_2T.T_Dist_2TPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("degFreedom", DegFreedom); writer.WriteObjectValue("x", X); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_2T/T_Dist_2TRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_2T/T_Dist_2TRequestBuilder.cs index 4adb1ac3e8d..37bc27be143 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_2T/T_Dist_2TRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_2T/T_Dist_2TRequestBuilder.cs @@ -51,7 +51,7 @@ public T_Dist_2TRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Dist_2T.T_Dist_2TPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Dist_2T.T_Dist_2TPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_RT/T_Dist_RTPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_RT/T_Dist_RTPostRequestBody.cs index 26c174dfac2..36d9220121d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_RT/T_Dist_RTPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_RT/T_Dist_RTPostRequestBody.cs @@ -68,7 +68,7 @@ public T_Dist_RTPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Dist_RT.T_Dist_RTPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Dist_RT.T_Dist_RTPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("degFreedom", DegFreedom); writer.WriteObjectValue("x", X); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_RT/T_Dist_RTRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_RT/T_Dist_RTRequestBuilder.cs index 4b2b0b8dfc4..9d4956e0fee 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_RT/T_Dist_RTRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Dist_RT/T_Dist_RTRequestBuilder.cs @@ -51,7 +51,7 @@ public T_Dist_RTRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Dist_RT.T_Dist_RTPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Dist_RT.T_Dist_RTPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv/T_InvPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv/T_InvPostRequestBody.cs index c8bbf70849b..63abe6f4290 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv/T_InvPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv/T_InvPostRequestBody.cs @@ -68,7 +68,7 @@ public T_InvPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Inv.T_InvPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Inv.T_InvPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("degFreedom", DegFreedom); writer.WriteObjectValue("probability", Probability); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv/T_InvRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv/T_InvRequestBuilder.cs index 3a579480707..1ab498dac17 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv/T_InvRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv/T_InvRequestBuilder.cs @@ -51,7 +51,7 @@ public T_InvRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Inv.T_InvPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Inv.T_InvPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv_2T/T_Inv_2TPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv_2T/T_Inv_2TPostRequestBody.cs index 1492a8af5e9..1c3848cb411 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv_2T/T_Inv_2TPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv_2T/T_Inv_2TPostRequestBody.cs @@ -68,7 +68,7 @@ public T_Inv_2TPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Inv_2T.T_Inv_2TPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Inv_2T.T_Inv_2TPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("degFreedom", DegFreedom); writer.WriteObjectValue("probability", Probability); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv_2T/T_Inv_2TRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv_2T/T_Inv_2TRequestBuilder.cs index 5ef1c5ff0ba..9c430c54fbd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv_2T/T_Inv_2TRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/T_Inv_2T/T_Inv_2TRequestBuilder.cs @@ -51,7 +51,7 @@ public T_Inv_2TRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Inv_2T.T_Inv_2TPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.T_Inv_2T.T_Inv_2TPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tan/TanPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tan/TanPostRequestBody.cs index 43c1ff05c85..23093d9f4ae 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tan/TanPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tan/TanPostRequestBody.cs @@ -52,7 +52,7 @@ public TanPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Tan.TanPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Tan.TanPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tan/TanRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tan/TanRequestBuilder.cs index b24ed32097d..67a4db2c1ff 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tan/TanRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tan/TanRequestBuilder.cs @@ -51,7 +51,7 @@ public TanRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Tan.TanPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Tan.TanPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tanh/TanhPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tanh/TanhPostRequestBody.cs index 4d87384bfc0..ee8ce6716c7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tanh/TanhPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tanh/TanhPostRequestBody.cs @@ -52,7 +52,7 @@ public TanhPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Tanh.TanhPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Tanh.TanhPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tanh/TanhRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tanh/TanhRequestBuilder.cs index 123e33dea5a..ad831377868 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tanh/TanhRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Tanh/TanhRequestBuilder.cs @@ -51,7 +51,7 @@ public TanhRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Tanh.TanhPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Tanh.TanhPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillEq/TbillEqPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillEq/TbillEqPostRequestBody.cs index 4472026c41d..0e25e5f0129 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillEq/TbillEqPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillEq/TbillEqPostRequestBody.cs @@ -84,7 +84,7 @@ public TbillEqPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TbillEq.TbillEqPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TbillEq.TbillEqPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("discount", Discount); writer.WriteObjectValue("maturity", Maturity); writer.WriteObjectValue("settlement", Settlement); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillEq/TbillEqRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillEq/TbillEqRequestBuilder.cs index 2e72f4a08e8..59a1a2f4911 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillEq/TbillEqRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillEq/TbillEqRequestBuilder.cs @@ -51,7 +51,7 @@ public TbillEqRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TbillEq.TbillEqPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TbillEq.TbillEqPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillPrice/TbillPricePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillPrice/TbillPricePostRequestBody.cs index 8b6846f305e..5edd3af4cb8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillPrice/TbillPricePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillPrice/TbillPricePostRequestBody.cs @@ -84,7 +84,7 @@ public TbillPricePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TbillPrice.TbillPricePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TbillPrice.TbillPricePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("discount", Discount); writer.WriteObjectValue("maturity", Maturity); writer.WriteObjectValue("settlement", Settlement); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillPrice/TbillPriceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillPrice/TbillPriceRequestBuilder.cs index a70414ec24c..302c4b0ad7a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillPrice/TbillPriceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillPrice/TbillPriceRequestBuilder.cs @@ -51,7 +51,7 @@ public TbillPriceRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TbillPrice.TbillPricePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TbillPrice.TbillPricePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillYield/TbillYieldPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillYield/TbillYieldPostRequestBody.cs index 90ff07c0b8c..5678054a602 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillYield/TbillYieldPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillYield/TbillYieldPostRequestBody.cs @@ -84,7 +84,7 @@ public TbillYieldPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TbillYield.TbillYieldPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TbillYield.TbillYieldPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("maturity", Maturity); writer.WriteObjectValue("pr", Pr); writer.WriteObjectValue("settlement", Settlement); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillYield/TbillYieldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillYield/TbillYieldRequestBuilder.cs index 67f395aaf92..2aca7f313e9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillYield/TbillYieldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TbillYield/TbillYieldRequestBuilder.cs @@ -51,7 +51,7 @@ public TbillYieldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TbillYield.TbillYieldPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TbillYield.TbillYieldPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Text/TextPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Text/TextPostRequestBody.cs index ea6620bb577..bb0b31bb941 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Text/TextPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Text/TextPostRequestBody.cs @@ -68,7 +68,7 @@ public TextPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Text.TextPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Text.TextPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("formatText", FormatText); writer.WriteObjectValue("value", Value); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Text/TextRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Text/TextRequestBuilder.cs index 2bdfa923818..5f7c480b5ae 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Text/TextRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Text/TextRequestBuilder.cs @@ -51,7 +51,7 @@ public TextRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Text.TextPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Text.TextPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Time/TimePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Time/TimePostRequestBody.cs index 8e90649b45a..a20fa3edeeb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Time/TimePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Time/TimePostRequestBody.cs @@ -84,7 +84,7 @@ public TimePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Time.TimePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Time.TimePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("hour", Hour); writer.WriteObjectValue("minute", Minute); writer.WriteObjectValue("second", Second); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Time/TimeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Time/TimeRequestBuilder.cs index 05c27db1ee6..fe6c6736c43 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Time/TimeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Time/TimeRequestBuilder.cs @@ -51,7 +51,7 @@ public TimeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Time.TimePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Time.TimePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Timevalue/TimevaluePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Timevalue/TimevaluePostRequestBody.cs index dd7b34d86a4..cf03cdf4a55 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Timevalue/TimevaluePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Timevalue/TimevaluePostRequestBody.cs @@ -52,7 +52,7 @@ public TimevaluePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Timevalue.TimevaluePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Timevalue.TimevaluePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("timeText", TimeText); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Timevalue/TimevalueRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Timevalue/TimevalueRequestBuilder.cs index bc22d41a277..cc659408261 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Timevalue/TimevalueRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Timevalue/TimevalueRequestBuilder.cs @@ -51,7 +51,7 @@ public TimevalueRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Timevalue.TimevaluePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Timevalue.TimevaluePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trim/TrimPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trim/TrimPostRequestBody.cs index 40103497cd0..256c6ba722f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trim/TrimPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trim/TrimPostRequestBody.cs @@ -52,7 +52,7 @@ public TrimPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Trim.TrimPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Trim.TrimPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trim/TrimRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trim/TrimRequestBuilder.cs index 88edadebaaf..6f7a8493f8a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trim/TrimRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trim/TrimRequestBuilder.cs @@ -51,7 +51,7 @@ public TrimRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Trim.TrimPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Trim.TrimPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TrimMean/TrimMeanPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TrimMean/TrimMeanPostRequestBody.cs index 1520b642388..fb60bba0c9f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TrimMean/TrimMeanPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TrimMean/TrimMeanPostRequestBody.cs @@ -68,7 +68,7 @@ public TrimMeanPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TrimMean.TrimMeanPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TrimMean.TrimMeanPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("array", Array); writer.WriteObjectValue("percent", Percent); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TrimMean/TrimMeanRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TrimMean/TrimMeanRequestBuilder.cs index beb512cdef3..9dbf125aa95 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TrimMean/TrimMeanRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TrimMean/TrimMeanRequestBuilder.cs @@ -51,7 +51,7 @@ public TrimMeanRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TrimMean.TrimMeanPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TrimMean.TrimMeanPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trunc/TruncPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trunc/TruncPostRequestBody.cs index 87da5058ecc..9195ebdfbeb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trunc/TruncPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trunc/TruncPostRequestBody.cs @@ -68,7 +68,7 @@ public TruncPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Trunc.TruncPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Trunc.TruncPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteObjectValue("numDigits", NumDigits); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trunc/TruncRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trunc/TruncRequestBuilder.cs index e2b4b76f040..8dcb3f12151 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trunc/TruncRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Trunc/TruncRequestBuilder.cs @@ -51,7 +51,7 @@ public TruncRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Trunc.TruncPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Trunc.TruncPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TypeNamespace/TypePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TypeNamespace/TypePostRequestBody.cs index 9c48669169f..da37a294228 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TypeNamespace/TypePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TypeNamespace/TypePostRequestBody.cs @@ -52,7 +52,7 @@ public TypePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TypeNamespace.TypePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TypeNamespace.TypePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TypeNamespace/TypeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TypeNamespace/TypeRequestBuilder.cs index 7d4b15642a7..8fad4cdf186 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TypeNamespace/TypeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/TypeNamespace/TypeRequestBuilder.cs @@ -51,7 +51,7 @@ public TypeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TypeNamespace.TypePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.TypeNamespace.TypePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unichar/UnicharPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unichar/UnicharPostRequestBody.cs index ef4316b1983..717a451c8f4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unichar/UnicharPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unichar/UnicharPostRequestBody.cs @@ -52,7 +52,7 @@ public UnicharPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Unichar.UnicharPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Unichar.UnicharPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unichar/UnicharRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unichar/UnicharRequestBuilder.cs index f37942b7011..89c519b6a0f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unichar/UnicharRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unichar/UnicharRequestBuilder.cs @@ -51,7 +51,7 @@ public UnicharRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Unichar.UnicharPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Unichar.UnicharPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unicode/UnicodePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unicode/UnicodePostRequestBody.cs index 85c064a63e4..dba8af87124 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unicode/UnicodePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unicode/UnicodePostRequestBody.cs @@ -52,7 +52,7 @@ public UnicodePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Unicode.UnicodePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Unicode.UnicodePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unicode/UnicodeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unicode/UnicodeRequestBuilder.cs index 4908b4040a1..6fb55815e06 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unicode/UnicodeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Unicode/UnicodeRequestBuilder.cs @@ -51,7 +51,7 @@ public UnicodeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Unicode.UnicodePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Unicode.UnicodePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Upper/UpperPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Upper/UpperPostRequestBody.cs index 4edb6bf012d..d1336b4b4d5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Upper/UpperPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Upper/UpperPostRequestBody.cs @@ -52,7 +52,7 @@ public UpperPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Upper.UpperPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Upper.UpperPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Upper/UpperRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Upper/UpperRequestBuilder.cs index dc77c3c68b6..4ed3fcb0dbb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Upper/UpperRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Upper/UpperRequestBuilder.cs @@ -51,7 +51,7 @@ public UpperRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Upper.UpperPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Upper.UpperPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Usdollar/UsdollarPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Usdollar/UsdollarPostRequestBody.cs index 217d477f4a5..b9d9198677c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Usdollar/UsdollarPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Usdollar/UsdollarPostRequestBody.cs @@ -68,7 +68,7 @@ public UsdollarPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Usdollar.UsdollarPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Usdollar.UsdollarPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("decimals", Decimals); writer.WriteObjectValue("number", Number); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Usdollar/UsdollarRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Usdollar/UsdollarRequestBuilder.cs index 458683c52de..6483f745ea8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Usdollar/UsdollarRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Usdollar/UsdollarRequestBuilder.cs @@ -51,7 +51,7 @@ public UsdollarRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Usdollar.UsdollarPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Usdollar.UsdollarPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Value/ValuePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Value/ValuePostRequestBody.cs index 28bbe7631e3..3e343bbd39f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Value/ValuePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Value/ValuePostRequestBody.cs @@ -52,7 +52,7 @@ public ValuePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Value.ValuePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Value.ValuePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("text", Text); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Value/ValueRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Value/ValueRequestBuilder.cs index d1f97692ff4..0c88563f7d2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Value/ValueRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Value/ValueRequestBuilder.cs @@ -51,7 +51,7 @@ public ValueRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Value.ValuePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Value.ValuePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarA/VarAPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarA/VarAPostRequestBody.cs index 22c608ddae1..ce5acb00de2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarA/VarAPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarA/VarAPostRequestBody.cs @@ -52,7 +52,7 @@ public VarAPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.VarA.VarAPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.VarA.VarAPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarA/VarARequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarA/VarARequestBuilder.cs index 3698902f696..776e588099c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarA/VarARequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarA/VarARequestBuilder.cs @@ -51,7 +51,7 @@ public VarARequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.VarA.VarAPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.VarA.VarAPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarPA/VarPAPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarPA/VarPAPostRequestBody.cs index fff19f0f34a..0aaf8a09ea1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarPA/VarPAPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarPA/VarPAPostRequestBody.cs @@ -52,7 +52,7 @@ public VarPAPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.VarPA.VarPAPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.VarPA.VarPAPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarPA/VarPARequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarPA/VarPARequestBuilder.cs index 3883bdd1934..9ec99177b34 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarPA/VarPARequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/VarPA/VarPARequestBuilder.cs @@ -51,7 +51,7 @@ public VarPARequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.VarPA.VarPAPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.VarPA.VarPAPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_P/Var_PPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_P/Var_PPostRequestBody.cs index 6c312bdad91..697a726c8f7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_P/Var_PPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_P/Var_PPostRequestBody.cs @@ -52,7 +52,7 @@ public Var_PPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Var_P.Var_PPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Var_P.Var_PPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_P/Var_PRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_P/Var_PRequestBuilder.cs index 13a5b262685..ebf838ee7b7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_P/Var_PRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_P/Var_PRequestBuilder.cs @@ -51,7 +51,7 @@ public Var_PRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Var_P.Var_PPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Var_P.Var_PPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_S/Var_SPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_S/Var_SPostRequestBody.cs index 65d71834e75..a4ef4a163d8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_S/Var_SPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_S/Var_SPostRequestBody.cs @@ -52,7 +52,7 @@ public Var_SPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Var_S.Var_SPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Var_S.Var_SPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_S/Var_SRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_S/Var_SRequestBuilder.cs index e5e8ff2c23e..ebdc0e106ac 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_S/Var_SRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Var_S/Var_SRequestBuilder.cs @@ -51,7 +51,7 @@ public Var_SRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Var_S.Var_SPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Var_S.Var_SPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vdb/VdbPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vdb/VdbPostRequestBody.cs index 1cb6d2c3688..e09f4088873 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vdb/VdbPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vdb/VdbPostRequestBody.cs @@ -148,7 +148,7 @@ public VdbPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Vdb.VdbPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Vdb.VdbPostRequestBody(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cost", Cost); writer.WriteObjectValue("endPeriod", EndPeriod); writer.WriteObjectValue("factor", Factor); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vdb/VdbRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vdb/VdbRequestBuilder.cs index b739f6c572a..87a36e6b2c2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vdb/VdbRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vdb/VdbRequestBuilder.cs @@ -51,7 +51,7 @@ public VdbRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Vdb.VdbPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Vdb.VdbPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vlookup/VlookupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vlookup/VlookupPostRequestBody.cs index f0c18715b95..0cd2a1a7480 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vlookup/VlookupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vlookup/VlookupPostRequestBody.cs @@ -100,7 +100,7 @@ public VlookupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Vlookup.VlookupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Vlookup.VlookupPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("colIndexNum", ColIndexNum); writer.WriteObjectValue("lookupValue", LookupValue); writer.WriteObjectValue("rangeLookup", RangeLookup); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vlookup/VlookupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vlookup/VlookupRequestBuilder.cs index 71f572e75a5..e5ba7e778b1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vlookup/VlookupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Vlookup/VlookupRequestBuilder.cs @@ -51,7 +51,7 @@ public VlookupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Vlookup.VlookupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Vlookup.VlookupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WeekNum/WeekNumPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WeekNum/WeekNumPostRequestBody.cs index c07dd0f2a56..b5901ee8de6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WeekNum/WeekNumPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WeekNum/WeekNumPostRequestBody.cs @@ -68,7 +68,7 @@ public WeekNumPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.WeekNum.WeekNumPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.WeekNum.WeekNumPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("returnType", ReturnType); writer.WriteObjectValue("serialNumber", SerialNumber); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WeekNum/WeekNumRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WeekNum/WeekNumRequestBuilder.cs index ba6b033c016..8995125d0bf 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WeekNum/WeekNumRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WeekNum/WeekNumRequestBuilder.cs @@ -51,7 +51,7 @@ public WeekNumRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.WeekNum.WeekNumPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.WeekNum.WeekNumPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weekday/WeekdayPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weekday/WeekdayPostRequestBody.cs index bd86c00435c..cfff1597293 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weekday/WeekdayPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weekday/WeekdayPostRequestBody.cs @@ -68,7 +68,7 @@ public WeekdayPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Weekday.WeekdayPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Weekday.WeekdayPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("returnType", ReturnType); writer.WriteObjectValue("serialNumber", SerialNumber); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weekday/WeekdayRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weekday/WeekdayRequestBuilder.cs index af086435ea5..7fd89ca2e3a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weekday/WeekdayRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weekday/WeekdayRequestBuilder.cs @@ -51,7 +51,7 @@ public WeekdayRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Weekday.WeekdayPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Weekday.WeekdayPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weibull_Dist/Weibull_DistPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weibull_Dist/Weibull_DistPostRequestBody.cs index 82248f69261..50f78cdf8cb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weibull_Dist/Weibull_DistPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weibull_Dist/Weibull_DistPostRequestBody.cs @@ -100,7 +100,7 @@ public Weibull_DistPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Weibull_Dist.Weibull_DistPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Weibull_Dist.Weibull_DistPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("alpha", Alpha); writer.WriteObjectValue("beta", Beta); writer.WriteObjectValue("cumulative", Cumulative); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weibull_Dist/Weibull_DistRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weibull_Dist/Weibull_DistRequestBuilder.cs index 9b15febc4de..7100bebccb5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weibull_Dist/Weibull_DistRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Weibull_Dist/Weibull_DistRequestBuilder.cs @@ -51,7 +51,7 @@ public Weibull_DistRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Weibull_Dist.Weibull_DistPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Weibull_Dist.Weibull_DistPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay/WorkDayPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay/WorkDayPostRequestBody.cs index ea87a385394..de10807a80b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay/WorkDayPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay/WorkDayPostRequestBody.cs @@ -84,7 +84,7 @@ public WorkDayPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.WorkDay.WorkDayPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.WorkDay.WorkDayPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("days", Days); writer.WriteObjectValue("holidays", Holidays); writer.WriteObjectValue("startDate", StartDate); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay/WorkDayRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay/WorkDayRequestBuilder.cs index f8c9f1b7b2b..b00d43c3904 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay/WorkDayRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay/WorkDayRequestBuilder.cs @@ -51,7 +51,7 @@ public WorkDayRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.WorkDay.WorkDayPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.WorkDay.WorkDayPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay_Intl/WorkDay_IntlPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay_Intl/WorkDay_IntlPostRequestBody.cs index c17fd8d54c2..f4b5e5e7076 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay_Intl/WorkDay_IntlPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay_Intl/WorkDay_IntlPostRequestBody.cs @@ -100,7 +100,7 @@ public WorkDay_IntlPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.WorkDay_Intl.WorkDay_IntlPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.WorkDay_Intl.WorkDay_IntlPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("days", Days); writer.WriteObjectValue("holidays", Holidays); writer.WriteObjectValue("startDate", StartDate); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay_Intl/WorkDay_IntlRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay_Intl/WorkDay_IntlRequestBuilder.cs index c1c17769b83..4e77aab9a6b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay_Intl/WorkDay_IntlRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/WorkDay_Intl/WorkDay_IntlRequestBuilder.cs @@ -51,7 +51,7 @@ public WorkDay_IntlRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.WorkDay_Intl.WorkDay_IntlPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.WorkDay_Intl.WorkDay_IntlPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xirr/XirrPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xirr/XirrPostRequestBody.cs index 22686903395..668cee3c451 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xirr/XirrPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xirr/XirrPostRequestBody.cs @@ -84,7 +84,7 @@ public XirrPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Xirr.XirrPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Xirr.XirrPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("dates", Dates); writer.WriteObjectValue("guess", Guess); writer.WriteObjectValue("values", Values); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xirr/XirrRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xirr/XirrRequestBuilder.cs index a29ca6b0dd1..8b747dd93b6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xirr/XirrRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xirr/XirrRequestBuilder.cs @@ -51,7 +51,7 @@ public XirrRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Xirr.XirrPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Xirr.XirrPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xnpv/XnpvPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xnpv/XnpvPostRequestBody.cs index 5f7a20f5d87..101fb4803c8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xnpv/XnpvPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xnpv/XnpvPostRequestBody.cs @@ -84,7 +84,7 @@ public XnpvPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Xnpv.XnpvPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Xnpv.XnpvPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("dates", Dates); writer.WriteObjectValue("rate", Rate); writer.WriteObjectValue("values", Values); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xnpv/XnpvRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xnpv/XnpvRequestBuilder.cs index 6e1c34e8831..fcdd9e76db7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xnpv/XnpvRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xnpv/XnpvRequestBuilder.cs @@ -51,7 +51,7 @@ public XnpvRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Xnpv.XnpvPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Xnpv.XnpvPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xor/XorPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xor/XorPostRequestBody.cs index 6bb883ba0c1..de15b42bda5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xor/XorPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xor/XorPostRequestBody.cs @@ -52,7 +52,7 @@ public XorPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Xor.XorPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Xor.XorPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xor/XorRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xor/XorRequestBuilder.cs index c109c94b540..4f4f3a6035c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xor/XorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Xor/XorRequestBuilder.cs @@ -51,7 +51,7 @@ public XorRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Xor.XorPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Xor.XorPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Year/YearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Year/YearPostRequestBody.cs index 0a83e7f8ca2..920c27fc0c4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Year/YearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Year/YearPostRequestBody.cs @@ -52,7 +52,7 @@ public YearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Year.YearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Year.YearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("serialNumber", SerialNumber); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Year/YearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Year/YearRequestBuilder.cs index 13df859e9cd..e5abe505b39 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Year/YearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Year/YearRequestBuilder.cs @@ -51,7 +51,7 @@ public YearRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Year.YearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Year.YearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YearFrac/YearFracPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YearFrac/YearFracPostRequestBody.cs index 38d3cc699a5..0dee57dff40 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YearFrac/YearFracPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YearFrac/YearFracPostRequestBody.cs @@ -84,7 +84,7 @@ public YearFracPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.YearFrac.YearFracPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.YearFrac.YearFracPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("endDate", EndDate); writer.WriteObjectValue("startDate", StartDate); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YearFrac/YearFracRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YearFrac/YearFracRequestBuilder.cs index acab4c4d509..d93d0bbc3d8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YearFrac/YearFracRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YearFrac/YearFracRequestBuilder.cs @@ -51,7 +51,7 @@ public YearFracRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.YearFrac.YearFracPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.YearFrac.YearFracPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Yield/YieldPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Yield/YieldPostRequestBody.cs index 7856dc2dcd6..e81ae00ba49 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Yield/YieldPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Yield/YieldPostRequestBody.cs @@ -148,7 +148,7 @@ public YieldPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Yield.YieldPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Yield.YieldPostRequestBody(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("frequency", Frequency); writer.WriteObjectValue("maturity", Maturity); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Yield/YieldRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Yield/YieldRequestBuilder.cs index 516b75bd5ba..825607e0d8e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Yield/YieldRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Yield/YieldRequestBuilder.cs @@ -51,7 +51,7 @@ public YieldRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Yield.YieldPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Yield.YieldPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldDisc/YieldDiscPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldDisc/YieldDiscPostRequestBody.cs index 7f4f2440c6a..4d430a1b551 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldDisc/YieldDiscPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldDisc/YieldDiscPostRequestBody.cs @@ -116,7 +116,7 @@ public YieldDiscPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.YieldDisc.YieldDiscPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.YieldDisc.YieldDiscPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("maturity", Maturity); writer.WriteObjectValue("pr", Pr); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldDisc/YieldDiscRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldDisc/YieldDiscRequestBuilder.cs index 4571d68a6ee..72cd2d7fe2e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldDisc/YieldDiscRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldDisc/YieldDiscRequestBuilder.cs @@ -51,7 +51,7 @@ public YieldDiscRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.YieldDisc.YieldDiscPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.YieldDisc.YieldDiscPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldMat/YieldMatPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldMat/YieldMatPostRequestBody.cs index 4e117f9a092..f5cf787e841 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldMat/YieldMatPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldMat/YieldMatPostRequestBody.cs @@ -132,7 +132,7 @@ public YieldMatPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.YieldMat.YieldMatPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.YieldMat.YieldMatPostRequestBody(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("basis", Basis); writer.WriteObjectValue("issue", Issue); writer.WriteObjectValue("maturity", Maturity); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldMat/YieldMatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldMat/YieldMatRequestBuilder.cs index 23f32aa049c..cd20fcbf138 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldMat/YieldMatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/YieldMat/YieldMatRequestBuilder.cs @@ -51,7 +51,7 @@ public YieldMatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.YieldMat.YieldMatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.YieldMat.YieldMatPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Z_Test/Z_TestPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Z_Test/Z_TestPostRequestBody.cs index ff7d39105a8..16e6ed6d456 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Z_Test/Z_TestPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Z_Test/Z_TestPostRequestBody.cs @@ -84,7 +84,7 @@ public Z_TestPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Z_Test.Z_TestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Z_Test.Z_TestPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("array", Array); writer.WriteObjectValue("sigma", Sigma); writer.WriteObjectValue("x", X); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Z_Test/Z_TestRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Z_Test/Z_TestRequestBuilder.cs index 9eb5dc80ce9..56ca0549aec 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Z_Test/Z_TestRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Functions/Z_Test/Z_TestRequestBuilder.cs @@ -51,7 +51,7 @@ public Z_TestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Z_Test.Z_TestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Functions.Z_Test.Z_TestPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Add/AddPostRequestBody.cs index ef99710e511..f082ce75845 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Add/AddPostRequestBody.cs @@ -84,7 +84,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Add.AddPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("comment", Comment); writer.WriteStringValue("name", Name); writer.WriteObjectValue("reference", Reference); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Add/AddRequestBuilder.cs index 335c6ad7028..c17d3c95192 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Add/AddRequestBuilder.cs @@ -52,7 +52,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/AddFormulaLocal/AddFormulaLocalPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/AddFormulaLocal/AddFormulaLocalPostRequestBody.cs index 395628fce25..a5405973a94 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/AddFormulaLocal/AddFormulaLocalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/AddFormulaLocal/AddFormulaLocalPostRequestBody.cs @@ -84,7 +84,7 @@ public AddFormulaLocalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.AddFormulaLocal.AddFormulaLocalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.AddFormulaLocal.AddFormulaLocalPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("comment", Comment); writer.WriteStringValue("formula", Formula); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/AddFormulaLocal/AddFormulaLocalRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/AddFormulaLocal/AddFormulaLocalRequestBuilder.cs index a3af0d809f1..197efe5a1f5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/AddFormulaLocal/AddFormulaLocalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/AddFormulaLocal/AddFormulaLocalRequestBuilder.cs @@ -52,7 +52,7 @@ public AddFormulaLocalRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.AddFormulaLocal.AddFormulaLocalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.AddFormulaLocal.AddFormulaLocalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Clear/ClearPostRequestBody.cs index f5d1f34e16e..5b97adad1f2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Clear/ClearRequestBuilder.cs index 970c7bc3ed6..2d3f2c130c4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Delete/DeletePostRequestBody.cs index 8075e20f515..bbcc18027f5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs index c16d97537d0..72d86d8bd98 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Format/FormatRequestBuilder.cs index 39d7196b510..029b0089f7d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Insert/InsertPostRequestBody.cs index fddb1ebd4ba..03301fb8257 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Insert/InsertRequestBuilder.cs index e690fe11643..dc8b5754e53 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Merge/MergePostRequestBody.cs index 0cf22d8f7c2..eed7522603f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Merge/MergeRequestBuilder.cs index 75d59f4e793..d28a4dd6dfd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/RangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/RangeRequestBuilder.cs index 238960efd80..20b23467085 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/RangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/RangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -213,8 +213,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base { } /// - /// Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. - /// Find more info here + /// Retrieve the properties and relationships of range object. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -254,8 +254,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,11 +297,11 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// - /// Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. + /// Retrieve the properties and relationships of range object. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Names.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Sort/SortRequestBuilder.cs index ded4139571d..c85e2d0c8db 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/RangeNamespace/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/WorkbookNamedItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/WorkbookNamedItemItemRequestBuilder.cs index a0e1163c190..15fd94a8f03 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/WorkbookNamedItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/Item/WorkbookNamedItemItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookNamedItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookNamedItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/NamesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/NamesRequestBuilder.cs index 297a96ce234..2f125d5f09a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/NamesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Names/NamesRequestBuilder.cs @@ -105,7 +105,7 @@ public NamesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookNamedItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookNamedItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/Item/WorkbookOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/Item/WorkbookOperationItemRequestBuilder.cs index 04eb8955795..afa573bf0c1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/Item/WorkbookOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/Item/WorkbookOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/OperationsRequestBuilder.cs index 2629fbded02..481a7fa528e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Add/AddPostRequestBody.cs index 3c7688d88f5..6a59a4b93d5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Add/AddPostRequestBody.cs @@ -58,7 +58,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Add.AddPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("address", Address); writer.WriteBoolValue("hasHeaders", HasHeaders); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Add/AddRequestBuilder.cs index 63a2476af28..db7bea8edb3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Add/AddRequestBuilder.cs @@ -35,8 +35,8 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r { } /// - /// Create a new table. The range source address determines the worksheet under which the table will be added. If the table can't be added (for example, because the address is invalid, or the table would overlap with another table), an error is thrown. - /// Find more info here + /// Use this API to create a new Table. + /// Find more info here /// /// A /// The request body @@ -52,7 +52,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -61,7 +61,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.WorkbookTable.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new table. The range source address determines the worksheet under which the table will be added. If the table can't be added (for example, because the address is invalid, or the table would overlap with another table), an error is thrown. + /// Use this API to create a new Table. /// /// A /// The request body @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Count/CountGetResponse.cs index 6a486450ea4..59828cc736f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Count/CountResponse.cs index 77f5e88b957..5d02ebf30d7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Add/AddPostRequestBody.cs index 3a86b742ecf..665da1c3cb8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Add/AddPostRequestBody.cs @@ -74,7 +74,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Add.AddPostRequestBody(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("index", Index); writer.WriteStringValue("name", Name); writer.WriteObjectValue("values", Values); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Add/AddRequestBuilder.cs index b19911016f2..7b6df247df0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Add/AddRequestBuilder.cs @@ -52,7 +52,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ColumnsRequestBuilder.cs index 8a61e88fefd..7411e4c928f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ColumnsRequestBuilder.cs @@ -90,7 +90,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -110,7 +110,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableColumn body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableColumn body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Count/CountGetResponse.cs index 1bae4c46a8b..da17847c6e5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Count/CountResponse.cs index 8ac0d5ff166..3cbc7aa8aa2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearPostRequestBody.cs index 0f95350a2ad..b3e3c66fac4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearRequestBuilder.cs index ce3ea16d972..42fad9388de 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs index cc310edab4d..4d533be7505 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Delete/DeletePostRequestBody.cs index 6c446104d5d..fc56bfab33b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs index 4ec17377c16..671153b30f1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Format/FormatRequestBuilder.cs index d40db2ee3e7..6f91e2fd982 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertPostRequestBody.cs index aec63c0cbe1..751bc759c5d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertRequestBuilder.cs index 7fdddd73ddd..8072e23359f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Merge/MergePostRequestBody.cs index f0257ce7b94..8b9e62afa3d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Merge/MergeRequestBuilder.cs index abac41554e4..adb6d03a7e5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.DataBodyRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Sort/SortRequestBuilder.cs index f53518e45b9..7bcc170e33b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/DataBodyRange/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/Apply/ApplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/Apply/ApplyPostRequestBody.cs index 5f546109287..fe0616d9e02 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/Apply/ApplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/Apply/ApplyPostRequestBody.cs @@ -53,7 +53,7 @@ public ApplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.Apply.ApplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.Apply.ApplyPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/Apply/ApplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/Apply/ApplyRequestBuilder.cs index f03552601f6..a811694a2a1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/Apply/ApplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/Apply/ApplyRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.Apply.ApplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.Apply.ApplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterPostRequestBody.cs index fe6f236e4fb..c15a1f29e3c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterPostRequestBody.cs @@ -42,7 +42,7 @@ public ApplyBottomItemsFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyBottomItemsFilter.ApplyBottomItemsFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyBottomItemsFilter.ApplyBottomItemsFilterPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("count", Count); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterRequestBuilder.cs index e93177bdbc3..8ca0ebfda29 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyBottomItemsFilter.ApplyBottomItemsFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyBottomItemsFilter.ApplyBottomItemsFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterPostRequestBody.cs index 4f3731f0e02..9d3d674698a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterPostRequestBody.cs @@ -42,7 +42,7 @@ public ApplyBottomPercentFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyBottomPercentFilter.ApplyBottomPercentFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyBottomPercentFilter.ApplyBottomPercentFilterPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("percent", Percent); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterRequestBuilder.cs index fbaedb416c0..9d421a963ea 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyBottomPercentFilter.ApplyBottomPercentFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyBottomPercentFilter.ApplyBottomPercentFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterPostRequestBody.cs index 7a19d646aa8..e00f149faf4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterPostRequestBody.cs @@ -52,7 +52,7 @@ public ApplyCellColorFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyCellColorFilter.ApplyCellColorFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyCellColorFilter.ApplyCellColorFilterPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("color", Color); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterRequestBuilder.cs index 121db757ef9..afcba7cd7a7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyCellColorFilter.ApplyCellColorFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyCellColorFilter.ApplyCellColorFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterPostRequestBody.cs index cc4a3f8f279..4d5365752b1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterPostRequestBody.cs @@ -84,7 +84,7 @@ public ApplyCustomFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyCustomFilter.ApplyCustomFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyCustomFilter.ApplyCustomFilterPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("criteria1", Criteria1); writer.WriteStringValue("criteria2", Criteria2); writer.WriteStringValue("oper", Oper); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterRequestBuilder.cs index 9657068906c..225ba97613c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyCustomFilter.ApplyCustomFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyCustomFilter.ApplyCustomFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterPostRequestBody.cs index 5e2ef20fb7e..af94850b43f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterPostRequestBody.cs @@ -52,7 +52,7 @@ public ApplyDynamicFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyDynamicFilter.ApplyDynamicFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyDynamicFilter.ApplyDynamicFilterPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("criteria", Criteria); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterRequestBuilder.cs index 4ae44dff5ee..f944e9ddef2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyDynamicFilter.ApplyDynamicFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyDynamicFilter.ApplyDynamicFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterPostRequestBody.cs index 5a5a2b534d1..d1f1f483ced 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterPostRequestBody.cs @@ -52,7 +52,7 @@ public ApplyFontColorFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyFontColorFilter.ApplyFontColorFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyFontColorFilter.ApplyFontColorFilterPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("color", Color); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterRequestBuilder.cs index f34b3a3ab54..daf2a2d4ecc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyFontColorFilter.ApplyFontColorFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyFontColorFilter.ApplyFontColorFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterPostRequestBody.cs index 7ae08c6492c..927ae5b4281 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterPostRequestBody.cs @@ -53,7 +53,7 @@ public ApplyIconFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyIconFilter.ApplyIconFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyIconFilter.ApplyIconFilterPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("icon", Icon); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterRequestBuilder.cs index 1cf86886820..d85a908e12f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyIconFilter.ApplyIconFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyIconFilter.ApplyIconFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterPostRequestBody.cs index 9aed4bef314..a5b7a95393a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterPostRequestBody.cs @@ -42,7 +42,7 @@ public ApplyTopItemsFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyTopItemsFilter.ApplyTopItemsFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyTopItemsFilter.ApplyTopItemsFilterPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("count", Count); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterRequestBuilder.cs index b61fab9d7ae..3b48380d45b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyTopItemsFilter.ApplyTopItemsFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyTopItemsFilter.ApplyTopItemsFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterPostRequestBody.cs index f56534cbefb..8b0fbdb9414 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterPostRequestBody.cs @@ -42,7 +42,7 @@ public ApplyTopPercentFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyTopPercentFilter.ApplyTopPercentFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyTopPercentFilter.ApplyTopPercentFilterPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("percent", Percent); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterRequestBuilder.cs index 06fda5d1809..94ba5456ccf 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyTopPercentFilter.ApplyTopPercentFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyTopPercentFilter.ApplyTopPercentFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterPostRequestBody.cs index ab8f465cc30..cfb37332d27 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterPostRequestBody.cs @@ -52,7 +52,7 @@ public ApplyValuesFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyValuesFilter.ApplyValuesFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyValuesFilter.ApplyValuesFilterPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterRequestBuilder.cs index c56578ee130..d9db49c412b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyValuesFilter.ApplyValuesFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.Filter.ApplyValuesFilter.ApplyValuesFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/FilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/FilterRequestBuilder.cs index 37b7352e1c4..9ae4a3a7823 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/FilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/Filter/FilterRequestBuilder.cs @@ -168,7 +168,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookFilter body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -229,7 +229,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookFilter body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs index 6cfc70d04cf..2dd0ec73d46 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs index 2282544eaea..9b4db48008f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs index 9659ed2559f..a7b07d14b04 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs index 545c551733a..ba2962bde7d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Format/FormatRequestBuilder.cs index 8dadbe6cc20..f316b67234a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs index 37bd563246b..c50e4a1bdce 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs index 266b98677c7..5a223c725af 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs index da92e43a584..f0836254d3e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergePostRequestBody.cs index 615c2eff74e..08b41e0cda2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs index c7c22aad74d..61d61c1c629 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.HeaderRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Sort/SortRequestBuilder.cs index 7b551842ef5..a2030645455 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/HeaderRowRange/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearPostRequestBody.cs index 6af06c3123c..c20bfe0a4d0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearRequestBuilder.cs index 966b5046276..289f736f68e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Delete/DeletePostRequestBody.cs index f341dcc31a1..39fd37b5de5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs index 4f7fd221ef3..749a9fca3c3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Format/FormatRequestBuilder.cs index 06517df46e1..79676154456 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertPostRequestBody.cs index ea4a8867ad8..7461bec5976 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertRequestBuilder.cs index 141d6d7702f..081a0da5f78 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Merge/MergePostRequestBody.cs index f2a8ecfd852..d6af361f084 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Merge/MergeRequestBuilder.cs index 7cb67a1565d..c2c0cc4ef51 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/RangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/RangeRequestBuilder.cs index b5bfae1169e..624b1cf9b3f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/RangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/RangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Sort/SortRequestBuilder.cs index c39e449d90a..502d0197f04 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/RangeNamespace/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearPostRequestBody.cs index de7030223a3..030dbf366a3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearRequestBuilder.cs index 546e00113e5..c36a3e3435d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Delete/DeletePostRequestBody.cs index 869392bbf1d..67fc95bea27 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs index 50b0ca01d9c..a4da4417ca8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Format/FormatRequestBuilder.cs index d9f565782c1..9fd029a2257 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertPostRequestBody.cs index 4b56b66012e..06400d4be01 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertRequestBuilder.cs index 69ef9b1952b..122cd3e1e69 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Merge/MergePostRequestBody.cs index ef32823cbd7..13abf971962 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Merge/MergeRequestBuilder.cs index 9564a45c52b..a3f4a9e4c87 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Sort/SortRequestBuilder.cs index 86995b36f88..9fa27bdb976 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs index 660d7094661..896c4510525 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Columns.Item.TotalRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/WorkbookTableColumnItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/WorkbookTableColumnItemRequestBuilder.cs index a3443f34567..93f98da90e4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/WorkbookTableColumnItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/Item/WorkbookTableColumnItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableColumn body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableColumn body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ItemAtWithIndex/Filter/FilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ItemAtWithIndex/Filter/FilterRequestBuilder.cs index 5f76851b20e..eaa42bbd98a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ItemAtWithIndex/Filter/FilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ItemAtWithIndex/Filter/FilterRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookFilter body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookFilter body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Clear/ClearPostRequestBody.cs index 382bd881f93..680fe3256d2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Clear/ClearRequestBuilder.cs index deb71da616c..ae9effb7ded 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs index 1db08b5f8e4..d2554456ee0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Delete/DeletePostRequestBody.cs index 4868054fe8f..69ea5f29bf3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs index b79d1bfb457..606da537bf2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Format/FormatRequestBuilder.cs index 1b915b42da9..fc5406f542b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Insert/InsertPostRequestBody.cs index 79334c1ea4f..1e003ca2a78 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Insert/InsertRequestBuilder.cs index 1e51ba7286d..f2d9435c72c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Merge/MergePostRequestBody.cs index c2202949e20..5f8bc1f5470 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Merge/MergeRequestBuilder.cs index 14c8cfdc740..89ad93819e6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.DataBodyRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Sort/SortRequestBuilder.cs index d91267011a7..1e08a489517 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/DataBodyRange/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs index 2255e83294c..bcd38872333 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs index 7a6b85b8e54..6383479d88d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs index f5cdba485a7..582869e896b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs index 98f1a37cbaf..56bf379bcff 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Format/FormatRequestBuilder.cs index 04f35c3c492..fd1c5beeed0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs index ead4847899d..99ed3831f38 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs index 2aaf464268b..731d127706d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs index 0eb6e1902c2..1166baffcfa 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Merge/MergePostRequestBody.cs index 6bbcdef38a1..beee35508bb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs index 858e04abe27..18d19e84a83 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.HeaderRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Sort/SortRequestBuilder.cs index e62f5ef64e2..29dc76b844a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/HeaderRowRange/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Clear/ClearPostRequestBody.cs index 3cc2e1c0f43..143079a06dd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Clear/ClearRequestBuilder.cs index 422a90474b7..1bbf9214da6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Delete/DeletePostRequestBody.cs index b8c5c6b0a9a..1abfc3d3d3f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs index 5d338251767..9944adb3bc8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Format/FormatRequestBuilder.cs index 7d31cb303a6..40d063dbab0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Insert/InsertPostRequestBody.cs index c19549ff3a8..157b2444f59 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Insert/InsertRequestBuilder.cs index 2a639601ff6..82a5c6cadd0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Merge/MergePostRequestBody.cs index 9f4a61760c7..3cd5cf10701 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Merge/MergeRequestBuilder.cs index e1d82fd8887..99cbb80dc92 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/RangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/RangeRequestBuilder.cs index 785490fcfca..99e8637327b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/RangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/RangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Sort/SortRequestBuilder.cs index 24420bec635..a2cf802d2c7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/RangeNamespace/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Add/AddPostRequestBody.cs index f73b116a46b..751059b44ef 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Add/AddPostRequestBody.cs @@ -58,7 +58,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Add.AddPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("index", Index); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Add/AddRequestBuilder.cs index 2193c5bd756..fb2f68363e1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Add/AddRequestBuilder.cs @@ -52,7 +52,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Count/CountGetResponse.cs index 9e03796cfdd..7eedf358a29 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Count/CountResponse.cs index be9a03f0ab0..80bcbaeeaaa 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearPostRequestBody.cs index 0f02babd9cc..08716cf5f32 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearRequestBuilder.cs index d5125f234c1..d365e6e8da3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Delete/DeletePostRequestBody.cs index 14a5cdfcba7..e04e03c1572 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs index 2fed0728b3d..06e180a2c44 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Format/FormatRequestBuilder.cs index 917d6556565..b5c664a16b7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertPostRequestBody.cs index a1ad5987350..341903c4598 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertRequestBuilder.cs index 520e41b7ab5..78889102d45 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Merge/MergePostRequestBody.cs index 56e5c5d8f72..12b0f09cf42 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Merge/MergeRequestBuilder.cs index cfa72c4c697..a897fa78eec 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/RangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/RangeRequestBuilder.cs index 6b849a81bb8..7498edaba13 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/RangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/RangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Sort/SortRequestBuilder.cs index 37b2e11e3e9..de8b6e2e9b9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/RangeNamespace/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/WorkbookTableRowItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/WorkbookTableRowItemRequestBuilder.cs index 533514dfb3e..dd4fc205eb6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/WorkbookTableRowItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/Item/WorkbookTableRowItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableRow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableRow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/RowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/RowsRequestBuilder.cs index 58894dde6f3..1bf3a019849 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/RowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Rows/RowsRequestBuilder.cs @@ -90,7 +90,7 @@ public RowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Rows.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -110,7 +110,7 @@ public RowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableRow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableRow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Sort/Apply/ApplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Sort/Apply/ApplyPostRequestBody.cs index f95efc9df2d..cee1e341d64 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Sort/Apply/ApplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Sort/Apply/ApplyPostRequestBody.cs @@ -75,7 +75,7 @@ public ApplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Sort.Apply.ApplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Sort.Apply.ApplyPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("fields", Fields); writer.WriteBoolValue("matchCase", MatchCase); writer.WriteStringValue("method", Method); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Sort/Apply/ApplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Sort/Apply/ApplyRequestBuilder.cs index 59703c14304..213154a3730 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Sort/Apply/ApplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Sort/Apply/ApplyRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Sort.Apply.ApplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.Sort.Apply.ApplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Sort/SortRequestBuilder.cs index 8b29fd6e4e5..b0b8324c3fb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Sort/SortRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Clear/ClearPostRequestBody.cs index 43bff149800..13bc339d709 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Clear/ClearRequestBuilder.cs index 9d923159514..83add037dd4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Delete/DeletePostRequestBody.cs index 97dd25b31c4..7903e6de9d4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs index 048ebc80852..fb7220fe066 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Format/FormatRequestBuilder.cs index 5caa7c0511d..7c77802edc8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Insert/InsertPostRequestBody.cs index e42e00427f5..d7084b97405 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Insert/InsertRequestBuilder.cs index e6724fa0fa6..eb26b0a4da0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Merge/MergePostRequestBody.cs index d081aeb6738..1decde1191f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Merge/MergeRequestBuilder.cs index 22cd02c9c23..1c9d37afe7a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Sort/SortRequestBuilder.cs index 890846ebbb4..a1392e90c54 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs index fc4ab794137..8ee15fc454b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.Item.TotalRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/WorkbookTableItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/WorkbookTableItemRequestBuilder.cs index 8c249469029..028176a0ae3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/WorkbookTableItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/WorkbookTableItemRequestBuilder.cs @@ -162,7 +162,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookTable body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -223,7 +223,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTable body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/ItemAtWithIndex/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/ItemAtWithIndex/Columns/ColumnsRequestBuilder.cs index 8dc19824637..008878181a0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/ItemAtWithIndex/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/ItemAtWithIndex/Columns/ColumnsRequestBuilder.cs @@ -74,7 +74,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableColumn body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableColumn body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/ItemAtWithIndex/Rows/RowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/ItemAtWithIndex/Rows/RowsRequestBuilder.cs index c857ca6f161..4286ef883b1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/ItemAtWithIndex/Rows/RowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/ItemAtWithIndex/Rows/RowsRequestBuilder.cs @@ -74,7 +74,7 @@ public RowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableRow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableRow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/ItemAtWithIndex/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/ItemAtWithIndex/Sort/SortRequestBuilder.cs index f4951876f48..ff2ee29cce5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/ItemAtWithIndex/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/ItemAtWithIndex/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs index 490beab2e6a..f0ce71acaf3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs @@ -90,7 +90,7 @@ public TablesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Tables.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -110,7 +110,7 @@ public TablesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookTable body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTable body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/WorkbookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/WorkbookRequestBuilder.cs index fea7ed6eef6..8b101ba1940 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/WorkbookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/WorkbookRequestBuilder.cs @@ -158,7 +158,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Workbook body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -239,7 +239,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Workbook body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Add/AddPostRequestBody.cs index 7d90924e626..cda9d2a6b25 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Add/AddPostRequestBody.cs @@ -52,7 +52,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Add.AddPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Add/AddRequestBuilder.cs index d2cdb8c8322..824cd83ad1b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Add/AddRequestBuilder.cs @@ -52,7 +52,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/CellWithRowWithColumnRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/CellWithRowWithColumnRequestBuilder.cs index 8efcbcc33f9..4b7501a1757 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/CellWithRowWithColumnRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/CellWithRowWithColumnRequestBuilder.cs @@ -160,7 +160,7 @@ public partial class CellWithRowWithColumnRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -170,7 +170,7 @@ public partial class CellWithRowWithColumnRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -180,7 +180,7 @@ public partial class CellWithRowWithColumnRequestBuilder : BaseRequestBuilder /// Usage: column={column1} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.ColumnWithColumn1.ColumnWithColumn1RequestBuilder ColumnWithColumn1(int? column1) { - _ = column1 ?? throw new ArgumentNullException(nameof(column1)); + if(ReferenceEquals(column1, null)) throw new ArgumentNullException(nameof(column1)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.ColumnWithColumn1.ColumnWithColumn1RequestBuilder(PathParameters, RequestAdapter, column1); } /// @@ -245,8 +245,8 @@ public CellWithRowWithColumnRequestBuilder(string rawUrl, IRequestAdapter reques /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -257,8 +257,8 @@ public CellWithRowWithColumnRequestBuilder(string rawUrl, IRequestAdapter reques /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -268,7 +268,7 @@ public CellWithRowWithColumnRequestBuilder(string rawUrl, IRequestAdapter reques /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -278,7 +278,7 @@ public CellWithRowWithColumnRequestBuilder(string rawUrl, IRequestAdapter reques /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -288,7 +288,7 @@ public CellWithRowWithColumnRequestBuilder(string rawUrl, IRequestAdapter reques /// Usage: row={row1} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.RowWithRow1.RowWithRow1RequestBuilder RowWithRow1(int? row1) { - _ = row1 ?? throw new ArgumentNullException(nameof(row1)); + if(ReferenceEquals(row1, null)) throw new ArgumentNullException(nameof(row1)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.RowWithRow1.RowWithRow1RequestBuilder(PathParameters, RequestAdapter, row1); } /// @@ -317,7 +317,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Clear/ClearPostRequestBody.cs index 331f1f25561..9d7bb24559a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Clear/ClearRequestBuilder.cs index e16602942a0..a00068ee118 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Delete/DeletePostRequestBody.cs index a5f954686be..36c72d268eb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Delete/DeleteRequestBuilder.cs index 9f592c15e35..6e0ef611865 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Format/FormatRequestBuilder.cs index a50ae5f85c4..9f3750da952 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Insert/InsertPostRequestBody.cs index 89b601ec6cf..e6a6948f105 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Insert/InsertRequestBuilder.cs index 2bdb00f99b6..5e6e812c6ad 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Merge/MergePostRequestBody.cs index 8e0e052dd92..2af20a329d1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Merge/MergeRequestBuilder.cs index 85638e3cc8f..cadf0af03c1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Sort/SortRequestBuilder.cs index 607893a04c1..3701e458110 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/CellWithRowWithColumn/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Add/AddPostRequestBody.cs index 1b387cae141..63d252a1d54 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Add/AddPostRequestBody.cs @@ -84,7 +84,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Add.AddPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("seriesBy", SeriesBy); writer.WriteObjectValue("sourceData", SourceData); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Add/AddRequestBuilder.cs index ad4fbd04a35..6d66aa10dd7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Add/AddRequestBuilder.cs @@ -52,7 +52,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs index 89d17e2b86d..70ff1fa80c5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs @@ -91,7 +91,7 @@ public ChartsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -121,7 +121,7 @@ public ChartsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookChart body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChart body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Count/CountGetResponse.cs index e5de1ccb7b3..a749fddcba3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Count/CountResponse.cs index 363c4e0a6a3..cd5b9e2ea07 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/AxesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/AxesRequestBuilder.cs index 7f5c905a8b1..21a6cb45718 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/AxesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/AxesRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxes body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxes body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/CategoryAxisRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/CategoryAxisRequestBuilder.cs index e3d549a5570..5e9291a41d9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/CategoryAxisRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/CategoryAxisRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxis body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxis body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Format/Font/FontRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Format/Font/FontRequestBuilder.cs index 77b7d6491bd..d70ef34ef02 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Format/Font/FontRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Format/Font/FontRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Format/FormatRequestBuilder.cs index a5231e2e0b3..2d1159b24bd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Format/FormatRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Format/Line/LineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Format/Line/LineRequestBuilder.cs index 33478852ce1..04095ef8919 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Format/Line/LineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Format/Line/LineRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MajorGridlines/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MajorGridlines/Format/FormatRequestBuilder.cs index bb22c3a6ef1..e6fb7455f92 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MajorGridlines/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MajorGridlines/Format/FormatRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlinesFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlinesFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MajorGridlines/Format/Line/LineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MajorGridlines/Format/Line/LineRequestBuilder.cs index bb6fd91d528..cf331dc2a7d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MajorGridlines/Format/Line/LineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MajorGridlines/Format/Line/LineRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MajorGridlines/MajorGridlinesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MajorGridlines/MajorGridlinesRequestBuilder.cs index 5386501ead6..d27bff2918e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MajorGridlines/MajorGridlinesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MajorGridlines/MajorGridlinesRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlines body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlines body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MinorGridlines/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MinorGridlines/Format/FormatRequestBuilder.cs index a524aab0ac5..472b3dc29e6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MinorGridlines/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MinorGridlines/Format/FormatRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlinesFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlinesFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MinorGridlines/Format/Line/LineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MinorGridlines/Format/Line/LineRequestBuilder.cs index 8e08b65c0cf..5a1a1aafc79 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MinorGridlines/Format/Line/LineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MinorGridlines/Format/Line/LineRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MinorGridlines/MinorGridlinesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MinorGridlines/MinorGridlinesRequestBuilder.cs index 9368044a512..47be90d32ec 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MinorGridlines/MinorGridlinesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/MinorGridlines/MinorGridlinesRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlines body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlines body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Title/Format/Font/FontRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Title/Format/Font/FontRequestBuilder.cs index 30e22ded6db..dade7e9b2f9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Title/Format/Font/FontRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Title/Format/Font/FontRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Title/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Title/Format/FormatRequestBuilder.cs index 669eebafadb..10d9b51ba98 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Title/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Title/Format/FormatRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitleFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitleFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Title/TitleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Title/TitleRequestBuilder.cs index 23899ac1b0c..7d160fe5f54 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Title/TitleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/CategoryAxis/Title/TitleRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitle body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitle body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Format/Font/FontRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Format/Font/FontRequestBuilder.cs index 64ff4b53419..8b1c143f653 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Format/Font/FontRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Format/Font/FontRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Format/FormatRequestBuilder.cs index 4be26bd61c7..0901aef0aab 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Format/FormatRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Format/Line/LineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Format/Line/LineRequestBuilder.cs index abcc6d95401..5261aa48409 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Format/Line/LineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Format/Line/LineRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MajorGridlines/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MajorGridlines/Format/FormatRequestBuilder.cs index 14d7fbb85d7..c8acece4e10 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MajorGridlines/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MajorGridlines/Format/FormatRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlinesFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlinesFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MajorGridlines/Format/Line/LineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MajorGridlines/Format/Line/LineRequestBuilder.cs index ba5849ed6a9..f6e86e86f2d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MajorGridlines/Format/Line/LineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MajorGridlines/Format/Line/LineRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MajorGridlines/MajorGridlinesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MajorGridlines/MajorGridlinesRequestBuilder.cs index 3318dd1cd9a..5f321770a55 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MajorGridlines/MajorGridlinesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MajorGridlines/MajorGridlinesRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlines body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlines body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MinorGridlines/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MinorGridlines/Format/FormatRequestBuilder.cs index f71db96fa6e..3a05b86d622 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MinorGridlines/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MinorGridlines/Format/FormatRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlinesFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlinesFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MinorGridlines/Format/Line/LineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MinorGridlines/Format/Line/LineRequestBuilder.cs index 4de221ed4d5..18916692f1c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MinorGridlines/Format/Line/LineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MinorGridlines/Format/Line/LineRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MinorGridlines/MinorGridlinesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MinorGridlines/MinorGridlinesRequestBuilder.cs index f4e99e4e025..2037b2a73c5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MinorGridlines/MinorGridlinesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/MinorGridlines/MinorGridlinesRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlines body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlines body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/SeriesAxisRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/SeriesAxisRequestBuilder.cs index 2a6cac5fe16..2b144a84f47 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/SeriesAxisRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/SeriesAxisRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxis body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxis body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Title/Format/Font/FontRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Title/Format/Font/FontRequestBuilder.cs index 925619b1d44..e20481e5431 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Title/Format/Font/FontRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Title/Format/Font/FontRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Title/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Title/Format/FormatRequestBuilder.cs index 5b26719885e..8090534285d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Title/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Title/Format/FormatRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitleFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitleFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Title/TitleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Title/TitleRequestBuilder.cs index 65109fe4e62..42e1e2a5aa7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Title/TitleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/SeriesAxis/Title/TitleRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitle body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitle body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Format/Font/FontRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Format/Font/FontRequestBuilder.cs index 8402e890f53..2a01b802102 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Format/Font/FontRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Format/Font/FontRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Format/FormatRequestBuilder.cs index ef401c64df2..7095a5d6857 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Format/FormatRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Format/Line/LineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Format/Line/LineRequestBuilder.cs index ae23f30fe96..a98d6dd4756 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Format/Line/LineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Format/Line/LineRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MajorGridlines/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MajorGridlines/Format/FormatRequestBuilder.cs index 27e3069c897..b0bc2f4b197 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MajorGridlines/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MajorGridlines/Format/FormatRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlinesFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlinesFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MajorGridlines/Format/Line/LineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MajorGridlines/Format/Line/LineRequestBuilder.cs index 26ea32c343a..a4b4f292981 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MajorGridlines/Format/Line/LineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MajorGridlines/Format/Line/LineRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MajorGridlines/MajorGridlinesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MajorGridlines/MajorGridlinesRequestBuilder.cs index 3ae3a52d6d8..a5783c09d75 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MajorGridlines/MajorGridlinesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MajorGridlines/MajorGridlinesRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlines body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlines body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MinorGridlines/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MinorGridlines/Format/FormatRequestBuilder.cs index aa7069429e9..1b4fbbbd6b4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MinorGridlines/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MinorGridlines/Format/FormatRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlinesFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlinesFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MinorGridlines/Format/Line/LineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MinorGridlines/Format/Line/LineRequestBuilder.cs index 5f171aabaef..7760dc8abf6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MinorGridlines/Format/Line/LineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MinorGridlines/Format/Line/LineRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MinorGridlines/MinorGridlinesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MinorGridlines/MinorGridlinesRequestBuilder.cs index 465d81585c3..56938803a59 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MinorGridlines/MinorGridlinesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/MinorGridlines/MinorGridlinesRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlines body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartGridlines body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Title/Format/Font/FontRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Title/Format/Font/FontRequestBuilder.cs index cc1b34a670d..77ba0b26037 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Title/Format/Font/FontRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Title/Format/Font/FontRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Title/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Title/Format/FormatRequestBuilder.cs index 80d6c009dc7..c8aaeb6ddff 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Title/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Title/Format/FormatRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitleFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitleFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Title/TitleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Title/TitleRequestBuilder.cs index 09cd73ab7fa..023e14a6474 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Title/TitleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/Title/TitleRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitle body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitle body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/ValueAxisRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/ValueAxisRequestBuilder.cs index 4ae799b7a29..65aaba6a1e6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/ValueAxisRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Axes/ValueAxis/ValueAxisRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxis body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxis body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/DataLabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/DataLabelsRequestBuilder.cs index fb177f2d37a..22f2126d6ae 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/DataLabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/DataLabelsRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartDataLabels body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartDataLabels body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Fill/FillRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Fill/FillRequestBuilder.cs index 3f06bfa3b1f..173d4eaa31e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Fill/FillRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Fill/FillRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFill body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFill body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs index d57d554f053..407652510a9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs @@ -52,7 +52,7 @@ public SetSolidColorPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.DataLabels.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.DataLabels.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("color", Color); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs index 3cc6f2bfc5a..2d1fbbdd217 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.DataLabels.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.DataLabels.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Font/FontRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Font/FontRequestBuilder.cs index b061bbaa45b..7cc2d0c74f3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Font/FontRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/Font/FontRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/FormatRequestBuilder.cs index 11e0222d91b..aca12e19e38 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/DataLabels/Format/FormatRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartDataLabelFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartDataLabelFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Fill/FillRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Fill/FillRequestBuilder.cs index 70585591c5d..9d8019e1ed1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Fill/FillRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Fill/FillRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFill body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFill body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs index 540224ae75f..1ab37565a63 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs @@ -52,7 +52,7 @@ public SetSolidColorPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("color", Color); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs index 378cbc82b12..221fb7ce5fb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Font/FontRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Font/FontRequestBuilder.cs index 238774d6b29..062b7ae9717 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Font/FontRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/Font/FontRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/FormatRequestBuilder.cs index 860aab58454..63ea6cea58c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Format/FormatRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAreaFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAreaFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Image/ImageGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Image/ImageGetResponse.cs index f0a94425cf6..2de478be25d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Image/ImageGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Image/ImageGetResponse.cs @@ -52,7 +52,7 @@ public ImageGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Image.ImageGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Image.ImageGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Image/ImageResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Image/ImageResponse.cs index 349f8a47d0d..aefa104e8ca 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Image/ImageResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Image/ImageResponse.cs @@ -20,7 +20,7 @@ public partial class ImageResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Image.ImageResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Image.ImageResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidth/ImageWithWidthGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidth/ImageWithWidthGetResponse.cs index 3d7e6e32bb4..c07aa6fab4a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidth/ImageWithWidthGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidth/ImageWithWidthGetResponse.cs @@ -52,7 +52,7 @@ public ImageWithWidthGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidth.ImageWithWidthGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidth.ImageWithWidthGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidth/ImageWithWidthResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidth/ImageWithWidthResponse.cs index ccb512bf5c2..c99d7ab6edd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidth/ImageWithWidthResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidth/ImageWithWidthResponse.cs @@ -20,7 +20,7 @@ public partial class ImageWithWidthResponse : global::Microsoft.Graph.Beta.Drive /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidth.ImageWithWidthResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidth.ImageWithWidthResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeight/ImageWithWidthWithHeightGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeight/ImageWithWidthWithHeightGetResponse.cs index 49badca08de..a2c628c6d48 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeight/ImageWithWidthWithHeightGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeight/ImageWithWidthWithHeightGetResponse.cs @@ -52,7 +52,7 @@ public ImageWithWidthWithHeightGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidthWithHeight.ImageWithWidthWithHeightGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidthWithHeight.ImageWithWidthWithHeightGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeight/ImageWithWidthWithHeightResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeight/ImageWithWidthWithHeightResponse.cs index 1a5756c9914..4a895e9bcc4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeight/ImageWithWidthWithHeightResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeight/ImageWithWidthWithHeightResponse.cs @@ -20,7 +20,7 @@ public partial class ImageWithWidthWithHeightResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidthWithHeight.ImageWithWidthWithHeightResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidthWithHeight.ImageWithWidthWithHeightResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeGetResponse.cs index 7d3da507763..6abd3173193 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeGetResponse.cs @@ -52,7 +52,7 @@ public ImageWithWidthWithHeightWithFittingModeGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeResponse.cs index b1aea1bf85c..83c18f7ca04 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeResponse.cs @@ -20,7 +20,7 @@ public partial class ImageWithWidthWithHeightWithFittingModeResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Fill/FillRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Fill/FillRequestBuilder.cs index dc8f0b09ebd..23fda230739 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Fill/FillRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Fill/FillRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFill body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFill body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs index 67a2328a855..e617b438934 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs @@ -52,7 +52,7 @@ public SetSolidColorPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Legend.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Legend.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("color", Color); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs index 9398cf065d4..1a139f0b4fb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Legend.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Legend.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Font/FontRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Font/FontRequestBuilder.cs index 4094a88109c..b9bd15bf7da 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Font/FontRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/Font/FontRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/FormatRequestBuilder.cs index f34638c75a6..2ed58fea057 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/Format/FormatRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartLegendFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartLegendFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/LegendRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/LegendRequestBuilder.cs index e4c6222169d..795950ac7b6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/LegendRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Legend/LegendRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartLegend body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartLegend body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Count/CountGetResponse.cs index 03b56deff2b..1b564c01907 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Count/CountResponse.cs index 8e7e4527ecc..9fe354fde5c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Fill/FillRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Fill/FillRequestBuilder.cs index f40690bc196..027f40515a8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Fill/FillRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Fill/FillRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFill body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFill body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs index ffadcc08e0f..620b3dc5b37 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs @@ -52,7 +52,7 @@ public SetSolidColorPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Item.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Item.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("color", Color); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs index 5567aa51f3c..d4debb27e02 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Item.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Item.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/FormatRequestBuilder.cs index e20c8adba9e..2fa74411fe6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/FormatRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartSeriesFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartSeriesFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Line/LineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Line/LineRequestBuilder.cs index ccde0abd4f6..044feae180e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Line/LineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Format/Line/LineRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Count/CountGetResponse.cs index 8127d514cc6..807ca7fb5e7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Item.Points.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Item.Points.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Count/CountResponse.cs index f46640865ab..bded6c8ef6d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Item.Points.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Item.Points.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/Fill/FillRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/Fill/FillRequestBuilder.cs index 724c8be8630..dc64e9399df 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/Fill/FillRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/Fill/FillRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFill body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFill body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs index 7954029b605..0132d9aceeb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs @@ -52,7 +52,7 @@ public SetSolidColorPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Item.Points.Item.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Item.Points.Item.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("color", Color); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs index 98b71605f59..81f7989706c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Item.Points.Item.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Item.Points.Item.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/FormatRequestBuilder.cs index fe4611ccfab..9f903fa7072 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/Format/FormatRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartPointFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartPointFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/WorkbookChartPointItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/WorkbookChartPointItemRequestBuilder.cs index 0435685f9c7..ab291a99a31 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/WorkbookChartPointItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/Item/WorkbookChartPointItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartPoint body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartPoint body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/ItemAtWithIndex/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/ItemAtWithIndex/Format/FormatRequestBuilder.cs index 1087608827c..e9b07e35fcb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/ItemAtWithIndex/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/ItemAtWithIndex/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartPointFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartPointFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/PointsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/PointsRequestBuilder.cs index 385a56569ed..16f3765c555 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/PointsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/Points/PointsRequestBuilder.cs @@ -84,7 +84,7 @@ public PointsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Item.Points.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.Item.Points.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -104,7 +104,7 @@ public PointsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartPoint body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartPoint body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/WorkbookChartSeriesItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/WorkbookChartSeriesItemRequestBuilder.cs index 4a9cc339da0..b2ceaecd847 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/WorkbookChartSeriesItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/Item/WorkbookChartSeriesItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartSeries body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartSeries body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/ItemAtWithIndex/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/ItemAtWithIndex/Format/FormatRequestBuilder.cs index 29848de9387..9a315cf775a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/ItemAtWithIndex/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/ItemAtWithIndex/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartSeriesFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartSeriesFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/ItemAtWithIndex/Points/PointsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/ItemAtWithIndex/Points/PointsRequestBuilder.cs index de35a2ab548..8264f08e030 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/ItemAtWithIndex/Points/PointsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/ItemAtWithIndex/Points/PointsRequestBuilder.cs @@ -74,7 +74,7 @@ public PointsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartPoint body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartPoint body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/SeriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/SeriesRequestBuilder.cs index 1848e4f09bd..90ef2ccd718 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/SeriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/SeriesRequestBuilder.cs @@ -84,7 +84,7 @@ public SeriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Series.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -104,7 +104,7 @@ public SeriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartSeries body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartSeries body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetData/SetDataPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetData/SetDataPostRequestBody.cs index 3a0cbcdce41..b113360fdde 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetData/SetDataPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetData/SetDataPostRequestBody.cs @@ -68,7 +68,7 @@ public SetDataPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.SetData.SetDataPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.SetData.SetDataPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("seriesBy", SeriesBy); writer.WriteObjectValue("sourceData", SourceData); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetData/SetDataRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetData/SetDataRequestBuilder.cs index 037410e10ff..8392c9a758c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetData/SetDataRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetData/SetDataRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.SetData.SetDataPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.SetData.SetDataPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetPosition/SetPositionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetPosition/SetPositionPostRequestBody.cs index d1164565648..0f2f50dfe3b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetPosition/SetPositionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetPosition/SetPositionPostRequestBody.cs @@ -68,7 +68,7 @@ public SetPositionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.SetPosition.SetPositionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.SetPosition.SetPositionPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("endCell", EndCell); writer.WriteObjectValue("startCell", StartCell); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetPosition/SetPositionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetPosition/SetPositionRequestBuilder.cs index 5c7c980f6d5..122d3895169 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetPosition/SetPositionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/SetPosition/SetPositionRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.SetPosition.SetPositionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.SetPosition.SetPositionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Fill/FillRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Fill/FillRequestBuilder.cs index 6fbaadd669e..dc6f32a6740 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Fill/FillRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Fill/FillRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFill body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFill body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs index 8d1e087c957..459c2379d2f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Fill/SetSolidColor/SetSolidColorPostRequestBody.cs @@ -52,7 +52,7 @@ public SetSolidColorPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Title.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Title.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("color", Color); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs index e3ed8a9c28a..bca504851e7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Fill/SetSolidColor/SetSolidColorRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Title.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.Title.Format.Fill.SetSolidColor.SetSolidColorPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Font/FontRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Font/FontRequestBuilder.cs index b040095cfdd..46d8c924c95 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Font/FontRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/Font/FontRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartFont body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/FormatRequestBuilder.cs index 85fbe88d916..8141798a1ee 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/Format/FormatRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartTitleFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartTitleFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/TitleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/TitleRequestBuilder.cs index 98e081d75c2..452449f4f18 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/TitleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Title/TitleRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartTitle body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartTitle body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/WorkbookChartItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/WorkbookChartItemRequestBuilder.cs index c58875e9607..2f82ca01d75 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/WorkbookChartItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/WorkbookChartItemRequestBuilder.cs @@ -149,7 +149,7 @@ public async Task DeleteAsync(ActionUsage: width={width} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidth.ImageWithWidthRequestBuilder ImageWithWidth(int? width) { - _ = width ?? throw new ArgumentNullException(nameof(width)); + if(ReferenceEquals(width, null)) throw new ArgumentNullException(nameof(width)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidth.ImageWithWidthRequestBuilder(PathParameters, RequestAdapter, width); } /// @@ -160,8 +160,8 @@ public async Task DeleteAsync(ActionUsage: width={width} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidthWithHeight.ImageWithWidthWithHeightRequestBuilder ImageWithWidthWithHeight(int? height, int? width) { - _ = height ?? throw new ArgumentNullException(nameof(height)); - _ = width ?? throw new ArgumentNullException(nameof(width)); + if(ReferenceEquals(height, null)) throw new ArgumentNullException(nameof(height)); + if(ReferenceEquals(width, null)) throw new ArgumentNullException(nameof(width)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.Item.ImageWithWidthWithHeight.ImageWithWidthWithHeightRequestBuilder(PathParameters, RequestAdapter, height, width); } /// @@ -174,8 +174,8 @@ public async Task DeleteAsync(Action @@ -195,7 +195,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChart body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -256,7 +256,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChart body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Axes/AxesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Axes/AxesRequestBuilder.cs index ccf8309ebc8..6e5ebc2c257 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Axes/AxesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Axes/AxesRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxes body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxes body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/DataLabels/DataLabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/DataLabels/DataLabelsRequestBuilder.cs index 43d8663de8f..b8958340661 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/DataLabels/DataLabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/DataLabels/DataLabelsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartDataLabels body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartDataLabels body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Format/FormatRequestBuilder.cs index e802e56bc0f..0ad11085d6f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAreaFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAreaFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Image/ImageGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Image/ImageGetResponse.cs index fe9931b9770..5a68288b6b8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Image/ImageGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Image/ImageGetResponse.cs @@ -52,7 +52,7 @@ public ImageGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.Image.ImageGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.Image.ImageGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Image/ImageResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Image/ImageResponse.cs index dac426cdb63..cf8931acce4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Image/ImageResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Image/ImageResponse.cs @@ -20,7 +20,7 @@ public partial class ImageResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.Image.ImageResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.Image.ImageResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidth/ImageWithWidthGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidth/ImageWithWidthGetResponse.cs index 179a11061f6..758004d133b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidth/ImageWithWidthGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidth/ImageWithWidthGetResponse.cs @@ -52,7 +52,7 @@ public ImageWithWidthGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidth.ImageWithWidthGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidth.ImageWithWidthGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidth/ImageWithWidthResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidth/ImageWithWidthResponse.cs index 2b175367c5a..e949c44131e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidth/ImageWithWidthResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidth/ImageWithWidthResponse.cs @@ -20,7 +20,7 @@ public partial class ImageWithWidthResponse : global::Microsoft.Graph.Beta.Drive /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidth.ImageWithWidthResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidth.ImageWithWidthResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeight/ImageWithWidthWithHeightGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeight/ImageWithWidthWithHeightGetResponse.cs index ccc94ae0fca..e57ea08cc32 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeight/ImageWithWidthWithHeightGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeight/ImageWithWidthWithHeightGetResponse.cs @@ -52,7 +52,7 @@ public ImageWithWidthWithHeightGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidthWithHeight.ImageWithWidthWithHeightGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidthWithHeight.ImageWithWidthWithHeightGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeight/ImageWithWidthWithHeightResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeight/ImageWithWidthWithHeightResponse.cs index e5f166435c9..f6e55337f88 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeight/ImageWithWidthWithHeightResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeight/ImageWithWidthWithHeightResponse.cs @@ -20,7 +20,7 @@ public partial class ImageWithWidthWithHeightResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidthWithHeight.ImageWithWidthWithHeightResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidthWithHeight.ImageWithWidthWithHeightResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeGetResponse.cs index 56733a07eda..1ff5a5ab124 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeGetResponse.cs @@ -52,7 +52,7 @@ public ImageWithWidthWithHeightWithFittingModeGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeResponse.cs index 313ad3e64d0..67e325cd099 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeResponse.cs @@ -20,7 +20,7 @@ public partial class ImageWithWidthWithHeightWithFittingModeResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ItemAtWithIndexRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ItemAtWithIndexRequestBuilder.cs index 22cbeb0dac1..285a31a2893 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ItemAtWithIndexRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/ItemAtWithIndexRequestBuilder.cs @@ -130,7 +130,7 @@ public ItemAtWithIndexRequestBuilder(string rawUrl, IRequestAdapter requestAdapt /// Usage: width={width} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidth.ImageWithWidthRequestBuilder ImageWithWidth(int? width) { - _ = width ?? throw new ArgumentNullException(nameof(width)); + if(ReferenceEquals(width, null)) throw new ArgumentNullException(nameof(width)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidth.ImageWithWidthRequestBuilder(PathParameters, RequestAdapter, width); } /// @@ -141,8 +141,8 @@ public ItemAtWithIndexRequestBuilder(string rawUrl, IRequestAdapter requestAdapt /// Usage: width={width} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidthWithHeight.ImageWithWidthWithHeightRequestBuilder ImageWithWidthWithHeight(int? height, int? width) { - _ = height ?? throw new ArgumentNullException(nameof(height)); - _ = width ?? throw new ArgumentNullException(nameof(width)); + if(ReferenceEquals(height, null)) throw new ArgumentNullException(nameof(height)); + if(ReferenceEquals(width, null)) throw new ArgumentNullException(nameof(width)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidthWithHeight.ImageWithWidthWithHeightRequestBuilder(PathParameters, RequestAdapter, height, width); } /// @@ -155,8 +155,8 @@ public ItemAtWithIndexRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeRequestBuilder ImageWithWidthWithHeightWithFittingMode(string fittingMode, int? height, int? width) { if(string.IsNullOrEmpty(fittingMode)) throw new ArgumentNullException(nameof(fittingMode)); - _ = height ?? throw new ArgumentNullException(nameof(height)); - _ = width ?? throw new ArgumentNullException(nameof(width)); + if(ReferenceEquals(height, null)) throw new ArgumentNullException(nameof(height)); + if(ReferenceEquals(width, null)) throw new ArgumentNullException(nameof(width)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeRequestBuilder(PathParameters, RequestAdapter, fittingMode, height, width); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Legend/LegendRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Legend/LegendRequestBuilder.cs index bb4a6579f1e..2a43cdf979f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Legend/LegendRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Legend/LegendRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartLegend body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartLegend body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Series/SeriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Series/SeriesRequestBuilder.cs index 006c75d1cb9..17abae2cdd0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Series/SeriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Series/SeriesRequestBuilder.cs @@ -74,7 +74,7 @@ public SeriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartSeries body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartSeries body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetData/SetDataPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetData/SetDataPostRequestBody.cs index 4579a5cb39d..201e5f51f19 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetData/SetDataPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetData/SetDataPostRequestBody.cs @@ -68,7 +68,7 @@ public SetDataPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.SetData.SetDataPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.SetData.SetDataPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("seriesBy", SeriesBy); writer.WriteObjectValue("sourceData", SourceData); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetData/SetDataRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetData/SetDataRequestBuilder.cs index d1eb07377b6..d010b269cf7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetData/SetDataRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetData/SetDataRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.SetData.SetDataPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.SetData.SetDataPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetPosition/SetPositionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetPosition/SetPositionPostRequestBody.cs index ca9c950c49b..507e30bea14 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetPosition/SetPositionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetPosition/SetPositionPostRequestBody.cs @@ -68,7 +68,7 @@ public SetPositionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.SetPosition.SetPositionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.SetPosition.SetPositionPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("endCell", EndCell); writer.WriteObjectValue("startCell", StartCell); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetPosition/SetPositionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetPosition/SetPositionRequestBuilder.cs index 454968a2e1a..7881d840925 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetPosition/SetPositionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/SetPosition/SetPositionRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.SetPosition.SetPositionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemAtWithIndex.SetPosition.SetPositionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Title/TitleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Title/TitleRequestBuilder.cs index a02f00badca..45782da5c02 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Title/TitleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemAtWithIndex/Title/TitleRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartTitle body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartTitle body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Axes/AxesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Axes/AxesRequestBuilder.cs index acac394b464..1b1fa314be3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Axes/AxesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Axes/AxesRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAxes body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAxes body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/DataLabels/DataLabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/DataLabels/DataLabelsRequestBuilder.cs index d8a5b91ccb6..8e901fed1c7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/DataLabels/DataLabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/DataLabels/DataLabelsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartDataLabels body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartDataLabels body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Format/FormatRequestBuilder.cs index c3107093e14..eedece9533b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartAreaFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartAreaFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Image/ImageGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Image/ImageGetResponse.cs index 834b6bb75a3..b2f59891a2a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Image/ImageGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Image/ImageGetResponse.cs @@ -52,7 +52,7 @@ public ImageGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.Image.ImageGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.Image.ImageGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Image/ImageResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Image/ImageResponse.cs index 9e744374f97..a32d425a074 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Image/ImageResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Image/ImageResponse.cs @@ -20,7 +20,7 @@ public partial class ImageResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.Image.ImageResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.Image.ImageResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidth/ImageWithWidthGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidth/ImageWithWidthGetResponse.cs index 9ed4d2082df..656b4dfd78a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidth/ImageWithWidthGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidth/ImageWithWidthGetResponse.cs @@ -52,7 +52,7 @@ public ImageWithWidthGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidth.ImageWithWidthGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidth.ImageWithWidthGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidth/ImageWithWidthResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidth/ImageWithWidthResponse.cs index e93863b7373..77bd4048c38 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidth/ImageWithWidthResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidth/ImageWithWidthResponse.cs @@ -20,7 +20,7 @@ public partial class ImageWithWidthResponse : global::Microsoft.Graph.Beta.Drive /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidth.ImageWithWidthResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidth.ImageWithWidthResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeight/ImageWithWidthWithHeightGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeight/ImageWithWidthWithHeightGetResponse.cs index 18e89b6a24f..2287d21bc43 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeight/ImageWithWidthWithHeightGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeight/ImageWithWidthWithHeightGetResponse.cs @@ -52,7 +52,7 @@ public ImageWithWidthWithHeightGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidthWithHeight.ImageWithWidthWithHeightGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidthWithHeight.ImageWithWidthWithHeightGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeight/ImageWithWidthWithHeightResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeight/ImageWithWidthWithHeightResponse.cs index a57b3975c43..8e22059bd33 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeight/ImageWithWidthWithHeightResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeight/ImageWithWidthWithHeightResponse.cs @@ -20,7 +20,7 @@ public partial class ImageWithWidthWithHeightResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidthWithHeight.ImageWithWidthWithHeightResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidthWithHeight.ImageWithWidthWithHeightResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeGetResponse.cs index 598030ddc5f..91435bf5ea9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeGetResponse.cs @@ -52,7 +52,7 @@ public ImageWithWidthWithHeightWithFittingModeGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeResponse.cs index 05029298b49..bb3da15761a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ImageWithWidthWithHeightWithFittingMode/ImageWithWidthWithHeightWithFittingModeResponse.cs @@ -20,7 +20,7 @@ public partial class ImageWithWidthWithHeightWithFittingModeResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ItemWithNameRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ItemWithNameRequestBuilder.cs index 54f1ccdb954..9d6cd4ecc57 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ItemWithNameRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/ItemWithNameRequestBuilder.cs @@ -129,7 +129,7 @@ public ItemWithNameRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Usage: width={width} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidth.ImageWithWidthRequestBuilder ImageWithWidth(int? width) { - _ = width ?? throw new ArgumentNullException(nameof(width)); + if(ReferenceEquals(width, null)) throw new ArgumentNullException(nameof(width)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidth.ImageWithWidthRequestBuilder(PathParameters, RequestAdapter, width); } /// @@ -140,8 +140,8 @@ public ItemWithNameRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Usage: width={width} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidthWithHeight.ImageWithWidthWithHeightRequestBuilder ImageWithWidthWithHeight(int? height, int? width) { - _ = height ?? throw new ArgumentNullException(nameof(height)); - _ = width ?? throw new ArgumentNullException(nameof(width)); + if(ReferenceEquals(height, null)) throw new ArgumentNullException(nameof(height)); + if(ReferenceEquals(width, null)) throw new ArgumentNullException(nameof(width)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidthWithHeight.ImageWithWidthWithHeightRequestBuilder(PathParameters, RequestAdapter, height, width); } /// @@ -154,8 +154,8 @@ public ItemWithNameRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeRequestBuilder ImageWithWidthWithHeightWithFittingMode(string fittingMode, int? height, int? width) { if(string.IsNullOrEmpty(fittingMode)) throw new ArgumentNullException(nameof(fittingMode)); - _ = height ?? throw new ArgumentNullException(nameof(height)); - _ = width ?? throw new ArgumentNullException(nameof(width)); + if(ReferenceEquals(height, null)) throw new ArgumentNullException(nameof(height)); + if(ReferenceEquals(width, null)) throw new ArgumentNullException(nameof(width)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.ImageWithWidthWithHeightWithFittingMode.ImageWithWidthWithHeightWithFittingModeRequestBuilder(PathParameters, RequestAdapter, fittingMode, height, width); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Legend/LegendRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Legend/LegendRequestBuilder.cs index 184739b11c1..d56b34bc844 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Legend/LegendRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Legend/LegendRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartLegend body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartLegend body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Series/SeriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Series/SeriesRequestBuilder.cs index 6296f1bc308..c29b483cc5a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Series/SeriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Series/SeriesRequestBuilder.cs @@ -74,7 +74,7 @@ public SeriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartSeries body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartSeries body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetData/SetDataPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetData/SetDataPostRequestBody.cs index 81c1a54e27b..5d709ddee40 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetData/SetDataPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetData/SetDataPostRequestBody.cs @@ -68,7 +68,7 @@ public SetDataPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.SetData.SetDataPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.SetData.SetDataPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("seriesBy", SeriesBy); writer.WriteObjectValue("sourceData", SourceData); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetData/SetDataRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetData/SetDataRequestBuilder.cs index 208fb44ad9c..90998b88a4b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetData/SetDataRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetData/SetDataRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.SetData.SetDataPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.SetData.SetDataPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetPosition/SetPositionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetPosition/SetPositionPostRequestBody.cs index 7aad802753b..9d38df78c4d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetPosition/SetPositionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetPosition/SetPositionPostRequestBody.cs @@ -68,7 +68,7 @@ public SetPositionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.SetPosition.SetPositionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.SetPosition.SetPositionPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("endCell", EndCell); writer.WriteObjectValue("startCell", StartCell); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetPosition/SetPositionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetPosition/SetPositionRequestBuilder.cs index 6a40db9c328..4c3751f4151 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetPosition/SetPositionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/SetPosition/SetPositionRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.SetPosition.SetPositionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Charts.ItemWithName.SetPosition.SetPositionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Title/TitleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Title/TitleRequestBuilder.cs index db5c9a74b49..3d81abecc53 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Title/TitleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ItemWithName/Title/TitleRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookChartTitle body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookChartTitle body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Add/AddPostRequestBody.cs index d709ee4133f..781ed7a415b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Add/AddPostRequestBody.cs @@ -84,7 +84,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Add.AddPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("comment", Comment); writer.WriteStringValue("name", Name); writer.WriteObjectValue("reference", Reference); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Add/AddRequestBuilder.cs index 358363959ab..5c7308b4bb4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Add/AddRequestBuilder.cs @@ -52,7 +52,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/AddFormulaLocal/AddFormulaLocalPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/AddFormulaLocal/AddFormulaLocalPostRequestBody.cs index 24e655164de..77e868a29b6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/AddFormulaLocal/AddFormulaLocalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/AddFormulaLocal/AddFormulaLocalPostRequestBody.cs @@ -84,7 +84,7 @@ public AddFormulaLocalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.AddFormulaLocal.AddFormulaLocalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.AddFormulaLocal.AddFormulaLocalPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("comment", Comment); writer.WriteStringValue("formula", Formula); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/AddFormulaLocal/AddFormulaLocalRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/AddFormulaLocal/AddFormulaLocalRequestBuilder.cs index 8ae7476d475..0325627e129 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/AddFormulaLocal/AddFormulaLocalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/AddFormulaLocal/AddFormulaLocalRequestBuilder.cs @@ -52,7 +52,7 @@ public AddFormulaLocalRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.AddFormulaLocal.AddFormulaLocalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.AddFormulaLocal.AddFormulaLocalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Clear/ClearPostRequestBody.cs index 39d9b493fd8..b4c56f51136 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Clear/ClearRequestBuilder.cs index d7d1fd4c50a..253885906de 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Delete/DeletePostRequestBody.cs index ef31d829e07..821b45b4544 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs index 6d010b49e53..caf8498176f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Format/FormatRequestBuilder.cs index f3049cb8f9f..fcfd4ab7b59 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Insert/InsertPostRequestBody.cs index 6d78554e9d3..92928018439 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Insert/InsertRequestBuilder.cs index d9ccd48a477..56f48a9e791 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Merge/MergePostRequestBody.cs index 44178364337..9e68899a849 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Merge/MergeRequestBuilder.cs index 86fa6f992c6..39123f7853b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/RangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/RangeRequestBuilder.cs index e0fb5032d39..25802159ad7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/RangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/RangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -213,8 +213,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base { } /// - /// Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. - /// Find more info here + /// Retrieve the properties and relationships of range object. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -254,8 +254,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,11 +297,11 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// - /// Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. + /// Retrieve the properties and relationships of range object. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Names.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Sort/SortRequestBuilder.cs index 603d3fcef9d..15d663d9597 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/RangeNamespace/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/WorkbookNamedItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/WorkbookNamedItemItemRequestBuilder.cs index dab7b13a9a5..92c9acb8c2d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/WorkbookNamedItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/Item/WorkbookNamedItemItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookNamedItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookNamedItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/NamesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/NamesRequestBuilder.cs index a1923cca553..cff0d7861b7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/NamesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Names/NamesRequestBuilder.cs @@ -105,7 +105,7 @@ public NamesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookNamedItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookNamedItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/PivotTables/Item/WorkbookPivotTableItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/PivotTables/Item/WorkbookPivotTableItemRequestBuilder.cs index c06ca3e8b95..acc3fbbc978 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/PivotTables/Item/WorkbookPivotTableItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/PivotTables/Item/WorkbookPivotTableItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookPivotTable body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookPivotTable body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/PivotTables/PivotTablesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/PivotTables/PivotTablesRequestBuilder.cs index 023ce132e9a..9ef47fc586e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/PivotTables/PivotTablesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/PivotTables/PivotTablesRequestBuilder.cs @@ -99,7 +99,7 @@ public PivotTablesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookPivotTable body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookPivotTable body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Protection/Protect/ProtectPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Protection/Protect/ProtectPostRequestBody.cs index 5289ad93482..d0f9db76c27 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Protection/Protect/ProtectPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Protection/Protect/ProtectPostRequestBody.cs @@ -53,7 +53,7 @@ public ProtectPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Protection.Protect.ProtectPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Protection.Protect.ProtectPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("options", Options); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Protection/Protect/ProtectRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Protection/Protect/ProtectRequestBuilder.cs index eb59c48f7bb..1897ed93780 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Protection/Protect/ProtectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Protection/Protect/ProtectRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Protection.Protect.ProtectPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Protection.Protect.ProtectPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Protection/ProtectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Protection/ProtectionRequestBuilder.cs index ed6f5e5a59a..0480dd56f13 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Protection/ProtectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Protection/ProtectionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookWorksheetProtection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookWorksheetProtection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Clear/ClearPostRequestBody.cs index 605fb0088ca..34dcc0a8852 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Clear/ClearRequestBuilder.cs index 4c090156a6a..e936b2a9f89 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Delete/DeletePostRequestBody.cs index 7837d6549cd..3cba38ca639 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs index a8fbac6828a..e22abf569ac 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Format/FormatRequestBuilder.cs index 8548a4ed639..e180f70f420 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Insert/InsertPostRequestBody.cs index 13ff24d4cff..bc591230bc7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Insert/InsertRequestBuilder.cs index cab46bd4591..2bbe1115fb0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Merge/MergePostRequestBody.cs index 2021fd5195e..100a025122a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Merge/MergeRequestBuilder.cs index 211bace5080..9501b14ddd2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/RangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/RangeRequestBuilder.cs index 410b59b1dbc..ea74d68189a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/RangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/RangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -253,8 +253,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -265,8 +265,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -276,7 +276,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -286,7 +286,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -296,7 +296,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -325,7 +325,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Sort/SortRequestBuilder.cs index a767fd1f345..ffdda25333e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeNamespace/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Clear/ClearPostRequestBody.cs index dd144510615..1728cd62bb5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Clear/ClearRequestBuilder.cs index 9437bae65b2..603281faec4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Delete/DeletePostRequestBody.cs index d204f2596b4..51a523ca8b1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Delete/DeleteRequestBuilder.cs index c7e61db736d..d5b92390a3b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Format/FormatRequestBuilder.cs index ac2baef0bea..223bd433265 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Insert/InsertPostRequestBody.cs index 1ab90a486ad..648bfefaa56 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Insert/InsertRequestBuilder.cs index 5b705033f18..6fc38d9c296 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Merge/MergePostRequestBody.cs index 6d69108ad04..c6aeb379982 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Merge/MergeRequestBuilder.cs index f5ae30304ca..96d9ab54671 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/RangeWithAddressRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/RangeWithAddressRequestBuilder.cs index 686b2dc99da..36290021716 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/RangeWithAddressRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/RangeWithAddressRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class RangeWithAddressRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class RangeWithAddressRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class RangeWithAddressRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class RangeWithAddressRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -255,8 +255,8 @@ public RangeWithAddressRequestBuilder(string rawUrl, IRequestAdapter requestAdap /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -267,8 +267,8 @@ public RangeWithAddressRequestBuilder(string rawUrl, IRequestAdapter requestAdap /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -278,7 +278,7 @@ public RangeWithAddressRequestBuilder(string rawUrl, IRequestAdapter requestAdap /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -288,7 +288,7 @@ public RangeWithAddressRequestBuilder(string rawUrl, IRequestAdapter requestAdap /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -298,7 +298,7 @@ public RangeWithAddressRequestBuilder(string rawUrl, IRequestAdapter requestAdap /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -327,7 +327,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.RangeWithAddress.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Sort/SortRequestBuilder.cs index 40adfc795fb..0f0b86e021d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/RangeWithAddress/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Add/AddPostRequestBody.cs index ee8ff0d06c9..8a9fb0dc8b0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Add/AddPostRequestBody.cs @@ -58,7 +58,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Add.AddPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("address", Address); writer.WriteBoolValue("hasHeaders", HasHeaders); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Add/AddRequestBuilder.cs index daf0f900f25..c3c3e1468d0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Add/AddRequestBuilder.cs @@ -35,8 +35,8 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r { } /// - /// Create a new table. The range source address determines the worksheet under which the table will be added. If the table can't be added (for example, because the address is invalid, or the table would overlap with another table), an error is thrown. - /// Find more info here + /// Use this API to create a new Table. + /// Find more info here /// /// A /// The request body @@ -52,7 +52,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -61,7 +61,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.WorkbookTable.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new table. The range source address determines the worksheet under which the table will be added. If the table can't be added (for example, because the address is invalid, or the table would overlap with another table), an error is thrown. + /// Use this API to create a new Table. /// /// A /// The request body @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Count/CountGetResponse.cs index 6277b043a1b..25ce8a44e88 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Count/CountResponse.cs index 60bc6a2125e..10b9eeed057 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Add/AddPostRequestBody.cs index d5788781eff..a0a47506ca5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Add/AddPostRequestBody.cs @@ -74,7 +74,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Add.AddPostRequestBody(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("index", Index); writer.WriteStringValue("name", Name); writer.WriteObjectValue("values", Values); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Add/AddRequestBuilder.cs index 14245160881..586360e2f2f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Add/AddRequestBuilder.cs @@ -52,7 +52,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ColumnsRequestBuilder.cs index eaf73aad67b..962ed10f217 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ColumnsRequestBuilder.cs @@ -90,7 +90,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -110,7 +110,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableColumn body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableColumn body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Count/CountGetResponse.cs index 93099e6cdf7..f09db8704a0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Count/CountResponse.cs index ea451e6bfdd..e7f665e2e23 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearPostRequestBody.cs index fa068bf27e3..a96af5fbbf1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearRequestBuilder.cs index cfa06b85c77..ce6188dcc25 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs index 58a3b397caf..d32d553db96 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Delete/DeletePostRequestBody.cs index 4b20777bea0..cd0ebb0b4e8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs index ec92b805c74..4f968add5cf 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Format/FormatRequestBuilder.cs index 2821fb4e25e..f5e4165a0c7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertPostRequestBody.cs index 636123e4b0c..7685c4130c6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertRequestBuilder.cs index fb387e351cf..22e39713d74 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Merge/MergePostRequestBody.cs index fa362fabc9c..272b83ff028 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Merge/MergeRequestBuilder.cs index 019eb994bb1..02b2f89f062 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.DataBodyRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Sort/SortRequestBuilder.cs index 9bd1d729468..b73e75d5023 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/DataBodyRange/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/Apply/ApplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/Apply/ApplyPostRequestBody.cs index 4cccac14b82..f087440e81a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/Apply/ApplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/Apply/ApplyPostRequestBody.cs @@ -53,7 +53,7 @@ public ApplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.Apply.ApplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.Apply.ApplyPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("criteria", Criteria); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/Apply/ApplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/Apply/ApplyRequestBuilder.cs index 9c38dc97319..3bc28a7389b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/Apply/ApplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/Apply/ApplyRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.Apply.ApplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.Apply.ApplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterPostRequestBody.cs index 2c2e55af2ad..05a8d723883 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterPostRequestBody.cs @@ -42,7 +42,7 @@ public ApplyBottomItemsFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyBottomItemsFilter.ApplyBottomItemsFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyBottomItemsFilter.ApplyBottomItemsFilterPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("count", Count); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterRequestBuilder.cs index b299f351a04..330529eaf0a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomItemsFilter/ApplyBottomItemsFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyBottomItemsFilter.ApplyBottomItemsFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyBottomItemsFilter.ApplyBottomItemsFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterPostRequestBody.cs index 294d1565f03..f234088e267 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterPostRequestBody.cs @@ -42,7 +42,7 @@ public ApplyBottomPercentFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyBottomPercentFilter.ApplyBottomPercentFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyBottomPercentFilter.ApplyBottomPercentFilterPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("percent", Percent); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterRequestBuilder.cs index 6a12a5deac7..ba1b0bd6604 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyBottomPercentFilter/ApplyBottomPercentFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyBottomPercentFilter.ApplyBottomPercentFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyBottomPercentFilter.ApplyBottomPercentFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterPostRequestBody.cs index e2f489f39fa..2fdc0c34161 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterPostRequestBody.cs @@ -52,7 +52,7 @@ public ApplyCellColorFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyCellColorFilter.ApplyCellColorFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyCellColorFilter.ApplyCellColorFilterPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("color", Color); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterRequestBuilder.cs index 5bbbd0de937..d5fed02c2a5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCellColorFilter/ApplyCellColorFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyCellColorFilter.ApplyCellColorFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyCellColorFilter.ApplyCellColorFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterPostRequestBody.cs index 6e9a939efb5..44b6b3bfcbc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterPostRequestBody.cs @@ -84,7 +84,7 @@ public ApplyCustomFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyCustomFilter.ApplyCustomFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyCustomFilter.ApplyCustomFilterPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("criteria1", Criteria1); writer.WriteStringValue("criteria2", Criteria2); writer.WriteStringValue("oper", Oper); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterRequestBuilder.cs index a87198ca5f7..9a3bf901893 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyCustomFilter/ApplyCustomFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyCustomFilter.ApplyCustomFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyCustomFilter.ApplyCustomFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterPostRequestBody.cs index bf249e0bf69..0f8d4003156 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterPostRequestBody.cs @@ -52,7 +52,7 @@ public ApplyDynamicFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyDynamicFilter.ApplyDynamicFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyDynamicFilter.ApplyDynamicFilterPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("criteria", Criteria); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterRequestBuilder.cs index 69f2e801af8..5a5911897e8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyDynamicFilter/ApplyDynamicFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyDynamicFilter.ApplyDynamicFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyDynamicFilter.ApplyDynamicFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterPostRequestBody.cs index 13e79ff2742..9850db435c2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterPostRequestBody.cs @@ -52,7 +52,7 @@ public ApplyFontColorFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyFontColorFilter.ApplyFontColorFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyFontColorFilter.ApplyFontColorFilterPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("color", Color); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterRequestBuilder.cs index 4d745139d77..62cea3956e8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyFontColorFilter/ApplyFontColorFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyFontColorFilter.ApplyFontColorFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyFontColorFilter.ApplyFontColorFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterPostRequestBody.cs index 2955329375b..629c0c85a06 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterPostRequestBody.cs @@ -53,7 +53,7 @@ public ApplyIconFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyIconFilter.ApplyIconFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyIconFilter.ApplyIconFilterPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("icon", Icon); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterRequestBuilder.cs index 391f1de9d92..e89a7ea2ea9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyIconFilter/ApplyIconFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyIconFilter.ApplyIconFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyIconFilter.ApplyIconFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterPostRequestBody.cs index 8efe73c63cd..42966e7f7ea 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterPostRequestBody.cs @@ -42,7 +42,7 @@ public ApplyTopItemsFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyTopItemsFilter.ApplyTopItemsFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyTopItemsFilter.ApplyTopItemsFilterPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("count", Count); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterRequestBuilder.cs index c193cb9af21..901041e216d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopItemsFilter/ApplyTopItemsFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyTopItemsFilter.ApplyTopItemsFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyTopItemsFilter.ApplyTopItemsFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterPostRequestBody.cs index d428fc69109..ad494fa8d52 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterPostRequestBody.cs @@ -42,7 +42,7 @@ public ApplyTopPercentFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyTopPercentFilter.ApplyTopPercentFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyTopPercentFilter.ApplyTopPercentFilterPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("percent", Percent); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterRequestBuilder.cs index 6d8faa3777c..82627d8550e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyTopPercentFilter/ApplyTopPercentFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyTopPercentFilter.ApplyTopPercentFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyTopPercentFilter.ApplyTopPercentFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterPostRequestBody.cs index c50c6fb8fd2..723b3eb8109 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterPostRequestBody.cs @@ -52,7 +52,7 @@ public ApplyValuesFilterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyValuesFilter.ApplyValuesFilterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyValuesFilter.ApplyValuesFilterPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterRequestBuilder.cs index 6ce8e3ef823..87b78d20456 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/ApplyValuesFilter/ApplyValuesFilterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyValuesFilter.ApplyValuesFilterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.Filter.ApplyValuesFilter.ApplyValuesFilterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/FilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/FilterRequestBuilder.cs index f0fe55e30b3..e3385284827 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/FilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/Filter/FilterRequestBuilder.cs @@ -168,7 +168,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookFilter body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -229,7 +229,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookFilter body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs index 0c7c1a8e082..47bf0b3ffc6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs index a90ff92dcd0..8997580c069 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs index 4e803267b82..391ed4addce 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs index becb1162c72..3f2a25a066d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Format/FormatRequestBuilder.cs index 9adb0be5774..0b398cefc68 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs index d6be2dddff9..167eea91be5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs index 870af11a15d..130e5c509f2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs index d8a1328bd93..d4f9a31c4aa 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergePostRequestBody.cs index fc20c45f244..b5a4b50b576 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs index 040f8445dc2..61e29229d33 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.HeaderRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Sort/SortRequestBuilder.cs index eabf49a451c..0d0a47d2b8e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/HeaderRowRange/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearPostRequestBody.cs index c70c7a8a852..a125ab76b0b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearRequestBuilder.cs index 74f1789280e..b3485ad68c9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Delete/DeletePostRequestBody.cs index a3ff5985cc7..b162bb6422f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs index 10dc8750bf7..e7382d8f6ce 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Format/FormatRequestBuilder.cs index 6ac7063ad0c..e85cad7c9fe 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertPostRequestBody.cs index 8c06afe9048..e40fda7ebcf 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertRequestBuilder.cs index 18b57ca0356..90430e566ca 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Merge/MergePostRequestBody.cs index 9368d451519..c3685da5a4a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Merge/MergeRequestBuilder.cs index c800eaa087d..027ac25007f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/RangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/RangeRequestBuilder.cs index 35bf8209657..f060d77d341 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/RangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/RangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Sort/SortRequestBuilder.cs index be72ebee12c..b2f935d53ed 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/RangeNamespace/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearPostRequestBody.cs index 2adb0cec3b7..f3d2d1248c9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearRequestBuilder.cs index a5f4e991130..c39f544e310 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Delete/DeletePostRequestBody.cs index 983c856e901..578c2aaca78 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs index cc4d6ac411a..bf0842f0db9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Format/FormatRequestBuilder.cs index 013a0a4908f..b353114a976 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertPostRequestBody.cs index 86098dd640b..be04c101873 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertRequestBuilder.cs index 35c1d3f3816..b5f08b06a7a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Merge/MergePostRequestBody.cs index 6ce8c1f4269..31e692811e3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Merge/MergeRequestBuilder.cs index 0565c58e470..a4e93637e15 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Sort/SortRequestBuilder.cs index 136d179e257..6fbaa63fda9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs index 870c2d10996..637f7295274 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Columns.Item.TotalRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/WorkbookTableColumnItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/WorkbookTableColumnItemRequestBuilder.cs index 12eeb985d0a..40ea3a4fb97 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/WorkbookTableColumnItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/Item/WorkbookTableColumnItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableColumn body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableColumn body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ItemAtWithIndex/Filter/FilterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ItemAtWithIndex/Filter/FilterRequestBuilder.cs index b8c9e4ef7e6..621ef3bafb5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ItemAtWithIndex/Filter/FilterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ItemAtWithIndex/Filter/FilterRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookFilter body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookFilter body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Clear/ClearPostRequestBody.cs index 6e6f4bbef58..bb5fb3ec8af 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Clear/ClearRequestBuilder.cs index 599c884321d..4584b07233f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs index 0c923454272..f6ee35ebfdc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/DataBodyRangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class DataBodyRangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public DataBodyRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Delete/DeletePostRequestBody.cs index b4ea6ce5313..cce609063d5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs index f35a1e7dbd2..1e314ed2ca0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Format/FormatRequestBuilder.cs index 5cfb38b24df..f6bfed70058 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Insert/InsertPostRequestBody.cs index 7e2c2b50b9e..d88a9c29b90 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Insert/InsertRequestBuilder.cs index a3dcf93bfee..79793859acf 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Merge/MergePostRequestBody.cs index 8de705bd3ea..0e785801130 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Merge/MergeRequestBuilder.cs index 45591d01213..6aba33de1a3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.DataBodyRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Sort/SortRequestBuilder.cs index 994fe2cf604..b6a292ca8c5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/DataBodyRange/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs index fe705515dd3..4de9b80171f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs index c507a52fc15..b9c6b3f08d1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs index 864ab40b321..935983e2b36 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs index 3241b55bf89..54740a5d630 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Format/FormatRequestBuilder.cs index 25d13c27b7a..50e19bfa2cc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs index eadfa80139c..3a490789359 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/HeaderRowRangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class HeaderRowRangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public HeaderRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs index b93314d6959..e9862cd2a88 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs index 26f71c1e3c5..17ceab51518 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Merge/MergePostRequestBody.cs index 2f74eddeb41..c69a0d00d85 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs index c6955a40fbe..175868e2f84 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.HeaderRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Sort/SortRequestBuilder.cs index 1bbe0608a60..08d0c4b150f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/HeaderRowRange/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Clear/ClearPostRequestBody.cs index d466680f08b..009ce39efab 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Clear/ClearRequestBuilder.cs index ea9abca8f3d..6534747fac0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Delete/DeletePostRequestBody.cs index a7920267826..85205a455d7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs index a2569c3b20e..bb37a801a7b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Format/FormatRequestBuilder.cs index 305870008fe..cc6f3badca5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Insert/InsertPostRequestBody.cs index 682a5bcdf3a..fd5be810ccb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Insert/InsertRequestBuilder.cs index 695e3d29ff7..5767be0a0a8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Merge/MergePostRequestBody.cs index e573bf45867..b71a270d8d8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Merge/MergeRequestBuilder.cs index 1cf8401bc8c..26c25cd0e56 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/RangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/RangeRequestBuilder.cs index 5ffc58092ca..cbc91340575 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/RangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/RangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Sort/SortRequestBuilder.cs index 78a417cfe07..88d083b83cd 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/RangeNamespace/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Add/AddPostRequestBody.cs index 679eb34d837..714fb9f0639 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Add/AddPostRequestBody.cs @@ -58,7 +58,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Add.AddPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("index", Index); writer.WriteObjectValue("values", Values); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Add/AddRequestBuilder.cs index a19f3d24115..7ff06d051a3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Add/AddRequestBuilder.cs @@ -52,7 +52,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Count/CountGetResponse.cs index 92380b418e4..6ccedcdb1b7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Count/CountResponse.cs index 9df42b1a36e..2ecb5eb32b2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearPostRequestBody.cs index 38231016ab6..f9e36ce192f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearRequestBuilder.cs index b9489aefb2b..f514d742c88 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Delete/DeletePostRequestBody.cs index 287e0f06f3d..077c2114082 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs index bddba99dc87..12f001736f2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Format/FormatRequestBuilder.cs index d6fb89a741e..ebedb18274d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertPostRequestBody.cs index ec864f4c735..9a6828212f7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertRequestBuilder.cs index 4604220647d..99637170a52 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Merge/MergePostRequestBody.cs index 941622e91f4..9e9b0782058 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Merge/MergeRequestBuilder.cs index 67b4db93003..afa121de3d1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/RangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/RangeRequestBuilder.cs index 022c50bd834..d6e45f058b0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/RangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/RangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class RangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public RangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.Item.RangeNamespace.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Sort/SortRequestBuilder.cs index 1b554f7f292..230e2eb9b72 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/RangeNamespace/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/WorkbookTableRowItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/WorkbookTableRowItemRequestBuilder.cs index 3a0c6b2f26f..dccc3007c9e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/WorkbookTableRowItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/Item/WorkbookTableRowItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableRow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableRow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/RowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/RowsRequestBuilder.cs index b32e0904e7e..dcf0b9be422 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/RowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Rows/RowsRequestBuilder.cs @@ -90,7 +90,7 @@ public RowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Rows.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -110,7 +110,7 @@ public RowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableRow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableRow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Sort/Apply/ApplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Sort/Apply/ApplyPostRequestBody.cs index 83b371f5db6..183d71c2a3d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Sort/Apply/ApplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Sort/Apply/ApplyPostRequestBody.cs @@ -75,7 +75,7 @@ public ApplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Sort.Apply.ApplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Sort.Apply.ApplyPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("fields", Fields); writer.WriteBoolValue("matchCase", MatchCase); writer.WriteStringValue("method", Method); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Sort/Apply/ApplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Sort/Apply/ApplyRequestBuilder.cs index 22800ab35d2..c5e7c1fce8a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Sort/Apply/ApplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Sort/Apply/ApplyRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Sort.Apply.ApplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.Sort.Apply.ApplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Sort/SortRequestBuilder.cs index a1120c86653..4e7c02fcd6a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Sort/SortRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Clear/ClearPostRequestBody.cs index ca46248b9b3..44464cddb62 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Clear/ClearRequestBuilder.cs index d7616edcd59..fc58a70261e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Delete/DeletePostRequestBody.cs index 96ff7fdc9db..fdaea2a3704 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs index 2c369c4dd01..3fc9e08122a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Format/FormatRequestBuilder.cs index dfa27d1ae0c..eecafd233d5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Insert/InsertPostRequestBody.cs index 5f8cb81a141..5b7d08e2646 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Insert/InsertRequestBuilder.cs index d636e1615aa..289d4750afa 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Merge/MergePostRequestBody.cs index 8dbcce5799d..e9c17256f57 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Merge/MergeRequestBuilder.cs index 29161afabb6..857eec85cc9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Sort/SortRequestBuilder.cs index 6b5655fb836..ecc3f2f568b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs index f649b11fd53..fe372447a15 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/TotalRowRange/TotalRowRangeRequestBuilder.cs @@ -162,8 +162,8 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -173,7 +173,7 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -183,7 +183,7 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -193,7 +193,7 @@ public partial class TotalRowRangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -254,8 +254,8 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -266,8 +266,8 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -277,7 +277,7 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -287,7 +287,7 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -297,7 +297,7 @@ public TotalRowRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// @@ -326,7 +326,7 @@ public RequestInformation ToGetRequestInformation(ActionUsage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.Item.TotalRowRange.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/WorkbookTableItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/WorkbookTableItemRequestBuilder.cs index 14e199ffaeb..bdc5944dc2d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/WorkbookTableItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/WorkbookTableItemRequestBuilder.cs @@ -162,7 +162,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookTable body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -223,7 +223,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTable body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/ItemAtWithIndex/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/ItemAtWithIndex/Columns/ColumnsRequestBuilder.cs index 7e80407cd44..87d5daa3e76 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/ItemAtWithIndex/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/ItemAtWithIndex/Columns/ColumnsRequestBuilder.cs @@ -74,7 +74,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableColumn body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableColumn body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/ItemAtWithIndex/Rows/RowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/ItemAtWithIndex/Rows/RowsRequestBuilder.cs index 0fa5b2f189a..6c42939361c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/ItemAtWithIndex/Rows/RowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/ItemAtWithIndex/Rows/RowsRequestBuilder.cs @@ -74,7 +74,7 @@ public RowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableRow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableRow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/ItemAtWithIndex/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/ItemAtWithIndex/Sort/SortRequestBuilder.cs index abf0b39f6c3..75c9464ef11 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/ItemAtWithIndex/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/ItemAtWithIndex/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookTableSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTableSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/TablesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/TablesRequestBuilder.cs index 695cef5433a..59d7f390687 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/TablesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/TablesRequestBuilder.cs @@ -90,7 +90,7 @@ public TablesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tables.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -110,7 +110,7 @@ public TablesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookTable body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookTable body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Count/CountGetResponse.cs index ac845092b48..8cbe32df1f5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Count/CountResponse.cs index fa21f2bb19c..3e78bf4da5e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/ChangesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/ChangesRequestBuilder.cs index 79167300629..b9414740872 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/ChangesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/ChangesRequestBuilder.cs @@ -84,7 +84,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Changes.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Changes.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -104,7 +104,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/Count/CountGetResponse.cs index 4fe0db50203..8609fd1b1e6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Changes.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Changes.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/Count/CountResponse.cs index c0571ddb83c..e1bd50c159c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Changes.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Changes.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs index 54841849cec..55423451757 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/CommentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/CommentRequestBuilder.cs index 054638f6442..fd5b6431dec 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/CommentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/CommentRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookComment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookComment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs index d81c99d1c9c..f3070f0a9b2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/ChangesRequestBuilder.cs @@ -84,7 +84,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Comment.Replies.Item.TaskNamespace.Changes.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Comment.Replies.Item.TaskNamespace.Changes.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -104,7 +104,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/Count/CountGetResponse.cs index 69f78374310..42be3e10252 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Comment.Replies.Item.TaskNamespace.Changes.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Comment.Replies.Item.TaskNamespace.Changes.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/Count/CountResponse.cs index b3ff8864fe3..8d65b3eee4b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Comment.Replies.Item.TaskNamespace.Changes.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Comment.Replies.Item.TaskNamespace.Changes.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs index 1c9ea08c64d..ac2843f5dd4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/TaskRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/TaskRequestBuilder.cs index 479ebd6422c..07d8941d377 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/TaskRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/TaskNamespace/TaskRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/WorkbookCommentReplyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/WorkbookCommentReplyItemRequestBuilder.cs index af490000ccf..bbf435fc143 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/WorkbookCommentReplyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/Item/WorkbookCommentReplyItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookCommentReply body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookCommentReply body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/RepliesRequestBuilder.cs index d246922b982..54aa9216858 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/Replies/RepliesRequestBuilder.cs @@ -93,7 +93,7 @@ public RepliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookCommentReply body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookCommentReply body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/ChangesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/ChangesRequestBuilder.cs index 05ab8688489..240a0c199cc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/ChangesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/ChangesRequestBuilder.cs @@ -84,7 +84,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Comment.TaskNamespace.Changes.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Comment.TaskNamespace.Changes.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -104,7 +104,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/Count/CountGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/Count/CountGetResponse.cs index 8194e6759cd..2a0b9356e0c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/Count/CountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/Count/CountGetResponse.cs @@ -42,7 +42,7 @@ public CountGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Comment.TaskNamespace.Changes.Count.CountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Comment.TaskNamespace.Changes.Count.CountGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/Count/CountResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/Count/CountResponse.cs index 08e62ec638b..bf92af7dd7a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/Count/CountResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/Count/CountResponse.cs @@ -20,7 +20,7 @@ public partial class CountResponse : global::Microsoft.Graph.Beta.Drives.Item.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Comment.TaskNamespace.Changes.Count.CountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.Item.Comment.TaskNamespace.Changes.Count.CountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs index 98542d51bd4..125dbf7f15e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/Changes/Item/WorkbookDocumentTaskChangeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/TaskRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/TaskRequestBuilder.cs index a5d7856aba1..abcb643f39f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/TaskRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/Comment/TaskNamespace/TaskRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/WorkbookDocumentTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/WorkbookDocumentTaskItemRequestBuilder.cs index d313f1c2894..678346e77d3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/WorkbookDocumentTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/Item/WorkbookDocumentTaskItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/ItemAtWithIndex/Changes/ChangesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/ItemAtWithIndex/Changes/ChangesRequestBuilder.cs index bec7acfa9fa..85bb866c0a9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/ItemAtWithIndex/Changes/ChangesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/ItemAtWithIndex/Changes/ChangesRequestBuilder.cs @@ -74,7 +74,7 @@ public ChangesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/ItemAtWithIndex/Comment/CommentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/ItemAtWithIndex/Comment/CommentRequestBuilder.cs index c0e704baf04..7ba0b965ecc 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/ItemAtWithIndex/Comment/CommentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/ItemAtWithIndex/Comment/CommentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookComment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookComment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/TasksRequestBuilder.cs index 1d4739e21af..d7cb6b623a2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tasks/TasksRequestBuilder.cs @@ -84,7 +84,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Usage: index={index} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.ItemAtWithIndex.ItemAtWithIndexRequestBuilder ItemAtWithIndex(int? index) { - _ = index ?? throw new ArgumentNullException(nameof(index)); + if(ReferenceEquals(index, null)) throw new ArgumentNullException(nameof(index)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.Tasks.ItemAtWithIndex.ItemAtWithIndexRequestBuilder(PathParameters, RequestAdapter, index); } /// @@ -104,7 +104,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Clear/ClearPostRequestBody.cs index 0ebbf9356bd..9827c8d91fb 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Clear/ClearRequestBuilder.cs index b94772abfcd..3b28d687c51 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Delete/DeletePostRequestBody.cs index 60030a9792b..8779361747f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Delete/DeleteRequestBuilder.cs index 41b9ce5c77c..404622c914b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Format/FormatRequestBuilder.cs index 2c90a0bcd7d..c28ac8543c9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Insert/InsertPostRequestBody.cs index eb34b3e0341..6134bf0be6b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Insert/InsertRequestBuilder.cs index 5efd056b8ca..6a33d2678f5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Merge/MergePostRequestBody.cs index 7a8bf5b45d2..cc3645595d3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Merge/MergeRequestBuilder.cs index cfeac889d6b..dcb3c91193a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Sort/SortRequestBuilder.cs index eff07d1fc46..eda0834c72b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/UsedRangeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/UsedRangeRequestBuilder.cs index 419243bea6a..7b68fb73d62 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/UsedRangeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRange/UsedRangeRequestBuilder.cs @@ -155,8 +155,8 @@ public partial class UsedRangeRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -166,7 +166,7 @@ public partial class UsedRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -176,7 +176,7 @@ public partial class UsedRangeRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -186,7 +186,7 @@ public partial class UsedRangeRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -246,8 +246,8 @@ public UsedRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -258,8 +258,8 @@ public UsedRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -269,7 +269,7 @@ public UsedRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -279,7 +279,7 @@ public UsedRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -289,7 +289,7 @@ public UsedRangeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRange.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Clear/ClearPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Clear/ClearPostRequestBody.cs index 6c04ba1c293..54a6631e145 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Clear/ClearPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Clear/ClearPostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Clear.ClearPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Clear.ClearPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applyTo", ApplyTo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Clear/ClearRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Clear/ClearRequestBuilder.cs index 8e709ceb802..0704609c17d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Clear/ClearRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Clear/ClearRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Clear.ClearPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Clear.ClearPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Delete/DeletePostRequestBody.cs index 0beed4051ea..5e69508d1e7 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Delete/DeleteRequestBuilder.cs index a776e5b30ac..ddd284df252 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Format/FormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Format/FormatRequestBuilder.cs index c91451065d8..fa058065cb5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Format/FormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Format/FormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Insert/InsertPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Insert/InsertPostRequestBody.cs index ae4de4560f7..f646a81ba39 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Insert/InsertPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Insert/InsertPostRequestBody.cs @@ -52,7 +52,7 @@ public InsertPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Insert.InsertPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Insert.InsertPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("shift", Shift); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Insert/InsertRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Insert/InsertRequestBuilder.cs index fbe7d14cd08..0d6beb02a67 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Insert/InsertRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Insert/InsertRequestBuilder.cs @@ -51,7 +51,7 @@ public InsertRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Insert.InsertPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Insert.InsertPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Merge/MergePostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Merge/MergePostRequestBody.cs index ecf96acc7d8..89912756cb1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Merge/MergePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Merge/MergePostRequestBody.cs @@ -42,7 +42,7 @@ public MergePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Merge.MergePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Merge.MergePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("across", Across); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Merge/MergeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Merge/MergeRequestBuilder.cs index f371238af86..e590dde9212 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Merge/MergeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Merge/MergeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Merge.MergePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.Merge.MergePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Sort/SortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Sort/SortRequestBuilder.cs index 621b2102ef3..48246f1d558 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Sort/SortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/Sort/SortRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookRangeSort body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/UsedRangeWithValuesOnlyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/UsedRangeWithValuesOnlyRequestBuilder.cs index 8976b164cda..e3747965558 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/UsedRangeWithValuesOnlyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/UsedRangeWithValuesOnly/UsedRangeWithValuesOnlyRequestBuilder.cs @@ -155,8 +155,8 @@ public partial class UsedRangeWithValuesOnlyRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -166,7 +166,7 @@ public partial class UsedRangeWithValuesOnlyRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder ColumnsAfterWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.ColumnsAfterWithCount.ColumnsAfterWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -176,7 +176,7 @@ public partial class UsedRangeWithValuesOnlyRequestBuilder : BaseRequestBuilder /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder ColumnsBeforeWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.ColumnsBeforeWithCount.ColumnsBeforeWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -186,7 +186,7 @@ public partial class UsedRangeWithValuesOnlyRequestBuilder : BaseRequestBuilder /// Usage: column={column} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.ColumnWithColumn.ColumnWithColumnRequestBuilder ColumnWithColumn(int? column) { - _ = column ?? throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.ColumnWithColumn.ColumnWithColumnRequestBuilder(PathParameters, RequestAdapter, column); } /// @@ -248,8 +248,8 @@ public UsedRangeWithValuesOnlyRequestBuilder(string rawUrl, IRequestAdapter requ /// Usage: rowOffset={rowOffset} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder OffsetRangeWithRowOffsetWithColumnOffset(int? columnOffset, int? rowOffset) { - _ = columnOffset ?? throw new ArgumentNullException(nameof(columnOffset)); - _ = rowOffset ?? throw new ArgumentNullException(nameof(rowOffset)); + if(ReferenceEquals(columnOffset, null)) throw new ArgumentNullException(nameof(columnOffset)); + if(ReferenceEquals(rowOffset, null)) throw new ArgumentNullException(nameof(rowOffset)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.OffsetRangeWithRowOffsetWithColumnOffset.OffsetRangeWithRowOffsetWithColumnOffsetRequestBuilder(PathParameters, RequestAdapter, columnOffset, rowOffset); } /// @@ -260,8 +260,8 @@ public UsedRangeWithValuesOnlyRequestBuilder(string rawUrl, IRequestAdapter requ /// Usage: deltaRows={deltaRows} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder ResizedRangeWithDeltaRowsWithDeltaColumns(int? deltaColumns, int? deltaRows) { - _ = deltaColumns ?? throw new ArgumentNullException(nameof(deltaColumns)); - _ = deltaRows ?? throw new ArgumentNullException(nameof(deltaRows)); + if(ReferenceEquals(deltaColumns, null)) throw new ArgumentNullException(nameof(deltaColumns)); + if(ReferenceEquals(deltaRows, null)) throw new ArgumentNullException(nameof(deltaRows)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.ResizedRangeWithDeltaRowsWithDeltaColumns.ResizedRangeWithDeltaRowsWithDeltaColumnsRequestBuilder(PathParameters, RequestAdapter, deltaColumns, deltaRows); } /// @@ -271,7 +271,7 @@ public UsedRangeWithValuesOnlyRequestBuilder(string rawUrl, IRequestAdapter requ /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.RowsAboveWithCount.RowsAboveWithCountRequestBuilder RowsAboveWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.RowsAboveWithCount.RowsAboveWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -281,7 +281,7 @@ public UsedRangeWithValuesOnlyRequestBuilder(string rawUrl, IRequestAdapter requ /// Usage: count={count} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.RowsBelowWithCount.RowsBelowWithCountRequestBuilder RowsBelowWithCount(int? count) { - _ = count ?? throw new ArgumentNullException(nameof(count)); + if(ReferenceEquals(count, null)) throw new ArgumentNullException(nameof(count)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.RowsBelowWithCount.RowsBelowWithCountRequestBuilder(PathParameters, RequestAdapter, count); } /// @@ -291,7 +291,7 @@ public UsedRangeWithValuesOnlyRequestBuilder(string rawUrl, IRequestAdapter requ /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.RowWithRow.RowWithRowRequestBuilder RowWithRow(int? row) { - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.RowWithRow.RowWithRowRequestBuilder(PathParameters, RequestAdapter, row); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/WorkbookWorksheetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/WorkbookWorksheetItemRequestBuilder.cs index 34e98de32f2..bcefb1058d9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/WorkbookWorksheetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/WorkbookWorksheetItemRequestBuilder.cs @@ -77,8 +77,8 @@ public partial class WorkbookWorksheetItemRequestBuilder : BaseRequestBuilder /// Usage: row={row} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder CellWithRowWithColumn(int? column, int? row) { - _ = column ?? throw new ArgumentNullException(nameof(column)); - _ = row ?? throw new ArgumentNullException(nameof(row)); + if(ReferenceEquals(column, null)) throw new ArgumentNullException(nameof(column)); + if(ReferenceEquals(row, null)) throw new ArgumentNullException(nameof(row)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.CellWithRowWithColumn.CellWithRowWithColumnRequestBuilder(PathParameters, RequestAdapter, column, row); } /// @@ -159,7 +159,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkbookWorksheet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -230,7 +230,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookWorksheet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -244,7 +244,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta /// Usage: valuesOnly={valuesOnly} public global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder UsedRangeWithValuesOnly(bool? valuesOnly) { - _ = valuesOnly ?? throw new ArgumentNullException(nameof(valuesOnly)); + if(ReferenceEquals(valuesOnly, null)) throw new ArgumentNullException(nameof(valuesOnly)); return new global::Microsoft.Graph.Beta.Drives.Item.Items.Item.Workbook.Worksheets.Item.UsedRangeWithValuesOnly.UsedRangeWithValuesOnlyRequestBuilder(PathParameters, RequestAdapter, valuesOnly); } /// diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/WorksheetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/WorksheetsRequestBuilder.cs index e1afe196ca0..c57a3dc75ab 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/WorksheetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/WorksheetsRequestBuilder.cs @@ -99,7 +99,7 @@ public WorksheetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkbookWorksheet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkbookWorksheet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/ItemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/ItemsRequestBuilder.cs index 3b6f8f4502c..f6e0fa2d404 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/ItemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/ItemsRequestBuilder.cs @@ -94,7 +94,7 @@ public ItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DriveItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DriveItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 545f4be18f0..595d6cbb424 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Activities/ActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Activities/ActivitiesRequestBuilder.cs index 9c8a14d3a1e..b83a1f783a2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Activities/ActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Activities/ActivitiesRequestBuilder.cs @@ -74,7 +74,7 @@ public ActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Columns/ColumnsRequestBuilder.cs index 5a0739a62ab..c9527aa900a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Columns/ColumnsRequestBuilder.cs @@ -93,7 +93,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Columns/Item/ColumnDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Columns/Item/ColumnDefinitionItemRequestBuilder.cs index 7ab5b9b3b5e..4e2397e51d1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Columns/Item/ColumnDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Columns/Item/ColumnDefinitionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopy/AddCopyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopy/AddCopyPostRequestBody.cs index 0e3c96c929f..e2b2622e678 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopy/AddCopyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopy/AddCopyPostRequestBody.cs @@ -52,7 +52,7 @@ public AddCopyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.AddCopy.AddCopyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.AddCopy.AddCopyPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("contentType", ContentType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopy/AddCopyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopy/AddCopyRequestBuilder.cs index a8a928163de..ff7924fc7d6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopy/AddCopyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopy/AddCopyRequestBuilder.cs @@ -52,7 +52,7 @@ public AddCopyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.AddCopy.AddCopyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.AddCopy.AddCopyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubPostRequestBody.cs index 9777146540c..de1ede51e50 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubPostRequestBody.cs @@ -52,7 +52,7 @@ public AddCopyFromContentTypeHubPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.AddCopyFromContentTypeHub.AddCopyFromContentTypeHubPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.AddCopyFromContentTypeHub.AddCopyFromContentTypeHubPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("contentTypeId", ContentTypeId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubRequestBuilder.cs index 3c0ee3353d1..df63e99d5a2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubRequestBuilder.cs @@ -52,7 +52,7 @@ public AddCopyFromContentTypeHubRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.AddCopyFromContentTypeHub.AddCopyFromContentTypeHubPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.AddCopyFromContentTypeHub.AddCopyFromContentTypeHubPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/ContentTypesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/ContentTypesRequestBuilder.cs index 141f7812c31..a0474c2b350 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/ContentTypesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/ContentTypesRequestBuilder.cs @@ -111,7 +111,7 @@ public ContentTypesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ContentType body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ContentType body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesGetResponse.cs index 8c658021bf8..c3290aee0c6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetCompatibleHubContentTypesGetResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.GetCompatibleHubContentTypes.GetCompatibleHubContentTypesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.GetCompatibleHubContentTypes.GetCompatibleHubContentTypesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesResponse.cs index 010fe65bc3f..aaedab09f73 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesResponse.cs @@ -20,7 +20,7 @@ public partial class GetCompatibleHubContentTypesResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.GetCompatibleHubContentTypes.GetCompatibleHubContentTypesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.GetCompatibleHubContentTypes.GetCompatibleHubContentTypesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesPostRequestBody.cs index f446c5bc4cd..eaee98b37ad 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesPostRequestBody.cs @@ -58,7 +58,7 @@ public AssociateWithHubSitesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.Item.AssociateWithHubSites.AssociateWithHubSitesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.Item.AssociateWithHubSites.AssociateWithHubSitesPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("hubSiteUrls", HubSiteUrls); writer.WriteBoolValue("propagateToExistingLists", PropagateToExistingLists); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesRequestBuilder.cs index 2627715017d..3398360f570 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.List.Conten public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.Item.AssociateWithHubSites.AssociateWithHubSitesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.Item.AssociateWithHubSites.AssociateWithHubSitesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/ColumnLinks/ColumnLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/ColumnLinks/ColumnLinksRequestBuilder.cs index 6f6a7e05c6b..c95aa64a958 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/ColumnLinks/ColumnLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/ColumnLinks/ColumnLinksRequestBuilder.cs @@ -93,7 +93,7 @@ public ColumnLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ColumnLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/ColumnLinks/Item/ColumnLinkItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/ColumnLinks/Item/ColumnLinkItemRequestBuilder.cs index 6d540bc5002..e1b6dbcc4b0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/ColumnLinks/Item/ColumnLinkItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/ColumnLinks/Item/ColumnLinkItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ColumnLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/Columns/ColumnsRequestBuilder.cs index 914cd558a71..2c47faf8140 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/Columns/ColumnsRequestBuilder.cs @@ -93,7 +93,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs index b3da2ebe839..88464e2880d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/ContentTypeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/ContentTypeItemRequestBuilder.cs index d9cfce7d592..5b3383cc5c2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/ContentTypeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/ContentTypeItemRequestBuilder.cs @@ -156,7 +156,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ContentType body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -217,7 +217,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ContentType body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationPostRequestBody.cs index 58cb4c8f0b4..f1128813995 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationPostRequestBody.cs @@ -69,7 +69,7 @@ public CopyToDefaultContentLocationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.Item.CopyToDefaultContentLocation.CopyToDefaultContentLocationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.Item.CopyToDefaultContentLocation.CopyToDefaultContentLocationPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("destinationFileName", DestinationFileName); writer.WriteObjectValue("sourceFile", SourceFile); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationRequestBuilder.cs index 45ef4a2db76..4213808cf94 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.List.Conten public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.Item.CopyToDefaultContentLocation.CopyToDefaultContentLocationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.Item.CopyToDefaultContentLocation.CopyToDefaultContentLocationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/IsPublished/IsPublishedGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/IsPublished/IsPublishedGetResponse.cs index 77a8070bd15..da555f6a463 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/IsPublished/IsPublishedGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/IsPublished/IsPublishedGetResponse.cs @@ -42,7 +42,7 @@ public IsPublishedGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.Item.IsPublished.IsPublishedGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.Item.IsPublished.IsPublishedGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/IsPublished/IsPublishedResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/IsPublished/IsPublishedResponse.cs index 6bbbe763e30..5860d1a45fa 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/IsPublished/IsPublishedResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ContentTypes/Item/IsPublished/IsPublishedResponse.cs @@ -20,7 +20,7 @@ public partial class IsPublishedResponse : global::Microsoft.Graph.Beta.Drives.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.Item.IsPublished.IsPublishedResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.ContentTypes.Item.IsPublished.IsPublishedResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 3d014262d17..287dc0fe1e0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Delta/DeltaGetResponse.cs index d0c15f0d6f1..d29a6b7d96f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Delta/DeltaResponse.cs index dae24bd3692..6dff1e02172 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Drives.Item.Li /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/DeltaWithToken/DeltaWithTokenGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/DeltaWithToken/DeltaWithTokenGetResponse.cs index 85aefe08db1..4188379ac40 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/DeltaWithToken/DeltaWithTokenGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/DeltaWithToken/DeltaWithTokenGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaWithTokenGetResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.List.Items.DeltaWithToken.DeltaWithTokenGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Items.DeltaWithToken.DeltaWithTokenGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/DeltaWithToken/DeltaWithTokenResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/DeltaWithToken/DeltaWithTokenResponse.cs index 5a7f079218d..81c174a9a69 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/DeltaWithToken/DeltaWithTokenResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/DeltaWithToken/DeltaWithTokenResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaWithTokenResponse : global::Microsoft.Graph.Beta.Drive /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.List.Items.DeltaWithToken.DeltaWithTokenResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Items.DeltaWithToken.DeltaWithTokenResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/ActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/ActivitiesRequestBuilder.cs index beead4f1d88..f0f31a866e8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/ActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/ActivitiesRequestBuilder.cs @@ -93,7 +93,7 @@ public ActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs index 65b56f9a8dd..f48210a33a1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs index 4a8c2455a7a..6e8dc4bbd05 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/Item/ItemActivityOLDItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/Item/ItemActivityOLDItemRequestBuilder.cs index 46c02a02226..a1541380f0d 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/Item/ItemActivityOLDItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Activities/Item/ItemActivityOLDItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreateLink/CreateLinkPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreateLink/CreateLinkPostRequestBody.cs index 687cee89a65..5d99f744ea5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreateLink/CreateLinkPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreateLink/CreateLinkPostRequestBody.cs @@ -135,7 +135,7 @@ public CreateLinkPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.CreateLink.CreateLinkPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.CreateLink.CreateLinkPostRequestBody(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteStringValue("message", Message); writer.WriteStringValue("password", Password); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreateLink/CreateLinkRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreateLink/CreateLinkRequestBuilder.cs index c8306e498bb..9480b4efd4f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreateLink/CreateLinkRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreateLink/CreateLinkRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateLinkRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.CreateLink.CreateLinkPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.CreateLink.CreateLinkPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 299541cbb0b..bf623136141 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/DocumentSetVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/DocumentSetVersionsRequestBuilder.cs index dfcf115bfe2..fe804d556f6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/DocumentSetVersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/DocumentSetVersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public DocumentSetVersionsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DocumentSetVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DocumentSetVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs index 34f33ce2f15..86a8662897f 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DocumentSetVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DocumentSetVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs index 0a33e23d6b3..c88759b552b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.FieldValueSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.FieldValueSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DriveItem/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DriveItem/Content/ContentRequestBuilder.cs index 7e90f8ecc63..0ce1dc8eee1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DriveItem/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DriveItem/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs index e72b0c59bd4..e33e657ea67 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Fields/FieldsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Fields/FieldsRequestBuilder.cs index ace77740cea..30bcc48bc89 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Fields/FieldsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Fields/FieldsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.FieldValueSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.FieldValueSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs index c0b278f916e..6a310e4c0d2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWith /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs index 71fff84927b..d46f76ab6e2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs @@ -20,7 +20,7 @@ public partial class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWith /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index f84ef0ce708..acaa82ef95e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/ListItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/ListItemItemRequestBuilder.cs index ef267aa8e18..4082354e001 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/ListItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/ListItemItemRequestBuilder.cs @@ -171,7 +171,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ListItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -232,7 +232,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ListItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantPostRequestBody.cs index fdbeaa4cd08..5e98bff304b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantPostRequestBody.cs @@ -69,7 +69,7 @@ public GrantPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.Permissions.Item.Grant.GrantPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.Permissions.Item.Grant.GrantPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("recipients", Recipients); writer.WriteCollectionOfPrimitiveValues("roles", Roles); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantPostResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantPostResponse.cs index 6476b4802a2..e07b61ed8c5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantPostResponse.cs @@ -36,7 +36,7 @@ public partial class GrantPostResponse : global::Microsoft.Graph.Beta.Models.Bas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.Permissions.Item.Grant.GrantPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.Permissions.Item.Grant.GrantPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantRequestBuilder.cs index f38b61845e8..33ebad0578a 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantRequestBuilder.cs @@ -51,7 +51,7 @@ public GrantRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsGrantPostResponseAsync(global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GrantRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantResponse.cs index 53a8fb02a7d..d60e57bc858 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/Grant/GrantResponse.cs @@ -20,7 +20,7 @@ public partial class GrantResponse : global::Microsoft.Graph.Beta.Drives.Item.Li /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.Permissions.Item.Grant.GrantResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.Permissions.Item.Grant.GrantResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/PermissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/PermissionItemRequestBuilder.cs index 496f67722a5..c99f25b12f3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/PermissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/PermissionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs index 6493135a3a6..4ef3de31662 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs @@ -53,7 +53,7 @@ public RevokeGrantsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("grantees", Grantees); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs index 847de14a64e..9156a85b0fa 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs @@ -52,7 +52,7 @@ public RevokeGrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.List.Items.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/PermissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/PermissionsRequestBuilder.cs index a6616fc0b29..ada123441a1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/PermissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Permissions/PermissionsRequestBuilder.cs @@ -93,7 +93,7 @@ public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Versions/Item/Fields/FieldsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Versions/Item/Fields/FieldsRequestBuilder.cs index 345497b87d7..041736fbd54 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Versions/Item/Fields/FieldsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Versions/Item/Fields/FieldsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.FieldValueSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.FieldValueSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Versions/Item/ListItemVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Versions/Item/ListItemVersionItemRequestBuilder.cs index 46eaaef49fd..b628164efe2 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Versions/Item/ListItemVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Versions/Item/ListItemVersionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ListItemVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ListItemVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Versions/VersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Versions/VersionsRequestBuilder.cs index 2bb1952f6d2..9542ba7dcf0 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Versions/VersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/Item/Versions/VersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public VersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ListItemVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ListItemVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/ItemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/ItemsRequestBuilder.cs index c4a423946f5..6fc4cf491e1 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Items/ItemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Items/ItemsRequestBuilder.cs @@ -110,7 +110,7 @@ public ItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ListItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ListItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 56f838aee55..80e0a3d9f28 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/ListRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/ListRequestBuilder.cs index 945a6c50c22..93cae6ea620 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/ListRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/ListRequestBuilder.cs @@ -156,7 +156,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -217,7 +217,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.List body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Operations/Item/RichLongRunningOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Operations/Item/RichLongRunningOperationItemRequestBuilder.cs index 1c256c429a2..96d0a6e9cd3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Operations/Item/RichLongRunningOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Operations/Item/RichLongRunningOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RichLongRunningOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RichLongRunningOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Operations/OperationsRequestBuilder.cs index ad7e31053f6..7f3e90f5076 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RichLongRunningOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RichLongRunningOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantPostRequestBody.cs index b8be33d2ccd..965da92034b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantPostRequestBody.cs @@ -69,7 +69,7 @@ public GrantPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.List.Permissions.Item.Grant.GrantPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Permissions.Item.Grant.GrantPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("recipients", Recipients); writer.WriteCollectionOfPrimitiveValues("roles", Roles); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantPostResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantPostResponse.cs index 334d2bc77f5..93bf4e756ee 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantPostResponse.cs @@ -36,7 +36,7 @@ public partial class GrantPostResponse : global::Microsoft.Graph.Beta.Models.Bas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.List.Permissions.Item.Grant.GrantPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Permissions.Item.Grant.GrantPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantRequestBuilder.cs index fb56393550c..0dfbcae0e1b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantRequestBuilder.cs @@ -51,7 +51,7 @@ public GrantRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsGrantPostResponseAsync(global::Microsoft.Graph.Beta.Drives.Item.List.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GrantRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.List.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.List.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantResponse.cs index b25f424d865..c9d58eb79a4 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/Grant/GrantResponse.cs @@ -20,7 +20,7 @@ public partial class GrantResponse : global::Microsoft.Graph.Beta.Drives.Item.Li /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.List.Permissions.Item.Grant.GrantResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Permissions.Item.Grant.GrantResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/PermissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/PermissionItemRequestBuilder.cs index 87d610fea87..0d81cfb7b1c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/PermissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/PermissionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs index c781c9bb2ce..04b5caebdc9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs @@ -53,7 +53,7 @@ public RevokeGrantsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.List.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("grantees", Grantees); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs index cc0f0abd779..209541f5bc9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs @@ -52,7 +52,7 @@ public RevokeGrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Drives.Item.List.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Drives.Item.List.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/PermissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/PermissionsRequestBuilder.cs index 4311d491f18..9f37d939218 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/PermissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Permissions/PermissionsRequestBuilder.cs @@ -93,7 +93,7 @@ public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyGetResponse.cs index 7db9dab5c2f..702d3937c33 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyGetResponse.cs @@ -52,7 +52,7 @@ public GetVapidPublicKeyGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Drives.Item.List.Subscriptions.GetVapidPublicKey.GetVapidPublicKeyGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Subscriptions.GetVapidPublicKey.GetVapidPublicKeyGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyResponse.cs index bf35080b028..a289e60e9c6 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyResponse.cs @@ -20,7 +20,7 @@ public partial class GetVapidPublicKeyResponse : global::Microsoft.Graph.Beta.Dr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.List.Subscriptions.GetVapidPublicKey.GetVapidPublicKeyResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.List.Subscriptions.GetVapidPublicKey.GetVapidPublicKeyResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/Item/SubscriptionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/Item/SubscriptionItemRequestBuilder.cs index 245b6aa2892..9f888592141 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/Item/SubscriptionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/Item/SubscriptionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Subscription body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Subscription body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/SubscriptionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/SubscriptionsRequestBuilder.cs index 3c4a2bd2c19..0c5d8472f3e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/SubscriptionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/List/Subscriptions/SubscriptionsRequestBuilder.cs @@ -99,7 +99,7 @@ public SubscriptionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Subscription body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Subscription body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Recent/RecentGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Recent/RecentGetResponse.cs index 607c8e0ca0c..cb1864cb067 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Recent/RecentGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Recent/RecentGetResponse.cs @@ -36,7 +36,7 @@ public partial class RecentGetResponse : global::Microsoft.Graph.Beta.Models.Bas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Recent.RecentGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Recent.RecentGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Recent/RecentResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/Recent/RecentResponse.cs index 2742dbcc2b9..d0985319473 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Recent/RecentResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Recent/RecentResponse.cs @@ -20,7 +20,7 @@ public partial class RecentResponse : global::Microsoft.Graph.Beta.Drives.Item.R /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.Recent.RecentResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.Recent.RecentResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Root/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Root/Content/ContentRequestBuilder.cs index 5fd0f2a78c1..0882b750901 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Root/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Root/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Root/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Root/ContentStream/ContentStreamRequestBuilder.cs index 030c1f1e533..285cdda1da5 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Root/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Root/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/SearchWithQ/SearchWithQGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/SearchWithQ/SearchWithQGetResponse.cs index 39a22203a61..4d4e3df7862 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/SearchWithQ/SearchWithQGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/SearchWithQ/SearchWithQGetResponse.cs @@ -36,7 +36,7 @@ public partial class SearchWithQGetResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.SearchWithQ.SearchWithQGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.SearchWithQ.SearchWithQGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/SearchWithQ/SearchWithQResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/SearchWithQ/SearchWithQResponse.cs index aa72697490c..91797b98987 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/SearchWithQ/SearchWithQResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/SearchWithQ/SearchWithQResponse.cs @@ -20,7 +20,7 @@ public partial class SearchWithQResponse : global::Microsoft.Graph.Beta.Drives.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.SearchWithQ.SearchWithQResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.SearchWithQ.SearchWithQResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/SharedWithMe/SharedWithMeGetResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/SharedWithMe/SharedWithMeGetResponse.cs index 0d5c6f67ad9..4f25e2638d8 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/SharedWithMe/SharedWithMeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/SharedWithMe/SharedWithMeGetResponse.cs @@ -36,7 +36,7 @@ public partial class SharedWithMeGetResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.SharedWithMe.SharedWithMeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.SharedWithMe.SharedWithMeGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/SharedWithMe/SharedWithMeResponse.cs b/src/Microsoft.Graph/Generated/Drives/Item/SharedWithMe/SharedWithMeResponse.cs index 8727c547d59..cf57c75c882 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/SharedWithMe/SharedWithMeResponse.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/SharedWithMe/SharedWithMeResponse.cs @@ -20,7 +20,7 @@ public partial class SharedWithMeResponse : global::Microsoft.Graph.Beta.Drives. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Drives.Item.SharedWithMe.SharedWithMeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Drives.Item.SharedWithMe.SharedWithMeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Special/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Special/Item/Content/ContentRequestBuilder.cs index 4934642fe82..b9ac798be8e 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Special/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Special/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Special/Item/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Special/Item/ContentStream/ContentStreamRequestBuilder.cs index 9f8632677cc..ef890ddbc3c 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Special/Item/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Special/Item/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/ClassesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/ClassesRequestBuilder.cs index 58991e031a5..ffc586aaea4 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/ClassesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/ClassesRequestBuilder.cs @@ -101,7 +101,7 @@ public ClassesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationClass body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationClass body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Education/Classes/Delta/DeltaGetResponse.cs index 98348ca0302..765b076ae36 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Classes.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Classes.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Education/Classes/Delta/DeltaResponse.cs index 872ad0e473e..50e5d661ecf 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Education.Clas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Classes.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Classes.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/AssignmentCategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/AssignmentCategoriesRequestBuilder.cs index 58230cdcaf8..6415ce16c3b 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/AssignmentCategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/AssignmentCategoriesRequestBuilder.cs @@ -101,7 +101,7 @@ public AssignmentCategoriesRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/Delta/DeltaGetResponse.cs index c8f28e4d0b1..c9977c0d213 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Classes.Item.AssignmentCategories.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Classes.Item.AssignmentCategories.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/Delta/DeltaResponse.cs index 2f6f6baab11..c2aeb25d90f 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Education.Clas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Classes.Item.AssignmentCategories.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Classes.Item.AssignmentCategories.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/Item/EducationCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/Item/EducationCategoryItemRequestBuilder.cs index 80f2e66c538..f4d54ae7481 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/Item/EducationCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentCategories/Item/EducationCategoryItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentDefaults/AssignmentDefaultsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentDefaults/AssignmentDefaultsRequestBuilder.cs index 7eab97e4f5b..dbc522ce27a 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentDefaults/AssignmentDefaultsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentDefaults/AssignmentDefaultsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationAssignmentDefaults body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignmentDefaults body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/AssignmentSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/AssignmentSettingsRequestBuilder.cs index 89fc019989f..bed8c163e5c 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/AssignmentSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/AssignmentSettingsRequestBuilder.cs @@ -116,7 +116,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationAssignmentSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignmentSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingCategories/GradingCategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingCategories/GradingCategoriesRequestBuilder.cs index c5400cdcebb..ada4f2ac7a6 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingCategories/GradingCategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingCategories/GradingCategoriesRequestBuilder.cs @@ -93,7 +93,7 @@ public GradingCategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationGradingCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationGradingCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingCategories/Item/EducationGradingCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingCategories/Item/EducationGradingCategoryItemRequestBuilder.cs index 45756994821..35a7e8e312b 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingCategories/Item/EducationGradingCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingCategories/Item/EducationGradingCategoryItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationGradingCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationGradingCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingSchemes/GradingSchemesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingSchemes/GradingSchemesRequestBuilder.cs index 63317b919f3..748a0fcd445 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingSchemes/GradingSchemesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingSchemes/GradingSchemesRequestBuilder.cs @@ -94,7 +94,7 @@ public GradingSchemesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationGradingScheme body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationGradingScheme body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingSchemes/Item/EducationGradingSchemeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingSchemes/Item/EducationGradingSchemeItemRequestBuilder.cs index 5284ce3ec5f..1a52cbcd6e9 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingSchemes/Item/EducationGradingSchemeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/AssignmentSettings/GradingSchemes/Item/EducationGradingSchemeItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationGradingScheme body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationGradingScheme body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/AssignmentsRequestBuilder.cs index 2a1be16016b..2359cb2e93c 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/AssignmentsRequestBuilder.cs @@ -101,7 +101,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Delta/DeltaGetResponse.cs index bea60bd92d9..72934ec828e 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Classes.Item.Assignments.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Classes.Item.Assignments.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Delta/DeltaResponse.cs index 92b1202af70..cca628bd633 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Education.Clas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Classes.Item.Assignments.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Classes.Item.Assignments.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/CategoriesRequestBuilder.cs index 98d15296b20..5a0b35579b2 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/CategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/CategoriesRequestBuilder.cs @@ -107,7 +107,7 @@ public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -149,7 +149,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/Delta/DeltaGetResponse.cs index 18698af21b7..937dea457f1 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Classes.Item.Assignments.Item.Categories.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Classes.Item.Assignments.Item.Categories.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/Delta/DeltaResponse.cs index fc316a5676f..a3883f16a6e 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Education.Clas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Classes.Item.Assignments.Item.Categories.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Classes.Item.Assignments.Item.Categories.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/Ref/RefRequestBuilder.cs index 1566b8fd7e4..769205e71c9 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Categories/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/education/classes/{educationClass%2Did}/assignments/{educationAssignment%2Did}/categories/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/EducationAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/EducationAssignmentItemRequestBuilder.cs index 45747136091..ab4db3274aa 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/EducationAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/EducationAssignmentItemRequestBuilder.cs @@ -165,7 +165,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -226,7 +226,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs index 6d1e8e4a356..0275e351e46 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public DependentResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/Item/DependentResources/Item/EducationAssignmentResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/Item/DependentResources/Item/EducationAssignmentResourceItemRequestBuilder.cs index 871f152cb3c..512b2f564be 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/Item/DependentResources/Item/EducationAssignmentResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/Item/DependentResources/Item/EducationAssignmentResourceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/Item/EducationAssignmentResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/Item/EducationAssignmentResourceItemRequestBuilder.cs index cd9c7d8427d..bef8216d84b 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/Item/EducationAssignmentResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/Item/EducationAssignmentResourceItemRequestBuilder.cs @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/ResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/ResourcesRequestBuilder.cs index 2b177b0d3d4..0438e503e77 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/ResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Resources/ResourcesRequestBuilder.cs @@ -95,7 +95,7 @@ public ResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Rubric/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Rubric/Ref/RefRequestBuilder.cs index 406553f7962..5d5afab8dcd 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Rubric/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Rubric/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate b public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Rubric/RubricRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Rubric/RubricRequestBuilder.cs index eb1c70f9e4a..5ec8957a05c 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Rubric/RubricRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Rubric/RubricRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationRubric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationRubric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/EducationSubmissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/EducationSubmissionItemRequestBuilder.cs index 2e86db2ce40..03eb9459f9d 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/EducationSubmissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/EducationSubmissionItemRequestBuilder.cs @@ -151,7 +151,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -212,7 +212,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Outcomes/Item/EducationOutcomeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Outcomes/Item/EducationOutcomeItemRequestBuilder.cs index f739e808be3..c952c5f694e 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Outcomes/Item/EducationOutcomeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Outcomes/Item/EducationOutcomeItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationOutcome body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationOutcome body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Outcomes/OutcomesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Outcomes/OutcomesRequestBuilder.cs index eea2bcff9ee..35d5821fa80 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Outcomes/OutcomesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Outcomes/OutcomesRequestBuilder.cs @@ -95,7 +95,7 @@ public OutcomesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationOutcome body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationOutcome body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs index 9aff33ca189..e820a80dd94 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public DependentResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs index b8c9b89ad78..56e85eb900e 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/Item/EducationSubmissionResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/Item/EducationSubmissionResourceItemRequestBuilder.cs index a8925904a13..db230c63b17 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/Item/EducationSubmissionResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/Item/EducationSubmissionResourceItemRequestBuilder.cs @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/ResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/ResourcesRequestBuilder.cs index 3e213d60640..9190bfaa235 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/ResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/Resources/ResourcesRequestBuilder.cs @@ -95,7 +95,7 @@ public ResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/DependentResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/DependentResourcesRequestBuilder.cs index 05b6a7ddb60..b4ac62734e1 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/DependentResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/DependentResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public DependentResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs index 077303890f5..8b766511e51 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/EducationSubmissionResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/EducationSubmissionResourceItemRequestBuilder.cs index 997c2b1b70f..895b9f75d35 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/EducationSubmissionResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/EducationSubmissionResourceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/SubmittedResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/SubmittedResourcesRequestBuilder.cs index 8df7926af9c..a9128940808 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/SubmittedResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/Item/SubmittedResources/SubmittedResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public SubmittedResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/SubmissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/SubmissionsRequestBuilder.cs index 1d8050a3a67..96b0209aa21 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/SubmissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Assignments/Item/Submissions/SubmissionsRequestBuilder.cs @@ -94,7 +94,7 @@ public SubmissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/EducationClassItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/EducationClassItemRequestBuilder.cs index bd0d77c5bab..5d4cb11177f 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/EducationClassItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/EducationClassItemRequestBuilder.cs @@ -159,7 +159,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationClass body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -220,7 +220,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationClass body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/GetRecentlyModifiedSubmissions/GetRecentlyModifiedSubmissionsGetResponse.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/GetRecentlyModifiedSubmissions/GetRecentlyModifiedSubmissionsGetResponse.cs index fe25658f037..bec634e233b 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/GetRecentlyModifiedSubmissions/GetRecentlyModifiedSubmissionsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/GetRecentlyModifiedSubmissions/GetRecentlyModifiedSubmissionsGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetRecentlyModifiedSubmissionsGetResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Classes.Item.GetRecentlyModifiedSubmissions.GetRecentlyModifiedSubmissionsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Classes.Item.GetRecentlyModifiedSubmissions.GetRecentlyModifiedSubmissionsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/GetRecentlyModifiedSubmissions/GetRecentlyModifiedSubmissionsResponse.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/GetRecentlyModifiedSubmissions/GetRecentlyModifiedSubmissionsResponse.cs index 75faba96c28..aa30a5981b4 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/GetRecentlyModifiedSubmissions/GetRecentlyModifiedSubmissionsResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/GetRecentlyModifiedSubmissions/GetRecentlyModifiedSubmissionsResponse.cs @@ -20,7 +20,7 @@ public partial class GetRecentlyModifiedSubmissionsResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Classes.Item.GetRecentlyModifiedSubmissions.GetRecentlyModifiedSubmissionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Classes.Item.GetRecentlyModifiedSubmissions.GetRecentlyModifiedSubmissionsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Members/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Members/Ref/RefRequestBuilder.cs index fef0d7c6194..e6194e05764 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Members/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Members/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/education/classes/{educationClass%2Did}/members/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/Item/EducationModuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/Item/EducationModuleItemRequestBuilder.cs index 901b8a3ca84..60da38e5c29 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/Item/EducationModuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/Item/EducationModuleItemRequestBuilder.cs @@ -129,7 +129,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationModule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -190,7 +190,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationModule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/Item/Resources/Item/EducationModuleResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/Item/Resources/Item/EducationModuleResourceItemRequestBuilder.cs index 09046c094e6..c623bc09530 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/Item/Resources/Item/EducationModuleResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/Item/Resources/Item/EducationModuleResourceItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationModuleResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationModuleResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/Item/Resources/ResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/Item/Resources/ResourcesRequestBuilder.cs index e6fcbd038bc..d88256d34b7 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/Item/Resources/ResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/Item/Resources/ResourcesRequestBuilder.cs @@ -95,7 +95,7 @@ public ResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationModuleResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationModuleResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/ModulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/ModulesRequestBuilder.cs index c08dc9de48e..578442e81ee 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/ModulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Modules/ModulesRequestBuilder.cs @@ -95,7 +95,7 @@ public ModulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationModule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationModule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Classes/Item/Teachers/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Classes/Item/Teachers/Ref/RefRequestBuilder.cs index 7f1f26c7116..357036817e2 100644 --- a/src/Microsoft.Graph/Generated/Education/Classes/Item/Teachers/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Classes/Item/Teachers/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/education/classes/{educationClass%2Did}/teachers/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/EducationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/EducationRequestBuilder.cs index 6af4f068c1a..a9afdb9f087 100644 --- a/src/Microsoft.Graph/Generated/Education/EducationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/EducationRequestBuilder.cs @@ -104,7 +104,7 @@ public EducationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.EducationRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/AssignmentsRequestBuilder.cs index 76cee22571b..474ac6411df 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/AssignmentsRequestBuilder.cs @@ -100,7 +100,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Delta/DeltaGetResponse.cs index 6a605aa2be0..a09cae2f100 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Me.Assignments.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Me.Assignments.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Delta/DeltaResponse.cs index 901580d29b1..134a2c330cb 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Education.Me.A /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Me.Assignments.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Me.Assignments.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/CategoriesRequestBuilder.cs index 9e423030c19..00dd33bdbec 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/CategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/CategoriesRequestBuilder.cs @@ -105,7 +105,7 @@ public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/Delta/DeltaGetResponse.cs index 2127e7a7de4..19f060f1190 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Me.Assignments.Item.Categories.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Me.Assignments.Item.Categories.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/Delta/DeltaResponse.cs index 0b23ab5c275..4f6f0e5f882 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Education.Me.A /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Me.Assignments.Item.Categories.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Me.Assignments.Item.Categories.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/Ref/RefRequestBuilder.cs index 7da378beb2e..c7e16efcd6e 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Categories/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/education/me/assignments/{educationAssignment%2Did}/categories/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/EducationAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/EducationAssignmentItemRequestBuilder.cs index 993f0c93ff2..c0d680a4d81 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/EducationAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/EducationAssignmentItemRequestBuilder.cs @@ -162,7 +162,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -223,7 +223,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs index 964024e52c7..5220464070d 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public DependentResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/Item/DependentResources/Item/EducationAssignmentResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/Item/DependentResources/Item/EducationAssignmentResourceItemRequestBuilder.cs index 77854a79f31..6c487d3319d 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/Item/DependentResources/Item/EducationAssignmentResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/Item/DependentResources/Item/EducationAssignmentResourceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/Item/EducationAssignmentResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/Item/EducationAssignmentResourceItemRequestBuilder.cs index 7400735f537..84a3bcc3745 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/Item/EducationAssignmentResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/Item/EducationAssignmentResourceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/ResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/ResourcesRequestBuilder.cs index e2b3ebd3840..db3f8929efc 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/ResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Resources/ResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public ResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Rubric/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Rubric/Ref/RefRequestBuilder.cs index e2f3b30518c..9c172dac2a8 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Rubric/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Rubric/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate b public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Rubric/RubricRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Rubric/RubricRequestBuilder.cs index 47eb962669c..2d4cd902daf 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Rubric/RubricRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Rubric/RubricRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationRubric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationRubric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/EducationSubmissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/EducationSubmissionItemRequestBuilder.cs index 87fbfe73541..07c82d0f8c6 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/EducationSubmissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/EducationSubmissionItemRequestBuilder.cs @@ -150,7 +150,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -211,7 +211,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Outcomes/Item/EducationOutcomeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Outcomes/Item/EducationOutcomeItemRequestBuilder.cs index af0456de122..c268c7a6642 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Outcomes/Item/EducationOutcomeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Outcomes/Item/EducationOutcomeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationOutcome body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationOutcome body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Outcomes/OutcomesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Outcomes/OutcomesRequestBuilder.cs index 5a5706e7ae3..b63393dd47c 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Outcomes/OutcomesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Outcomes/OutcomesRequestBuilder.cs @@ -93,7 +93,7 @@ public OutcomesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationOutcome body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationOutcome body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs index 2f3d7e5bae9..9e40d9af7b3 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public DependentResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs index a4d28164c35..e1a0005d3dc 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/Item/EducationSubmissionResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/Item/EducationSubmissionResourceItemRequestBuilder.cs index f39f7a4fcbe..9700461209a 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/Item/EducationSubmissionResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/Item/EducationSubmissionResourceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/ResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/ResourcesRequestBuilder.cs index e4e88a18424..2327b155043 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/ResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/Resources/ResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public ResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/DependentResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/DependentResourcesRequestBuilder.cs index cac4a1da41c..2bac0a0f764 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/DependentResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/DependentResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public DependentResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs index b367c5c27e1..d7c291b180f 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/Item/EducationSubmissionResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/Item/EducationSubmissionResourceItemRequestBuilder.cs index f2d8feae710..0b3099ef8cf 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/Item/EducationSubmissionResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/Item/EducationSubmissionResourceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/SubmittedResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/SubmittedResourcesRequestBuilder.cs index 6037df10ed9..b94af614df2 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/SubmittedResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/Item/SubmittedResources/SubmittedResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public SubmittedResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/SubmissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/SubmissionsRequestBuilder.cs index 04694479b8a..a620ace1067 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/SubmissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Assignments/Item/Submissions/SubmissionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SubmissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/MeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/MeRequestBuilder.cs index 1625b4a9a65..0c31abb2bfb 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/MeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/MeRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Rubrics/Item/EducationRubricItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Rubrics/Item/EducationRubricItemRequestBuilder.cs index 898d3ba540e..f2156181f20 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Rubrics/Item/EducationRubricItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Rubrics/Item/EducationRubricItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationRubric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationRubric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/Rubrics/RubricsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/Rubrics/RubricsRequestBuilder.cs index 4788900d485..6e3c8882c24 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/Rubrics/RubricsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/Rubrics/RubricsRequestBuilder.cs @@ -95,7 +95,7 @@ public RubricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationRubric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationRubric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Me/User/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Me/User/MailboxSettings/MailboxSettingsRequestBuilder.cs index 916881f4244..f9d1ec731a9 100644 --- a/src/Microsoft.Graph/Generated/Education/Me/User/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Me/User/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Reports/ReadingAssignmentSubmissions/Item/ReadingAssignmentSubmissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Reports/ReadingAssignmentSubmissions/Item/ReadingAssignmentSubmissionItemRequestBuilder.cs index ef389e6754a..44aef46321c 100644 --- a/src/Microsoft.Graph/Generated/Education/Reports/ReadingAssignmentSubmissions/Item/ReadingAssignmentSubmissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Reports/ReadingAssignmentSubmissions/Item/ReadingAssignmentSubmissionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ReadingAssignmentSubmission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ReadingAssignmentSubmission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Reports/ReadingAssignmentSubmissions/ReadingAssignmentSubmissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Reports/ReadingAssignmentSubmissions/ReadingAssignmentSubmissionsRequestBuilder.cs index 92828cd7a39..ebd8e4ca947 100644 --- a/src/Microsoft.Graph/Generated/Education/Reports/ReadingAssignmentSubmissions/ReadingAssignmentSubmissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Reports/ReadingAssignmentSubmissions/ReadingAssignmentSubmissionsRequestBuilder.cs @@ -94,7 +94,7 @@ public ReadingAssignmentSubmissionsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReadingAssignmentSubmission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReadingAssignmentSubmission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Reports/ReadingCoachPassages/Item/ReadingCoachPassageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Reports/ReadingCoachPassages/Item/ReadingCoachPassageItemRequestBuilder.cs index 20c56b37cf5..d813b562c39 100644 --- a/src/Microsoft.Graph/Generated/Education/Reports/ReadingCoachPassages/Item/ReadingCoachPassageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Reports/ReadingCoachPassages/Item/ReadingCoachPassageItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ReadingCoachPassage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ReadingCoachPassage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Reports/ReadingCoachPassages/ReadingCoachPassagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Reports/ReadingCoachPassages/ReadingCoachPassagesRequestBuilder.cs index cceec460ba7..efd553d73ec 100644 --- a/src/Microsoft.Graph/Generated/Education/Reports/ReadingCoachPassages/ReadingCoachPassagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Reports/ReadingCoachPassages/ReadingCoachPassagesRequestBuilder.cs @@ -94,7 +94,7 @@ public ReadingCoachPassagesRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReadingCoachPassage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReadingCoachPassage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Reports/ReflectCheckInResponses/Item/ReflectCheckInResponseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Reports/ReflectCheckInResponses/Item/ReflectCheckInResponseItemRequestBuilder.cs index c492b110fad..12049f1518e 100644 --- a/src/Microsoft.Graph/Generated/Education/Reports/ReflectCheckInResponses/Item/ReflectCheckInResponseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Reports/ReflectCheckInResponses/Item/ReflectCheckInResponseItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ReflectCheckInResponse body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ReflectCheckInResponse body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Reports/ReflectCheckInResponses/ReflectCheckInResponsesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Reports/ReflectCheckInResponses/ReflectCheckInResponsesRequestBuilder.cs index e1f092c8316..2a96e21c3d5 100644 --- a/src/Microsoft.Graph/Generated/Education/Reports/ReflectCheckInResponses/ReflectCheckInResponsesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Reports/ReflectCheckInResponses/ReflectCheckInResponsesRequestBuilder.cs @@ -94,7 +94,7 @@ public ReflectCheckInResponsesRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReflectCheckInResponse body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReflectCheckInResponse body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Reports/ReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Reports/ReportsRequestBuilder.cs index e1f190238c7..d1f1fbd98d4 100644 --- a/src/Microsoft.Graph/Generated/Education/Reports/ReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Reports/ReportsRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ReportsRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ReportsRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Reports/SpeakerAssignmentSubmissions/Item/SpeakerAssignmentSubmissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Reports/SpeakerAssignmentSubmissions/Item/SpeakerAssignmentSubmissionItemRequestBuilder.cs index 70e89655f60..428d2fecdca 100644 --- a/src/Microsoft.Graph/Generated/Education/Reports/SpeakerAssignmentSubmissions/Item/SpeakerAssignmentSubmissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Reports/SpeakerAssignmentSubmissions/Item/SpeakerAssignmentSubmissionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SpeakerAssignmentSubmission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SpeakerAssignmentSubmission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Reports/SpeakerAssignmentSubmissions/SpeakerAssignmentSubmissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Reports/SpeakerAssignmentSubmissions/SpeakerAssignmentSubmissionsRequestBuilder.cs index 959a91ea83a..33d6d361759 100644 --- a/src/Microsoft.Graph/Generated/Education/Reports/SpeakerAssignmentSubmissions/SpeakerAssignmentSubmissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Reports/SpeakerAssignmentSubmissions/SpeakerAssignmentSubmissionsRequestBuilder.cs @@ -94,7 +94,7 @@ public SpeakerAssignmentSubmissionsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SpeakerAssignmentSubmission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SpeakerAssignmentSubmission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Schools/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Education/Schools/Delta/DeltaGetResponse.cs index 2b8e977e05d..6f615662b09 100644 --- a/src/Microsoft.Graph/Generated/Education/Schools/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Schools/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Schools.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Schools.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Education/Schools/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Education/Schools/Delta/DeltaResponse.cs index 49ed6a94261..450b5c9e79f 100644 --- a/src/Microsoft.Graph/Generated/Education/Schools/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Schools/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Education.Scho /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Schools.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Schools.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Education/Schools/Item/AdministrativeUnit/AdministrativeUnitRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Schools/Item/AdministrativeUnit/AdministrativeUnitRequestBuilder.cs index 7a9806cff70..045620731d0 100644 --- a/src/Microsoft.Graph/Generated/Education/Schools/Item/AdministrativeUnit/AdministrativeUnitRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Schools/Item/AdministrativeUnit/AdministrativeUnitRequestBuilder.cs @@ -75,7 +75,7 @@ public AdministrativeUnitRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.AdministrativeUnit body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -117,7 +117,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AdministrativeUnit body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Schools/Item/Classes/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Schools/Item/Classes/Ref/RefRequestBuilder.cs index ab4759d296a..0359b3abf36 100644 --- a/src/Microsoft.Graph/Generated/Education/Schools/Item/Classes/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Schools/Item/Classes/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/education/schools/{educationSchool%2Did}/classes/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Schools/Item/EducationSchoolItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Schools/Item/EducationSchoolItemRequestBuilder.cs index 6f622352798..c5f3d0e72be 100644 --- a/src/Microsoft.Graph/Generated/Education/Schools/Item/EducationSchoolItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Schools/Item/EducationSchoolItemRequestBuilder.cs @@ -117,7 +117,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSchool body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -178,7 +178,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSchool body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Schools/Item/Users/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Schools/Item/Users/Ref/RefRequestBuilder.cs index b91f7a2d8f7..4ac12e8dd33 100644 --- a/src/Microsoft.Graph/Generated/Education/Schools/Item/Users/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Schools/Item/Users/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/education/schools/{educationSchool%2Did}/users/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Schools/SchoolsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Schools/SchoolsRequestBuilder.cs index 99d8c2b6657..7648c819acf 100644 --- a/src/Microsoft.Graph/Generated/Education/Schools/SchoolsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Schools/SchoolsRequestBuilder.cs @@ -101,7 +101,7 @@ public SchoolsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSchool body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSchool body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Education/Users/Delta/DeltaGetResponse.cs index 1be9525e28b..6c419c96ef3 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Users.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Users.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Education/Users/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Education/Users/Delta/DeltaResponse.cs index 49a32f4cc15..8be3d210a97 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Education.User /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Users.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Users.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/AssignmentsRequestBuilder.cs index ba64bf9086e..be495974b83 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/AssignmentsRequestBuilder.cs @@ -100,7 +100,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Delta/DeltaGetResponse.cs index 4f87de2c440..6ca9e485ad1 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Users.Item.Assignments.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Users.Item.Assignments.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Delta/DeltaResponse.cs index 1b05dfd876e..b87f83ceee5 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Education.User /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Users.Item.Assignments.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Users.Item.Assignments.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/CategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/CategoriesRequestBuilder.cs index 8de65d434e1..6cb1d578174 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/CategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/CategoriesRequestBuilder.cs @@ -105,7 +105,7 @@ public CategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/Delta/DeltaGetResponse.cs index 388004c8b25..adfdc435055 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Users.Item.Assignments.Item.Categories.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Users.Item.Assignments.Item.Categories.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/Delta/DeltaResponse.cs index 69879b76081..9a77efb7eb0 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Education.User /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Education.Users.Item.Assignments.Item.Categories.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Education.Users.Item.Assignments.Item.Categories.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/Ref/RefRequestBuilder.cs index 2ec670ce0a3..af76cf29c5a 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Categories/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/education/users/{educationUser%2Did}/assignments/{educationAssignment%2Did}/categories/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/EducationAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/EducationAssignmentItemRequestBuilder.cs index 0c579d00dda..bda60c0b95c 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/EducationAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/EducationAssignmentItemRequestBuilder.cs @@ -162,7 +162,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -223,7 +223,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs index beb83239cfe..6bf018d91b9 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public DependentResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/Item/DependentResources/Item/EducationAssignmentResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/Item/DependentResources/Item/EducationAssignmentResourceItemRequestBuilder.cs index ce117ee4114..b4e4798df73 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/Item/DependentResources/Item/EducationAssignmentResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/Item/DependentResources/Item/EducationAssignmentResourceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/Item/EducationAssignmentResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/Item/EducationAssignmentResourceItemRequestBuilder.cs index 916aefe3470..5d0ddd7950e 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/Item/EducationAssignmentResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/Item/EducationAssignmentResourceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/ResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/ResourcesRequestBuilder.cs index f2aebd6f953..7eb3bb8acec 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/ResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Resources/ResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public ResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationAssignmentResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Rubric/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Rubric/Ref/RefRequestBuilder.cs index a8f7475fd18..8512719d8a2 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Rubric/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Rubric/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate b public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Rubric/RubricRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Rubric/RubricRequestBuilder.cs index 90ed9818da5..38bfb4d7afc 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Rubric/RubricRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Rubric/RubricRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationRubric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationRubric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/EducationSubmissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/EducationSubmissionItemRequestBuilder.cs index 064a4fed54c..6449e6ba4a6 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/EducationSubmissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/EducationSubmissionItemRequestBuilder.cs @@ -150,7 +150,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -211,7 +211,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Outcomes/Item/EducationOutcomeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Outcomes/Item/EducationOutcomeItemRequestBuilder.cs index e5b77a03a0d..b4c930c064c 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Outcomes/Item/EducationOutcomeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Outcomes/Item/EducationOutcomeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationOutcome body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationOutcome body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Outcomes/OutcomesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Outcomes/OutcomesRequestBuilder.cs index 88a9e11a3cf..ba25801e283 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Outcomes/OutcomesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Outcomes/OutcomesRequestBuilder.cs @@ -93,7 +93,7 @@ public OutcomesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationOutcome body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationOutcome body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs index 4f639d3da32..e1b4acb0fcd 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/DependentResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public DependentResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs index 281c39cd02a..d3d691f4659 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/Item/EducationSubmissionResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/Item/EducationSubmissionResourceItemRequestBuilder.cs index 10f23ed8cdd..1769e605508 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/Item/EducationSubmissionResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/Item/EducationSubmissionResourceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/ResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/ResourcesRequestBuilder.cs index 0689cf5782f..051fa69e933 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/ResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/Resources/ResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public ResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/DependentResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/DependentResourcesRequestBuilder.cs index 2f9d77bfe92..b6aebfd2c4b 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/DependentResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/DependentResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public DependentResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs index a377d3b0cdd..9dcef516e62 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/DependentResources/Item/EducationSubmissionResourceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/EducationSubmissionResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/EducationSubmissionResourceItemRequestBuilder.cs index de76cc42927..f6eee5f55f7 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/EducationSubmissionResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/Item/EducationSubmissionResourceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/SubmittedResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/SubmittedResourcesRequestBuilder.cs index f67144c43ef..1f1224eedcf 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/SubmittedResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/Item/SubmittedResources/SubmittedResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public SubmittedResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmissionResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/SubmissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/SubmissionsRequestBuilder.cs index 1a566d62354..be1f117f06a 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/SubmissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Assignments/Item/Submissions/SubmissionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SubmissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationSubmission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationSubmission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/EducationUserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/EducationUserItemRequestBuilder.cs index e31b53b0180..53e119d2b25 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/EducationUserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/EducationUserItemRequestBuilder.cs @@ -118,8 +118,8 @@ public async Task DeleteAsync(Action(requestInfo, global::Microsoft.Graph.Beta.Models.EducationUser.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of an educationuser object. - /// Find more info here + /// Update the relatedContact collection of an educationUser object. + /// Find more info here /// /// A /// The request body @@ -135,7 +135,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -182,7 +182,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of an educationuser object. + /// Update the relatedContact collection of an educationUser object. /// /// A /// The request body @@ -196,7 +196,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Rubrics/Item/EducationRubricItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Rubrics/Item/EducationRubricItemRequestBuilder.cs index 976a948ba09..13c133d35f3 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Rubrics/Item/EducationRubricItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Rubrics/Item/EducationRubricItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationRubric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationRubric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/Rubrics/RubricsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/Rubrics/RubricsRequestBuilder.cs index 2305a6e84fa..2c5870f8b3f 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/Rubrics/RubricsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/Rubrics/RubricsRequestBuilder.cs @@ -93,7 +93,7 @@ public RubricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationRubric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationRubric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs index df070fed12f..58dd9583aea 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Education/Users/UsersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Education/Users/UsersRequestBuilder.cs index 8671e5e6bcd..51bd0dfe52c 100644 --- a/src/Microsoft.Graph/Generated/Education/Users/UsersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Education/Users/UsersRequestBuilder.cs @@ -101,7 +101,7 @@ public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/Communities/CommunitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/Communities/CommunitiesRequestBuilder.cs index d0bbfaae962..a9bde77fc88 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/Communities/CommunitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/Communities/CommunitiesRequestBuilder.cs @@ -95,7 +95,7 @@ public CommunitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Community body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Community body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/Communities/Item/CommunityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/Communities/Item/CommunityItemRequestBuilder.cs index b3e957e770f..9bfc6fc231f 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/Communities/Item/CommunityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/Communities/Item/CommunityItemRequestBuilder.cs @@ -122,7 +122,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Community body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -183,7 +183,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Community body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/Communities/Item/Owners/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/Communities/Item/Owners/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs index a2938b0f902..e97e54baa78 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/Communities/Item/Owners/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/Communities/Item/Owners/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/EmployeeExperienceRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/EmployeeExperienceRequestBuilder.cs index 4e24ac1eaf2..1650807d759 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/EmployeeExperienceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/EmployeeExperienceRequestBuilder.cs @@ -121,7 +121,7 @@ public EmployeeExperienceRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.EmployeeExperience body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EmployeeExperience body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/EngagementAsyncOperations/EngagementAsyncOperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/EngagementAsyncOperations/EngagementAsyncOperationsRequestBuilder.cs index 6a8ed2d6a4a..b5a92138ae5 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/EngagementAsyncOperations/EngagementAsyncOperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/EngagementAsyncOperations/EngagementAsyncOperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public EngagementAsyncOperationsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EngagementAsyncOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementAsyncOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/EngagementAsyncOperations/Item/EngagementAsyncOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/EngagementAsyncOperations/Item/EngagementAsyncOperationItemRequestBuilder.cs index 38e3e60afe5..950cb978257 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/EngagementAsyncOperations/Item/EngagementAsyncOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/EngagementAsyncOperations/Item/EngagementAsyncOperationItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EngagementAsyncOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementAsyncOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/ExportJobs/ExportJobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/ExportJobs/ExportJobsRequestBuilder.cs index 0aed0a26a3c..4bb3a22f211 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/ExportJobs/ExportJobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/ExportJobs/ExportJobsRequestBuilder.cs @@ -95,7 +95,7 @@ public ExportJobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GoalsExportJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GoalsExportJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/ExportJobs/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/ExportJobs/Item/Content/ContentRequestBuilder.cs index b56ab707876..4a87b7b07b8 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/ExportJobs/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/ExportJobs/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/ExportJobs/Item/GoalsExportJobItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/ExportJobs/Item/GoalsExportJobItemRequestBuilder.cs index b0cf8da3bfc..74cd681f898 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/ExportJobs/Item/GoalsExportJobItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/ExportJobs/Item/GoalsExportJobItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GoalsExportJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GoalsExportJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/GoalsRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/GoalsRequestBuilder.cs index 2a0d9a4911d..ca7e9e53e41 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/GoalsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/Goals/GoalsRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Goals body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Goals body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs index 9fae8c0c58f..cf1b8668886 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.LearningCourseActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.LearningCourseActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs index dd80cb2ddf1..b888c40dba7 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs @@ -93,7 +93,7 @@ public LearningCourseActivitiesRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.LearningCourseActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.LearningCourseActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivitiesWithExternalcourseActivityId/LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivitiesWithExternalcourseActivityId/LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder.cs index 863e0232ff7..6bd933abd28 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivitiesWithExternalcourseActivityId/LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningCourseActivitiesWithExternalcourseActivityId/LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.LearningCourseActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.LearningCourseActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningContents/Item/LearningContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningContents/Item/LearningContentItemRequestBuilder.cs index 70ac60634b1..d5b58140409 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningContents/Item/LearningContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningContents/Item/LearningContentItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.LearningContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.LearningContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningContents/LearningContentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningContents/LearningContentsRequestBuilder.cs index 252b3e8682c..f9183fd4033 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningContents/LearningContentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningContents/LearningContentsRequestBuilder.cs @@ -94,7 +94,7 @@ public LearningContentsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.LearningContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.LearningContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningContentsWithExternalId/LearningContentsWithExternalIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningContentsWithExternalId/LearningContentsWithExternalIdRequestBuilder.cs index 5967211d624..0b859dabfd8 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningContentsWithExternalId/LearningContentsWithExternalIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningContentsWithExternalId/LearningContentsWithExternalIdRequestBuilder.cs @@ -101,7 +101,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.LearningContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.LearningContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs index 7d8ca2253bd..80630ab157d 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/Item/LearningCourseActivityItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.LearningCourseActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.LearningCourseActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs index 6291acea6bd..9559f6bfa1b 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivities/LearningCourseActivitiesRequestBuilder.cs @@ -95,7 +95,7 @@ public LearningCourseActivitiesRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.LearningCourseActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.LearningCourseActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivitiesWithExternalcourseActivityId/LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivitiesWithExternalcourseActivityId/LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder.cs index 018cbe97b58..8481e8ca235 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivitiesWithExternalcourseActivityId/LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningCourseActivitiesWithExternalcourseActivityId/LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder.cs @@ -100,7 +100,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.LearningCourseActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -161,7 +161,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.LearningCourseActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningProviderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningProviderItemRequestBuilder.cs index 4501268c45f..09fcf07f211 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningProviderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/Item/LearningProviderItemRequestBuilder.cs @@ -133,7 +133,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.LearningProvider body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -194,7 +194,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.LearningProvider body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/LearningProvidersRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/LearningProvidersRequestBuilder.cs index 6574e12dc8c..0d06fba0be1 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/LearningProvidersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/LearningProviders/LearningProvidersRequestBuilder.cs @@ -95,7 +95,7 @@ public LearningProvidersRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.LearningProvider body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.LearningProvider body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/EngagementRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/EngagementRoleItemRequestBuilder.cs index ea97f9b077f..cb987890125 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/EngagementRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/EngagementRoleItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EngagementRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/Members/Item/EngagementRoleMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/Members/Item/EngagementRoleMemberItemRequestBuilder.cs index f0b4362bc28..95bc89c4c1c 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/Members/Item/EngagementRoleMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/Members/Item/EngagementRoleMemberItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EngagementRoleMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementRoleMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/Members/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/Members/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs index 1f193275794..0c410bf8834 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/Members/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/Members/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/Members/MembersRequestBuilder.cs index 7b0e10951e2..d19d78f8d57 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/Item/Members/MembersRequestBuilder.cs @@ -95,7 +95,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EngagementRoleMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementRoleMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/RolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/RolesRequestBuilder.cs index 3c566f5647e..08fd1cf8364 100644 --- a/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/RolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/EmployeeExperience/Roles/RolesRequestBuilder.cs @@ -94,7 +94,7 @@ public RolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EngagementRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/AuthorizationSystems/AuthorizationSystemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/AuthorizationSystems/AuthorizationSystemsRequestBuilder.cs index 32c9ff379ce..8f1eaa589c7 100644 --- a/src/Microsoft.Graph/Generated/External/AuthorizationSystems/AuthorizationSystemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/AuthorizationSystems/AuthorizationSystemsRequestBuilder.cs @@ -94,7 +94,7 @@ public AuthorizationSystemsRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthorizationSystem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthorizationSystem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/AuthorizationSystems/Item/AuthorizationSystemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/AuthorizationSystems/Item/AuthorizationSystemItemRequestBuilder.cs index 5fe0eea871a..015f6716cdc 100644 --- a/src/Microsoft.Graph/Generated/External/AuthorizationSystems/Item/AuthorizationSystemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/AuthorizationSystems/Item/AuthorizationSystemItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthorizationSystem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthorizationSystem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/AuthorizationSystems/Item/DataCollectionInfo/DataCollectionInfoRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/AuthorizationSystems/Item/DataCollectionInfo/DataCollectionInfoRequestBuilder.cs index aa48c054531..ac686bb9998 100644 --- a/src/Microsoft.Graph/Generated/External/AuthorizationSystems/Item/DataCollectionInfo/DataCollectionInfoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/AuthorizationSystems/Item/DataCollectionInfo/DataCollectionInfoRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DataCollectionInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DataCollectionInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/ConnectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/ConnectionsRequestBuilder.cs index 9e562b195c2..fbe87445a28 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/ConnectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/ConnectionsRequestBuilder.cs @@ -95,7 +95,7 @@ public ConnectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalConnection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalConnection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/ExternalConnectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/ExternalConnectionItemRequestBuilder.cs index ae354fcfb76..a521837d7c1 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/ExternalConnectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/ExternalConnectionItemRequestBuilder.cs @@ -129,7 +129,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalConnection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -190,7 +190,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalConnection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/GroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/GroupsRequestBuilder.cs index 5ec7705b920..39a7f5b26b3 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/GroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/GroupsRequestBuilder.cs @@ -94,7 +94,7 @@ public GroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/Item/ExternalGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/Item/ExternalGroupItemRequestBuilder.cs index 87dabdd6bbb..c89f2f8bb54 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/Item/ExternalGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/Item/ExternalGroupItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/Item/Members/Item/IdentityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/Item/Members/Item/IdentityItemRequestBuilder.cs index 8f0c1813fe2..6de82347f24 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/Item/Members/Item/IdentityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/Item/Members/Item/IdentityItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.Identity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.Identity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/Item/Members/MembersRequestBuilder.cs index 52cd84ae6df..5f9f191c9a8 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Groups/Item/Members/MembersRequestBuilder.cs @@ -94,7 +94,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.Identity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.Identity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/Activities/ActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/Activities/ActivitiesRequestBuilder.cs index 7f51d67a70f..68c2d7853cf 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/Activities/ActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/Activities/ActivitiesRequestBuilder.cs @@ -93,7 +93,7 @@ public ActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/Activities/Item/ExternalActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/Activities/Item/ExternalActivityItemRequestBuilder.cs index ce761fe64ef..4593fee30a3 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/Activities/Item/ExternalActivityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/Activities/Item/ExternalActivityItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/ExternalItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/ExternalItemItemRequestBuilder.cs index ab0b19960cb..65d8d242d01 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/ExternalItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/ExternalItemItemRequestBuilder.cs @@ -94,8 +94,8 @@ public async Task DeleteAsync(Action(requestInfo, global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItem.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new externalItem. This API can be used to create a custom item. The containing externalConnection must have a schema registered of the corresponding type. - /// Find more info here + /// Update the properties of an externalitem. + /// Find more info here /// /// A /// The request body @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PutAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new externalItem. This API can be used to create a custom item. The containing externalConnection must have a schema registered of the corresponding type. + /// Update the properties of an externalitem. /// /// A /// The request body @@ -172,7 +172,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostRequestBody.cs index 34f546511b8..7261a6e5bc9 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostRequestBody.cs @@ -53,7 +53,7 @@ public AddActivitiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.External.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.External.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("activities", Activities); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostResponse.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostResponse.cs index edce20275c0..312735b173a 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostResponse.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesPostResponse.cs @@ -37,7 +37,7 @@ public partial class AddActivitiesPostResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.External.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.External.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesPostResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesResponse.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesResponse.cs index 261a419c5cf..1987e74aa68 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesResponse.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/AddActivitiesResponse.cs @@ -20,7 +20,7 @@ public partial class AddActivitiesResponse : global::Microsoft.Graph.Beta.Extern /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.External.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.External.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder.cs index b65dbf8b317..fbedc861ddb 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/Item/MicrosoftGraphExternalConnectorsAddActivities/MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder.cs @@ -50,7 +50,7 @@ public MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder(string rawUrl public async Task PostAsAddActivitiesPostResponseAsync(global::Microsoft.Graph.Beta.External.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public MicrosoftGraphExternalConnectorsAddActivitiesRequestBuilder(string rawUrl public async Task PostAsync(global::Microsoft.Graph.Beta.External.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.External.Connections.Item.Items.Item.MicrosoftGraphExternalConnectorsAddActivities.AddActivitiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/ItemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/ItemsRequestBuilder.cs index 5fb07c2c1cf..6672565fb0b 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Items/ItemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Items/ItemsRequestBuilder.cs @@ -93,7 +93,7 @@ public ItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Operations/Item/ConnectionOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Operations/Item/ConnectionOperationItemRequestBuilder.cs index ca6d189b905..dabadcba08e 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Operations/Item/ConnectionOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Operations/Item/ConnectionOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Operations/OperationsRequestBuilder.cs index 4aff6136ea5..81f75f199ec 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Quota/QuotaRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Quota/QuotaRequestBuilder.cs index 99269d5aa2f..14035b4bbc1 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Quota/QuotaRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Quota/QuotaRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionQuota body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionQuota body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/Connections/Item/Schema/SchemaRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/Connections/Item/Schema/SchemaRequestBuilder.cs index ab6ac4da659..76b7a749ab7 100644 --- a/src/Microsoft.Graph/Generated/External/Connections/Item/Schema/SchemaRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/Connections/Item/Schema/SchemaRequestBuilder.cs @@ -59,8 +59,8 @@ public SchemaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.ExternalConnectors.Schema.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new or update an existing schema for a Microsoft Search connection. - /// Find more info here + /// Update the properties of a schema for an externalConnection. + /// Find more info here /// /// A /// The request body @@ -76,7 +76,7 @@ public SchemaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.Schema body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -104,7 +104,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new or update an existing schema for a Microsoft Search connection. + /// Update the properties of a schema for an externalConnection. /// /// A /// The request body @@ -118,7 +118,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.Schema body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/ExternalRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/ExternalRequestBuilder.cs index 1a97390cb29..0c1046eb1bb 100644 --- a/src/Microsoft.Graph/Generated/External/ExternalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/ExternalRequestBuilder.cs @@ -92,7 +92,7 @@ public ExternalRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalConnectors.External body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -134,7 +134,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalConnectors.External body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/DataConnectorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/DataConnectorsRequestBuilder.cs index 19e50f7f6d1..c502c1fc693 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/DataConnectorsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/DataConnectorsRequestBuilder.cs @@ -95,7 +95,7 @@ public DataConnectorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Item/IndustryDataConnectorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Item/IndustryDataConnectorItemRequestBuilder.cs index 57b17067c12..d6ecbaf924c 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Item/IndustryDataConnectorItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/DataConnectors/Item/IndustryDataConnectorItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/InboundFlowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/InboundFlowsRequestBuilder.cs index 46df9537b2a..1584a9c6277 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/InboundFlowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/InboundFlowsRequestBuilder.cs @@ -78,8 +78,8 @@ public InboundFlowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.IndustryData.InboundFlowCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new inboundFileFlow object. - /// Find more info here + /// Create a new inboundApiFlow object. + /// Find more info here /// /// A /// The request body @@ -95,7 +95,7 @@ public InboundFlowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IndustryData.InboundFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -123,7 +123,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new inboundFileFlow object. + /// Create a new inboundApiFlow object. /// /// A /// The request body @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.InboundFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Item/InboundFlowItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Item/InboundFlowItemRequestBuilder.cs index 3ee92cf086e..4f1711295c5 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Item/InboundFlowItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/InboundFlows/Item/InboundFlowItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IndustryData.InboundFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.InboundFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Operations/Item/LongRunningOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Operations/Item/LongRunningOperationItemRequestBuilder.cs index bceaecc520d..38197f34bb3 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/Operations/Item/LongRunningOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Operations/Item/LongRunningOperationItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.LongRunningOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.LongRunningOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Operations/OperationsRequestBuilder.cs index f33824dbbba..c55ec856bb7 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Operations/OperationsRequestBuilder.cs @@ -94,7 +94,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.LongRunningOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.LongRunningOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/Item/OutboundProvisioningFlowSetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/Item/OutboundProvisioningFlowSetItemRequestBuilder.cs index f731550819c..9e101e15fcd 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/Item/OutboundProvisioningFlowSetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/Item/OutboundProvisioningFlowSetItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IndustryData.OutboundProvisioningFlowSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.OutboundProvisioningFlowSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/Item/ProvisioningFlows/Item/ProvisioningFlowItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/Item/ProvisioningFlows/Item/ProvisioningFlowItemRequestBuilder.cs index 95aa5cd3978..c3c67154cc5 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/Item/ProvisioningFlows/Item/ProvisioningFlowItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/Item/ProvisioningFlows/Item/ProvisioningFlowItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IndustryData.ProvisioningFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.ProvisioningFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/Item/ProvisioningFlows/ProvisioningFlowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/Item/ProvisioningFlows/ProvisioningFlowsRequestBuilder.cs index 1aa1dcbbc25..dc830337eae 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/Item/ProvisioningFlows/ProvisioningFlowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/Item/ProvisioningFlows/ProvisioningFlowsRequestBuilder.cs @@ -94,7 +94,7 @@ public ProvisioningFlowsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IndustryData.ProvisioningFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.ProvisioningFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/OutboundProvisioningFlowSetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/OutboundProvisioningFlowSetsRequestBuilder.cs index 73bf486d52c..25a375d0c1d 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/OutboundProvisioningFlowSetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/OutboundProvisioningFlowSets/OutboundProvisioningFlowSetsRequestBuilder.cs @@ -94,7 +94,7 @@ public OutboundProvisioningFlowSetsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IndustryData.OutboundProvisioningFlowSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.OutboundProvisioningFlowSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/Item/ReferenceDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/Item/ReferenceDefinitionItemRequestBuilder.cs index 7002efc1ca7..070c1364883 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/Item/ReferenceDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/Item/ReferenceDefinitionItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IndustryData.ReferenceDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.ReferenceDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/ReferenceDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/ReferenceDefinitionsRequestBuilder.cs index 8d1420a0e4c..10fb204b02a 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/ReferenceDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/ReferenceDefinitions/ReferenceDefinitionsRequestBuilder.cs @@ -95,7 +95,7 @@ public ReferenceDefinitionsRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IndustryData.ReferenceDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.ReferenceDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/Item/RoleGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/Item/RoleGroupItemRequestBuilder.cs index d4595496c8d..fd9d4f049f8 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/Item/RoleGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/Item/RoleGroupItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IndustryData.RoleGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.RoleGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/RoleGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/RoleGroupsRequestBuilder.cs index 02228897aea..29a50a5db72 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/RoleGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/RoleGroups/RoleGroupsRequestBuilder.cs @@ -94,7 +94,7 @@ public RoleGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IndustryData.RoleGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.RoleGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/Item/SourceSystemDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/Item/SourceSystemDefinitionItemRequestBuilder.cs index aa188ef91ab..0f0790d769b 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/Item/SourceSystemDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/Item/SourceSystemDefinitionItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IndustryData.SourceSystemDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.SourceSystemDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/SourceSystemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/SourceSystemsRequestBuilder.cs index 50d6efad588..b9d852b1572 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/SourceSystemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/SourceSystems/SourceSystemsRequestBuilder.cs @@ -95,7 +95,7 @@ public SourceSystemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IndustryData.SourceSystemDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.SourceSystemDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Years/Item/YearTimePeriodDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Years/Item/YearTimePeriodDefinitionItemRequestBuilder.cs index ec48766cd3f..bdad7f14c3d 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/Years/Item/YearTimePeriodDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Years/Item/YearTimePeriodDefinitionItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IndustryData.YearTimePeriodDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.YearTimePeriodDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/External/IndustryData/Years/YearsRequestBuilder.cs b/src/Microsoft.Graph/Generated/External/IndustryData/Years/YearsRequestBuilder.cs index a617eb03c17..3f04b9464ed 100644 --- a/src/Microsoft.Graph/Generated/External/IndustryData/Years/YearsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/External/IndustryData/Years/YearsRequestBuilder.cs @@ -95,7 +95,7 @@ public YearsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IndustryData.YearTimePeriodDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IndustryData.YearTimePeriodDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/FilterOperators/FilterOperatorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/FilterOperators/FilterOperatorsRequestBuilder.cs index 8399b71a870..886de29ef61 100644 --- a/src/Microsoft.Graph/Generated/FilterOperators/FilterOperatorsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/FilterOperators/FilterOperatorsRequestBuilder.cs @@ -93,7 +93,7 @@ public FilterOperatorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.FilterOperatorSchema body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.FilterOperatorSchema body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/FilterOperators/Item/FilterOperatorSchemaItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/FilterOperators/Item/FilterOperatorSchemaItemRequestBuilder.cs index 36530c37bc6..62611eb85ef 100644 --- a/src/Microsoft.Graph/Generated/FilterOperators/Item/FilterOperatorSchemaItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/FilterOperators/Item/FilterOperatorSchemaItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.FilterOperatorSchema body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.FilterOperatorSchema body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/FilteringPolicies/FilteringPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/FilteringPolicies/FilteringPoliciesRequestBuilder.cs index 13e043360c6..1ccbf8d70e7 100644 --- a/src/Microsoft.Graph/Generated/FilteringPolicies/FilteringPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/FilteringPolicies/FilteringPoliciesRequestBuilder.cs @@ -93,7 +93,7 @@ public FilteringPoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/FilteringPolicies/Item/FilteringPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/FilteringPolicies/Item/FilteringPolicyItemRequestBuilder.cs index 4bb60d1a489..23871b74566 100644 --- a/src/Microsoft.Graph/Generated/FilteringPolicies/Item/FilteringPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/FilteringPolicies/Item/FilteringPolicyItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/FilteringPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/FilteringPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs index fc9ea4a458b..a984182caa1 100644 --- a/src/Microsoft.Graph/Generated/FilteringPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/FilteringPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/FilteringPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/FilteringPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs index f3a68e68a46..89fc905af18 100644 --- a/src/Microsoft.Graph/Generated/FilteringPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/FilteringPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs @@ -93,7 +93,7 @@ public PolicyRulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CompanyInformation/Item/CompanyInformationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CompanyInformation/Item/CompanyInformationItemRequestBuilder.cs index 1d0fa918fb7..7659137b890 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CompanyInformation/Item/CompanyInformationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CompanyInformation/Item/CompanyInformationItemRequestBuilder.cs @@ -80,7 +80,7 @@ public CompanyInformationItemRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.CompanyInformation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -122,7 +122,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CompanyInformation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CompanyInformation/Item/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CompanyInformation/Item/Picture/PictureRequestBuilder.cs index a040f18806e..ab6e8a9592c 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CompanyInformation/Item/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CompanyInformation/Item/Picture/PictureRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CountriesRegions/CountriesRegionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CountriesRegions/CountriesRegionsRequestBuilder.cs index 38179c52ddf..dde33ab028a 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CountriesRegions/CountriesRegionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CountriesRegions/CountriesRegionsRequestBuilder.cs @@ -106,7 +106,7 @@ public CountriesRegionsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CountryRegion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CountryRegion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CountriesRegions/Item/CountryRegionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CountriesRegions/Item/CountryRegionItemRequestBuilder.cs index c09307d1dec..628345964f8 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CountriesRegions/Item/CountryRegionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CountriesRegions/Item/CountryRegionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CountryRegion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CountryRegion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Currencies/CurrenciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Currencies/CurrenciesRequestBuilder.cs index d9fd53ff0e9..4dc27e4ea14 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Currencies/CurrenciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Currencies/CurrenciesRequestBuilder.cs @@ -106,7 +106,7 @@ public CurrenciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Currencies/Item/CurrencyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Currencies/Item/CurrencyItemRequestBuilder.cs index 0813457775f..b6c6b7ea55a 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Currencies/Item/CurrencyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Currencies/Item/CurrencyItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/CustomerPaymentJournalsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/CustomerPaymentJournalsRequestBuilder.cs index 350149c532a..d8ea1175909 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/CustomerPaymentJournalsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/CustomerPaymentJournalsRequestBuilder.cs @@ -106,7 +106,7 @@ public CustomerPaymentJournalsRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomerPaymentJournal body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomerPaymentJournal body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPaymentJournalItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPaymentJournalItemRequestBuilder.cs index 1ad1720c4cf..ff75f721731 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPaymentJournalItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPaymentJournalItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomerPaymentJournal body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomerPaymentJournal body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/CustomerPaymentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/CustomerPaymentsRequestBuilder.cs index 9c0550015c6..5299f602c88 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/CustomerPaymentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/CustomerPaymentsRequestBuilder.cs @@ -106,7 +106,7 @@ public CustomerPaymentsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomerPayment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomerPayment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Currency/CurrencyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Currency/CurrencyRequestBuilder.cs index 2e603afa5d6..e2c86a6cc04 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Currency/CurrencyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Currency/CurrencyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/CustomerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/CustomerRequestBuilder.cs index 8b3898de827..f96a2785cc3 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/CustomerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/CustomerRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs index 2f872fb18dc..082418b185e 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs index 0a1913e6b84..edc113a86c3 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs index 19676bf57c9..c11954f073f 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs index 7e9d8351110..515313e5e73 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Picture/PictureRequestBuilder.cs index 62d05ec20cf..1a7f91e2764 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs index edf4c1408ac..a37e84dc5e4 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/CustomerPaymentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/CustomerPaymentItemRequestBuilder.cs index c55a168db0b..1c9a4fcd611 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/CustomerPaymentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPaymentJournals/Item/CustomerPayments/Item/CustomerPaymentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomerPayment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomerPayment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/CustomerPaymentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/CustomerPaymentsRequestBuilder.cs index d2c205589ef..cf258dbcf66 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/CustomerPaymentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/CustomerPaymentsRequestBuilder.cs @@ -106,7 +106,7 @@ public CustomerPaymentsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomerPayment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomerPayment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Currency/CurrencyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Currency/CurrencyRequestBuilder.cs index 505291b2c75..981c64239c2 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Currency/CurrencyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Currency/CurrencyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/CustomerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/CustomerRequestBuilder.cs index 052e012626a..e1d9ac13847 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/CustomerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/CustomerRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs index 7e2619ea914..85c5a9e9948 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs index 3d3b1c41e95..2a85975f7b9 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs index 98b0006208d..363332afea7 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs index bba106881e2..95949e3fbaa 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Picture/PictureRequestBuilder.cs index 34270401e5b..34df8af2505 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs index a950908c2c1..452b3b6cbbb 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/CustomerPaymentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/CustomerPaymentItemRequestBuilder.cs index 71468e4b397..c14cb705b64 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/CustomerPaymentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/CustomerPayments/Item/CustomerPaymentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomerPayment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomerPayment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/CustomersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/CustomersRequestBuilder.cs index c673e5b4497..6bd40cb6f6d 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/CustomersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/CustomersRequestBuilder.cs @@ -106,7 +106,7 @@ public CustomersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Currency/CurrencyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Currency/CurrencyRequestBuilder.cs index dcf21d59c7a..79a6356e43d 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Currency/CurrencyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Currency/CurrencyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/CustomerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/CustomerItemRequestBuilder.cs index 6f1444195ed..b892ec9fd47 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/CustomerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/CustomerItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/PaymentMethod/PaymentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/PaymentMethod/PaymentMethodRequestBuilder.cs index 11117135682..3887d154701 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/PaymentMethod/PaymentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/PaymentMethod/PaymentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/PaymentTerm/PaymentTermRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/PaymentTerm/PaymentTermRequestBuilder.cs index 3ca9a1a4210..8f4d3e42c8b 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/PaymentTerm/PaymentTermRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/PaymentTerm/PaymentTermRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Picture/Item/Content/ContentRequestBuilder.cs index 1e311863316..d73cd123166 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Picture/Item/PictureItemRequestBuilder.cs index cbc7b5c3e6c..134e710e187 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Picture/PictureRequestBuilder.cs index 36d96787da3..d4abc63d644 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/ShipmentMethod/ShipmentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/ShipmentMethod/ShipmentMethodRequestBuilder.cs index 4cc34ef860a..c11f66c55aa 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/ShipmentMethod/ShipmentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Customers/Item/ShipmentMethod/ShipmentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/EmployeesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/EmployeesRequestBuilder.cs index 33c2b518115..6507808a380 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/EmployeesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/EmployeesRequestBuilder.cs @@ -106,7 +106,7 @@ public EmployeesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Employee body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Employee body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/EmployeeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/EmployeeItemRequestBuilder.cs index eafc914d080..1fc07a767fb 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/EmployeeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/EmployeeItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Employee body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Employee body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/Picture/Item/Content/ContentRequestBuilder.cs index ad594d2b62a..a011ba4f688 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/Picture/Item/PictureItemRequestBuilder.cs index e96e7bce63e..a3573fa0c15 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/Picture/PictureRequestBuilder.cs index 6921de66050..e2b4091d7d2 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Employees/Item/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/ItemCategories/Item/ItemCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/ItemCategories/Item/ItemCategoryItemRequestBuilder.cs index a887edf3f81..a25bd48aff6 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/ItemCategories/Item/ItemCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/ItemCategories/Item/ItemCategoryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/ItemCategories/ItemCategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/ItemCategories/ItemCategoriesRequestBuilder.cs index b5845cb6640..09f86d5dba0 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/ItemCategories/ItemCategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/ItemCategories/ItemCategoriesRequestBuilder.cs @@ -106,7 +106,7 @@ public ItemCategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/ItemCategory/ItemCategoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/ItemCategory/ItemCategoryRequestBuilder.cs index 1934ce3c37c..356962438de 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/ItemCategory/ItemCategoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/ItemCategory/ItemCategoryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/ItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/ItemItemRequestBuilder.cs index 95f4762cf86..93266c0f12f 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/ItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/ItemItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/Picture/Item/Content/ContentRequestBuilder.cs index 00a30e581c9..d58cec1cde6 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/Picture/Item/PictureItemRequestBuilder.cs index 0e7b478faf7..13ff51080df 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/Picture/PictureRequestBuilder.cs index 693440f90a1..b5ab1dfdb60 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/Item/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/ItemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/ItemsRequestBuilder.cs index 347a173a084..42744048a12 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/ItemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Items/ItemsRequestBuilder.cs @@ -106,7 +106,7 @@ public ItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/JournalLines/Item/JournalLineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/JournalLines/Item/JournalLineItemRequestBuilder.cs index 42a0b27d2ff..ba75888d54d 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/JournalLines/Item/JournalLineItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/JournalLines/Item/JournalLineItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.JournalLine body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.JournalLine body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/JournalLines/JournalLinesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/JournalLines/JournalLinesRequestBuilder.cs index 200cd728021..41ae66093c3 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/JournalLines/JournalLinesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/JournalLines/JournalLinesRequestBuilder.cs @@ -106,7 +106,7 @@ public JournalLinesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.JournalLine body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.JournalLine body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/Item/JournalItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/Item/JournalItemRequestBuilder.cs index 6c09772e7ac..942ea34ed64 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/Item/JournalItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/Item/JournalItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Journal body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Journal body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/Item/JournalLines/Item/JournalLineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/Item/JournalLines/Item/JournalLineItemRequestBuilder.cs index 33f51804750..bd4ce8d4f79 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/Item/JournalLines/Item/JournalLineItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/Item/JournalLines/Item/JournalLineItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.JournalLine body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.JournalLine body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/Item/JournalLines/JournalLinesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/Item/JournalLines/JournalLinesRequestBuilder.cs index 5111ee97b41..987cd1b51c8 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/Item/JournalLines/JournalLinesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/Item/JournalLines/JournalLinesRequestBuilder.cs @@ -106,7 +106,7 @@ public JournalLinesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.JournalLine body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.JournalLine body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/JournalsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/JournalsRequestBuilder.cs index f94df5950ae..82f2cffdf01 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/JournalsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Journals/JournalsRequestBuilder.cs @@ -106,7 +106,7 @@ public JournalsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Journal body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Journal body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentMethods/Item/PaymentMethodItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentMethods/Item/PaymentMethodItemRequestBuilder.cs index b095fbdc435..a5021abaeb1 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentMethods/Item/PaymentMethodItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentMethods/Item/PaymentMethodItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentMethods/PaymentMethodsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentMethods/PaymentMethodsRequestBuilder.cs index 20b084313ab..27503af35ba 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentMethods/PaymentMethodsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentMethods/PaymentMethodsRequestBuilder.cs @@ -106,7 +106,7 @@ public PaymentMethodsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentTerms/Item/PaymentTermItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentTerms/Item/PaymentTermItemRequestBuilder.cs index d2b3a8c9aae..664fe9c4271 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentTerms/Item/PaymentTermItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentTerms/Item/PaymentTermItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentTerms/PaymentTermsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentTerms/PaymentTermsRequestBuilder.cs index cd738ef733f..80acc657518 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentTerms/PaymentTermsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PaymentTerms/PaymentTermsRequestBuilder.cs @@ -106,7 +106,7 @@ public PaymentTermsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Picture/Item/Content/ContentRequestBuilder.cs index 027bc8633a0..2a5ce18d771 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Picture/Item/PictureItemRequestBuilder.cs index d06a3758f4d..df7a00340b4 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Picture/PictureRequestBuilder.cs index 1817a37b310..378fe100c45 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs index 79587d1072a..06c575bc270 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs index 39667bae23d..c60db2f36b9 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs index 13b3cb95cc5..2c80521cdff 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs index 473aeaaca6f..a0d5c7c0257 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs index 640a7570566..60425893add 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/PurchaseInvoiceLineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/PurchaseInvoiceLineItemRequestBuilder.cs index f4b87f58c1f..d8329b61a0e 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/PurchaseInvoiceLineItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoiceLines/Item/PurchaseInvoiceLineItemRequestBuilder.cs @@ -86,7 +86,7 @@ public PurchaseInvoiceLineItemRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.PurchaseInvoiceLine body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -128,7 +128,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PurchaseInvoiceLine body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Currency/CurrencyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Currency/CurrencyRequestBuilder.cs index 5b8c28b7712..0c37563059c 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Currency/CurrencyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Currency/CurrencyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceItemRequestBuilder.cs index b3677560dfd..1b48baa3d5f 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceItemRequestBuilder.cs @@ -98,7 +98,7 @@ public PurchaseInvoiceItemRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.PurchaseInvoice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -140,7 +140,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PurchaseInvoice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs index 306761e5560..dc3472c733e 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs index 7e70ebd7568..2bb9ad874ef 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs index b58d250deee..ba1321b7cbc 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs index d81696dedd2..b5471192645 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs index 4068e3200ba..4c6ccf58c75 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/PurchaseInvoiceLineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/PurchaseInvoiceLineItemRequestBuilder.cs index 0c11c3ed24d..87b1e892b5b 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/PurchaseInvoiceLineItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/PurchaseInvoiceLines/Item/PurchaseInvoiceLineItemRequestBuilder.cs @@ -86,7 +86,7 @@ public PurchaseInvoiceLineItemRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.PurchaseInvoiceLine body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -128,7 +128,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PurchaseInvoiceLine body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Currency/CurrencyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Currency/CurrencyRequestBuilder.cs index e454477304f..0d9633d216b 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Currency/CurrencyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Currency/CurrencyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/PaymentMethod/PaymentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/PaymentMethod/PaymentMethodRequestBuilder.cs index 6570b8f6cb7..30042ca1887 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/PaymentMethod/PaymentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/PaymentMethod/PaymentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/PaymentTerm/PaymentTermRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/PaymentTerm/PaymentTermRequestBuilder.cs index b2493aa9e2b..b1b5475dec4 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/PaymentTerm/PaymentTermRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/PaymentTerm/PaymentTermRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Picture/Item/Content/ContentRequestBuilder.cs index 3c3ac80d0aa..2c2aac1166e 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Picture/Item/PictureItemRequestBuilder.cs index d8c2473007d..5864464687d 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Picture/PictureRequestBuilder.cs index 0108ef0ec46..0929175110f 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/VendorRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/VendorRequestBuilder.cs index 3cb129e57ed..6a2c986cbfe 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/VendorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/PurchaseInvoices/Item/Vendor/VendorRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Vendor body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Vendor body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs index 7c9163fc4fc..936819ab97e 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs index 0708fa95ac4..e3d9bfc807f 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs index 80a29088243..eacee552c7c 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs index d7596bce821..5b1c2dc90b3 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs index d13a9af30a9..373a10a3a0e 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/SalesCreditMemoLineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/SalesCreditMemoLineItemRequestBuilder.cs index 5472dd89641..55c29326ed6 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/SalesCreditMemoLineItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemoLines/Item/SalesCreditMemoLineItemRequestBuilder.cs @@ -86,7 +86,7 @@ public SalesCreditMemoLineItemRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.SalesCreditMemoLine body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -128,7 +128,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SalesCreditMemoLine body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Currency/CurrencyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Currency/CurrencyRequestBuilder.cs index 898031403b2..3a3ff61ebb3 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Currency/CurrencyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Currency/CurrencyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Currency/CurrencyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Currency/CurrencyRequestBuilder.cs index 51fcced5e4b..a3045bdc129 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Currency/CurrencyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Currency/CurrencyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/CustomerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/CustomerRequestBuilder.cs index 81a3c9dae4a..9d064519098 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/CustomerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/CustomerRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs index c898f74023a..e3a0c954373 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs index 7e169c97e1a..3a3b6daf7a0 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs index 895d5695884..eda6ca1fab4 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs index 68a0fcdaed9..92ef11423ab 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Picture/PictureRequestBuilder.cs index 7b87f1db275..cb139f068fb 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs index 508229392e3..025dc8bfa1a 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/PaymentTerm/PaymentTermRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/PaymentTerm/PaymentTermRequestBuilder.cs index ba74712a237..3ee29391489 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/PaymentTerm/PaymentTermRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/PaymentTerm/PaymentTermRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoItemRequestBuilder.cs index 2d6abbb404b..07f496832e7 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoItemRequestBuilder.cs @@ -98,7 +98,7 @@ public SalesCreditMemoItemRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.SalesCreditMemo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -140,7 +140,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SalesCreditMemo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs index f2c2d8b3035..ac3d45c215e 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs index aea648640ac..6e3793e022f 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs index 935da91b535..1abbcc09cdf 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs index b7d16750816..355eb60841d 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs index 61614be2918..fcadef628a7 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/SalesCreditMemoLineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/SalesCreditMemoLineItemRequestBuilder.cs index 7c2b8ca150c..1b165cc580f 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/SalesCreditMemoLineItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesCreditMemos/Item/SalesCreditMemoLines/Item/SalesCreditMemoLineItemRequestBuilder.cs @@ -86,7 +86,7 @@ public SalesCreditMemoLineItemRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.SalesCreditMemoLine body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -128,7 +128,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SalesCreditMemoLine body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs index e7dc9ec8cc8..1e80a135979 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs index 49b7063deb8..09df7812891 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs index 8db839e3b10..dd2c9969de5 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs index 229ad006bed..6dab6935628 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs index 2655254b420..1da43533f5a 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/SalesInvoiceLineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/SalesInvoiceLineItemRequestBuilder.cs index c6f84904233..765e2296928 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/SalesInvoiceLineItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoiceLines/Item/SalesInvoiceLineItemRequestBuilder.cs @@ -86,7 +86,7 @@ public SalesInvoiceLineItemRequestBuilder(string rawUrl, IRequestAdapter request public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.SalesInvoiceLine body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -128,7 +128,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SalesInvoiceLine body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Currency/CurrencyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Currency/CurrencyRequestBuilder.cs index 762c43cf931..b5643ff1bd5 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Currency/CurrencyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Currency/CurrencyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Currency/CurrencyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Currency/CurrencyRequestBuilder.cs index a494cdc05df..1a5b84c37db 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Currency/CurrencyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Currency/CurrencyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/CustomerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/CustomerRequestBuilder.cs index a19262872de..7133457ce15 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/CustomerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/CustomerRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs index 09cbfa8dd9b..9e1b89d3402 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs index 520b67362f2..d5dabb7d5e9 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs index 2aab6956417..0e6fbb65de3 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs index d14f17c264e..2b83ff8ac1e 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Picture/PictureRequestBuilder.cs index 5f111ebdcbc..55c4dfde460 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs index 32685c0f312..61ba2a65b11 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/PaymentTerm/PaymentTermRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/PaymentTerm/PaymentTermRequestBuilder.cs index 855f643890f..59554487a07 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/PaymentTerm/PaymentTermRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/PaymentTerm/PaymentTermRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceItemRequestBuilder.cs index 039b6357ac4..4595196cf78 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceItemRequestBuilder.cs @@ -134,7 +134,7 @@ public SalesInvoiceItemRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.SalesInvoice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -176,7 +176,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SalesInvoice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs index 5526142dc10..84568e24306 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs index 0a97241b979..171f2f439c0 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs index ff27ed33004..a48e8335126 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs index c26ce85a851..9e724e7db63 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs index 435e433ab01..1dd370d9ebf 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/SalesInvoiceLineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/SalesInvoiceLineItemRequestBuilder.cs index 4f8b0055ef6..0dcf81d0ca2 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/SalesInvoiceLineItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/SalesInvoiceLines/Item/SalesInvoiceLineItemRequestBuilder.cs @@ -86,7 +86,7 @@ public SalesInvoiceLineItemRequestBuilder(string rawUrl, IRequestAdapter request public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.SalesInvoiceLine body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -128,7 +128,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SalesInvoiceLine body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/ShipmentMethod/ShipmentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/ShipmentMethod/ShipmentMethodRequestBuilder.cs index a1beb13f4ac..c79499e08d7 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/ShipmentMethod/ShipmentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesInvoices/Item/ShipmentMethod/ShipmentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs index 8ff59aae99e..674f5bf7fcf 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs index 937629d0501..cc79c7598fe 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs index 1d1443cbbef..131bfdf7b73 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs index 1e8eebccb1d..e91815f4793 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs index 2f6f9e32e2f..912f6a988cd 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/SalesOrderLineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/SalesOrderLineItemRequestBuilder.cs index 175c2939b66..e1aa4e77abb 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/SalesOrderLineItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrderLines/Item/SalesOrderLineItemRequestBuilder.cs @@ -86,7 +86,7 @@ public SalesOrderLineItemRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.SalesOrderLine body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -128,7 +128,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SalesOrderLine body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Currency/CurrencyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Currency/CurrencyRequestBuilder.cs index f234c10aede..7989d6572ae 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Currency/CurrencyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Currency/CurrencyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Currency/CurrencyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Currency/CurrencyRequestBuilder.cs index c9729b98d78..cf6ea558cca 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Currency/CurrencyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Currency/CurrencyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/CustomerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/CustomerRequestBuilder.cs index 7baf8a6714e..e1ff5e85f10 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/CustomerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/CustomerRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs index e1db6199cf1..800909c0623 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs index 6916c279778..0b791713925 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs index 700d34095a9..a455246f0ef 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs index e212b05beea..37a030257aa 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Picture/PictureRequestBuilder.cs index b781f3e7355..f7aa624b541 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs index ece50c9b05b..0d114d721c1 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/PaymentTerm/PaymentTermRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/PaymentTerm/PaymentTermRequestBuilder.cs index 527a297e3df..17ce542200a 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/PaymentTerm/PaymentTermRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/PaymentTerm/PaymentTermRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderItemRequestBuilder.cs index 946d22758c0..24d281287a7 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderItemRequestBuilder.cs @@ -98,7 +98,7 @@ public SalesOrderItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.SalesOrder body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -140,7 +140,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SalesOrder body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs index 44e8df7adbc..d31bdc2ef2b 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs index 2e0f51828c3..2646d558449 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs index e24b5555ccb..b1b91b53533 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs index eddfa199075..de46333d5d6 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs index 5ddd6a4f685..d1347bbbd6c 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/SalesOrderLineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/SalesOrderLineItemRequestBuilder.cs index c56b06012de..1617708b3e6 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/SalesOrderLineItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesOrders/Item/SalesOrderLines/Item/SalesOrderLineItemRequestBuilder.cs @@ -86,7 +86,7 @@ public SalesOrderLineItemRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.SalesOrderLine body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -128,7 +128,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SalesOrderLine body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs index 5a153259a98..bb344bdb11d 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs index 0bd5a275095..037274e9c43 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs index 0f6c4db9d77..fab7c7dee4b 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs index 2e317574d79..c84fd68f070 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs index de65b391296..d933bac2106 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/SalesQuoteLineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/SalesQuoteLineItemRequestBuilder.cs index 23f928b661c..cb073516190 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/SalesQuoteLineItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuoteLines/Item/SalesQuoteLineItemRequestBuilder.cs @@ -86,7 +86,7 @@ public SalesQuoteLineItemRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.SalesQuoteLine body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -128,7 +128,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SalesQuoteLine body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Currency/CurrencyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Currency/CurrencyRequestBuilder.cs index 7651eedda93..eadd8362102 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Currency/CurrencyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Currency/CurrencyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Currency/CurrencyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Currency/CurrencyRequestBuilder.cs index 6f2a2050e76..28afc1014ec 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Currency/CurrencyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Currency/CurrencyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/CustomerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/CustomerRequestBuilder.cs index 9826f42b46e..0a7556b6902 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/CustomerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/CustomerRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Customer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs index fc0c3b35c06..9dec37ac3e5 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/PaymentMethod/PaymentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs index b258e089105..3e858f8a011 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/PaymentTerm/PaymentTermRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs index 24becb49fe3..7d90042c83a 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs index 9832d81ceef..dcfc068ea40 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Picture/PictureRequestBuilder.cs index 89bea93ef30..125ae7a9f85 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs index 83abf7c7fe8..540ae47b9da 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/Customer/ShipmentMethod/ShipmentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/PaymentTerm/PaymentTermRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/PaymentTerm/PaymentTermRequestBuilder.cs index 8dc8d092300..220488d7c94 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/PaymentTerm/PaymentTermRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/PaymentTerm/PaymentTermRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteItemRequestBuilder.cs index 40d87d08158..34e420f6363 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteItemRequestBuilder.cs @@ -116,7 +116,7 @@ public SalesQuoteItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.SalesQuote body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SalesQuote body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs index 88caf526219..28c51646556 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/ItemCategory/ItemCategoryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs index ed32cb21745..37141f0adc0 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Item_EscapedRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Item body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs index 9882d1b9f03..3d858b3e735 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs index 732da9724e9..49e338d56ce 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs index f70f8b82b41..a7b5864885f 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/Item_Escaped/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/SalesQuoteLineItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/SalesQuoteLineItemRequestBuilder.cs index 2cf5533b4e2..20f4732a10b 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/SalesQuoteLineItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/SalesQuoteLines/Item/SalesQuoteLineItemRequestBuilder.cs @@ -86,7 +86,7 @@ public SalesQuoteLineItemRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.SalesQuoteLine body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -128,7 +128,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SalesQuoteLine body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/ShipmentMethod/ShipmentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/ShipmentMethod/ShipmentMethodRequestBuilder.cs index a14486ceedf..c0412e77faa 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/ShipmentMethod/ShipmentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/SalesQuotes/Item/ShipmentMethod/ShipmentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/ShipmentMethods/Item/ShipmentMethodItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/ShipmentMethods/Item/ShipmentMethodItemRequestBuilder.cs index 05ca44e994e..8e7cf92faca 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/ShipmentMethods/Item/ShipmentMethodItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/ShipmentMethods/Item/ShipmentMethodItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/ShipmentMethods/ShipmentMethodsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/ShipmentMethods/ShipmentMethodsRequestBuilder.cs index 17c14bde18e..19bd92616e7 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/ShipmentMethods/ShipmentMethodsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/ShipmentMethods/ShipmentMethodsRequestBuilder.cs @@ -106,7 +106,7 @@ public ShipmentMethodsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ShipmentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxAreas/Item/TaxAreaItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxAreas/Item/TaxAreaItemRequestBuilder.cs index cf706084f6f..c5dd2446ede 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxAreas/Item/TaxAreaItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxAreas/Item/TaxAreaItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TaxArea body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TaxArea body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxAreas/TaxAreasRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxAreas/TaxAreasRequestBuilder.cs index b43907f1e8d..8cb84e14538 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxAreas/TaxAreasRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxAreas/TaxAreasRequestBuilder.cs @@ -106,7 +106,7 @@ public TaxAreasRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TaxArea body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TaxArea body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxGroups/Item/TaxGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxGroups/Item/TaxGroupItemRequestBuilder.cs index 5766d7e14ce..09693710f3d 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxGroups/Item/TaxGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxGroups/Item/TaxGroupItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TaxGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TaxGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxGroups/TaxGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxGroups/TaxGroupsRequestBuilder.cs index 5a4a17667ce..c0750c4c3ff 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxGroups/TaxGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/TaxGroups/TaxGroupsRequestBuilder.cs @@ -93,7 +93,7 @@ public TaxGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TaxGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TaxGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/UnitsOfMeasure/Item/UnitOfMeasureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/UnitsOfMeasure/Item/UnitOfMeasureItemRequestBuilder.cs index f1faf2419c2..7b851587bc8 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/UnitsOfMeasure/Item/UnitOfMeasureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/UnitsOfMeasure/Item/UnitOfMeasureItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnitOfMeasure body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnitOfMeasure body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/UnitsOfMeasure/UnitsOfMeasureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/UnitsOfMeasure/UnitsOfMeasureRequestBuilder.cs index 585d6a9add8..d7675a3603e 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/UnitsOfMeasure/UnitsOfMeasureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/UnitsOfMeasure/UnitsOfMeasureRequestBuilder.cs @@ -106,7 +106,7 @@ public UnitsOfMeasureRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnitOfMeasure body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnitOfMeasure body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Currency/CurrencyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Currency/CurrencyRequestBuilder.cs index 666989547cd..b539ff98615 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Currency/CurrencyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Currency/CurrencyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Currency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/PaymentMethod/PaymentMethodRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/PaymentMethod/PaymentMethodRequestBuilder.cs index b3dbe7aa4ee..615115d753a 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/PaymentMethod/PaymentMethodRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/PaymentMethod/PaymentMethodRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/PaymentTerm/PaymentTermRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/PaymentTerm/PaymentTermRequestBuilder.cs index 808276fe127..8c28b8e1b11 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/PaymentTerm/PaymentTermRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/PaymentTerm/PaymentTermRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PaymentTerm body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Picture/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Picture/Item/Content/ContentRequestBuilder.cs index 4a6a35d959b..0e8e6cdb441 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Picture/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Picture/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Picture/Item/PictureItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Picture/Item/PictureItemRequestBuilder.cs index 949ce0ef488..73e44f45baf 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Picture/Item/PictureItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Picture/Item/PictureItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Picture/PictureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Picture/PictureRequestBuilder.cs index 4d282eaf6eb..c97cb9cddb2 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Picture/PictureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/Picture/PictureRequestBuilder.cs @@ -106,7 +106,7 @@ public PictureRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Picture body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/VendorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/VendorItemRequestBuilder.cs index 4055776986d..edd679e1f13 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/VendorItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/Item/VendorItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Vendor body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Vendor body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/VendorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/VendorsRequestBuilder.cs index 3604af72e51..9f3e6c66843 100644 --- a/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/VendorsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/Companies/Item/Vendors/VendorsRequestBuilder.cs @@ -106,7 +106,7 @@ public VendorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Vendor body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Vendor body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Financials/FinancialsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Financials/FinancialsRequestBuilder.cs index 4095817bab2..6e92ea9edf9 100644 --- a/src/Microsoft.Graph/Generated/Financials/FinancialsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Financials/FinancialsRequestBuilder.cs @@ -80,7 +80,7 @@ public FinancialsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.Financials body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -122,7 +122,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Financials body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Functions/FunctionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Functions/FunctionsRequestBuilder.cs index 65c986ceafa..ce94229bddb 100644 --- a/src/Microsoft.Graph/Generated/Functions/FunctionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Functions/FunctionsRequestBuilder.cs @@ -93,7 +93,7 @@ public FunctionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AttributeMappingFunctionSchema body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AttributeMappingFunctionSchema body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Functions/Item/AttributeMappingFunctionSchemaItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Functions/Item/AttributeMappingFunctionSchemaItemRequestBuilder.cs index 2c4575b0336..246bf437e3f 100644 --- a/src/Microsoft.Graph/Generated/Functions/Item/AttributeMappingFunctionSchemaItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Functions/Item/AttributeMappingFunctionSchemaItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AttributeMappingFunctionSchema body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AttributeMappingFunctionSchema body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/GovernanceResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/GovernanceResourcesRequestBuilder.cs index 7b66a310341..114ea062a95 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/GovernanceResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/GovernanceResourcesRequestBuilder.cs @@ -99,7 +99,7 @@ public GovernanceResourcesRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/GovernanceResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/GovernanceResourceItemRequestBuilder.cs index 67c299cf394..30bdee0d50a 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/GovernanceResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/GovernanceResourceItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs index 542c3c0176a..1793d534040 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs index a3c0dd16881..9dc61019349 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs index 7a7d32738d7..026247fd89d 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs index 922bc63e516..a77c04445fe 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs @@ -101,7 +101,7 @@ public UpdateRequestPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.GovernanceResources.Item.RoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GovernanceResources.Item.RoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("assignmentState", AssignmentState); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("reason", Reason); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs index a3b5df89b2b..73d498176dc 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs @@ -51,7 +51,7 @@ public UpdateRequestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.GovernanceResources.Item.RoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.GovernanceResources.Item.RoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/RoleAssignmentRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/RoleAssignmentRequestsRequestBuilder.cs index 03412f6ec1f..8b0a4524cd7 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/RoleAssignmentRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignmentRequests/RoleAssignmentRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public RoleAssignmentRequestsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Export/ExportGetResponse.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Export/ExportGetResponse.cs index da43a362fc2..8f09a7bbaa7 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Export/ExportGetResponse.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Export/ExportGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.GovernanceResources.Item.RoleAssignments.Export.ExportGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GovernanceResources.Item.RoleAssignments.Export.ExportGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Export/ExportResponse.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Export/ExportResponse.cs index d7b71ccf600..288d52f1e1d 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Export/ExportResponse.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Export/ExportResponse.cs @@ -20,7 +20,7 @@ public partial class ExportResponse : global::Microsoft.Graph.Beta.GovernanceRes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.GovernanceResources.Item.RoleAssignments.Export.ExportResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GovernanceResources.Item.RoleAssignments.Export.ExportResponse(); } } diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs index aacb916363d..d2353407099 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs index 7e4d5704ed7..a4a34036b67 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Item/Subject/SubjectRequestBuilder.cs index c6d8549b88d..f981b8e74d6 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/Item/Subject/SubjectRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs index 3f2efd3a198..7382b38a19b 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public RoleAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs index 016966d3933..6a38e621212 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleDefinitions/RoleDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleDefinitions/RoleDefinitionsRequestBuilder.cs index e5df00d40e7..546b2be589f 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleDefinitions/RoleDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleDefinitions/RoleDefinitionsRequestBuilder.cs @@ -93,7 +93,7 @@ public RoleDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs index b7650e29819..7195228f9ec 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs index 3c9bd5a5586..b7e882331f0 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleSettings/RoleSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleSettings/RoleSettingsRequestBuilder.cs index 2d2fea5f7e3..248e6ca2a17 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleSettings/RoleSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Item/RoleSettings/RoleSettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public RoleSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Register/RegisterPostRequestBody.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Register/RegisterPostRequestBody.cs index b6073e99e32..8ab73bcc6d5 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Register/RegisterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Register/RegisterPostRequestBody.cs @@ -52,7 +52,7 @@ public RegisterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.GovernanceResources.Register.RegisterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GovernanceResources.Register.RegisterPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("externalId", ExternalId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/GovernanceResources/Register/RegisterRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceResources/Register/RegisterRequestBuilder.cs index 8b27040c113..e610a1c0328 100644 --- a/src/Microsoft.Graph/Generated/GovernanceResources/Register/RegisterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceResources/Register/RegisterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.GovernanceResources.Reg public async Task PostAsync(global::Microsoft.Graph.Beta.GovernanceResources.Register.RegisterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.GovernanceResources.Register.RegisterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/GovernanceRoleAssignmentRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/GovernanceRoleAssignmentRequestsRequestBuilder.cs index db7a91a419f..04010e162ef 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/GovernanceRoleAssignmentRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/GovernanceRoleAssignmentRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public GovernanceRoleAssignmentRequestsRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs index 82339750645..7279f93bb72 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs index 7af969a71ec..e2ef20b9aed 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs index fc8a88af13f..80740736eb6 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs b/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs index 5d01f956666..3231db33622 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs @@ -101,7 +101,7 @@ public UpdateRequestPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.GovernanceRoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GovernanceRoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("assignmentState", AssignmentState); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("reason", Reason); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs index d3f79447787..2a3dc59dafb 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs @@ -51,7 +51,7 @@ public UpdateRequestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.GovernanceRoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.GovernanceRoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Export/ExportGetResponse.cs b/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Export/ExportGetResponse.cs index 610134159a0..8269b43c489 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Export/ExportGetResponse.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Export/ExportGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.GovernanceRoleAssignments.Export.ExportGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GovernanceRoleAssignments.Export.ExportGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Export/ExportResponse.cs b/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Export/ExportResponse.cs index 397706b30f7..a3f1ffc0c25 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Export/ExportResponse.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Export/ExportResponse.cs @@ -20,7 +20,7 @@ public partial class ExportResponse : global::Microsoft.Graph.Beta.GovernanceRol /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.GovernanceRoleAssignments.Export.ExportResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GovernanceRoleAssignments.Export.ExportResponse(); } } diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/GovernanceRoleAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/GovernanceRoleAssignmentsRequestBuilder.cs index 6cada37dc01..8c621f3709c 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/GovernanceRoleAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/GovernanceRoleAssignmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public GovernanceRoleAssignmentsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs index 10b25f15a40..594e6866705 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs index 92cf93e200c..513dcc3ee02 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Item/Subject/SubjectRequestBuilder.cs index 44a576f6187..c1b53eeb111 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleAssignments/Item/Subject/SubjectRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleDefinitions/GovernanceRoleDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceRoleDefinitions/GovernanceRoleDefinitionsRequestBuilder.cs index bcd1279ce71..6db8d500a26 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleDefinitions/GovernanceRoleDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleDefinitions/GovernanceRoleDefinitionsRequestBuilder.cs @@ -93,7 +93,7 @@ public GovernanceRoleDefinitionsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceRoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs index 6a3ed5cacef..1c9fbba1307 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleSettings/GovernanceRoleSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceRoleSettings/GovernanceRoleSettingsRequestBuilder.cs index 05f6dd61734..e7102e14a1a 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleSettings/GovernanceRoleSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleSettings/GovernanceRoleSettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public GovernanceRoleSettingsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceRoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs index 996841cdca7..2d947552e17 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceRoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceRoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs index 75fc0de6381..f538fdb06e0 100644 --- a/src/Microsoft.Graph/Generated/GovernanceRoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceRoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceSubjects/GovernanceSubjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceSubjects/GovernanceSubjectsRequestBuilder.cs index 87e5213cd7b..520b19561d5 100644 --- a/src/Microsoft.Graph/Generated/GovernanceSubjects/GovernanceSubjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceSubjects/GovernanceSubjectsRequestBuilder.cs @@ -93,7 +93,7 @@ public GovernanceSubjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GovernanceSubjects/Item/GovernanceSubjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/GovernanceSubjects/Item/GovernanceSubjectItemRequestBuilder.cs index fe2c75d67a7..ecb5714d44e 100644 --- a/src/Microsoft.Graph/Generated/GovernanceSubjects/Item/GovernanceSubjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GovernanceSubjects/Item/GovernanceSubjectItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/GroupLifecyclePoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/GroupLifecyclePoliciesRequestBuilder.cs index b9c82a2e0da..60ef7b19249 100644 --- a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/GroupLifecyclePoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/GroupLifecyclePoliciesRequestBuilder.cs @@ -101,7 +101,7 @@ public GroupLifecyclePoliciesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupLifecyclePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupLifecyclePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostRequestBody.cs index 1b1cc5168f9..938825e5648 100644 --- a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostRequestBody.cs @@ -52,7 +52,7 @@ public AddGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.AddGroup.AddGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.AddGroup.AddGroupPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostResponse.cs b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostResponse.cs index 7ca3b951f1d..7c667d9e8f8 100644 --- a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostResponse.cs +++ b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostResponse.cs @@ -42,7 +42,7 @@ public AddGroupPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.AddGroup.AddGroupPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.AddGroup.AddGroupPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupRequestBuilder.cs index 237bd646507..23167cd9b7c 100644 --- a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupRequestBuilder.cs @@ -50,7 +50,7 @@ public AddGroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsAddGroupPostResponseAsync(global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.AddGroup.AddGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public AddGroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.AddGroup.AddGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.AddGroup.AddGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupResponse.cs b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupResponse.cs index cf53ddd0970..5141d2bd2f0 100644 --- a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupResponse.cs +++ b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/AddGroup/AddGroupResponse.cs @@ -20,7 +20,7 @@ public partial class AddGroupResponse : global::Microsoft.Graph.Beta.GroupLifecy /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.AddGroup.AddGroupResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.AddGroup.AddGroupResponse(); } } diff --git a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/GroupLifecyclePolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/GroupLifecyclePolicyItemRequestBuilder.cs index 0c59407ffaa..4ca8068d3db 100644 --- a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/GroupLifecyclePolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/GroupLifecyclePolicyItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupLifecyclePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupLifecyclePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostRequestBody.cs index 99e9711b70f..06f840ac86d 100644 --- a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostRequestBody.cs @@ -52,7 +52,7 @@ public RemoveGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostResponse.cs b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostResponse.cs index 06f85e86d88..eae5e575f59 100644 --- a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostResponse.cs +++ b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostResponse.cs @@ -42,7 +42,7 @@ public RemoveGroupPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupRequestBuilder.cs index e80ce3d3ad2..6228d3f891b 100644 --- a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupRequestBuilder.cs @@ -50,7 +50,7 @@ public RemoveGroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsRemoveGroupPostResponseAsync(global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RemoveGroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupResponse.cs b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupResponse.cs index 2899e96c427..a0d874bf2bc 100644 --- a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupResponse.cs +++ b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupResponse.cs @@ -20,7 +20,7 @@ public partial class RemoveGroupResponse : global::Microsoft.Graph.Beta.GroupLif /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupResponse(); } } diff --git a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupPostRequestBody.cs index 744b3076492..5427381bcfe 100644 --- a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupPostRequestBody.cs @@ -52,7 +52,7 @@ public RenewGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.GroupLifecyclePolicies.RenewGroup.RenewGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GroupLifecyclePolicies.RenewGroup.RenewGroupPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupPostResponse.cs b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupPostResponse.cs index a16a499333c..865664175ff 100644 --- a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupPostResponse.cs +++ b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupPostResponse.cs @@ -42,7 +42,7 @@ public RenewGroupPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.GroupLifecyclePolicies.RenewGroup.RenewGroupPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GroupLifecyclePolicies.RenewGroup.RenewGroupPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupRequestBuilder.cs index f6bbb1cb10b..c4b5076c09f 100644 --- a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupRequestBuilder.cs @@ -51,7 +51,7 @@ public RenewGroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsRenewGroupPostResponseAsync(global::Microsoft.Graph.Beta.GroupLifecyclePolicies.RenewGroup.RenewGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public RenewGroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.GroupLifecyclePolicies.RenewGroup.RenewGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.GroupLifecyclePolicies.RenewGroup.RenewGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupResponse.cs b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupResponse.cs index 0eec2586058..271ac8a07e7 100644 --- a/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupResponse.cs +++ b/src/Microsoft.Graph/Generated/GroupLifecyclePolicies/RenewGroup/RenewGroupResponse.cs @@ -20,7 +20,7 @@ public partial class RenewGroupResponse : global::Microsoft.Graph.Beta.GroupLife /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.GroupLifecyclePolicies.RenewGroup.RenewGroupResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.GroupLifecyclePolicies.RenewGroup.RenewGroupResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Delta/DeltaGetResponse.cs index 14ae64cef16..df1ba500756 100644 --- a/src/Microsoft.Graph/Generated/Groups/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Delta/DeltaResponse.cs index 4bced0f3191..dc10344d2c2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Delta.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/EvaluateDynamicMembership/EvaluateDynamicMembershipPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/EvaluateDynamicMembership/EvaluateDynamicMembershipPostRequestBody.cs index ce3519e7b16..94fbecdf0a6 100644 --- a/src/Microsoft.Graph/Generated/Groups/EvaluateDynamicMembership/EvaluateDynamicMembershipPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/EvaluateDynamicMembership/EvaluateDynamicMembershipPostRequestBody.cs @@ -68,7 +68,7 @@ public EvaluateDynamicMembershipPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.EvaluateDynamicMembership.EvaluateDynamicMembershipPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.EvaluateDynamicMembership.EvaluateDynamicMembershipPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("memberId", MemberId); writer.WriteStringValue("membershipRule", MembershipRule); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/EvaluateDynamicMembership/EvaluateDynamicMembershipRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/EvaluateDynamicMembership/EvaluateDynamicMembershipRequestBuilder.cs index 639793e96a4..de52d7de0e1 100644 --- a/src/Microsoft.Graph/Generated/Groups/EvaluateDynamicMembership/EvaluateDynamicMembershipRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/EvaluateDynamicMembership/EvaluateDynamicMembershipRequestBuilder.cs @@ -52,7 +52,7 @@ public EvaluateDynamicMembershipRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.EvaluateDynamicMembership.EvaluateDynamicMembershipPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.EvaluateDynamicMembership.EvaluateDynamicMembershipPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsPostRequestBody.cs index 11444de74fe..7700df4f2e1 100644 --- a/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetByIdsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.GetByIds.GetByIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.GetByIds.GetByIdsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteCollectionOfPrimitiveValues("types", Types); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsPostResponse.cs index b1a8136440b..7c2a9d32230 100644 --- a/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetByIdsPostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.GetByIds.GetByIdsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.GetByIds.GetByIdsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsRequestBuilder.cs index 58ed974c5c4..cb648b1ec93 100644 --- a/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsGetByIdsPostResponseAsync(global::Microsoft.Graph.Beta.Groups.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsResponse.cs b/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsResponse.cs index 123a9e53c0c..9e908141faa 100644 --- a/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/GetByIds/GetByIdsResponse.cs @@ -20,7 +20,7 @@ public partial class GetByIdsResponse : global::Microsoft.Graph.Beta.Groups.GetB /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.GetByIds.GetByIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.GetByIds.GetByIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs index 9e95ea2f5fa..e62ea1abd45 100644 --- a/src/Microsoft.Graph/Generated/Groups/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetUserOwnedObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("type", Type); writer.WriteStringValue("userId", UserId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs index 094da15350a..bee33d1eb6e 100644 --- a/src/Microsoft.Graph/Generated/Groups/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs @@ -52,7 +52,7 @@ public GetUserOwnedObjectsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/GroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/GroupsRequestBuilder.cs index 9b8d4efa878..e57bacd7e6a 100644 --- a/src/Microsoft.Graph/Generated/Groups/GroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/GroupsRequestBuilder.cs @@ -125,7 +125,7 @@ public GroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Group body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -167,7 +167,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Group body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/AcceptedSenders/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/AcceptedSenders/Ref/RefRequestBuilder.cs index 7f138c7984c..cf39176e398 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/AcceptedSenders/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/AcceptedSenders/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/groups/{group%2Did}/acceptedSenders/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/AppRoleAssignments/AppRoleAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/AppRoleAssignments/AppRoleAssignmentsRequestBuilder.cs index 7ad022171fc..d0a5c1d4115 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/AppRoleAssignments/AppRoleAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/AppRoleAssignments/AppRoleAssignmentsRequestBuilder.cs @@ -95,7 +95,7 @@ public AppRoleAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AppRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AppRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/AppRoleAssignments/Item/AppRoleAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/AppRoleAssignments/Item/AppRoleAssignmentItemRequestBuilder.cs index e51263f4df0..ef0f75fc594 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/AppRoleAssignments/Item/AppRoleAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/AppRoleAssignments/Item/AppRoleAssignmentItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AppRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/AssignLicense/AssignLicensePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/AssignLicense/AssignLicensePostRequestBody.cs index 5bfdd758e71..39a9228e37d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/AssignLicense/AssignLicensePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/AssignLicense/AssignLicensePostRequestBody.cs @@ -69,7 +69,7 @@ public AssignLicensePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.AssignLicense.AssignLicensePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.AssignLicense.AssignLicensePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("addLicenses", AddLicenses); writer.WriteCollectionOfPrimitiveValues("removeLicenses", RemoveLicenses); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/AssignLicense/AssignLicenseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/AssignLicense/AssignLicenseRequestBuilder.cs index 26e14f652a2..aa9b9cdb7a9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/AssignLicense/AssignLicenseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/AssignLicense/AssignLicenseRequestBuilder.cs @@ -52,7 +52,7 @@ public AssignLicenseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.AssignLicense.AssignLicensePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.AssignLicense.AssignLicensePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs index da0b885f6ef..a35a766501b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs @@ -36,7 +36,7 @@ public partial class AllowedCalendarSharingRolesWithUserGetResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Calendar.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfEnumValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs index 9cc373dd8ab..4fbd55d5954 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs @@ -20,7 +20,7 @@ public partial class AllowedCalendarSharingRolesWithUserResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Calendar.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarPermissions/CalendarPermissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarPermissions/CalendarPermissionsRequestBuilder.cs index 4204ba5eb0d..35dac095b4a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarPermissions/CalendarPermissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarPermissions/CalendarPermissionsRequestBuilder.cs @@ -93,7 +93,7 @@ public CalendarPermissionsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs index 206e3028c86..d4a570747be 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarView/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarView/Delta/DeltaGetResponse.cs index 1b52f4c31cf..61f5f7bb926 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarView/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarView/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Calendar.CalendarView.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.CalendarView.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarView/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarView/Delta/DeltaResponse.cs index 54213b48808..5f59dc1d56f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarView/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/CalendarView/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Ca /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Calendar.CalendarView.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.CalendarView.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Delta/DeltaGetResponse.cs index edbc1c040d7..6ff358aa434 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Delta/DeltaResponse.cs index db3f7cde5b6..963c417e90f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Ca /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/EventsRequestBuilder.cs index 9d90a0d0c39..42097a20416 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/EventsRequestBuilder.cs @@ -99,7 +99,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Accept/AcceptPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Accept/AcceptPostRequestBody.cs index 8fca36ce61e..180b4a4e0c8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Accept/AcceptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Accept/AcceptPostRequestBody.cs @@ -58,7 +58,7 @@ public AcceptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Accept.AcceptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Accept.AcceptPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteBoolValue("SendResponse", SendResponse); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Accept/AcceptRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Accept/AcceptRequestBuilder.cs index 1ff4695e58e..7dc89e5205f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Accept/AcceptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Accept/AcceptRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Ev public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Accept.AcceptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Accept.AcceptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Attachments/AttachmentsRequestBuilder.cs index 3aa668a3801..52b03986f4f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Attachments/AttachmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index 7334d453066..d3db0eb22c8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 27f2ed87e94..96becafc407 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Cancel/CancelPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Cancel/CancelPostRequestBody.cs index 640706821e3..15193a36c10 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Cancel/CancelPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Cancel/CancelPostRequestBody.cs @@ -52,7 +52,7 @@ public CancelPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Cancel.CancelPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Cancel.CancelPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Cancel/CancelRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Cancel/CancelRequestBuilder.cs index 42435d8bc7d..e27c44f037d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Cancel/CancelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Cancel/CancelRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Ev public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Decline/DeclinePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Decline/DeclinePostRequestBody.cs index 1cb207c6897..447654b10c2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Decline/DeclinePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Decline/DeclinePostRequestBody.cs @@ -75,7 +75,7 @@ public DeclinePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Decline.DeclinePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Decline.DeclinePostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("ProposedNewTime", ProposedNewTime); writer.WriteBoolValue("SendResponse", SendResponse); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Decline/DeclineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Decline/DeclineRequestBuilder.cs index ee28fd7db62..e5912f23cff 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Decline/DeclineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Decline/DeclineRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Ev public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Decline.DeclinePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Decline.DeclinePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/EventItemRequestBuilder.cs index 8455415c63a..21e9ada11d8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/EventItemRequestBuilder.cs @@ -168,7 +168,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -229,7 +229,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Extensions/ExtensionsRequestBuilder.cs index 3f4c133487f..05ad8ef9b6c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index a332d16288a..b7e7119afde 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Forward/ForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Forward/ForwardPostRequestBody.cs index 30202cea5cf..eb4c178a027 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Forward/ForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Forward/ForwardPostRequestBody.cs @@ -69,7 +69,7 @@ public ForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Forward.ForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Forward.ForwardPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Forward/ForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Forward/ForwardRequestBuilder.cs index 38b0831f49c..a5f0d6694f3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Forward/ForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Forward/ForwardRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Ev public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Instances/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Instances/Delta/DeltaGetResponse.cs index c3fca4bd598..e012114ebfe 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Instances/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Instances/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Instances.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Instances.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Instances/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Instances/Delta/DeltaResponse.cs index c65285b4bce..f04b66d41ae 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Instances/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/Instances/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Ca /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Instances.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.Instances.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs index 59e704ec15c..331fba671f1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs @@ -53,7 +53,7 @@ public SnoozeReminderPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("NewReminderTime", NewReminderTime); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs index 9604bdbdf96..5747da7b131 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Ev public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs index 9edaa240f45..e7a1f4ecc3b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs @@ -75,7 +75,7 @@ public TentativelyAcceptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("ProposedNewTime", ProposedNewTime); writer.WriteBoolValue("SendResponse", SendResponse); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs index f32dc3f1a85..eb7f66d5d88 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Ev public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Calendar.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetSchedulePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetSchedulePostRequestBody.cs index 8df62591a89..60060a5b775 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetSchedulePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetSchedulePostRequestBody.cs @@ -91,7 +91,7 @@ public GetSchedulePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Calendar.GetSchedule.GetSchedulePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.GetSchedule.GetSchedulePostRequestBody(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("AvailabilityViewInterval", AvailabilityViewInterval); writer.WriteObjectValue("EndTime", EndTime); writer.WriteCollectionOfPrimitiveValues("Schedules", Schedules); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetSchedulePostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetSchedulePostResponse.cs index 24181f89b13..95bc2d3c727 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetSchedulePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetSchedulePostResponse.cs @@ -36,7 +36,7 @@ public partial class GetSchedulePostResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Calendar.GetSchedule.GetSchedulePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.GetSchedule.GetSchedulePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetScheduleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetScheduleRequestBuilder.cs index c221b53912d..4e8e30f18df 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetScheduleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetScheduleRequestBuilder.cs @@ -51,7 +51,7 @@ public GetScheduleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsGetSchedulePostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.GetSchedule.GetSchedulePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetScheduleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Calendar.GetSchedule.GetSchedulePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Calendar.GetSchedule.GetSchedulePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetScheduleResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetScheduleResponse.cs index cf5e2e34a47..ef4bf102342 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetScheduleResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Calendar/GetSchedule/GetScheduleResponse.cs @@ -20,7 +20,7 @@ public partial class GetScheduleResponse : global::Microsoft.Graph.Beta.Groups.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Calendar.GetSchedule.GetScheduleResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Calendar.GetSchedule.GetScheduleResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/CalendarView/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/CalendarView/Delta/DeltaGetResponse.cs index 9e1b4bf63a4..04f43e52f2e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/CalendarView/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/CalendarView/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.CalendarView.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.CalendarView.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/CalendarView/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/CalendarView/Delta/DeltaResponse.cs index 5331b5ced55..3cc318e3502 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/CalendarView/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/CalendarView/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Ca /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.CalendarView.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.CalendarView.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/CheckGrantedPermissionsForApp/CheckGrantedPermissionsForAppPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/CheckGrantedPermissionsForApp/CheckGrantedPermissionsForAppPostResponse.cs index 1474b2c26d5..a595f01af74 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/CheckGrantedPermissionsForApp/CheckGrantedPermissionsForAppPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/CheckGrantedPermissionsForApp/CheckGrantedPermissionsForAppPostResponse.cs @@ -36,7 +36,7 @@ public partial class CheckGrantedPermissionsForAppPostResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.CheckGrantedPermissionsForApp.CheckGrantedPermissionsForAppPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.CheckGrantedPermissionsForApp.CheckGrantedPermissionsForAppPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/CheckGrantedPermissionsForApp/CheckGrantedPermissionsForAppResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/CheckGrantedPermissionsForApp/CheckGrantedPermissionsForAppResponse.cs index 59446e2b2f2..6e5cff8eb8c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/CheckGrantedPermissionsForApp/CheckGrantedPermissionsForAppResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/CheckGrantedPermissionsForApp/CheckGrantedPermissionsForAppResponse.cs @@ -20,7 +20,7 @@ public partial class CheckGrantedPermissionsForAppResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.CheckGrantedPermissionsForApp.CheckGrantedPermissionsForAppResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.CheckGrantedPermissionsForApp.CheckGrantedPermissionsForAppResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs index cf46ca0285f..f03e9bf89a7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs index c2ca5815c71..ba999b47101 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.CheckMemberGroups.CheckMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.CheckMemberGroups.CheckMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs index ddf2f036fc7..2fda6d34f9c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsCheckMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs index 1e1f3f26f89..4e0416d63dd 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberGroupsResponse : global::Microsoft.Graph.Beta.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.CheckMemberGroups.CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.CheckMemberGroups.CheckMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs index 97b0bec29d2..a7dc5ab3c20 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs index a9ff9bb2c62..c4910b49021 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.CheckMemberObjects.CheckMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.CheckMemberObjects.CheckMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs index 55be335fecf..1c064e7b225 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsCheckMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs index 88bf1e0e740..d83f955a0fb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberObjectsResponse : global::Microsoft.Graph.Beta.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.CheckMemberObjects.CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.CheckMemberObjects.CheckMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/ConversationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/ConversationsRequestBuilder.cs index 71a3826e0d9..76daa0273ad 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/ConversationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/ConversationsRequestBuilder.cs @@ -78,8 +78,8 @@ public ConversationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.ConversationCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new conversation by including a thread and a post. Use reply thread or reply post to further post to that conversation. - /// Find more info here + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. + /// Find more info here /// /// A /// The request body @@ -95,7 +95,7 @@ public ConversationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Conversation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -123,7 +123,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new conversation by including a thread and a post. Use reply thread or reply post to further post to that conversation. + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. /// /// A /// The request body @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Conversation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/ConversationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/ConversationItemRequestBuilder.cs index bd8591e33d1..165173d768b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/ConversationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/ConversationItemRequestBuilder.cs @@ -41,8 +41,8 @@ public ConversationItemRequestBuilder(string rawUrl, IRequestAdapter requestAdap { } /// - /// Delete a group's conversation object. - /// Find more info here + /// Delete conversation. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -64,8 +64,8 @@ public async Task DeleteAsync(Action - /// Get a group's conversation object. - /// Find more info here + /// Retrieve the properties and relationships of conversation object. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -88,7 +88,7 @@ public async Task DeleteAsync(Action(requestInfo, global::Microsoft.Graph.Beta.Models.Conversation.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Delete a group's conversation object. + /// Delete conversation. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -107,7 +107,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Get a group's conversation object. + /// Retrieve the properties and relationships of conversation object. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -143,7 +143,7 @@ public partial class ConversationItemRequestBuilderDeleteRequestConfiguration : { } /// - /// Get a group's conversation object. + /// Retrieve the properties and relationships of conversation object. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class ConversationItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs index 5aabd663c66..d36bf63a901 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConversationThread body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationThread body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Attachments/AttachmentsRequestBuilder.cs index 520bdcea93b..28ee299b44e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Attachments/AttachmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index 94218b5f36d..af11d43c0db 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 293ccaa7957..45e0135a5e9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Extensions/ExtensionsRequestBuilder.cs index 8efd929676f..21a818d99ff 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 37cdefe55fb..eacd025b3e6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Forward/ForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Forward/ForwardPostRequestBody.cs index 920f486aa00..f9fefebd93a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Forward/ForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Forward/ForwardPostRequestBody.cs @@ -69,7 +69,7 @@ public ForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.Forward.ForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.Forward.ForwardPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Forward/ForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Forward/ForwardRequestBuilder.cs index 39026688837..8ddfe5b8eb8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Forward/ForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Forward/ForwardRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Conversatio public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/AttachmentsRequestBuilder.cs index c57520af5c0..abb180d4f1d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/AttachmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index 330f8ba2584..bfcf4d15456 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.InReplyTo.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.InReplyTo.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 9477cfb6dc4..d48d570a025 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.InReplyTo.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.InReplyTo.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/ExtensionsRequestBuilder.cs index 9e9ee1c1838..7622295c3e5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/Item/ExtensionItemRequestBuilder.cs index 1080137f4a7..8c31dd39a95 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardPostRequestBody.cs index 5dc099f6dc0..f79798ac867 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardPostRequestBody.cs @@ -69,7 +69,7 @@ public ForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.InReplyTo.Forward.ForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.InReplyTo.Forward.ForwardPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardRequestBuilder.cs index 6d53d3f8452..9331d627d99 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Conversatio public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.InReplyTo.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.InReplyTo.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Mentions/MentionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Mentions/MentionsRequestBuilder.cs index 50b0cb85fb2..16923c48d95 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Mentions/MentionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Mentions/MentionsRequestBuilder.cs @@ -93,7 +93,7 @@ public MentionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Mention body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Mention body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyPostRequestBody.cs index c004359489a..932521b2d37 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyPostRequestBody.cs @@ -53,7 +53,7 @@ public ReplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.InReplyTo.Reply.ReplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.InReplyTo.Reply.ReplyPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("Post", Post); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs index 9a582ae92ea..7444508ad9f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Conversatio public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.InReplyTo.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.InReplyTo.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Mentions/MentionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Mentions/MentionsRequestBuilder.cs index 62a9f83b1ce..a9ab968998a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Mentions/MentionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Mentions/MentionsRequestBuilder.cs @@ -93,7 +93,7 @@ public MentionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Mention body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Mention body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/PostItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/PostItemRequestBuilder.cs index 9be88563c2b..38f9f29e172 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/PostItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/PostItemRequestBuilder.cs @@ -110,7 +110,7 @@ public PostItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.Post body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Post body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Reply/ReplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Reply/ReplyPostRequestBody.cs index c469dd51002..dd1faefdecc 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Reply/ReplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Reply/ReplyPostRequestBody.cs @@ -53,7 +53,7 @@ public ReplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.Reply.ReplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.Reply.ReplyPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("Post", Post); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs index 9c334a623cf..0c8fed7fe25 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Conversatio public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Posts.Item.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyPostRequestBody.cs index 26997851df1..fa6588e6655 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyPostRequestBody.cs @@ -53,7 +53,7 @@ public ReplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Reply.ReplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Reply.ReplyPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("Post", Post); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs index 28fbfa68cfa..0710b3ea7b2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs @@ -34,8 +34,8 @@ public ReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base { } /// - /// Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. - /// Find more info here + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Conversatio public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -59,7 +59,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Conversatio await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. /// /// A /// The request body @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Conversations.Item.Threads.Item.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/ThreadsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/ThreadsRequestBuilder.cs index 3639f6b82e9..660d380e56b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/ThreadsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/ThreadsRequestBuilder.cs @@ -95,7 +95,7 @@ public ThreadsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConversationThread body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationThread body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsPostRequestBody.cs index 1854aad5d1f..7c69fc09b9e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsPostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePasswordSingleSignOnCredentialsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.DeletePasswordSingleSignOnCredentials.DeletePasswordSingleSignOnCredentialsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.DeletePasswordSingleSignOnCredentials.DeletePasswordSingleSignOnCredentialsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsRequestBuilder.cs index e5c1b2182e1..c13d81fa6d1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.DeletePassw public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.DeletePasswordSingleSignOnCredentials.DeletePasswordSingleSignOnCredentialsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.DeletePasswordSingleSignOnCredentials.DeletePasswordSingleSignOnCredentialsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Endpoints/EndpointsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Endpoints/EndpointsRequestBuilder.cs index 930f97a057d..c5f5ca40714 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Endpoints/EndpointsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Endpoints/EndpointsRequestBuilder.cs @@ -94,7 +94,7 @@ public EndpointsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Endpoint body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Endpoint body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Endpoints/Item/EndpointItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Endpoints/Item/EndpointItemRequestBuilder.cs index 9fc30f6e237..b1805209dff 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Endpoints/Item/EndpointItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Endpoints/Item/EndpointItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Endpoint body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Endpoint body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/EvaluateDynamicMembership/EvaluateDynamicMembershipPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/EvaluateDynamicMembership/EvaluateDynamicMembershipPostRequestBody.cs index 7bd3decb4a5..00b354f8585 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/EvaluateDynamicMembership/EvaluateDynamicMembershipPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/EvaluateDynamicMembership/EvaluateDynamicMembershipPostRequestBody.cs @@ -52,7 +52,7 @@ public EvaluateDynamicMembershipPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.EvaluateDynamicMembership.EvaluateDynamicMembershipPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.EvaluateDynamicMembership.EvaluateDynamicMembershipPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("memberId", MemberId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/EvaluateDynamicMembership/EvaluateDynamicMembershipRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/EvaluateDynamicMembership/EvaluateDynamicMembershipRequestBuilder.cs index bd5bb4e8502..ebfe13d7487 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/EvaluateDynamicMembership/EvaluateDynamicMembershipRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/EvaluateDynamicMembership/EvaluateDynamicMembershipRequestBuilder.cs @@ -52,7 +52,7 @@ public EvaluateDynamicMembershipRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.EvaluateDynamicMembership.EvaluateDynamicMembershipPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.EvaluateDynamicMembership.EvaluateDynamicMembershipPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Delta/DeltaGetResponse.cs index 906794b878a..8d3e9b52686 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Events.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Events.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Delta/DeltaResponse.cs index fd380e1b16b..f8fa4f4ddb5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Ev /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Events.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Events.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/EventsRequestBuilder.cs index 2ce97198e25..f8d168a948f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/EventsRequestBuilder.cs @@ -101,7 +101,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Accept/AcceptPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Accept/AcceptPostRequestBody.cs index 2e89c00de90..384394af3c1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Accept/AcceptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Accept/AcceptPostRequestBody.cs @@ -58,7 +58,7 @@ public AcceptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Accept.AcceptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Accept.AcceptPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteBoolValue("SendResponse", SendResponse); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Accept/AcceptRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Accept/AcceptRequestBuilder.cs index 515071a7185..cdbedd3c1d1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Accept/AcceptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Accept/AcceptRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Events.Item public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Accept.AcceptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Accept.AcceptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Attachments/AttachmentsRequestBuilder.cs index 73277cf3c6b..8d1a62c96db 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Attachments/AttachmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index 8e80e3ccf4a..08189101906 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 242308a9a42..f5070e5076d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Cancel/CancelPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Cancel/CancelPostRequestBody.cs index f9a53bae8d2..9e82f889b40 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Cancel/CancelPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Cancel/CancelPostRequestBody.cs @@ -52,7 +52,7 @@ public CancelPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Cancel.CancelPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Cancel.CancelPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Cancel/CancelRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Cancel/CancelRequestBuilder.cs index 92f69777f9c..610903a982d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Cancel/CancelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Cancel/CancelRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Events.Item public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Decline/DeclinePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Decline/DeclinePostRequestBody.cs index 4b1b4817e0a..862b74ac7ea 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Decline/DeclinePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Decline/DeclinePostRequestBody.cs @@ -75,7 +75,7 @@ public DeclinePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Decline.DeclinePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Decline.DeclinePostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("ProposedNewTime", ProposedNewTime); writer.WriteBoolValue("SendResponse", SendResponse); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Decline/DeclineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Decline/DeclineRequestBuilder.cs index f0094fec18b..6a63e70a4b5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Decline/DeclineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Decline/DeclineRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Events.Item public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Decline.DeclinePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Decline.DeclinePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/EventItemRequestBuilder.cs index b51d9a700ef..0b356ba0d3e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/EventItemRequestBuilder.cs @@ -171,7 +171,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -232,7 +232,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Extensions/ExtensionsRequestBuilder.cs index 67164b0ee59..5e574baa6e4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Extensions/ExtensionsRequestBuilder.cs @@ -94,7 +94,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 90508660dd6..b2edee983c2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Forward/ForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Forward/ForwardPostRequestBody.cs index a846179d419..7e3c6695063 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Forward/ForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Forward/ForwardPostRequestBody.cs @@ -69,7 +69,7 @@ public ForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Forward.ForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Forward.ForwardPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Forward/ForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Forward/ForwardRequestBuilder.cs index 4c36c8809fc..8c54d03fbee 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Forward/ForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Forward/ForwardRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Events.Item public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Instances/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Instances/Delta/DeltaGetResponse.cs index 6249853434c..51f2fd8cfd8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Instances/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Instances/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Instances.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Instances.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Instances/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Instances/Delta/DeltaResponse.cs index 0307ccc3081..af4af6c4803 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Instances/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/Instances/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Ev /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Instances.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Events.Item.Instances.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs index ff0dde6a922..ce71c772439 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs @@ -53,7 +53,7 @@ public SnoozeReminderPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("NewReminderTime", NewReminderTime); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs index 42df3298243..c8c6bb4988b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Events.Item public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs index 9899b60fd85..cbac9b861db 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs @@ -75,7 +75,7 @@ public TentativelyAcceptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("ProposedNewTime", ProposedNewTime); writer.WriteBoolValue("SendResponse", SendResponse); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs index d7f380386cf..345e990df80 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Events.Item public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Extensions/ExtensionsRequestBuilder.cs index 2090d22b456..f4b143d0531 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 6992f845432..93717d45b96 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs index 7b36fa4bf00..e55b1440a31 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.GetMemberGroups.GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GetMemberGroups.GetMemberGroupsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs index 50f200c7e3f..9049b2eb03e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.GetMemberGroups.GetMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GetMemberGroups.GetMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs index 23424744b13..64090b30aba 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsGetMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsResponse.cs index a18cf00eb9c..a4df1432a61 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberGroups/GetMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberGroupsResponse : global::Microsoft.Graph.Beta.Grou /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.GetMemberGroups.GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GetMemberGroups.GetMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs index 29684529336..c2682b0a3d2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.GetMemberObjects.GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GetMemberObjects.GetMemberObjectsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs index 5841a6e1ad8..7c1f6153706 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.GetMemberObjects.GetMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GetMemberObjects.GetMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs index 83f1f0140ef..7fc9978e7a4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsResponse.cs index d32ee0fff7d..e356c97c807 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GetMemberObjects/GetMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberObjectsResponse : global::Microsoft.Graph.Beta.Gro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.GetMemberObjects.GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GetMemberObjects.GetMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsPostResponse.cs index 7b1a4c54cf2..785ffdac9ac 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetPasswordSingleSignOnCredentialsPostResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.GetPasswordSingleSignOnCredentials.GetPasswordSingleSignOnCredentialsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GetPasswordSingleSignOnCredentials.GetPasswordSingleSignOnCredentialsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsResponse.cs index e4558a1cb28..77269b2f2dd 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsResponse.cs @@ -20,7 +20,7 @@ public partial class GetPasswordSingleSignOnCredentialsResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.GetPasswordSingleSignOnCredentials.GetPasswordSingleSignOnCredentialsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GetPasswordSingleSignOnCredentials.GetPasswordSingleSignOnCredentialsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupItemRequestBuilder.cs index 686479ab43e..d327661c9b9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupItemRequestBuilder.cs @@ -387,7 +387,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Group body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -448,7 +448,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Group body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/GroupLifecyclePoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/GroupLifecyclePoliciesRequestBuilder.cs index aacd374498a..ec59025e9ba 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/GroupLifecyclePoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/GroupLifecyclePoliciesRequestBuilder.cs @@ -100,7 +100,7 @@ public GroupLifecyclePoliciesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GroupLifecyclePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GroupLifecyclePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostRequestBody.cs index f5cb721ed90..78275bb77f7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostRequestBody.cs @@ -52,7 +52,7 @@ public AddGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.AddGroup.AddGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.AddGroup.AddGroupPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostResponse.cs index 12f550f53ab..3442279f48a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupPostResponse.cs @@ -42,7 +42,7 @@ public AddGroupPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.AddGroup.AddGroupPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.AddGroup.AddGroupPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupRequestBuilder.cs index 1b52b4ca421..64b007b56f3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupRequestBuilder.cs @@ -50,7 +50,7 @@ public AddGroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsAddGroupPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.AddGroup.AddGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public AddGroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.AddGroup.AddGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.AddGroup.AddGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupResponse.cs index 5acacf3aa8a..30da5e4692a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/AddGroup/AddGroupResponse.cs @@ -20,7 +20,7 @@ public partial class AddGroupResponse : global::Microsoft.Graph.Beta.Groups.Item /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.AddGroup.AddGroupResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.AddGroup.AddGroupResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/GroupLifecyclePolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/GroupLifecyclePolicyItemRequestBuilder.cs index cb0976e6992..df97dc118f5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/GroupLifecyclePolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/GroupLifecyclePolicyItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GroupLifecyclePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GroupLifecyclePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostRequestBody.cs index dba4a6c7c2f..f730530127a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostRequestBody.cs @@ -52,7 +52,7 @@ public RemoveGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostResponse.cs index 0f422befafe..2d7c1bff4f4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupPostResponse.cs @@ -42,7 +42,7 @@ public RemoveGroupPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupRequestBuilder.cs index a834fe46553..0f6a6fa8105 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupRequestBuilder.cs @@ -50,7 +50,7 @@ public RemoveGroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsRemoveGroupPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RemoveGroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupResponse.cs index 8f80b52f46d..b27802b2662 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/Item/RemoveGroup/RemoveGroupResponse.cs @@ -20,7 +20,7 @@ public partial class RemoveGroupResponse : global::Microsoft.Graph.Beta.Groups.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.Item.RemoveGroup.RemoveGroupResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupPostRequestBody.cs index 8cf7218dc73..19cbe08c7d4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupPostRequestBody.cs @@ -52,7 +52,7 @@ public RenewGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.RenewGroup.RenewGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.RenewGroup.RenewGroupPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupPostResponse.cs index 0b0e665bd2b..85769d0cc8e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupPostResponse.cs @@ -42,7 +42,7 @@ public RenewGroupPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.RenewGroup.RenewGroupPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.RenewGroup.RenewGroupPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupRequestBuilder.cs index fbc973dcd62..a9cfbc756b5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupRequestBuilder.cs @@ -51,7 +51,7 @@ public RenewGroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsRenewGroupPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.RenewGroup.RenewGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public RenewGroupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.RenewGroup.RenewGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.RenewGroup.RenewGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupResponse.cs index e3e6f8f0d45..cbe427baae3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupLifecyclePolicies/RenewGroup/RenewGroupResponse.cs @@ -20,7 +20,7 @@ public partial class RenewGroupResponse : global::Microsoft.Graph.Beta.Groups.It /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.RenewGroup.RenewGroupResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.GroupLifecyclePolicies.RenewGroup.RenewGroupResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Members/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Members/Ref/RefRequestBuilder.cs index ab5c5ad0579..f7f7f55b025 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Members/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Members/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/groups/{group%2Did}/members/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/OnPremisesSyncBehavior/OnPremisesSyncBehaviorRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/OnPremisesSyncBehavior/OnPremisesSyncBehaviorRequestBuilder.cs index d06c3c4a425..10345aeac39 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/OnPremisesSyncBehavior/OnPremisesSyncBehaviorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/OnPremisesSyncBehavior/OnPremisesSyncBehaviorRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnPremisesSyncBehavior body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesSyncBehavior body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlPostRequestBody.cs index 3392200cb3a..34d30df19b6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlPostRequestBody.cs @@ -52,7 +52,7 @@ public GetNotebookFromWebUrlPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.GetNotebookFromWebUrl.GetNotebookFromWebUrlPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.GetNotebookFromWebUrl.GetNotebookFromWebUrlPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("webUrl", WebUrl); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlRequestBuilder.cs index a5afa2c53c2..4ed8d291c73 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlRequestBuilder.cs @@ -52,7 +52,7 @@ public GetNotebookFromWebUrlRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.GetNotebookFromWebUrl.GetNotebookFromWebUrlPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.GetNotebookFromWebUrl.GetNotebookFromWebUrlPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksGetResponse.cs index ae502fc34dc..c98394d0d0c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetRecentNotebooksWithIncludePersonalNotebooksGetResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksResponse.cs index 01815f0aeb1..78d6de76742 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksResponse.cs @@ -20,7 +20,7 @@ public partial class GetRecentNotebooksWithIncludePersonalNotebooksResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookPostRequestBody.cs index 0f3a4959db8..0c02654a8c7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.CopyNotebook.CopyNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.CopyNotebook.CopyNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("notebookFolder", NotebookFolder); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookRequestBuilder.cs index 88f0946e21d..6bcadf8a2d5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.CopyNotebook.CopyNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.CopyNotebook.CopyNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/NotebookItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/NotebookItemRequestBuilder.cs index a5c1eeb22fc..736d6902f80 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/NotebookItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/NotebookItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Notebook body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Notebook body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/SectionGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/SectionGroupItemRequestBuilder.cs index 7286212aaf9..d32c8923aba 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/SectionGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/SectionGroupItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs index 0c4551e2772..8c37900c393 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs index 7eb4dcf8035..76f97983735 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs index 56f66835695..154e9b08f01 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToSectionGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs index ed02bdd2e18..d4afb431829 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionGroupRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs index d6ba2a33c89..7535725c50b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs index 6babb13c7cd..78759ccb406 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index fa0935f9d72..28a562411fd 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index 32e8a8a0295..d4d39a07757 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs index feac976c98e..43a3efdb92b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index 45938f208ef..9f39d6979b5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index a6cb5ea9a06..a5f7acbd4f3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Not public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs index e0ec3ccc4ea..18355e5029a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/SectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/SectionsRequestBuilder.cs index 34c4400c56b..7b314fb5831 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/SectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/SectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/SectionGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/SectionGroupsRequestBuilder.cs index efde7dd32b7..acc57b35ad3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/SectionGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/SectionGroups/SectionGroupsRequestBuilder.cs @@ -93,7 +93,7 @@ public SectionGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs index 29c2707cb9a..66073bbfee8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs index d5821eb0238..d5f9bd208c6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs index 52a4063cf73..a430f9e878e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToSectionGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs index 19c0ef6b541..f9b3b371881 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionGroupRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs index 2acfb1cda8a..84dbba95217 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs index 94e076a5ec2..040863ffc47 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index 9ced5dc2e2d..c12f8eeea11 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index 9ec91e84c7c..aac61aebcc5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs index 858abe53ffb..e3b45d500e2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index 1262de68532..f5bc5cd4785 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index d2faf2df27c..4efde2e1bf5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Not public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/PagesRequestBuilder.cs index d7034428667..add5ee73318 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/Item/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/SectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/SectionsRequestBuilder.cs index 240d8f1c3e4..f5d0d69e318 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/SectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/Item/Sections/SectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/NotebooksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/NotebooksRequestBuilder.cs index 1e370453de5..9e37da00ccd 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/NotebooksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Notebooks/NotebooksRequestBuilder.cs @@ -90,7 +90,7 @@ public NotebooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Usage: includePersonalNotebooks={includePersonalNotebooks} public global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder GetRecentNotebooksWithIncludePersonalNotebooks(bool? includePersonalNotebooks) { - _ = includePersonalNotebooks ?? throw new ArgumentNullException(nameof(includePersonalNotebooks)); + if(ReferenceEquals(includePersonalNotebooks, null)) throw new ArgumentNullException(nameof(includePersonalNotebooks)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder(PathParameters, RequestAdapter, includePersonalNotebooks); } /// @@ -110,7 +110,7 @@ public NotebooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Notebook body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Notebook body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/OnenoteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/OnenoteRequestBuilder.cs index c5414476671..457708a3515 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/OnenoteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/OnenoteRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Onenote body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Onenote body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Operations/Item/OnenoteOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Operations/Item/OnenoteOperationItemRequestBuilder.cs index 8437476ba9a..53838c05c89 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Operations/Item/OnenoteOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Operations/Item/OnenoteOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Operations/OperationsRequestBuilder.cs index 5bd5f5cb6a2..4007cdd8c02 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs index c6dd1241fda..8c98462b001 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index d9ba9ac1826..d192a651518 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index 8f7c0c69512..b78c2ff788a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/OnenotePageItemRequestBuilder.cs index 10e9aebdcf8..9ac9107e449 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index 8ffb4fbb9f3..7b311d33eba 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index da0c08a0d82..2530c99e45d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Pag public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/PagesRequestBuilder.cs index f56d0c69d80..55f12ff5f31 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Resources/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Resources/Item/Content/ContentRequestBuilder.cs index e445005e209..c16b84ae843 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Resources/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Resources/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Resources/Item/OnenoteResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Resources/Item/OnenoteResourceItemRequestBuilder.cs index f33ad30edf2..638f22e92f0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Resources/Item/OnenoteResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Resources/Item/OnenoteResourceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Resources/ResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Resources/ResourcesRequestBuilder.cs index 947c5753163..f61dd852f3a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Resources/ResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Resources/ResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public ResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/SectionGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/SectionGroupItemRequestBuilder.cs index 48fb4f3c182..339db507323 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/SectionGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/SectionGroupItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs index 9c761c2419b..16c33be9553 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs index 574b473ee15..96981e49ce2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs index d7f9ad993fa..e6bd9905ec0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToSectionGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs index bde8e7a8721..10d913670b4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionGroupRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs index 67d9dac8c4a..c2daa8c5c33 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs index d2e3c43636e..46d4fe377eb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index 444fc07a417..1f1ac2be7a4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index 18fdd379743..e40aed7436c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs index 40a9e3254c2..b3e702d19c7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index 26c14a2d0dc..936b47cd00b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index 1ca68e0883b..155d7687e5e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sec public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs index 2702615d1be..bd3ad0874ad 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/SectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/SectionsRequestBuilder.cs index 65ecc5970db..3c0404a94d1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/SectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/Item/Sections/SectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/SectionGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/SectionGroupsRequestBuilder.cs index f73b0181433..059b0ba4088 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/SectionGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/SectionGroups/SectionGroupsRequestBuilder.cs @@ -93,7 +93,7 @@ public SectionGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs index ffdfc128eb2..25b13a7e4d7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs index 10bcb64b376..38ebafccf1a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs index 14b31512aa3..60a892b5815 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToSectionGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs index 68a5465a78e..6159fa4a653 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionGroupRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/OnenoteSectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/OnenoteSectionItemRequestBuilder.cs index 03899b0a960..482ffbec065 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/OnenoteSectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/OnenoteSectionItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs index 1c5d52bcdb2..9181c27a39f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index 721900e17dd..c1d247c3cad 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index dab8ded4997..377d68b247d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs index 73cc82ae1dd..417c9d4473f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index 04374f3a180..27383c4c601 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index 3052403be32..0851b0eca4b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sec public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Onenote.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/PagesRequestBuilder.cs index af2d0d99280..58f180b1a54 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/Item/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/SectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/SectionsRequestBuilder.cs index f34516e2c17..ff8a25d6c49 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/SectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Onenote/Sections/SectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Owners/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Owners/Ref/RefRequestBuilder.cs index dfe7d87da0d..6a36bb75cbb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Owners/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Owners/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/groups/{group%2Did}/owners/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs index a30c0fb3e7c..96689ca7031 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/PermissionGrants/PermissionGrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/PermissionGrants/PermissionGrantsRequestBuilder.cs index a74f237a5d2..afd35898084 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/PermissionGrants/PermissionGrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/PermissionGrants/PermissionGrantsRequestBuilder.cs @@ -94,7 +94,7 @@ public PermissionGrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Photo/PhotoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Photo/PhotoRequestBuilder.cs index 3c2f156b561..d116ac38f53 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Photo/PhotoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Photo/PhotoRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ProfilePhoto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProfilePhoto body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Photo/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Photo/Value/ContentRequestBuilder.cs index 96e9b0182f9..9f4fd5f6ae1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Photo/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Photo/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Photos/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Photos/Item/Value/ContentRequestBuilder.cs index 8a0ecec00e3..b06f01a9520 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Photos/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Photos/Item/Value/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/PlannerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/PlannerRequestBuilder.cs index b6438799eb3..4c72633713d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/PlannerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/PlannerRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Delta/DeltaGetResponse.cs index faf4b5de249..98248519336 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Delta/DeltaResponse.cs index bd22060ddda..bd4f28d0c2d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Pl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs index a3218ebf740..34a4e22e0ec 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs @@ -52,7 +52,7 @@ public ArchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Archive.ArchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Archive.ArchivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("justification", Justification); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs index 51e2c32cbba..410f376939b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Planner.Pla public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs index 975416601e0..b92307178d8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs @@ -99,7 +99,7 @@ public BucketsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs index b807ef999f3..a1a0e92cfdd 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Buckets.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Buckets.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs index 8ec12382b76..87f5e995ea4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Pl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Buckets.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Buckets.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs index feaa6cd8226..35bf0fc5533 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs index 9d7fa75fede..9cd49200b32 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs index 49216c34827..b8c8ebf7508 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Pl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs index 8863deee5ce..f285a12b2a9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs index 62db98a1e16..aa502d37eb6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs index 125b113833b..38d829b2ec7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs index ed9259cf354..37034b8a3fb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs index 9486a166348..dd2dd465b3b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs index 726ab5c4266..d630051152d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs @@ -99,7 +99,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Details/DetailsRequestBuilder.cs index e7e71ee647f..3c7ec905028 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerPlanDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlanDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs index fc5e674f626..2dafe4abc22 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs @@ -53,7 +53,7 @@ public MoveToContainerPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("container", Container); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs index 8a21bc36e71..ff43fa4f041 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs @@ -52,7 +52,7 @@ public MoveToContainerRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs index 1e6725319f9..8cd4acb4e7d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs index b8bf0cc425e..4f201fd7a32 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Tasks.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Tasks.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs index 939f5fe7c0f..32680781fd2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Pl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Tasks.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Tasks.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs index bcd51ef2894..98aa1b4f79b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs index 37f06361894..c51461cdc73 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs index 1c33ea5b60c..e6b2cbff300 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs index 4d75bdff90c..c86ad9c88c5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs index d44fe886e2d..e8318d663b2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs index 2112bd208b3..52e6d450d34 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs @@ -99,7 +99,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs index 24a5a2e9e72..a10bd6bb07a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs @@ -52,7 +52,7 @@ public UnarchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("justification", Justification); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs index e8041540251..60c0828a38d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Planner.Pla public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/PlansRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/PlansRequestBuilder.cs index e47b3f4fe91..51e097554ce 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/PlansRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Planner/Plans/PlansRequestBuilder.cs @@ -100,7 +100,7 @@ public PlansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/RejectedSenders/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/RejectedSenders/Ref/RefRequestBuilder.cs index d251044fad8..53180df5320 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/RejectedSenders/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/RejectedSenders/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/groups/{group%2Did}/rejectedSenders/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Settings/Item/DirectorySettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Settings/Item/DirectorySettingItemRequestBuilder.cs index 6e9298cc9b1..804bc4c820a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Settings/Item/DirectorySettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Settings/Item/DirectorySettingItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DirectorySetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DirectorySetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Settings/SettingsRequestBuilder.cs index fbefcd8619e..21a4d31b92f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Settings/SettingsRequestBuilder.cs @@ -94,7 +94,7 @@ public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DirectorySetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DirectorySetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddPostRequestBody.cs index 8fae9a47ed2..f51681bd9aa 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddPostRequestBody.cs @@ -53,7 +53,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Add.AddPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddPostResponse.cs index d5ca197e4d8..2d3ad8173ae 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddPostResponse.cs @@ -36,7 +36,7 @@ public partial class AddPostResponse : global::Microsoft.Graph.Beta.Models.BaseC /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Add.AddPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Add.AddPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddRequestBuilder.cs index 308457302ec..7207b0acfbf 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddRequestBuilder.cs @@ -51,7 +51,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsAddPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddResponse.cs index 7d99f067bb2..f71ac87bda3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Add/AddResponse.cs @@ -20,7 +20,7 @@ public partial class AddResponse : global::Microsoft.Graph.Beta.Groups.Item.Site /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Add.AddResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Add.AddResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Delta/DeltaGetResponse.cs index 3aacff7b841..31bedc59a16 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Delta/DeltaResponse.cs index 482e73eef39..ca4aca35867 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Si /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/GetAllSites/GetAllSitesGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/GetAllSites/GetAllSitesGetResponse.cs index fe88ef8878c..f6e98f35577 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/GetAllSites/GetAllSitesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/GetAllSites/GetAllSitesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllSitesGetResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.GetAllSites.GetAllSitesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.GetAllSites.GetAllSitesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/GetAllSites/GetAllSitesResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/GetAllSites/GetAllSitesResponse.cs index 0d8385e9b71..f232ee98189 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/GetAllSites/GetAllSitesResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/GetAllSites/GetAllSitesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllSitesResponse : global::Microsoft.Graph.Beta.Groups.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.GetAllSites.GetAllSitesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.GetAllSites.GetAllSitesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/AnalyticsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/AnalyticsRequestBuilder.cs index 177d1a4242f..31408bcb63a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/AnalyticsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/AnalyticsRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemAnalytics body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemAnalytics body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/ActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/ActivitiesRequestBuilder.cs index f86dffb6cda..bfd1879ee3f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/ActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/ActivitiesRequestBuilder.cs @@ -93,7 +93,7 @@ public ActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs index 4c5b1a2bbce..71eec5d0765 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs index cf6123ccf71..b7cec1ebddb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/Item/ItemActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/Item/ItemActivityItemRequestBuilder.cs index 587665b9fb1..76ef29762a5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/Item/ItemActivityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/Activities/Item/ItemActivityItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/ItemActivityStatItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/ItemActivityStatItemRequestBuilder.cs index fa22bf28288..849ccc613f5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/ItemActivityStatItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/Item/ItemActivityStatItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemActivityStat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivityStat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/ItemActivityStatsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/ItemActivityStatsRequestBuilder.cs index e67d740b1c5..238a2853adf 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/ItemActivityStatsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Analytics/ItemActivityStats/ItemActivityStatsRequestBuilder.cs @@ -93,7 +93,7 @@ public ItemActivityStatsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemActivityStat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivityStat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Columns/ColumnsRequestBuilder.cs index e003277b4c0..0bae639a6fc 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Columns/ColumnsRequestBuilder.cs @@ -93,7 +93,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs index 3fd0d64a6e9..57d5917aa50 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/ContentModelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/ContentModelsRequestBuilder.cs index d0c84b2bb25..455b0eeaec8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/ContentModelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/ContentModelsRequestBuilder.cs @@ -104,7 +104,7 @@ public ContentModelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ContentModel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ContentModel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/AddToDrive/AddToDrivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/AddToDrive/AddToDrivePostRequestBody.cs index f9da12b7817..9f8a55f48b8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/AddToDrive/AddToDrivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/AddToDrive/AddToDrivePostRequestBody.cs @@ -52,7 +52,7 @@ public AddToDrivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.GetByNameWithModelName.AddToDrive.AddToDrivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.GetByNameWithModelName.AddToDrive.AddToDrivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("driveId", DriveId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/AddToDrive/AddToDriveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/AddToDrive/AddToDriveRequestBuilder.cs index d0ecce6e620..65a258a4d2e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/AddToDrive/AddToDriveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/AddToDrive/AddToDriveRequestBuilder.cs @@ -52,7 +52,7 @@ public AddToDriveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.GetByNameWithModelName.AddToDrive.AddToDrivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.GetByNameWithModelName.AddToDrive.AddToDrivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/GetAppliedDrives/GetAppliedDrivesGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/GetAppliedDrives/GetAppliedDrivesGetResponse.cs index 54273ddd59b..836ea3079eb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/GetAppliedDrives/GetAppliedDrivesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/GetAppliedDrives/GetAppliedDrivesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAppliedDrivesGetResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.GetByNameWithModelName.GetAppliedDrives.GetAppliedDrivesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.GetByNameWithModelName.GetAppliedDrives.GetAppliedDrivesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/GetAppliedDrives/GetAppliedDrivesResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/GetAppliedDrives/GetAppliedDrivesResponse.cs index 0b9580c0521..24a7bb33d60 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/GetAppliedDrives/GetAppliedDrivesResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/GetAppliedDrives/GetAppliedDrivesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAppliedDrivesResponse : global::Microsoft.Graph.Beta.Gro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.GetByNameWithModelName.GetAppliedDrives.GetAppliedDrivesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.GetByNameWithModelName.GetAppliedDrives.GetAppliedDrivesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/RemoveFromDrive/RemoveFromDrivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/RemoveFromDrive/RemoveFromDrivePostRequestBody.cs index ccfcca1c1be..0e9a66ea0b9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/RemoveFromDrive/RemoveFromDrivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/RemoveFromDrive/RemoveFromDrivePostRequestBody.cs @@ -52,7 +52,7 @@ public RemoveFromDrivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.GetByNameWithModelName.RemoveFromDrive.RemoveFromDrivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.GetByNameWithModelName.RemoveFromDrive.RemoveFromDrivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("driveId", DriveId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/RemoveFromDrive/RemoveFromDriveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/RemoveFromDrive/RemoveFromDriveRequestBuilder.cs index 7bcd8f2efda..f00bf532728 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/RemoveFromDrive/RemoveFromDriveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/GetByNameWithModelName/RemoveFromDrive/RemoveFromDriveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.GetByNameWithModelName.RemoveFromDrive.RemoveFromDrivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.GetByNameWithModelName.RemoveFromDrive.RemoveFromDrivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/AddToDrive/AddToDrivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/AddToDrive/AddToDrivePostRequestBody.cs index 9397004bfa9..41d0d7c354c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/AddToDrive/AddToDrivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/AddToDrive/AddToDrivePostRequestBody.cs @@ -52,7 +52,7 @@ public AddToDrivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.Item.AddToDrive.AddToDrivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.Item.AddToDrive.AddToDrivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("driveId", DriveId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/AddToDrive/AddToDriveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/AddToDrive/AddToDriveRequestBuilder.cs index 12ca9d22e0a..17f80639e69 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/AddToDrive/AddToDriveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/AddToDrive/AddToDriveRequestBuilder.cs @@ -52,7 +52,7 @@ public AddToDriveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.Item.AddToDrive.AddToDrivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.Item.AddToDrive.AddToDrivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/ContentModelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/ContentModelItemRequestBuilder.cs index a78972d5973..8dc31399c89 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/ContentModelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/ContentModelItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ContentModel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ContentModel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/GetAppliedDrives/GetAppliedDrivesGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/GetAppliedDrives/GetAppliedDrivesGetResponse.cs index a2216cceee9..40fe1ae4f7a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/GetAppliedDrives/GetAppliedDrivesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/GetAppliedDrives/GetAppliedDrivesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAppliedDrivesGetResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.Item.GetAppliedDrives.GetAppliedDrivesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.Item.GetAppliedDrives.GetAppliedDrivesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/GetAppliedDrives/GetAppliedDrivesResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/GetAppliedDrives/GetAppliedDrivesResponse.cs index c0a2c2198da..deffce1f1a9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/GetAppliedDrives/GetAppliedDrivesResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/GetAppliedDrives/GetAppliedDrivesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAppliedDrivesResponse : global::Microsoft.Graph.Beta.Gro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.Item.GetAppliedDrives.GetAppliedDrivesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.Item.GetAppliedDrives.GetAppliedDrivesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/RemoveFromDrive/RemoveFromDrivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/RemoveFromDrive/RemoveFromDrivePostRequestBody.cs index 927c2b6555b..8a01151bffe 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/RemoveFromDrive/RemoveFromDrivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/RemoveFromDrive/RemoveFromDrivePostRequestBody.cs @@ -52,7 +52,7 @@ public RemoveFromDrivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.Item.RemoveFromDrive.RemoveFromDrivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.Item.RemoveFromDrive.RemoveFromDrivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("driveId", DriveId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/RemoveFromDrive/RemoveFromDriveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/RemoveFromDrive/RemoveFromDriveRequestBuilder.cs index 1bca09ee24d..2700f1de1f5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/RemoveFromDrive/RemoveFromDriveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentModels/Item/RemoveFromDrive/RemoveFromDriveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.Item.RemoveFromDrive.RemoveFromDrivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentModels.Item.RemoveFromDrive.RemoveFromDrivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopy/AddCopyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopy/AddCopyPostRequestBody.cs index 744aa889c49..8542aa5bfa4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopy/AddCopyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopy/AddCopyPostRequestBody.cs @@ -52,7 +52,7 @@ public AddCopyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.AddCopy.AddCopyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.AddCopy.AddCopyPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("contentType", ContentType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopy/AddCopyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopy/AddCopyRequestBuilder.cs index 1361a412ad8..ede4fd97390 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopy/AddCopyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopy/AddCopyRequestBuilder.cs @@ -52,7 +52,7 @@ public AddCopyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.AddCopy.AddCopyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.AddCopy.AddCopyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubPostRequestBody.cs index 92dcece285a..f81e925c9e4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubPostRequestBody.cs @@ -52,7 +52,7 @@ public AddCopyFromContentTypeHubPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.AddCopyFromContentTypeHub.AddCopyFromContentTypeHubPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.AddCopyFromContentTypeHub.AddCopyFromContentTypeHubPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("contentTypeId", ContentTypeId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubRequestBuilder.cs index a25cc0ed601..50f4a32b81e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubRequestBuilder.cs @@ -52,7 +52,7 @@ public AddCopyFromContentTypeHubRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.AddCopyFromContentTypeHub.AddCopyFromContentTypeHubPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.AddCopyFromContentTypeHub.AddCopyFromContentTypeHubPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/ContentTypesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/ContentTypesRequestBuilder.cs index c0577b6a9ba..b5071889b87 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/ContentTypesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/ContentTypesRequestBuilder.cs @@ -111,7 +111,7 @@ public ContentTypesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ContentType body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ContentType body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesGetResponse.cs index 8e22c893d6f..3268d7b8856 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetCompatibleHubContentTypesGetResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.GetCompatibleHubContentTypes.GetCompatibleHubContentTypesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.GetCompatibleHubContentTypes.GetCompatibleHubContentTypesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesResponse.cs index 240756663d4..7c73aac9c25 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesResponse.cs @@ -20,7 +20,7 @@ public partial class GetCompatibleHubContentTypesResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.GetCompatibleHubContentTypes.GetCompatibleHubContentTypesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.GetCompatibleHubContentTypes.GetCompatibleHubContentTypesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesPostRequestBody.cs index 9bb83bb6981..d052ae5343a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesPostRequestBody.cs @@ -58,7 +58,7 @@ public AssociateWithHubSitesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.Item.AssociateWithHubSites.AssociateWithHubSitesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.Item.AssociateWithHubSites.AssociateWithHubSitesPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("hubSiteUrls", HubSiteUrls); writer.WriteBoolValue("propagateToExistingLists", PropagateToExistingLists); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesRequestBuilder.cs index 8711fc36220..e772b891792 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.Item.AssociateWithHubSites.AssociateWithHubSitesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.Item.AssociateWithHubSites.AssociateWithHubSitesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/ColumnLinks/ColumnLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/ColumnLinks/ColumnLinksRequestBuilder.cs index de49eae9784..b7cf9debff3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/ColumnLinks/ColumnLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/ColumnLinks/ColumnLinksRequestBuilder.cs @@ -93,7 +93,7 @@ public ColumnLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ColumnLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/ColumnLinks/Item/ColumnLinkItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/ColumnLinks/Item/ColumnLinkItemRequestBuilder.cs index a4d7adab163..e59c90cf3ef 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/ColumnLinks/Item/ColumnLinkItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/ColumnLinks/Item/ColumnLinkItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ColumnLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/Columns/ColumnsRequestBuilder.cs index 4b2cdf9f83a..9f8a4b7181b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/Columns/ColumnsRequestBuilder.cs @@ -93,7 +93,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs index f359c5e1517..8211dc70160 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/ContentTypeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/ContentTypeItemRequestBuilder.cs index 94b6df94fee..6839689e2c6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/ContentTypeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/ContentTypeItemRequestBuilder.cs @@ -156,7 +156,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ContentType body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -217,7 +217,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ContentType body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationPostRequestBody.cs index af78ab6e263..7aa74297f2f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationPostRequestBody.cs @@ -69,7 +69,7 @@ public CopyToDefaultContentLocationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.Item.CopyToDefaultContentLocation.CopyToDefaultContentLocationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.Item.CopyToDefaultContentLocation.CopyToDefaultContentLocationPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("destinationFileName", DestinationFileName); writer.WriteObjectValue("sourceFile", SourceFile); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationRequestBuilder.cs index 759f00475cf..9a57174b391 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.Item.CopyToDefaultContentLocation.CopyToDefaultContentLocationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.Item.CopyToDefaultContentLocation.CopyToDefaultContentLocationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/IsPublished/IsPublishedGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/IsPublished/IsPublishedGetResponse.cs index 52658d1b7e2..bcc263b2741 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/IsPublished/IsPublishedGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/IsPublished/IsPublishedGetResponse.cs @@ -42,7 +42,7 @@ public IsPublishedGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.Item.IsPublished.IsPublishedGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.Item.IsPublished.IsPublishedGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/IsPublished/IsPublishedResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/IsPublished/IsPublishedResponse.cs index 4679eb79e38..3412ffbdc85 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/IsPublished/IsPublishedResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/ContentTypes/Item/IsPublished/IsPublishedResponse.cs @@ -20,7 +20,7 @@ public partial class IsPublishedResponse : global::Microsoft.Graph.Beta.Groups.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.Item.IsPublished.IsPublishedResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.ContentTypes.Item.IsPublished.IsPublishedResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 68b969de5c2..c58a59b9e2f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/DocumentProcessingJobs/DocumentProcessingJobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/DocumentProcessingJobs/DocumentProcessingJobsRequestBuilder.cs index cf560edb4fd..711f686ac99 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/DocumentProcessingJobs/DocumentProcessingJobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/DocumentProcessingJobs/DocumentProcessingJobsRequestBuilder.cs @@ -93,7 +93,7 @@ public DocumentProcessingJobsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DocumentProcessingJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DocumentProcessingJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/DocumentProcessingJobs/Item/DocumentProcessingJobItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/DocumentProcessingJobs/Item/DocumentProcessingJobItemRequestBuilder.cs index 7fc6fde1379..bd53d3f4c6f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/DocumentProcessingJobs/Item/DocumentProcessingJobItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/DocumentProcessingJobs/Item/DocumentProcessingJobItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DocumentProcessingJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DocumentProcessingJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Extensions/ExtensionsRequestBuilder.cs index d29fb31f3f4..92a060422d8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 77dd40a06a5..d0082115e57 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs index 641f44f6dc0..40ff72c8ed6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWith /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs index 4b4ebfb63fc..5d7caed6be9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs @@ -20,7 +20,7 @@ public partial class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWith /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdGetResponse.cs index e76f151ed42..313de650566 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetApplicableContentTypesForListWithListIdGetResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetApplicableContentTypesForListWithListId.GetApplicableContentTypesForListWithListIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetApplicableContentTypesForListWithListId.GetApplicableContentTypesForListWithListIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdResponse.cs index 8429de7484a..6099151a403 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdResponse.cs @@ -20,7 +20,7 @@ public partial class GetApplicableContentTypesForListWithListIdResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetApplicableContentTypesForListWithListId.GetApplicableContentTypesForListWithListIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetApplicableContentTypesForListWithListId.GetApplicableContentTypesForListWithListIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Analytics/AnalyticsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Analytics/AnalyticsRequestBuilder.cs index 820da16da14..344e8c58432 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Analytics/AnalyticsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Analytics/AnalyticsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemAnalytics body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemAnalytics body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Columns/ColumnsRequestBuilder.cs index 6dfd18979c0..a045b7a2dea 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Columns/ColumnsRequestBuilder.cs @@ -74,7 +74,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/ContentModels/ContentModelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/ContentModels/ContentModelsRequestBuilder.cs index 4c2019ef92f..7f9cfbd0e1f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/ContentModels/ContentModelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/ContentModels/ContentModelsRequestBuilder.cs @@ -74,7 +74,7 @@ public ContentModelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ContentModel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ContentModel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/ContentTypes/ContentTypesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/ContentTypes/ContentTypesRequestBuilder.cs index 450ccd0d69f..468f1005e40 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/ContentTypes/ContentTypesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/ContentTypes/ContentTypesRequestBuilder.cs @@ -74,7 +74,7 @@ public ContentTypesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ContentType body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ContentType body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/DocumentProcessingJobs/DocumentProcessingJobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/DocumentProcessingJobs/DocumentProcessingJobsRequestBuilder.cs index 1de3daa5fee..b097fc9e463 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/DocumentProcessingJobs/DocumentProcessingJobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/DocumentProcessingJobs/DocumentProcessingJobsRequestBuilder.cs @@ -74,7 +74,7 @@ public DocumentProcessingJobsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DocumentProcessingJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DocumentProcessingJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Extensions/ExtensionsRequestBuilder.cs index 2e53f160998..4c0ab374df9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Extensions/ExtensionsRequestBuilder.cs @@ -74,7 +74,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs index 3127edcb43c..5029de5d277 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWith /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetByPathWithPath.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetByPathWithPath.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs index e1c6195f648..ed78e34a563 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs @@ -20,7 +20,7 @@ public partial class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWith /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetByPathWithPath.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetByPathWithPath.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdGetResponse.cs index a6dd3b031f1..25fabe3f2b5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetApplicableContentTypesForListWithListIdGetResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetByPathWithPath.GetApplicableContentTypesForListWithListId.GetApplicableContentTypesForListWithListIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetByPathWithPath.GetApplicableContentTypesForListWithListId.GetApplicableContentTypesForListWithListIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdResponse.cs index dce3c9cdec8..82393e0c124 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/GetApplicableContentTypesForListWithListId/GetApplicableContentTypesForListWithListIdResponse.cs @@ -20,7 +20,7 @@ public partial class GetApplicableContentTypesForListWithListIdResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetByPathWithPath.GetApplicableContentTypesForListWithListId.GetApplicableContentTypesForListWithListIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.GetByPathWithPath.GetApplicableContentTypesForListWithListId.GetApplicableContentTypesForListWithListIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/InformationProtection/InformationProtectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/InformationProtection/InformationProtectionRequestBuilder.cs index 2597e6eaf1d..b77e069e0f6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/InformationProtection/InformationProtectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/InformationProtection/InformationProtectionRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InformationProtection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InformationProtection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Lists/ListsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Lists/ListsRequestBuilder.cs index e0a8e57d7bc..609156c2ce5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Lists/ListsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Lists/ListsRequestBuilder.cs @@ -74,7 +74,7 @@ public ListsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.List body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Onenote/OnenoteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Onenote/OnenoteRequestBuilder.cs index d7b84e6d48b..315680b88b3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Onenote/OnenoteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Onenote/OnenoteRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Onenote body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Onenote body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Operations/OperationsRequestBuilder.cs index 1618ba20b37..457d506edc4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Operations/OperationsRequestBuilder.cs @@ -74,7 +74,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RichLongRunningOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RichLongRunningOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/PageTemplates/PageTemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/PageTemplates/PageTemplatesRequestBuilder.cs index f7f457f7d5a..1557b2c2724 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/PageTemplates/PageTemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/PageTemplates/PageTemplatesRequestBuilder.cs @@ -74,7 +74,7 @@ public PageTemplatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PageTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PageTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Pages/PagesRequestBuilder.cs index 5d68e991c37..1b2e5cc4759 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Pages/PagesRequestBuilder.cs @@ -74,7 +74,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BaseSitePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BaseSitePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Permissions/PermissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Permissions/PermissionsRequestBuilder.cs index 028095ff70d..20867f2f91d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Permissions/PermissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/Permissions/PermissionsRequestBuilder.cs @@ -74,7 +74,7 @@ public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/RecycleBin/RecycleBinRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/RecycleBin/RecycleBinRequestBuilder.cs index 05eceec8d58..72278a546d5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/RecycleBin/RecycleBinRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/RecycleBin/RecycleBinRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RecycleBin body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RecycleBin body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/TermStore/TermStoreRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/TermStore/TermStoreRequestBuilder.cs index b8e8ac287be..562f51751c2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/TermStore/TermStoreRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/GetByPathWithPath/TermStore/TermStoreRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Store body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Store body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/DataLossPreventionPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/DataLossPreventionPoliciesRequestBuilder.cs index 1492038a7b8..c2ad3fc3988 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/DataLossPreventionPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/DataLossPreventionPoliciesRequestBuilder.cs @@ -99,7 +99,7 @@ public DataLossPreventionPoliciesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluatePostRequestBody.cs index 6cd858faa52..86a88920271 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluatePostRequestBody.cs @@ -85,7 +85,7 @@ public EvaluatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.DataLossPreventionPolicies.Evaluate.EvaluatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.DataLossPreventionPolicies.Evaluate.EvaluatePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("evaluationInput", EvaluationInput); writer.WriteObjectValue("notificationInfo", NotificationInfo); writer.WriteStringValue("target", Target); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluateRequestBuilder.cs index aeed8536c9e..a043144a23e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluateRequestBuilder.cs @@ -51,7 +51,7 @@ public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.DataLossPreventionPolicies.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.DataLossPreventionPolicies.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/Item/DataLossPreventionPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/Item/DataLossPreventionPolicyItemRequestBuilder.cs index fbdd78bb048..131b0e2f1f7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/Item/DataLossPreventionPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DataLossPreventionPolicies/Item/DataLossPreventionPolicyItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DecryptBuffer/DecryptBufferPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DecryptBuffer/DecryptBufferPostRequestBody.cs index 4c3c244eec7..10c71a74f9e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DecryptBuffer/DecryptBufferPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DecryptBuffer/DecryptBufferPostRequestBody.cs @@ -68,7 +68,7 @@ public DecryptBufferPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.DecryptBuffer.DecryptBufferPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.DecryptBuffer.DecryptBufferPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("encryptedBuffer", EncryptedBuffer); writer.WriteByteArrayValue("publishingLicense", PublishingLicense); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DecryptBuffer/DecryptBufferRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DecryptBuffer/DecryptBufferRequestBuilder.cs index fcc5521bd8a..b06082857e1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DecryptBuffer/DecryptBufferRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/DecryptBuffer/DecryptBufferRequestBuilder.cs @@ -52,7 +52,7 @@ public DecryptBufferRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.DecryptBuffer.DecryptBufferPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.DecryptBuffer.DecryptBufferPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/EncryptBuffer/EncryptBufferPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/EncryptBuffer/EncryptBufferPostRequestBody.cs index c605166b1a7..fda03009efb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/EncryptBuffer/EncryptBufferPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/EncryptBuffer/EncryptBufferPostRequestBody.cs @@ -58,7 +58,7 @@ public EncryptBufferPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.EncryptBuffer.EncryptBufferPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.EncryptBuffer.EncryptBufferPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("buffer", Buffer); writer.WriteGuidValue("labelId", LabelId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/EncryptBuffer/EncryptBufferRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/EncryptBuffer/EncryptBufferRequestBuilder.cs index 3364c67ced6..a4a7944884f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/EncryptBuffer/EncryptBufferRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/EncryptBuffer/EncryptBufferRequestBuilder.cs @@ -52,7 +52,7 @@ public EncryptBufferRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.EncryptBuffer.EncryptBufferPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.EncryptBuffer.EncryptBufferPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/InformationProtectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/InformationProtectionRequestBuilder.cs index 51e3a02eb83..3c2ca8f84bb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/InformationProtectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/InformationProtectionRequestBuilder.cs @@ -156,7 +156,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InformationProtection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -217,7 +217,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InformationProtection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostRequestBody.cs index 6a36bc423a6..3d0bd66b380 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluateApplicationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteObjectValue("labelingOptions", LabelingOptions); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostResponse.cs index eca7962a27b..177015a3f9e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostResponse.cs @@ -36,7 +36,7 @@ public partial class EvaluateApplicationPostResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationRequestBuilder.cs index 03cbf96c1cb..eca16bbf73f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationRequestBuilder.cs @@ -52,7 +52,7 @@ public EvaluateApplicationRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsEvaluateApplicationPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -79,7 +79,7 @@ public EvaluateApplicationRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -103,7 +103,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationResponse.cs index 64053b32eee..aaa1d33f97a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationResponse.cs @@ -20,7 +20,7 @@ public partial class EvaluateApplicationResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs index 1e48dac51cc..946256a689c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluateClassificationResultsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("classificationResults", ClassificationResults); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs index 92c1ddd8d72..a0b54fcd4af 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs @@ -36,7 +36,7 @@ public partial class EvaluateClassificationResultsPostResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsRequestBuilder.cs index 8c388baad56..bedb61233a7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsRequestBuilder.cs @@ -52,7 +52,7 @@ public EvaluateClassificationResultsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsEvaluateClassificationResultsPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -79,7 +79,7 @@ public EvaluateClassificationResultsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -103,7 +103,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsResponse.cs index bc6e49a5e67..2640b645c22 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsResponse.cs @@ -20,7 +20,7 @@ public partial class EvaluateClassificationResultsResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostRequestBody.cs index da3e07a07f9..7049c9025f8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluateRemovalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteObjectValue("downgradeJustification", DowngradeJustification); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostResponse.cs index 7cd61b6b219..00465d50464 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostResponse.cs @@ -36,7 +36,7 @@ public partial class EvaluateRemovalPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalRequestBuilder.cs index 87af94bac46..eaaf8eb69ad 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalRequestBuilder.cs @@ -52,7 +52,7 @@ public EvaluateRemovalRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsEvaluateRemovalPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -79,7 +79,7 @@ public EvaluateRemovalRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -103,7 +103,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalResponse.cs index 6ca46e3f300..d7e4d57e63b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalResponse.cs @@ -20,7 +20,7 @@ public partial class EvaluateRemovalResponse : global::Microsoft.Graph.Beta.Grou /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelPostRequestBody.cs index 06a5e3351e0..3f7cac33084 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelPostRequestBody.cs @@ -53,7 +53,7 @@ public ExtractLabelPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.ExtractLabel.ExtractLabelPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.ExtractLabel.ExtractLabelPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelRequestBuilder.cs index d1050f8b078..af6cbe9649c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelRequestBuilder.cs @@ -53,7 +53,7 @@ public ExtractLabelRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.ExtractLabel.ExtractLabelPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.Policy.Labels.ExtractLabel.ExtractLabelPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/Item/InformationProtectionLabelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/Item/InformationProtectionLabelItemRequestBuilder.cs index ec044fe5e43..28f70608e11 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/Item/InformationProtectionLabelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/Item/InformationProtectionLabelItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InformationProtectionLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InformationProtectionLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/LabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/LabelsRequestBuilder.cs index eafaaacf9a7..092d83d1d95 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/LabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/Labels/LabelsRequestBuilder.cs @@ -125,7 +125,7 @@ public LabelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.InformationProtectionLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.InformationProtectionLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/PolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/PolicyRequestBuilder.cs index 54c337417aa..f107fdda2ac 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/PolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/Policy/PolicyRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InformationProtectionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InformationProtectionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs index e3c95ea9de0..f97525d92a8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs @@ -101,7 +101,7 @@ public ComputeRightsAndInheritancePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("delegatedUserEmail", DelegatedUserEmail); writer.WriteStringValue("locale", Locale); writer.WriteCollectionOfObjectValues("protectedContents", ProtectedContents); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs index b05c7c2df91..deb4a22032f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs @@ -52,7 +52,7 @@ public ComputeRightsAndInheritanceRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs index 4500112b439..79bfb62665e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.Evaluate.EvaluatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.Evaluate.EvaluatePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("currentLabel", CurrentLabel); writer.WriteCollectionOfObjectValues("discoveredSensitiveTypes", DiscoveredSensitiveTypes); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs index 99969da23c7..05a8e63dc00 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs @@ -51,7 +51,7 @@ public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs index bac7b0daa43..047e615fd0d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs index d890d02ae05..7bf85aff97d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs @@ -101,7 +101,7 @@ public ComputeRightsAndInheritancePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("delegatedUserEmail", DelegatedUserEmail); writer.WriteStringValue("locale", Locale); writer.WriteCollectionOfObjectValues("protectedContents", ProtectedContents); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs index c7626023206..cf676dc7f6a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs @@ -52,7 +52,7 @@ public ComputeRightsAndInheritanceRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs index c675da069bc..c42134cb5a1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("currentLabel", CurrentLabel); writer.WriteCollectionOfObjectValues("discoveredSensitiveTypes", DiscoveredSensitiveTypes); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs index 98e46aadb54..153d4ef2104 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs @@ -51,7 +51,7 @@ public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs index 1c501ab7086..07900d6e255 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs index 3060728a660..075e510bb60 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs @@ -120,7 +120,7 @@ public SublabelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs index 5406ea26e2c..b9ca43220f5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs @@ -120,7 +120,7 @@ public SensitivityLabelsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityPolicySettings/SensitivityPolicySettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityPolicySettings/SensitivityPolicySettingsRequestBuilder.cs index c9d7c7224ab..0c2470f6ac4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityPolicySettings/SensitivityPolicySettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SensitivityPolicySettings/SensitivityPolicySettingsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SensitivityPolicySettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityPolicySettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SignDigest/SignDigestPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SignDigest/SignDigestPostRequestBody.cs index 322c3429d8c..e6dc32206af 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SignDigest/SignDigestPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SignDigest/SignDigestPostRequestBody.cs @@ -52,7 +52,7 @@ public SignDigestPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SignDigest.SignDigestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SignDigest.SignDigestPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("digest", Digest); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SignDigest/SignDigestRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SignDigest/SignDigestRequestBuilder.cs index 5bb8db44d2b..4d7e4b0bff8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SignDigest/SignDigestRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/SignDigest/SignDigestRequestBuilder.cs @@ -52,7 +52,7 @@ public SignDigestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SignDigest.SignDigestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.SignDigest.SignDigestPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/Item/Results/Item/ThreatAssessmentResultItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/Item/Results/Item/ThreatAssessmentResultItemRequestBuilder.cs index 30197386bbd..02fcdbf64c7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/Item/Results/Item/ThreatAssessmentResultItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/Item/Results/Item/ThreatAssessmentResultItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ThreatAssessmentResult body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ThreatAssessmentResult body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/Item/Results/ResultsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/Item/Results/ResultsRequestBuilder.cs index d2dea79ac69..536e26ba24e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/Item/Results/ResultsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/Item/Results/ResultsRequestBuilder.cs @@ -93,7 +93,7 @@ public ResultsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ThreatAssessmentResult body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ThreatAssessmentResult body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/Item/ThreatAssessmentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/Item/ThreatAssessmentRequestItemRequestBuilder.cs index f7fcf1e8262..cedc68472af 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/Item/ThreatAssessmentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/Item/ThreatAssessmentRequestItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/ThreatAssessmentRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/ThreatAssessmentRequestsRequestBuilder.cs index 758e4a04d2e..a9598b245ec 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/ThreatAssessmentRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/ThreatAssessmentRequests/ThreatAssessmentRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public ThreatAssessmentRequestsRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/VerifySignature/VerifySignaturePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/VerifySignature/VerifySignaturePostRequestBody.cs index 098673b907e..35731a4039f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/VerifySignature/VerifySignaturePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/VerifySignature/VerifySignaturePostRequestBody.cs @@ -84,7 +84,7 @@ public VerifySignaturePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.VerifySignature.VerifySignaturePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.VerifySignature.VerifySignaturePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("digest", Digest); writer.WriteByteArrayValue("signature", Signature); writer.WriteStringValue("signingKeyId", SigningKeyId); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/VerifySignature/VerifySignatureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/VerifySignature/VerifySignatureRequestBuilder.cs index 45a6da46e49..5e7e04e9f0e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/VerifySignature/VerifySignatureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/InformationProtection/VerifySignature/VerifySignatureRequestBuilder.cs @@ -52,7 +52,7 @@ public VerifySignatureRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.VerifySignature.VerifySignaturePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.InformationProtection.VerifySignature.VerifySignaturePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 1439ea4d73e..236bdc50ec8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Activities/ActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Activities/ActivitiesRequestBuilder.cs index 99b7d7c059b..fb882877894 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Activities/ActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Activities/ActivitiesRequestBuilder.cs @@ -74,7 +74,7 @@ public ActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Columns/ColumnsRequestBuilder.cs index a08a954a52b..468a48fff97 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Columns/ColumnsRequestBuilder.cs @@ -93,7 +93,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs index 34ce558832f..549203f8f9a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopy/AddCopyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopy/AddCopyPostRequestBody.cs index 1e0bead5bf1..1b16f01f3e7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopy/AddCopyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopy/AddCopyPostRequestBody.cs @@ -52,7 +52,7 @@ public AddCopyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.AddCopy.AddCopyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.AddCopy.AddCopyPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("contentType", ContentType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopy/AddCopyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopy/AddCopyRequestBuilder.cs index b4063161c4e..f730c61baa8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopy/AddCopyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopy/AddCopyRequestBuilder.cs @@ -52,7 +52,7 @@ public AddCopyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.AddCopy.AddCopyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.AddCopy.AddCopyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubPostRequestBody.cs index f9c72ed86b7..ba7ecc99b79 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubPostRequestBody.cs @@ -52,7 +52,7 @@ public AddCopyFromContentTypeHubPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.AddCopyFromContentTypeHub.AddCopyFromContentTypeHubPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.AddCopyFromContentTypeHub.AddCopyFromContentTypeHubPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("contentTypeId", ContentTypeId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubRequestBuilder.cs index 01a4c8988fc..1ebddcb04f6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/AddCopyFromContentTypeHub/AddCopyFromContentTypeHubRequestBuilder.cs @@ -52,7 +52,7 @@ public AddCopyFromContentTypeHubRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.AddCopyFromContentTypeHub.AddCopyFromContentTypeHubPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.AddCopyFromContentTypeHub.AddCopyFromContentTypeHubPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/ContentTypesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/ContentTypesRequestBuilder.cs index 1d7b73244df..0c74ade6508 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/ContentTypesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/ContentTypesRequestBuilder.cs @@ -111,7 +111,7 @@ public ContentTypesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ContentType body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ContentType body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesGetResponse.cs index d176d4f46e3..3b3a6208a74 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetCompatibleHubContentTypesGetResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.GetCompatibleHubContentTypes.GetCompatibleHubContentTypesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.GetCompatibleHubContentTypes.GetCompatibleHubContentTypesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesResponse.cs index 029ad236d04..1ac80e7cd09 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/GetCompatibleHubContentTypes/GetCompatibleHubContentTypesResponse.cs @@ -20,7 +20,7 @@ public partial class GetCompatibleHubContentTypesResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.GetCompatibleHubContentTypes.GetCompatibleHubContentTypesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.GetCompatibleHubContentTypes.GetCompatibleHubContentTypesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesPostRequestBody.cs index d5f41d0a7f5..b2ed011ef11 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesPostRequestBody.cs @@ -58,7 +58,7 @@ public AssociateWithHubSitesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.Item.AssociateWithHubSites.AssociateWithHubSitesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.Item.AssociateWithHubSites.AssociateWithHubSitesPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("hubSiteUrls", HubSiteUrls); writer.WriteBoolValue("propagateToExistingLists", PropagateToExistingLists); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesRequestBuilder.cs index 7a1d4e2bfa0..b48eecf2562 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/AssociateWithHubSites/AssociateWithHubSitesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.Item.AssociateWithHubSites.AssociateWithHubSitesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.Item.AssociateWithHubSites.AssociateWithHubSitesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/ColumnLinks/ColumnLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/ColumnLinks/ColumnLinksRequestBuilder.cs index d70797f6e1b..da6fd2c07be 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/ColumnLinks/ColumnLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/ColumnLinks/ColumnLinksRequestBuilder.cs @@ -93,7 +93,7 @@ public ColumnLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ColumnLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/ColumnLinks/Item/ColumnLinkItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/ColumnLinks/Item/ColumnLinkItemRequestBuilder.cs index a0d90bc3daa..18621bdee27 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/ColumnLinks/Item/ColumnLinkItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/ColumnLinks/Item/ColumnLinkItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ColumnLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/Columns/ColumnsRequestBuilder.cs index 727d95bbdc9..c6fa121d111 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/Columns/ColumnsRequestBuilder.cs @@ -93,7 +93,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs index d3df26d1ddf..bc6fba51731 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/Columns/Item/ColumnDefinitionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ColumnDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/ContentTypeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/ContentTypeItemRequestBuilder.cs index 1f617036cf5..d0e87e5110b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/ContentTypeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/ContentTypeItemRequestBuilder.cs @@ -156,7 +156,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ContentType body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -217,7 +217,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ContentType body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationPostRequestBody.cs index 0ff5c25c3cb..475b5935cac 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationPostRequestBody.cs @@ -69,7 +69,7 @@ public CopyToDefaultContentLocationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.Item.CopyToDefaultContentLocation.CopyToDefaultContentLocationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.Item.CopyToDefaultContentLocation.CopyToDefaultContentLocationPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("destinationFileName", DestinationFileName); writer.WriteObjectValue("sourceFile", SourceFile); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationRequestBuilder.cs index 957032c96ed..ce2a62f66b4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/CopyToDefaultContentLocation/CopyToDefaultContentLocationRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.Item.CopyToDefaultContentLocation.CopyToDefaultContentLocationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.Item.CopyToDefaultContentLocation.CopyToDefaultContentLocationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/IsPublished/IsPublishedGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/IsPublished/IsPublishedGetResponse.cs index 465e1c84ad6..313b6fff177 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/IsPublished/IsPublishedGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/IsPublished/IsPublishedGetResponse.cs @@ -42,7 +42,7 @@ public IsPublishedGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.Item.IsPublished.IsPublishedGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.Item.IsPublished.IsPublishedGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/IsPublished/IsPublishedResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/IsPublished/IsPublishedResponse.cs index 5b28239c02f..866b19e5c0f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/IsPublished/IsPublishedResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ContentTypes/Item/IsPublished/IsPublishedResponse.cs @@ -20,7 +20,7 @@ public partial class IsPublishedResponse : global::Microsoft.Graph.Beta.Groups.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.Item.IsPublished.IsPublishedResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.ContentTypes.Item.IsPublished.IsPublishedResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index e29dedc4b53..9f8f0a36bf5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Delta/DeltaGetResponse.cs index 672a93cc541..596b6dd7815 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Delta/DeltaResponse.cs index 4b754fb652e..b78d8cc593a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Si /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/DeltaWithToken/DeltaWithTokenGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/DeltaWithToken/DeltaWithTokenGetResponse.cs index fe836c2f2a7..592133c991d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/DeltaWithToken/DeltaWithTokenGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/DeltaWithToken/DeltaWithTokenGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaWithTokenGetResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.DeltaWithToken.DeltaWithTokenGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.DeltaWithToken.DeltaWithTokenGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/DeltaWithToken/DeltaWithTokenResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/DeltaWithToken/DeltaWithTokenResponse.cs index a1a69926971..ecbdedcbdb7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/DeltaWithToken/DeltaWithTokenResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/DeltaWithToken/DeltaWithTokenResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaWithTokenResponse : global::Microsoft.Graph.Beta.Group /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.DeltaWithToken.DeltaWithTokenResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.DeltaWithToken.DeltaWithTokenResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/ActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/ActivitiesRequestBuilder.cs index 1d132e2d6ef..16892007d69 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/ActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/ActivitiesRequestBuilder.cs @@ -93,7 +93,7 @@ public ActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs index 4cb1177b383..cad5c644cad 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/Item/DriveItem/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs index 581d31e1bb5..70825bdcf3c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/Item/ItemActivityOLDItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/Item/ItemActivityOLDItemRequestBuilder.cs index 087bcf3f225..6caab0d25a6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/Item/ItemActivityOLDItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Activities/Item/ItemActivityOLDItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemActivityOLD body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreateLink/CreateLinkPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreateLink/CreateLinkPostRequestBody.cs index a03afba258b..4010edf64bb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreateLink/CreateLinkPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreateLink/CreateLinkPostRequestBody.cs @@ -135,7 +135,7 @@ public CreateLinkPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.CreateLink.CreateLinkPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.CreateLink.CreateLinkPostRequestBody(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteStringValue("message", Message); writer.WriteStringValue("password", Password); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreateLink/CreateLinkRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreateLink/CreateLinkRequestBuilder.cs index b9da70be9f0..527cf5c1b20 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreateLink/CreateLinkRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreateLink/CreateLinkRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateLinkRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.CreateLink.CreateLinkPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.CreateLink.CreateLinkPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 3abf2ffcf1d..1a7e2edf65d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/DocumentSetVersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/DocumentSetVersionsRequestBuilder.cs index 50aa1677ce7..b62e2782675 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/DocumentSetVersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/DocumentSetVersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public DocumentSetVersionsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DocumentSetVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DocumentSetVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs index af922835332..69a6c1718fc 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/DocumentSetVersionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DocumentSetVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DocumentSetVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs index 4c5324e5070..e590cfe6158 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DocumentSetVersions/Item/Fields/FieldsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.FieldValueSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.FieldValueSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DriveItem/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DriveItem/Content/ContentRequestBuilder.cs index 6e81290166b..8724f7ed6f7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DriveItem/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DriveItem/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs index 879ef172e19..d2c32ad15ed 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/DriveItem/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Fields/FieldsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Fields/FieldsRequestBuilder.cs index 8ca1913a679..db0691d07af 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Fields/FieldsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Fields/FieldsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.FieldValueSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.FieldValueSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs index 9207ae52a56..1ead046feaf 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWith /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs index 425e568568c..a9724e9bca2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval/GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse.cs @@ -20,7 +20,7 @@ public partial class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWith /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithInterval.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 518aa1cc10c..503fa17f05e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/ListItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/ListItemItemRequestBuilder.cs index 988d913bad5..de62813a53c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/ListItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/ListItemItemRequestBuilder.cs @@ -171,7 +171,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ListItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -232,7 +232,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ListItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantPostRequestBody.cs index 05981549864..51a3856a0df 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantPostRequestBody.cs @@ -69,7 +69,7 @@ public GrantPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.Permissions.Item.Grant.GrantPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.Permissions.Item.Grant.GrantPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("recipients", Recipients); writer.WriteCollectionOfPrimitiveValues("roles", Roles); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantPostResponse.cs index 991755f5233..a063318799a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantPostResponse.cs @@ -36,7 +36,7 @@ public partial class GrantPostResponse : global::Microsoft.Graph.Beta.Models.Bas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.Permissions.Item.Grant.GrantPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.Permissions.Item.Grant.GrantPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantRequestBuilder.cs index 0f1ccfa61bd..804da46ca50 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantRequestBuilder.cs @@ -51,7 +51,7 @@ public GrantRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsGrantPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GrantRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantResponse.cs index 92eba143bf8..ea9383f35b8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/Grant/GrantResponse.cs @@ -20,7 +20,7 @@ public partial class GrantResponse : global::Microsoft.Graph.Beta.Groups.Item.Si /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.Permissions.Item.Grant.GrantResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.Permissions.Item.Grant.GrantResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/PermissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/PermissionItemRequestBuilder.cs index caf286a633c..83854aa5a21 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/PermissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/PermissionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs index 8afa1afddde..2f82d58a925 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs @@ -53,7 +53,7 @@ public RevokeGrantsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("grantees", Grantees); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs index c877fc5a531..253582ea81c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs @@ -52,7 +52,7 @@ public RevokeGrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Items.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/PermissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/PermissionsRequestBuilder.cs index ab07c002bef..12e141914b9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/PermissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Permissions/PermissionsRequestBuilder.cs @@ -93,7 +93,7 @@ public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Versions/Item/Fields/FieldsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Versions/Item/Fields/FieldsRequestBuilder.cs index de3710ca632..598390ac7c5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Versions/Item/Fields/FieldsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Versions/Item/Fields/FieldsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.FieldValueSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.FieldValueSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Versions/Item/ListItemVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Versions/Item/ListItemVersionItemRequestBuilder.cs index 9e384e6ed9a..5cf679dbc38 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Versions/Item/ListItemVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Versions/Item/ListItemVersionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ListItemVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ListItemVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Versions/VersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Versions/VersionsRequestBuilder.cs index 68b55d7b4d8..cf6e903e483 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Versions/VersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/Item/Versions/VersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public VersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ListItemVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ListItemVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/ItemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/ItemsRequestBuilder.cs index e5e12729c4c..ced77a18dcb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/ItemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Items/ItemsRequestBuilder.cs @@ -104,7 +104,7 @@ public ItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ListItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ListItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 30b0690df2e..684a624f4c7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ListItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ListItemRequestBuilder.cs index aa288a9fe38..8c1530f3e4b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ListItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ListItemRequestBuilder.cs @@ -156,7 +156,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -217,7 +217,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.List body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Operations/Item/RichLongRunningOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Operations/Item/RichLongRunningOperationItemRequestBuilder.cs index 2f559ba114a..f24b866a6d0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Operations/Item/RichLongRunningOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Operations/Item/RichLongRunningOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RichLongRunningOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RichLongRunningOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Operations/OperationsRequestBuilder.cs index 18f6506a7d8..44286a07a33 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RichLongRunningOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RichLongRunningOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantPostRequestBody.cs index cdc5347df86..cdfbb8ae183 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantPostRequestBody.cs @@ -69,7 +69,7 @@ public GrantPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Permissions.Item.Grant.GrantPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Permissions.Item.Grant.GrantPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("recipients", Recipients); writer.WriteCollectionOfPrimitiveValues("roles", Roles); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantPostResponse.cs index f04d7c4e00b..ab763722c87 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantPostResponse.cs @@ -36,7 +36,7 @@ public partial class GrantPostResponse : global::Microsoft.Graph.Beta.Models.Bas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Permissions.Item.Grant.GrantPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Permissions.Item.Grant.GrantPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantRequestBuilder.cs index 68a527c1e94..d750b4ace58 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantRequestBuilder.cs @@ -51,7 +51,7 @@ public GrantRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsGrantPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GrantRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantResponse.cs index c155818230d..c8054ff5f6a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/Grant/GrantResponse.cs @@ -20,7 +20,7 @@ public partial class GrantResponse : global::Microsoft.Graph.Beta.Groups.Item.Si /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Permissions.Item.Grant.GrantResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Permissions.Item.Grant.GrantResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/PermissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/PermissionItemRequestBuilder.cs index d86aac45f3f..48ac0869c11 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/PermissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/PermissionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs index 5d9493657c4..3cbf443ded0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs @@ -53,7 +53,7 @@ public RevokeGrantsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("grantees", Grantees); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs index 5311e92d657..b600c775227 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs @@ -52,7 +52,7 @@ public RevokeGrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/PermissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/PermissionsRequestBuilder.cs index e35262c7c33..0735baf5eda 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/PermissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Permissions/PermissionsRequestBuilder.cs @@ -93,7 +93,7 @@ public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyGetResponse.cs index c2c73f70aeb..45a12bb15f1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyGetResponse.cs @@ -52,7 +52,7 @@ public GetVapidPublicKeyGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Subscriptions.GetVapidPublicKey.GetVapidPublicKeyGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Subscriptions.GetVapidPublicKey.GetVapidPublicKeyGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyResponse.cs index da5eed4c7d3..4a0e6839fb2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/GetVapidPublicKey/GetVapidPublicKeyResponse.cs @@ -20,7 +20,7 @@ public partial class GetVapidPublicKeyResponse : global::Microsoft.Graph.Beta.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Subscriptions.GetVapidPublicKey.GetVapidPublicKeyResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Lists.Item.Subscriptions.GetVapidPublicKey.GetVapidPublicKeyResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/Item/SubscriptionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/Item/SubscriptionItemRequestBuilder.cs index 7555e702495..741110af80d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/Item/SubscriptionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/Item/SubscriptionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Subscription body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Subscription body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/SubscriptionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/SubscriptionsRequestBuilder.cs index 1515323b5e8..6a1bd765308 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/SubscriptionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/Subscriptions/SubscriptionsRequestBuilder.cs @@ -99,7 +99,7 @@ public SubscriptionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Subscription body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Subscription body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/ListsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/ListsRequestBuilder.cs index 253e1ec783f..11d4156c538 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/ListsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/ListsRequestBuilder.cs @@ -93,7 +93,7 @@ public ListsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.List body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.List body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlPostRequestBody.cs index 2964f2e57c3..9ae1fea8962 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlPostRequestBody.cs @@ -52,7 +52,7 @@ public GetNotebookFromWebUrlPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.GetNotebookFromWebUrl.GetNotebookFromWebUrlPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.GetNotebookFromWebUrl.GetNotebookFromWebUrlPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("webUrl", WebUrl); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlRequestBuilder.cs index 1508741b382..4126bc95626 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlRequestBuilder.cs @@ -52,7 +52,7 @@ public GetNotebookFromWebUrlRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.GetNotebookFromWebUrl.GetNotebookFromWebUrlPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.GetNotebookFromWebUrl.GetNotebookFromWebUrlPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksGetResponse.cs index dfcbc6a6d24..5a61ddfbe8d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetRecentNotebooksWithIncludePersonalNotebooksGetResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksResponse.cs index 1d9f895ae5e..0d3b05abc52 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksResponse.cs @@ -20,7 +20,7 @@ public partial class GetRecentNotebooksWithIncludePersonalNotebooksResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookPostRequestBody.cs index 1a8b2f3c059..cfb3f759a79 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.CopyNotebook.CopyNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.CopyNotebook.CopyNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("notebookFolder", NotebookFolder); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookRequestBuilder.cs index e2c36c3bb9d..4e40d024293 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.CopyNotebook.CopyNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.CopyNotebook.CopyNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/NotebookItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/NotebookItemRequestBuilder.cs index 8fbddf47898..31fff16b14c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/NotebookItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/NotebookItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Notebook body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Notebook body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/SectionGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/SectionGroupItemRequestBuilder.cs index 805bdbc6feb..809c54075f9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/SectionGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/SectionGroupItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs index ad8b3b504ef..4d339b9e50a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs index 83f784f9792..122880b34f3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs index c0193e4eb8c..7eccb57407a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToSectionGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs index 59ea78604f2..4b6b7d96994 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionGroupRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs index 588c4ad5283..53fe37570a0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs index ff01907bf96..11a91d5a78f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index 03e955204f4..01f927ba4a3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index 3c5c01d1480..735d9a23a43 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs index ca3fa03c90d..32eecf7cebf 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index 5a33dd54423..f441997296b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index d724a289ddd..244e82deb5f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs index dac1bc0bfab..e3c7eb9cb16 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/SectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/SectionsRequestBuilder.cs index eae409c80ce..c61e8b9b82e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/SectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/Item/Sections/SectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/SectionGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/SectionGroupsRequestBuilder.cs index a67550b3849..49349880517 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/SectionGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/SectionGroups/SectionGroupsRequestBuilder.cs @@ -93,7 +93,7 @@ public SectionGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs index 573022dcf6f..0da55645c87 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs index 852c2b4046b..408cce04c20 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs index 5dd18416900..a104e64647b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToSectionGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs index d284579fe5e..40f079b0f04 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionGroupRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs index 7c73f08cfa7..9c989cd520a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs index 0cc8ec5988b..5abbb9c06d5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index 288b4d58916..89b73903e5e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index d2789d82eca..21c758f2068 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs index ee6ae4e5432..b93bcf9f6e1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index e05d92a8268..3765725f7de 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index 13db4d8cd3b..dcb01ac8762 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/PagesRequestBuilder.cs index b9ac18f90f7..e798925643b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/Item/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/SectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/SectionsRequestBuilder.cs index 0cb2e48b410..8a6334c0da8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/SectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/Item/Sections/SectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/NotebooksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/NotebooksRequestBuilder.cs index 42ea7b41564..8e9567058ee 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/NotebooksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Notebooks/NotebooksRequestBuilder.cs @@ -90,7 +90,7 @@ public NotebooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Usage: includePersonalNotebooks={includePersonalNotebooks} public global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder GetRecentNotebooksWithIncludePersonalNotebooks(bool? includePersonalNotebooks) { - _ = includePersonalNotebooks ?? throw new ArgumentNullException(nameof(includePersonalNotebooks)); + if(ReferenceEquals(includePersonalNotebooks, null)) throw new ArgumentNullException(nameof(includePersonalNotebooks)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder(PathParameters, RequestAdapter, includePersonalNotebooks); } /// @@ -110,7 +110,7 @@ public NotebooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Notebook body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Notebook body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/OnenoteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/OnenoteRequestBuilder.cs index 54bf34d0b7e..41c16d1c60b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/OnenoteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/OnenoteRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Onenote body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Onenote body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Operations/Item/OnenoteOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Operations/Item/OnenoteOperationItemRequestBuilder.cs index 87b3a7e93da..8f36ddfa3b7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Operations/Item/OnenoteOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Operations/Item/OnenoteOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Operations/OperationsRequestBuilder.cs index 0b307ce7a84..aaa81e8248c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs index a7261c769ad..d78cf7f1047 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index 4da4f3778b5..3b9675119c9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index f878ecce047..8dc87b98e18 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/OnenotePageItemRequestBuilder.cs index dffe72ab9da..17e36b1c9d6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index eb30f38293c..d69bd1f3edb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index 1c5cc01578b..ebd5d808f40 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/PagesRequestBuilder.cs index f4e5c6df932..04d3c500cb8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Resources/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Resources/Item/Content/ContentRequestBuilder.cs index 6334368eef1..f7efc1ff28e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Resources/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Resources/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Resources/Item/OnenoteResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Resources/Item/OnenoteResourceItemRequestBuilder.cs index 722c711df07..833ced4c26f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Resources/Item/OnenoteResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Resources/Item/OnenoteResourceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Resources/ResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Resources/ResourcesRequestBuilder.cs index 4ed5244ba34..39d39482a13 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Resources/ResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Resources/ResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public ResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/SectionGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/SectionGroupItemRequestBuilder.cs index c8b26a0b1cf..a62529b59f9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/SectionGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/SectionGroupItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs index 275baf6390b..6a6c4d5bbda 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs index 9ceac24d519..f75b9661689 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs index f06be070244..bad7ba2e39f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToSectionGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs index 3c9651a1095..5bd71e8f47e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionGroupRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs index 876e1bb73cf..3dde8620a84 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs index 050b4555b13..dd5ba249103 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index 23a34cad9f6..23471360a37 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index 9a6231718ff..e82615c10dd 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs index afe126d1b8f..9840a2d0307 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index 32602ee6f75..f75ac82a06c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index 3750f50a1d8..f801bf9f0e2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs index a84798c3ef6..97ffa4dbcf6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/SectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/SectionsRequestBuilder.cs index 9a02827fc06..6fdbd167b4a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/SectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/Item/Sections/SectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/SectionGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/SectionGroupsRequestBuilder.cs index 248e7e0eca0..ba2d02c15e7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/SectionGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/SectionGroups/SectionGroupsRequestBuilder.cs @@ -93,7 +93,7 @@ public SectionGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs index 8a290b587b7..177a23babad 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs index 00e9cd93656..7e002af5053 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs index 32c5724465a..180aa14d0a3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToSectionGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs index 525f65771b6..7382c167109 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionGroupRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/OnenoteSectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/OnenoteSectionItemRequestBuilder.cs index 752ee33de7c..1ce582c2bea 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/OnenoteSectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/OnenoteSectionItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs index 63bb71e1df8..0aee17a7e9d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index 8698e3767f7..ba47c574272 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index 2b060ffa254..e241dcfdd66 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs index f723e560e7a..7ad299b76eb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index fc0dda5f277..2e912c98e7d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index d27cfa74192..7641f0712f5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Onenote.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/PagesRequestBuilder.cs index 6dd7748e316..b6d8b76b288 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/Item/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/SectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/SectionsRequestBuilder.cs index 6e5fff42dc6..8d3152d4aa0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/SectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Onenote/Sections/SectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Operations/Item/RichLongRunningOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Operations/Item/RichLongRunningOperationItemRequestBuilder.cs index 7c1062737be..9d27bb3f93c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Operations/Item/RichLongRunningOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Operations/Item/RichLongRunningOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RichLongRunningOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RichLongRunningOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Operations/OperationsRequestBuilder.cs index 42a78ece181..36d918672cf 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RichLongRunningOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RichLongRunningOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/CanvasLayoutRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/CanvasLayoutRequestBuilder.cs index 48b06c69083..0fce4765d35 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/CanvasLayoutRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/CanvasLayoutRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CanvasLayout body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CanvasLayout body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/HorizontalSectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/HorizontalSectionsRequestBuilder.cs index ae09dc48b0c..62601880615 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/HorizontalSectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/HorizontalSectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public HorizontalSectionsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HorizontalSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HorizontalSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/ColumnsRequestBuilder.cs index 1ed98972cbe..f5c9e7980ce 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/ColumnsRequestBuilder.cs @@ -93,7 +93,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HorizontalSectionColumn body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HorizontalSectionColumn body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/Item/HorizontalSectionColumnItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/Item/HorizontalSectionColumnItemRequestBuilder.cs index 29f78736016..af17ce7f909 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/Item/HorizontalSectionColumnItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/Item/HorizontalSectionColumnItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HorizontalSectionColumn body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HorizontalSectionColumn body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/Item/WebPartItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/Item/WebPartItemRequestBuilder.cs index 808b91aec07..ec6732c43a7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/Item/WebPartItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/Item/WebPartItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/WebpartsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/WebpartsRequestBuilder.cs index 851207e4534..fffc0eb3113 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/WebpartsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/WebpartsRequestBuilder.cs @@ -93,7 +93,7 @@ public WebpartsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/HorizontalSectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/HorizontalSectionItemRequestBuilder.cs index bebab008ba5..afb24f29a45 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/HorizontalSectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/HorizontalSections/Item/HorizontalSectionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HorizontalSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HorizontalSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/VerticalSection/VerticalSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/VerticalSection/VerticalSectionRequestBuilder.cs index a9f7f38c208..5e4b7bd40f7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/VerticalSection/VerticalSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/VerticalSection/VerticalSectionRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.VerticalSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.VerticalSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/VerticalSection/Webparts/Item/WebPartItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/VerticalSection/Webparts/Item/WebPartItemRequestBuilder.cs index 65e517d14e9..a68957fc831 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/VerticalSection/Webparts/Item/WebPartItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/VerticalSection/Webparts/Item/WebPartItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/VerticalSection/Webparts/WebpartsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/VerticalSection/Webparts/WebpartsRequestBuilder.cs index 7863652d19f..3458c36dcdd 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/VerticalSection/Webparts/WebpartsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CanvasLayout/VerticalSection/Webparts/WebpartsRequestBuilder.cs @@ -93,7 +93,7 @@ public WebpartsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 6611dad4a80..252a374cf42 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index f955e08af10..bc74d341ac1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/PageTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/PageTemplateItemRequestBuilder.cs index 21a7044d297..ec25c86fd8a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/PageTemplateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/PageTemplateItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PageTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PageTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/WebParts/Item/WebPartItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/WebParts/Item/WebPartItemRequestBuilder.cs index b24c522d3f1..22f96216c3d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/WebParts/Item/WebPartItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/WebParts/Item/WebPartItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/WebParts/WebPartsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/WebParts/WebPartsRequestBuilder.cs index bdd550c989e..d980112ac78 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/WebParts/WebPartsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/Item/WebParts/WebPartsRequestBuilder.cs @@ -93,7 +93,7 @@ public WebPartsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/PageTemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/PageTemplatesRequestBuilder.cs index bb2d1bf1ba2..92ce4eb3c3f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/PageTemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/PageTemplates/PageTemplatesRequestBuilder.cs @@ -93,7 +93,7 @@ public PageTemplatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PageTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PageTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/BaseSitePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/BaseSitePageItemRequestBuilder.cs index 2308b30ea9c..42e4c904066 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/BaseSitePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/BaseSitePageItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.BaseSitePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.BaseSitePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 7ee8dfbc519..320b68af534 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/CanvasLayoutRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/CanvasLayoutRequestBuilder.cs index 2b44ded237b..f53498103e6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/CanvasLayoutRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/CanvasLayoutRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CanvasLayout body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CanvasLayout body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/HorizontalSectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/HorizontalSectionsRequestBuilder.cs index 97bb1d63886..ae3a197b1fb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/HorizontalSectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/HorizontalSectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public HorizontalSectionsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HorizontalSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HorizontalSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/ColumnsRequestBuilder.cs index e38b5cd7513..1c08eed0e48 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/ColumnsRequestBuilder.cs @@ -93,7 +93,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HorizontalSectionColumn body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HorizontalSectionColumn body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/Item/HorizontalSectionColumnItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/Item/HorizontalSectionColumnItemRequestBuilder.cs index 57440d3aef5..e313987ae40 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/Item/HorizontalSectionColumnItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/Item/HorizontalSectionColumnItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HorizontalSectionColumn body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HorizontalSectionColumn body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/Item/WebPartItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/Item/WebPartItemRequestBuilder.cs index 4f73a9450af..dcf90febb57 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/Item/WebPartItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/Item/WebPartItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/WebpartsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/WebpartsRequestBuilder.cs index 6eb23834c0b..1bffd25e84f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/WebpartsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/Columns/Item/Webparts/WebpartsRequestBuilder.cs @@ -93,7 +93,7 @@ public WebpartsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/HorizontalSectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/HorizontalSectionItemRequestBuilder.cs index 785be3f5dbc..27f04380fcb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/HorizontalSectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/HorizontalSections/Item/HorizontalSectionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HorizontalSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HorizontalSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/VerticalSection/VerticalSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/VerticalSection/VerticalSectionRequestBuilder.cs index 6c31513d9cc..ed4d04bb57b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/VerticalSection/VerticalSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/VerticalSection/VerticalSectionRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.VerticalSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.VerticalSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/VerticalSection/Webparts/Item/WebPartItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/VerticalSection/Webparts/Item/WebPartItemRequestBuilder.cs index 790a374852e..e162e94216e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/VerticalSection/Webparts/Item/WebPartItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/VerticalSection/Webparts/Item/WebPartItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/VerticalSection/Webparts/WebpartsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/VerticalSection/Webparts/WebpartsRequestBuilder.cs index e2e9bfb047f..a542266285a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/VerticalSection/Webparts/WebpartsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CanvasLayout/VerticalSection/Webparts/WebpartsRequestBuilder.cs @@ -93,7 +93,7 @@ public WebpartsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 645d22fd054..97a73e9d6db 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 6284a1e6c6b..258585d438e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/WebParts/Item/WebPartItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/WebParts/Item/WebPartItemRequestBuilder.cs index 3ac9a69739e..c776b8e8c4b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/WebParts/Item/WebPartItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/WebParts/Item/WebPartItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/WebParts/WebPartsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/WebParts/WebPartsRequestBuilder.cs index 7f49409a04a..70e5315cfbb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/WebParts/WebPartsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/GraphSitePage/WebParts/WebPartsRequestBuilder.cs @@ -93,7 +93,7 @@ public WebPartsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WebPart body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 438182d2566..816c6c5367e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/PagesRequestBuilder.cs index 018c6bc2176..cb0a8867f00 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Pages/PagesRequestBuilder.cs @@ -99,7 +99,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.BaseSitePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.BaseSitePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantPostRequestBody.cs index 766f2df1a13..35fc6269778 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantPostRequestBody.cs @@ -69,7 +69,7 @@ public GrantPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Permissions.Item.Grant.GrantPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Permissions.Item.Grant.GrantPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("recipients", Recipients); writer.WriteCollectionOfPrimitiveValues("roles", Roles); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantPostResponse.cs index 2d77bff1fef..47d063bfbd8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantPostResponse.cs @@ -36,7 +36,7 @@ public partial class GrantPostResponse : global::Microsoft.Graph.Beta.Models.Bas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Permissions.Item.Grant.GrantPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Permissions.Item.Grant.GrantPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantRequestBuilder.cs index 4d1c9c5b0ca..6ff1eada47f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantRequestBuilder.cs @@ -51,7 +51,7 @@ public GrantRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsGrantPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GrantRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Permissions.Item.Grant.GrantPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantResponse.cs index ed92773a30d..510048961f2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/Grant/GrantResponse.cs @@ -20,7 +20,7 @@ public partial class GrantResponse : global::Microsoft.Graph.Beta.Groups.Item.Si /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Permissions.Item.Grant.GrantResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Permissions.Item.Grant.GrantResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/PermissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/PermissionItemRequestBuilder.cs index d0a39d36ae4..eefdb8646f9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/PermissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/PermissionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs index d68acd1239a..07cdb5a6e85 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/RevokeGrants/RevokeGrantsPostRequestBody.cs @@ -53,7 +53,7 @@ public RevokeGrantsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("grantees", Grantees); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs index adf09666e2f..2876fced526 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/Item/RevokeGrants/RevokeGrantsRequestBuilder.cs @@ -52,7 +52,7 @@ public RevokeGrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.Permissions.Item.RevokeGrants.RevokeGrantsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/PermissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/PermissionsRequestBuilder.cs index 06849dc4ede..b1fd2968574 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/PermissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Permissions/PermissionsRequestBuilder.cs @@ -93,7 +93,7 @@ public PermissionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Permission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 31d4c7a137f..f786bf147f6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Delete/DeletePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Delete/DeletePostRequestBody.cs index 6fd6fc1b309..165898e9319 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Delete/DeletePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Delete/DeletePostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.RecycleBin.Items.Delete.DeletePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.RecycleBin.Items.Delete.DeletePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Delete/DeleteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Delete/DeleteRequestBuilder.cs index ef9a3fc8da1..65c75f4279e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Delete/DeleteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Delete/DeleteRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.RecycleBin.Items.Delete.DeletePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.RecycleBin.Items.Delete.DeletePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 073ddde3e44..6dca6a3b33e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Item/CreatedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index e0274ed5acf..4ce0cb62da3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Item/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Item/RecycleBinItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Item/RecycleBinItemItemRequestBuilder.cs index a71ec465bbb..48d3e6f1fed 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Item/RecycleBinItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Item/RecycleBinItemItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RecycleBinItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RecycleBinItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/ItemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/ItemsRequestBuilder.cs index 8421b05b3ba..39f7771279d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/ItemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/ItemsRequestBuilder.cs @@ -105,7 +105,7 @@ public ItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RecycleBinItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RecycleBinItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestorePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestorePostRequestBody.cs index 6346596cb88..fe048ee33ef 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestorePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestorePostRequestBody.cs @@ -52,7 +52,7 @@ public RestorePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.RecycleBin.Items.Restore.RestorePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.RecycleBin.Items.Restore.RestorePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestorePostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestorePostResponse.cs index 8203936cc9f..76285b7f0fe 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestorePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestorePostResponse.cs @@ -36,7 +36,7 @@ public partial class RestorePostResponse : global::Microsoft.Graph.Beta.Models.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.RecycleBin.Items.Restore.RestorePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.RecycleBin.Items.Restore.RestorePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestoreRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestoreRequestBuilder.cs index d36fab694f0..6a38a57d67f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestoreRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestoreRequestBuilder.cs @@ -50,7 +50,7 @@ public RestoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsRestorePostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.RecycleBin.Items.Restore.RestorePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RestoreRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.RecycleBin.Items.Restore.RestorePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.RecycleBin.Items.Restore.RestorePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestoreResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestoreResponse.cs index b1be118157c..7d56f1c7bff 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestoreResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/Items/Restore/RestoreResponse.cs @@ -20,7 +20,7 @@ public partial class RestoreResponse : global::Microsoft.Graph.Beta.Groups.Item. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.RecycleBin.Items.Restore.RestoreResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Item.RecycleBin.Items.Restore.RestoreResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 40f767808c7..629e61739af 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/LastModifiedByUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/RecycleBinRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/RecycleBinRequestBuilder.cs index 2b45e83743f..0139d40bfa0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/RecycleBinRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/RecycleBin/RecycleBinRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RecycleBin body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RecycleBin body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/SiteItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/SiteItemRequestBuilder.cs index 866f4525738..9cd5ac5ac71 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/SiteItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/SiteItemRequestBuilder.cs @@ -255,7 +255,7 @@ public SiteItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.Site body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -297,7 +297,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Site body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/GroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/GroupsRequestBuilder.cs index 065934651cb..b577761b9d1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/GroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/GroupsRequestBuilder.cs @@ -93,7 +93,7 @@ public GroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Group body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Group body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/GroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/GroupItemRequestBuilder.cs index 39951b57367..d49a37f4e3c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/GroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/GroupItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Group body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Group body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/ChildrenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/ChildrenRequestBuilder.cs index 99b0f44b039..2d81c49362c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/ChildrenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/ChildrenRequestBuilder.cs @@ -93,7 +93,7 @@ public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/ChildrenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/ChildrenRequestBuilder.cs index 27892c27b7b..d54e2d3292b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/ChildrenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/ChildrenRequestBuilder.cs @@ -93,7 +93,7 @@ public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs index 2b18b39fab7..d289d225d29 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/Item/Relations/RelationsRequestBuilder.cs index d3f89fde0bc..5b3da3f4c07 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/Item/TermItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/Item/TermItemRequestBuilder.cs index 1fe80fef1f0..f4b69b5a306 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/Item/TermItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Children/Item/TermItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs index a55a21f3fc3..c5539682c10 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Relations/RelationsRequestBuilder.cs index 6ab5f32aece..d72f344d3cb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/TermItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/TermItemRequestBuilder.cs index 940c441906d..713267f64bc 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/TermItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Children/Item/TermItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/ParentGroup/ParentGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/ParentGroup/ParentGroupRequestBuilder.cs index 4c10683e3bb..e7a91ae072b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/ParentGroup/ParentGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/ParentGroup/ParentGroupRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Group body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Group body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Relations/Item/RelationItemRequestBuilder.cs index 595be4ae54e..aa0af3128d1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Relations/RelationsRequestBuilder.cs index ad5cbfc5a65..edc26708235 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/SetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/SetItemRequestBuilder.cs index 0c32880b539..28c25ac2aca 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/SetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/SetItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Set body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Set body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/ChildrenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/ChildrenRequestBuilder.cs index 9cd5bdfaec2..cb3362932e8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/ChildrenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/ChildrenRequestBuilder.cs @@ -93,7 +93,7 @@ public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs index 6f9a0bf9fd5..b6fbbc295ff 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/Item/Relations/RelationsRequestBuilder.cs index 6518237836f..0a95530a971 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/Item/TermItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/Item/TermItemRequestBuilder.cs index a0f5f5ec6e9..b42d65270e1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/Item/TermItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Children/Item/TermItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Relations/Item/RelationItemRequestBuilder.cs index abe01b0cf2d..d7d4d89adf0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Relations/RelationsRequestBuilder.cs index 44ce230f283..6ad286f9e74 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/TermItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/TermItemRequestBuilder.cs index 3ad4969c587..2e6334eb02f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/TermItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/Item/TermItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/TermsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/TermsRequestBuilder.cs index 1fa01ccd201..e625e143e62 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/TermsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/Item/Terms/TermsRequestBuilder.cs @@ -93,7 +93,7 @@ public TermsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/SetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/SetsRequestBuilder.cs index 5f6efd20495..7a6c882271e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/SetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Groups/Item/Sets/SetsRequestBuilder.cs @@ -93,7 +93,7 @@ public SetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Set body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Set body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/ChildrenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/ChildrenRequestBuilder.cs index 727ac91234d..2229d62d3e3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/ChildrenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/ChildrenRequestBuilder.cs @@ -93,7 +93,7 @@ public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/ChildrenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/ChildrenRequestBuilder.cs index 0e73e7c38aa..1ab7e535b47 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/ChildrenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/ChildrenRequestBuilder.cs @@ -93,7 +93,7 @@ public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs index e295e40ca49..a6e854bb22e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/Item/Relations/RelationsRequestBuilder.cs index 978d745099a..6193995f1b8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/Item/TermItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/Item/TermItemRequestBuilder.cs index d0f8b93eb28..ddbf4616737 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/Item/TermItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Children/Item/TermItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs index 1277b17728c..b6a14b12737 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Relations/RelationsRequestBuilder.cs index e28a18022c5..a3d7416ef08 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/TermItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/TermItemRequestBuilder.cs index 11befb60875..b50be9c9c60 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/TermItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Children/Item/TermItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/ParentGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/ParentGroupRequestBuilder.cs index 843a4ae0fe4..1c762c9643b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/ParentGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/ParentGroupRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Group body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Group body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/ChildrenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/ChildrenRequestBuilder.cs index 7cdb835ce04..9dd2a0d9341 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/ChildrenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/ChildrenRequestBuilder.cs @@ -93,7 +93,7 @@ public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/ChildrenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/ChildrenRequestBuilder.cs index 734d27ecce2..763359f3e4e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/ChildrenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/ChildrenRequestBuilder.cs @@ -93,7 +93,7 @@ public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs index cf57a553cec..44daca0bf78 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/Item/Relations/RelationsRequestBuilder.cs index 48cc97aa0c4..fd2f680d876 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/Item/TermItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/Item/TermItemRequestBuilder.cs index 83ba333b962..26f65f3d166 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/Item/TermItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Children/Item/TermItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs index 93abbd2c467..78b7aa81774 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Relations/RelationsRequestBuilder.cs index 5931cf62c28..bd88a7732bb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/TermItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/TermItemRequestBuilder.cs index 2c92fdb3dfa..433c756581d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/TermItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Children/Item/TermItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Relations/Item/RelationItemRequestBuilder.cs index 048bee3a8a5..0f19666bcb0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Relations/RelationsRequestBuilder.cs index fb7c74a2a5c..ff2cff979a2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/SetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/SetItemRequestBuilder.cs index 77048beec89..7ff55648bba 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/SetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/SetItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Set body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Set body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/ChildrenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/ChildrenRequestBuilder.cs index 673cb27398c..e9419ba26d9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/ChildrenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/ChildrenRequestBuilder.cs @@ -93,7 +93,7 @@ public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs index 8c9e053ac5b..1d12a124fa9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/Item/Relations/RelationsRequestBuilder.cs index 94e809dbfdd..2f4b3dffe09 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/Item/TermItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/Item/TermItemRequestBuilder.cs index 60467ef7963..0c35137ddc9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/Item/TermItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Children/Item/TermItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Relations/Item/RelationItemRequestBuilder.cs index be78fc104fb..ebf639ceef5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Relations/RelationsRequestBuilder.cs index 7df074b99ce..f91fcb549c6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/TermItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/TermItemRequestBuilder.cs index 4bf0ea9cc2e..4e32d6ae246 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/TermItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/Item/TermItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/TermsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/TermsRequestBuilder.cs index 387d64ad06b..6f7424b0a7a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/TermsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/Item/Terms/TermsRequestBuilder.cs @@ -93,7 +93,7 @@ public TermsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/SetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/SetsRequestBuilder.cs index 01a6f2d80c1..c8d439af82b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/SetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/ParentGroup/Sets/SetsRequestBuilder.cs @@ -93,7 +93,7 @@ public SetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Set body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Set body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Relations/Item/RelationItemRequestBuilder.cs index 86782f4694f..6b44965e109 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Relations/RelationsRequestBuilder.cs index c2719b70199..1ead5646efe 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/SetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/SetItemRequestBuilder.cs index da86b1c1e5e..23f25ea1af0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/SetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/SetItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Set body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Set body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/ChildrenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/ChildrenRequestBuilder.cs index c17d51e87ea..d1831e7d130 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/ChildrenRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/ChildrenRequestBuilder.cs @@ -93,7 +93,7 @@ public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs index 2f3cbd4ad2e..70c852d7b6a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/Item/Relations/RelationsRequestBuilder.cs index d499e25811b..7ef688723d0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/Item/TermItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/Item/TermItemRequestBuilder.cs index 43104c6c967..d56adf3df34 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/Item/TermItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Children/Item/TermItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Relations/Item/RelationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Relations/Item/RelationItemRequestBuilder.cs index a77e881e603..b49265c4f5d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Relations/Item/RelationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Relations/Item/RelationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Relations/RelationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Relations/RelationsRequestBuilder.cs index 33934bcecb7..b95de31a70d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Relations/RelationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/Relations/RelationsRequestBuilder.cs @@ -93,7 +93,7 @@ public RelationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Relation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/TermItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/TermItemRequestBuilder.cs index db9ccf91c45..46ebe5710ee 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/TermItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/Item/TermItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/TermsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/TermsRequestBuilder.cs index 65e5f193595..fd36eb3e537 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/TermsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/Item/Terms/TermsRequestBuilder.cs @@ -93,7 +93,7 @@ public TermsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Term body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/SetsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/SetsRequestBuilder.cs index 0b88c70c4b8..ac56c4af1fa 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/SetsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/Sets/SetsRequestBuilder.cs @@ -93,7 +93,7 @@ public SetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TermStore.Set body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Set body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/TermStoreRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/TermStoreRequestBuilder.cs index a54d7ab8966..b004252207a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/TermStoreRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/TermStore/TermStoreRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermStore.Store body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermStore.Store body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemovePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemovePostRequestBody.cs index 59cef93aea9..3f89053cb3a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemovePostRequestBody.cs @@ -53,7 +53,7 @@ public RemovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Sites.Remove.RemovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Remove.RemovePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemovePostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemovePostResponse.cs index 46e749a8895..abb60f34c42 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemovePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemovePostResponse.cs @@ -36,7 +36,7 @@ public partial class RemovePostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Remove.RemovePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Remove.RemovePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemoveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemoveRequestBuilder.cs index c8e9d5534f6..08eb79cedb2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemoveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemoveRequestBuilder.cs @@ -51,7 +51,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsRemovePostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Sites.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Sites.Remove.RemovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemoveResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemoveResponse.cs index 1f1a5562068..52f4f31e08b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemoveResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Remove/RemoveResponse.cs @@ -20,7 +20,7 @@ public partial class RemoveResponse : global::Microsoft.Graph.Beta.Groups.Item.S /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Sites.Remove.RemoveResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Sites.Remove.RemoveResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Archive/ArchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Archive/ArchivePostRequestBody.cs index 829da0aa259..641a97640b7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Archive/ArchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Archive/ArchivePostRequestBody.cs @@ -42,7 +42,7 @@ public ArchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Archive.ArchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Archive.ArchivePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("shouldSetSpoSiteReadOnlyForMembers", ShouldSetSpoSiteReadOnlyForMembers); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Archive/ArchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Archive/ArchiveRequestBuilder.cs index 91ee6b79e5a..5c775ae119d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Archive/ArchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Archive/ArchiveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Archiv public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/AllMessages/AllMessagesGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/AllMessages/AllMessagesGetResponse.cs index 6da83f3d446..b2b59efea90 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/AllMessages/AllMessagesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/AllMessages/AllMessagesGetResponse.cs @@ -36,7 +36,7 @@ public partial class AllMessagesGetResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.AllMessages.AllMessagesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.AllMessages.AllMessagesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/AllMessages/AllMessagesResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/AllMessages/AllMessagesResponse.cs index b842990ce47..845c593f1f4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/AllMessages/AllMessagesResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/AllMessages/AllMessagesResponse.cs @@ -20,7 +20,7 @@ public partial class AllMessagesResponse : global::Microsoft.Graph.Beta.Groups.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.AllMessages.AllMessagesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.AllMessages.AllMessagesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/ChannelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/ChannelsRequestBuilder.cs index 7d641d4922a..488e9abcd7d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/ChannelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/ChannelsRequestBuilder.cs @@ -111,7 +111,7 @@ public ChannelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Channel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Channel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllMessages/GetAllMessagesGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllMessages/GetAllMessagesGetResponse.cs index 4bbdd12b1bf..4acaed68540 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllMessages/GetAllMessagesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllMessages/GetAllMessagesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllMessagesGetResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.GetAllMessages.GetAllMessagesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.GetAllMessages.GetAllMessagesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllMessages/GetAllMessagesResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllMessages/GetAllMessagesResponse.cs index 3670369b416..a996c72c745 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllMessages/GetAllMessagesResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllMessages/GetAllMessagesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllMessagesResponse : global::Microsoft.Graph.Beta.Group /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.GetAllMessages.GetAllMessagesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.GetAllMessages.GetAllMessagesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllRetainedMessages/GetAllRetainedMessagesGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllRetainedMessages/GetAllRetainedMessagesGetResponse.cs index 3ceaf44a22f..5b043acbf8b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllRetainedMessages/GetAllRetainedMessagesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllRetainedMessages/GetAllRetainedMessagesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllRetainedMessagesGetResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.GetAllRetainedMessages.GetAllRetainedMessagesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.GetAllRetainedMessages.GetAllRetainedMessagesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllRetainedMessages/GetAllRetainedMessagesResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllRetainedMessages/GetAllRetainedMessagesResponse.cs index 29909df3269..5f6d1ae53ed 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllRetainedMessages/GetAllRetainedMessagesResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/GetAllRetainedMessages/GetAllRetainedMessagesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllRetainedMessagesResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.GetAllRetainedMessages.GetAllRetainedMessagesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.GetAllRetainedMessages.GetAllRetainedMessagesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddPostRequestBody.cs index 600fd619302..bb325e6ab69 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddPostRequestBody.cs @@ -53,7 +53,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Add.AddPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddPostResponse.cs index ea63187c552..1e565316b17 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddPostResponse.cs @@ -36,7 +36,7 @@ public partial class AddPostResponse : global::Microsoft.Graph.Beta.Models.BaseC /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Add.AddPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Add.AddPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddRequestBuilder.cs index e1a1ba16505..d84e5bfb33e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddRequestBuilder.cs @@ -51,7 +51,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsAddPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddResponse.cs index 8de8b8882f2..8dcdbd2c3ae 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Add/AddResponse.cs @@ -20,7 +20,7 @@ public partial class AddResponse : global::Microsoft.Graph.Beta.Groups.Item.Team /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Add.AddResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Add.AddResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/AllMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/AllMembersRequestBuilder.cs index ba776c71bd5..5cfefb9fd60 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/AllMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/AllMembersRequestBuilder.cs @@ -105,7 +105,7 @@ public AllMembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Item/ConversationMemberItemRequestBuilder.cs index cbc53620a0b..65750fc921c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Item/ConversationMemberItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemovePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemovePostRequestBody.cs index 939558a3f06..a16caca828d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemovePostRequestBody.cs @@ -53,7 +53,7 @@ public RemovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Remove.RemovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Remove.RemovePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemovePostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemovePostResponse.cs index d44bbd455b1..88ca0ddf65c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemovePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemovePostResponse.cs @@ -36,7 +36,7 @@ public partial class RemovePostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Remove.RemovePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Remove.RemovePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemoveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemoveRequestBuilder.cs index ce346c9ff8f..6c94cca7db5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemoveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemoveRequestBuilder.cs @@ -51,7 +51,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsRemovePostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Remove.RemovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemoveResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemoveResponse.cs index b2dfd2a043f..981fe8b9ba8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemoveResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/AllMembers/Remove/RemoveResponse.cs @@ -20,7 +20,7 @@ public partial class RemoveResponse : global::Microsoft.Graph.Beta.Groups.Item.T /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Remove.RemoveResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.AllMembers.Remove.RemoveResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Archive/ArchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Archive/ArchivePostRequestBody.cs index 2e0d000c85a..d00d372dc99 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Archive/ArchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Archive/ArchivePostRequestBody.cs @@ -42,7 +42,7 @@ public ArchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Archive.ArchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Archive.ArchivePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("shouldSetSpoSiteReadOnlyForMembers", ShouldSetSpoSiteReadOnlyForMembers); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Archive/ArchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Archive/ArchiveRequestBuilder.cs index 8ce368ca543..2ef1347f371 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Archive/ArchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Archive/ArchiveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channe public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/ChannelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/ChannelItemRequestBuilder.cs index 2dfad0e0802..3526fc62e58 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/ChannelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/ChannelItemRequestBuilder.cs @@ -174,7 +174,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Channel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -235,7 +235,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Channel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs index b194ba142ef..1ff8b7fd374 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs @@ -42,7 +42,7 @@ public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrinci /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse.cs index 1ace043775d..ecef7bc5903 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse.cs @@ -20,7 +20,7 @@ public partial class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipal /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/FilesFolder/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/FilesFolder/Content/ContentRequestBuilder.cs index 58e64c6de54..0f6d319b628 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/FilesFolder/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/FilesFolder/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/FilesFolder/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/FilesFolder/ContentStream/ContentStreamRequestBuilder.cs index 7eb522f43ea..36fd4c4b246 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/FilesFolder/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/FilesFolder/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddPostRequestBody.cs index 0bf0994e74c..a08be00abf9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddPostRequestBody.cs @@ -53,7 +53,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Add.AddPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddPostResponse.cs index dd3b619bc45..4cc0ee4ee56 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddPostResponse.cs @@ -36,7 +36,7 @@ public partial class AddPostResponse : global::Microsoft.Graph.Beta.Models.BaseC /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Add.AddPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Add.AddPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddRequestBuilder.cs index 399da786055..dc6d3259b1f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddRequestBuilder.cs @@ -51,7 +51,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsAddPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddResponse.cs index ef310eb1c87..784f911a5ab 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Add/AddResponse.cs @@ -20,7 +20,7 @@ public partial class AddResponse : global::Microsoft.Graph.Beta.Groups.Item.Team /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Add.AddResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Add.AddResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs index b90fa2fbded..eb0d9b3019c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/MembersRequestBuilder.cs index 11cdeb4db02..e852165858c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/MembersRequestBuilder.cs @@ -105,7 +105,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemovePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemovePostRequestBody.cs index 8ac6adc3f9a..2804f640070 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemovePostRequestBody.cs @@ -53,7 +53,7 @@ public RemovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Remove.RemovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Remove.RemovePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemovePostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemovePostResponse.cs index aac6682f69d..4b69f528bd2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemovePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemovePostResponse.cs @@ -36,7 +36,7 @@ public partial class RemovePostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Remove.RemovePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Remove.RemovePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemoveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemoveRequestBuilder.cs index b0d2b326bcf..557db11c062 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemoveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemoveRequestBuilder.cs @@ -51,7 +51,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsRemovePostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemoveResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemoveResponse.cs index 9012f31604c..a3443702ddf 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemoveResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Members/Remove/RemoveResponse.cs @@ -20,7 +20,7 @@ public partial class RemoveResponse : global::Microsoft.Graph.Beta.Groups.Item.T /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Remove.RemoveResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Members.Remove.RemoveResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Delta/DeltaGetResponse.cs index 6b2a099d03e..2d3fc4fd186 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Delta/DeltaResponse.cs index 68b78d30667..80b3cc975d1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Te /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs index 7cd77e732b3..71796a0bc17 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs @@ -85,7 +85,7 @@ public ForwardToChatPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("additionalMessage", AdditionalMessage); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteCollectionOfPrimitiveValues("targetChatIds", TargetChatIds); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatPostResponse.cs index c22dd2d1ccb..292dfc038ec 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatPostResponse.cs @@ -36,7 +36,7 @@ public partial class ForwardToChatPostResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.ForwardToChat.ForwardToChatPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.ForwardToChat.ForwardToChatPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs index cc4b02bbf0c..3f2ba04411c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs @@ -51,7 +51,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsForwardToChatPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatResponse.cs index 402cdbc2388..8a53f7c2261 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ForwardToChat/ForwardToChatResponse.cs @@ -20,7 +20,7 @@ public partial class ForwardToChatResponse : global::Microsoft.Graph.Beta.Groups /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.ForwardToChat.ForwardToChatResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.ForwardToChat.ForwardToChatResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/ChatMessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/ChatMessageItemRequestBuilder.cs index 9f6a76a51d0..9bc50a5f8ad 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/ChatMessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/ChatMessageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs index 6766442d9ae..821868eca19 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs @@ -93,7 +93,7 @@ public HostedContentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs index 529d32a6816..ab11080e2cc 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs index 36395dd4cfe..42461f22d68 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Delta/DeltaGetResponse.cs index 179264daeed..15ec56bed82 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Delta/DeltaResponse.cs index b5d62ef7258..680e1b24b5c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Te /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs index 02d99353843..d7c9814d06f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs @@ -85,7 +85,7 @@ public ForwardToChatPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("additionalMessage", AdditionalMessage); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteCollectionOfPrimitiveValues("targetChatIds", TargetChatIds); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs index 06204b873b9..8e66abc8517 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs @@ -36,7 +36,7 @@ public partial class ForwardToChatPostResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs index 5ef097761a3..bb5d8733d7f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs @@ -51,7 +51,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsForwardToChatPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs index 73dd4886c92..26c2c444694 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs @@ -20,7 +20,7 @@ public partial class ForwardToChatResponse : global::Microsoft.Graph.Beta.Groups /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs index e6cee00926e..5556a11c829 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs index a81020744de..96074ac8334 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs @@ -93,7 +93,7 @@ public HostedContentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs index 2516766816d..4852686aa14 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs index 3048f3c603c..95d132c5bb9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs index 4e97fb4b1c9..283784b30d5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public SetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs index 037fa90de40..b06a03688df 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channe public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs index ee4118bc9e1..e0baa5d1d13 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public UnsetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs index 6989cbf1311..ed6de3c37b5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channe public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 031099eb018..343e0052018 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -111,7 +111,7 @@ public RepliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs index 762ea18a9bc..b908249b60c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs @@ -69,7 +69,7 @@ public ReplyWithQuotePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteObjectValue("replyMessage", ReplyMessage); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs index 7ddbf8a0ca1..e007b2507e9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs @@ -52,7 +52,7 @@ public ReplyWithQuoteRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.cs index a2acb118d13..368dca21475 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public SetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.SetReaction.SetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.SetReaction.SetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.cs index 63ea9169278..7406fb5fa81 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channe public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs index 8789ee20e3c..9058e7d389d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public UnsetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs index a8152ea4057..5d041fffbbd 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channe public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs index 9ec07c09cb6..d11f9b08c3a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -111,7 +111,7 @@ public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs index 4fbcee54fd9..6dc1d573a8d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs @@ -69,7 +69,7 @@ public ReplyWithQuotePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteObjectValue("replyMessage", ReplyMessage); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs index 3fe5f4e661d..25c1aae67df 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs @@ -52,7 +52,7 @@ public ReplyWithQuoteRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/PlannerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/PlannerRequestBuilder.cs index f91486ec6a0..83a77a178d4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/PlannerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/PlannerRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsChannelPlanner body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsChannelPlanner body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Delta/DeltaGetResponse.cs index 543eedb71a2..fd7ae8af357 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Delta/DeltaResponse.cs index 8dce449d403..783af4217c8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Te /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs index 79116f16803..3e49d102a17 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs @@ -52,7 +52,7 @@ public ArchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Archive.ArchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Archive.ArchivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("justification", Justification); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs index 4e881b7f62e..bbdc00ded28 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channe public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs index 26b499797ef..8314fc55fce 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs @@ -99,7 +99,7 @@ public BucketsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs index 4fd26ad83db..92b94b382aa 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Buckets.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Buckets.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs index f2df47cc419..42bba106e58 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Te /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Buckets.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Buckets.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs index b2449aa5f6a..6d832e271fc 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs index 878eac74f0b..94fa9191162 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs index 8e3d6ff8aef..b39f1a6b8e8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Te /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs index 463f8141c54..6972b4a8b02 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs index 748b143a815..ced32098a27 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs index ba8abc00a63..147608be90e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs index 8bdeeaeb492..1d5667bdddf 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs index 48cd5e1bd2e..dec7fcc61f9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs index f203b234aab..c4c136e4790 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs @@ -99,7 +99,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Details/DetailsRequestBuilder.cs index 6d0a3f728a7..50c5e9b497e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerPlanDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlanDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs index 3afa538e19b..02e8c27fe5e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs @@ -53,7 +53,7 @@ public MoveToContainerPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("container", Container); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs index 9f61b3746c8..a9669b31531 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs @@ -52,7 +52,7 @@ public MoveToContainerRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs index 3dfe2e63ecd..5a9f472f1ce 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs index 2847d028ec9..7ce17929347 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Tasks.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Tasks.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs index c83cabd3d07..d711a0dadbe 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Te /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Tasks.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Tasks.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs index 138d6b3133f..8758cef0f1c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs index fdd9715dfa6..33d1ea5bd46 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs index fd0e4aa8d06..4dc021a4c45 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs index 799e478c651..069883be9b6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs index 5e1539a9dcf..5bcc27ed0af 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs index 854759a2260..e5256271199 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs @@ -99,7 +99,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs index f624df2a354..0d788c48ca3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs @@ -52,7 +52,7 @@ public UnarchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("justification", Justification); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs index 0c06233c982..c5c7c5e3d66 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channe public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Channels.Item.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/PlansRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/PlansRequestBuilder.cs index 8785c6b5ecf..97b68103151 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/PlansRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Planner/Plans/PlansRequestBuilder.cs @@ -99,7 +99,7 @@ public PlansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs index 1d36e4783cf..19501569158 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SharedWithChannelTeamInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SharedWithChannelTeamInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/SharedWithTeamsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/SharedWithTeamsRequestBuilder.cs index 5ee9aea6d85..b49d19c32f0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/SharedWithTeamsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/SharedWithTeams/SharedWithTeamsRequestBuilder.cs @@ -93,7 +93,7 @@ public SharedWithTeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SharedWithChannelTeamInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SharedWithChannelTeamInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Tabs/Item/TeamsTabItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Tabs/Item/TeamsTabItemRequestBuilder.cs index d6941f3399f..da7223655ff 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Tabs/Item/TeamsTabItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Tabs/Item/TeamsTabItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Tabs/TabsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Tabs/TabsRequestBuilder.cs index 0983951b4fa..d77d95c07ad 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Tabs/TabsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Tabs/TabsRequestBuilder.cs @@ -93,7 +93,7 @@ public TabsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Clone/ClonePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Clone/ClonePostRequestBody.cs index a72260f8f19..faa8dc8a30c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Clone/ClonePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Clone/ClonePostRequestBody.cs @@ -113,7 +113,7 @@ public ClonePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Clone.ClonePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Clone.ClonePostRequestBody(); } /// @@ -138,7 +138,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("classification", Classification); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Clone/CloneRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Clone/CloneRequestBuilder.cs index 0e7d2999f13..5ec23d7a5b4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Clone/CloneRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Clone/CloneRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Clone. public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Clone.ClonePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Clone.ClonePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/InstalledAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/InstalledAppsRequestBuilder.cs index e8dc31acdf8..aed1edaf26c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/InstalledAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/InstalledAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public InstalledAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamsAppInstallation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAppInstallation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/TeamsAppInstallationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/TeamsAppInstallationItemRequestBuilder.cs index 7e274c25c92..092e36345ab 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/TeamsAppInstallationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/TeamsAppInstallationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsAppInstallation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAppInstallation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs index 7ee0f10c100..98e26af338f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs @@ -53,7 +53,7 @@ public UpgradePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.InstalledApps.Item.Upgrade.UpgradePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.InstalledApps.Item.Upgrade.UpgradePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("consentedPermissionSet", ConsentedPermissionSet); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs index bc7b41408ff..029c253b7f4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Instal public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.InstalledApps.Item.Upgrade.UpgradePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.InstalledApps.Item.Upgrade.UpgradePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddPostRequestBody.cs index 6730785cc42..9ff959e07ee 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddPostRequestBody.cs @@ -53,7 +53,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Add.AddPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddPostResponse.cs index 014133fe335..1afecbf252d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddPostResponse.cs @@ -36,7 +36,7 @@ public partial class AddPostResponse : global::Microsoft.Graph.Beta.Models.BaseC /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Add.AddPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Add.AddPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddRequestBuilder.cs index e687cf7f2c9..8864cd71d7b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddRequestBuilder.cs @@ -51,7 +51,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsAddPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddResponse.cs index 5cd0cd7b2dc..b32f10a4650 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Add/AddResponse.cs @@ -20,7 +20,7 @@ public partial class AddResponse : global::Microsoft.Graph.Beta.Groups.Item.Team /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Add.AddResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Add.AddResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Item/ConversationMemberItemRequestBuilder.cs index b307f30c8fd..0eda852a420 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/MembersRequestBuilder.cs index 5693080fc83..9f0b8a31704 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/MembersRequestBuilder.cs @@ -105,7 +105,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemovePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemovePostRequestBody.cs index a290020a6e1..18333b0295e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemovePostRequestBody.cs @@ -53,7 +53,7 @@ public RemovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Remove.RemovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Remove.RemovePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemovePostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemovePostResponse.cs index a76df2239b4..c8b4ca5c41e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemovePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemovePostResponse.cs @@ -36,7 +36,7 @@ public partial class RemovePostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Remove.RemovePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Remove.RemovePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemoveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemoveRequestBuilder.cs index bda232fa617..df16c09569b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemoveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemoveRequestBuilder.cs @@ -51,7 +51,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsRemovePostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemoveResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemoveResponse.cs index 9c5a1d580c9..27d554915a8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemoveResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Members/Remove/RemoveResponse.cs @@ -20,7 +20,7 @@ public partial class RemoveResponse : global::Microsoft.Graph.Beta.Groups.Item.T /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Remove.RemoveResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Members.Remove.RemoveResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Operations/Item/TeamsAsyncOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Operations/Item/TeamsAsyncOperationItemRequestBuilder.cs index f258f8daba0..c5f93e45d4a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Operations/Item/TeamsAsyncOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Operations/Item/TeamsAsyncOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsAsyncOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAsyncOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Operations/OperationsRequestBuilder.cs index a722e2ec1e5..296acc72f84 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamsAsyncOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAsyncOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Owners/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Owners/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs index 34b6b197aee..2a5d0d8db09 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Owners/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Owners/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs index 9ed83dcfdf8..264d4994b01 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PermissionGrants/PermissionGrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PermissionGrants/PermissionGrantsRequestBuilder.cs index 30ce33878b7..29842e18497 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PermissionGrants/PermissionGrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PermissionGrants/PermissionGrantsRequestBuilder.cs @@ -93,7 +93,7 @@ public PermissionGrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/PhotoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/PhotoRequestBuilder.cs index 65095773c56..3090b502dd2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/PhotoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/PhotoRequestBuilder.cs @@ -80,7 +80,7 @@ public PhotoRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.ProfilePhoto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -122,7 +122,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProfilePhoto body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/Value/ContentRequestBuilder.cs index 16da310f0cd..d161f01ed11 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Photo/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddPostRequestBody.cs index 48873b6a137..8bfadf35d9b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddPostRequestBody.cs @@ -53,7 +53,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Add.AddPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddPostResponse.cs index 05a1076be46..54ce19119f2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddPostResponse.cs @@ -36,7 +36,7 @@ public partial class AddPostResponse : global::Microsoft.Graph.Beta.Models.BaseC /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Add.AddPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Add.AddPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddRequestBuilder.cs index bcad527ae90..b33dbd88386 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddRequestBuilder.cs @@ -51,7 +51,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsAddPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddResponse.cs index 33187732644..57527076dd7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Add/AddResponse.cs @@ -20,7 +20,7 @@ public partial class AddResponse : global::Microsoft.Graph.Beta.Groups.Item.Team /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Add.AddResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Add.AddResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/AllMembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/AllMembersRequestBuilder.cs index 331ac7dc074..d64de4d3604 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/AllMembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/AllMembersRequestBuilder.cs @@ -105,7 +105,7 @@ public AllMembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Item/ConversationMemberItemRequestBuilder.cs index bd63e20a36f..2fc72540dc4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Item/ConversationMemberItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemovePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemovePostRequestBody.cs index 85dbf2243c9..5b4d6df303f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemovePostRequestBody.cs @@ -53,7 +53,7 @@ public RemovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Remove.RemovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Remove.RemovePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemovePostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemovePostResponse.cs index 8306f40dc64..bd3afce505f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemovePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemovePostResponse.cs @@ -36,7 +36,7 @@ public partial class RemovePostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Remove.RemovePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Remove.RemovePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemoveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemoveRequestBuilder.cs index 71065005720..40078b53d85 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemoveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemoveRequestBuilder.cs @@ -51,7 +51,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsRemovePostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Remove.RemovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemoveResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemoveResponse.cs index 7ce2db5d21c..0fc909ffcc9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemoveResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/AllMembers/Remove/RemoveResponse.cs @@ -20,7 +20,7 @@ public partial class RemoveResponse : global::Microsoft.Graph.Beta.Groups.Item.T /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Remove.RemoveResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.AllMembers.Remove.RemoveResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Archive/ArchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Archive/ArchivePostRequestBody.cs index 0969bffaa00..634614bf435 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Archive/ArchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Archive/ArchivePostRequestBody.cs @@ -42,7 +42,7 @@ public ArchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Archive.ArchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Archive.ArchivePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("shouldSetSpoSiteReadOnlyForMembers", ShouldSetSpoSiteReadOnlyForMembers); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Archive/ArchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Archive/ArchiveRequestBuilder.cs index db38eee47a3..6fb3bf1cc3f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Archive/ArchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Archive/ArchiveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Primar public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs index 281be6e772d..078eda33f7a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse.cs @@ -42,7 +42,7 @@ public DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrinci /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse.cs index a59aff2bf01..0cfdd9e2142 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName/DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse.cs @@ -20,7 +20,7 @@ public partial class DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipal /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalName.DoesUserHaveAccessuserIdUserIdTenantIdTenantIdUserPrincipalNameUserPrincipalNameResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/FilesFolder/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/FilesFolder/Content/ContentRequestBuilder.cs index 43ebb12ab0a..efdfb0cddea 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/FilesFolder/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/FilesFolder/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/FilesFolder/ContentStream/ContentStreamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/FilesFolder/ContentStream/ContentStreamRequestBuilder.cs index f03bbf5abc0..a47ff7aa6e7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/FilesFolder/ContentStream/ContentStreamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/FilesFolder/ContentStream/ContentStreamRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddPostRequestBody.cs index acd128d1145..93d6ab77079 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddPostRequestBody.cs @@ -53,7 +53,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Add.AddPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddPostResponse.cs index 5d5c9a9ef34..64e68140b77 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddPostResponse.cs @@ -36,7 +36,7 @@ public partial class AddPostResponse : global::Microsoft.Graph.Beta.Models.BaseC /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Add.AddPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Add.AddPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddRequestBuilder.cs index 7c8dc70a403..1a8c1547692 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddRequestBuilder.cs @@ -51,7 +51,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsAddPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddResponse.cs index 330a5d384a7..b1874915080 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Add/AddResponse.cs @@ -20,7 +20,7 @@ public partial class AddResponse : global::Microsoft.Graph.Beta.Groups.Item.Team /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Add.AddResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Add.AddResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs index e8a5d9cf5ef..35f02a0e754 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/MembersRequestBuilder.cs index a9ebd3639b1..481bdcbfce1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/MembersRequestBuilder.cs @@ -105,7 +105,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemovePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemovePostRequestBody.cs index 871aaf7178b..49c09fd0dd1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemovePostRequestBody.cs @@ -53,7 +53,7 @@ public RemovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Remove.RemovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Remove.RemovePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemovePostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemovePostResponse.cs index 130c0b2cdf2..b59f18fa2c2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemovePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemovePostResponse.cs @@ -36,7 +36,7 @@ public partial class RemovePostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Remove.RemovePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Remove.RemovePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemoveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemoveRequestBuilder.cs index f481c07d0fc..a0ac3802985 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemoveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemoveRequestBuilder.cs @@ -51,7 +51,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsRemovePostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemoveResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemoveResponse.cs index a12ca44d813..2339cc97446 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemoveResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Members/Remove/RemoveResponse.cs @@ -20,7 +20,7 @@ public partial class RemoveResponse : global::Microsoft.Graph.Beta.Groups.Item.T /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Remove.RemoveResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Members.Remove.RemoveResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Delta/DeltaGetResponse.cs index 71b58e2a930..05f2301053d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Delta/DeltaResponse.cs index e3ff1244380..b265557b035 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Te /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs index b8164a12e58..704c26f9b33 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs @@ -85,7 +85,7 @@ public ForwardToChatPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.ForwardToChat.ForwardToChatPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.ForwardToChat.ForwardToChatPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("additionalMessage", AdditionalMessage); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteCollectionOfPrimitiveValues("targetChatIds", TargetChatIds); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatPostResponse.cs index d0e0215d93a..31aac9a176b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatPostResponse.cs @@ -36,7 +36,7 @@ public partial class ForwardToChatPostResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.ForwardToChat.ForwardToChatPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.ForwardToChat.ForwardToChatPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs index b6b5239281a..8c58fdcf6da 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs @@ -51,7 +51,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsForwardToChatPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatResponse.cs index dbbabd63489..a30ae8f6c2a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ForwardToChat/ForwardToChatResponse.cs @@ -20,7 +20,7 @@ public partial class ForwardToChatResponse : global::Microsoft.Graph.Beta.Groups /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.ForwardToChat.ForwardToChatResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.ForwardToChat.ForwardToChatResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/ChatMessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/ChatMessageItemRequestBuilder.cs index 4ba48f6b645..24d252d45c7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/ChatMessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/ChatMessageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs index fea1473cbc9..67148e7faa5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs @@ -93,7 +93,7 @@ public HostedContentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs index e6540336b71..d0c4e91bbb9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs index 41012402283..c719b8c2bc9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Delta/DeltaGetResponse.cs index 6b45c24e652..bea174d222f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Delta/DeltaResponse.cs index 24df4c0ed77..09787333adb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Te /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs index 9d31a5235d0..3943ff07341 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs @@ -85,7 +85,7 @@ public ForwardToChatPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("additionalMessage", AdditionalMessage); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteCollectionOfPrimitiveValues("targetChatIds", TargetChatIds); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs index a28b2722d2d..a6f31fbaecc 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs @@ -36,7 +36,7 @@ public partial class ForwardToChatPostResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.ForwardToChat.ForwardToChatPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.ForwardToChat.ForwardToChatPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs index cfbeb61aca5..b5a729d8d5f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs @@ -51,7 +51,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsForwardToChatPostResponseAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs index 3f67fb6fd13..81e5a33bbe4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs @@ -20,7 +20,7 @@ public partial class ForwardToChatResponse : global::Microsoft.Graph.Beta.Groups /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.ForwardToChat.ForwardToChatResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.ForwardToChat.ForwardToChatResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs index a4904314913..8c9585ee543 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs index a665f09e771..cc7ede45a89 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs @@ -93,7 +93,7 @@ public HostedContentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs index eb74bf10050..8dd36c4749f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs index 478abad52ea..02bbfa9ec22 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs index d35bd5818e5..1a3f865e584 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public SetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs index 82a5d18af5e..5bf79ebabf9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Primar public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs index 2b6a83b3df9..f10580c4c51 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public UnsetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs index 3b66745ce20..778af52dbb9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Primar public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs index ac10c67fdc3..ce26936d566 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -111,7 +111,7 @@ public RepliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs index 7774237b4c8..1099dc3f21f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs @@ -69,7 +69,7 @@ public ReplyWithQuotePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteObjectValue("replyMessage", ReplyMessage); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs index 054c0f57fab..ccc875b78f8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs @@ -52,7 +52,7 @@ public ReplyWithQuoteRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/SetReaction/SetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/SetReaction/SetReactionPostRequestBody.cs index 7398e57f2a1..2e88f246dee 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/SetReaction/SetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/SetReaction/SetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public SetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.SetReaction.SetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.SetReaction.SetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/SetReaction/SetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/SetReaction/SetReactionRequestBuilder.cs index 62717a38766..9419f28306e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/SetReaction/SetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/SetReaction/SetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Primar public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs index 14cbd9a7223..53886f7f161 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public UnsetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs index 1e6968ec565..dab2ba9fb9a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Primar public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs index aaf22028d9e..da3eff66c69 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs @@ -111,7 +111,7 @@ public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs index 8df760f120d..577d06009ae 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs @@ -69,7 +69,7 @@ public ReplyWithQuotePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteObjectValue("replyMessage", ReplyMessage); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs index 94725961c7d..1b607163599 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs @@ -52,7 +52,7 @@ public ReplyWithQuoteRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/PlannerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/PlannerRequestBuilder.cs index 6916aa2fc75..65cf8453a88 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/PlannerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/PlannerRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsChannelPlanner body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsChannelPlanner body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Delta/DeltaGetResponse.cs index 372db4c9f3e..7a4cde2f4c9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Delta/DeltaResponse.cs index 4431ec90cb4..fc71bb31c24 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Te /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs index 0bcea0f396b..af81648d654 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs @@ -52,7 +52,7 @@ public ArchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Archive.ArchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Archive.ArchivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("justification", Justification); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs index 390323d502d..b8b955a2fd8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Primar public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs index 39a75f3707a..46aba825dad 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs @@ -99,7 +99,7 @@ public BucketsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs index adb4c89d97e..4efb6e581a5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Buckets.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Buckets.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs index 06d9e283826..f8620c84d66 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Te /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Buckets.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Buckets.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs index 65515a5b07a..ea2a189e3d5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs index edb2bc47c54..2070071c65f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs index acb71149d00..4550081b956 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Te /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs index 0adffe88999..a1f17cc2f51 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs index 27d80783656..06df528e6ae 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs index c0795b9545b..7442f431a78 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs index 3fae779c99b..073294b38fc 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs index 136fcec3e7a..bfb08598e9e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs index e439a909f90..f37b5a3f1b5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs @@ -99,7 +99,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Details/DetailsRequestBuilder.cs index 81898246340..ef6ab3482f6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerPlanDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlanDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs index 45fb6e7b332..1db66e48634 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs @@ -53,7 +53,7 @@ public MoveToContainerPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("container", Container); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs index d28aed48e88..0c0e1d6cac9 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs @@ -52,7 +52,7 @@ public MoveToContainerRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs index f95f17c5565..2b12694f1b5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs index 86a0630ecc4..eab9f0c4e48 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Tasks.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Tasks.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs index bfbf06cc4fd..3bd745f9bbb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Groups.Item.Te /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Tasks.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Tasks.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs index 2ab8c56e7e4..c5967eb51a2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs index aeb28fc403d..b42a55652e6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs index 54c07635004..d7c35da38bf 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs index d9fda8eb0c5..74b02c39435 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs index bb5b8d092ec..7691ab8c15d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs index 85de9dfd82c..c7c48173557 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs @@ -99,7 +99,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs index 053d7422d3a..11930e325ea 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs @@ -52,7 +52,7 @@ public UnarchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("justification", Justification); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs index c7ac325cd3c..ed5bb083c21 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Primar public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.PrimaryChannel.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/PlansRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/PlansRequestBuilder.cs index e57112fbe97..2a3d2f22562 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/PlansRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Planner/Plans/PlansRequestBuilder.cs @@ -99,7 +99,7 @@ public PlansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/PrimaryChannelRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/PrimaryChannelRequestBuilder.cs index dba120e26bd..dbc4f1d6973 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/PrimaryChannelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/PrimaryChannelRequestBuilder.cs @@ -174,7 +174,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Channel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -235,7 +235,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Channel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs index 0aedc48f1a6..3a07ded8750 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/Item/SharedWithChannelTeamInfoItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SharedWithChannelTeamInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SharedWithChannelTeamInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/SharedWithTeamsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/SharedWithTeamsRequestBuilder.cs index 7ecb103fe12..51bb24516f8 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/SharedWithTeamsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/SharedWithTeams/SharedWithTeamsRequestBuilder.cs @@ -93,7 +93,7 @@ public SharedWithTeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SharedWithChannelTeamInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SharedWithChannelTeamInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Tabs/Item/TeamsTabItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Tabs/Item/TeamsTabItemRequestBuilder.cs index 4941ed4dfb4..5c5957523c0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Tabs/Item/TeamsTabItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Tabs/Item/TeamsTabItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Tabs/TabsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Tabs/TabsRequestBuilder.cs index 48488136e8a..1e1ddf3db50 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Tabs/TabsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Tabs/TabsRequestBuilder.cs @@ -93,7 +93,7 @@ public TabsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/DayNotes/DayNotesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/DayNotes/DayNotesRequestBuilder.cs index 9d705c7a522..29d7a64eff2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/DayNotes/DayNotesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/DayNotes/DayNotesRequestBuilder.cs @@ -93,7 +93,7 @@ public DayNotesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DayNote body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DayNote body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/DayNotes/Item/DayNoteItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/DayNotes/Item/DayNoteItemRequestBuilder.cs index fc4a052e1f4..5d9ce8748ef 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/DayNotes/Item/DayNoteItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/DayNotes/Item/DayNoteItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DayNote body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DayNote body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OfferShiftRequests/Item/OfferShiftRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OfferShiftRequests/Item/OfferShiftRequestItemRequestBuilder.cs index f2e42a0e687..d8dcc546538 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OfferShiftRequests/Item/OfferShiftRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OfferShiftRequests/Item/OfferShiftRequestItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OfferShiftRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OfferShiftRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OfferShiftRequests/OfferShiftRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OfferShiftRequests/OfferShiftRequestsRequestBuilder.cs index 80b864da35c..f247543d7dc 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OfferShiftRequests/OfferShiftRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OfferShiftRequests/OfferShiftRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public OfferShiftRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OfferShiftRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OfferShiftRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShiftChangeRequests/Item/OpenShiftChangeRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShiftChangeRequests/Item/OpenShiftChangeRequestItemRequestBuilder.cs index e83928fd9fe..bb6086a7514 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShiftChangeRequests/Item/OpenShiftChangeRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShiftChangeRequests/Item/OpenShiftChangeRequestItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OpenShiftChangeRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OpenShiftChangeRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShiftChangeRequests/OpenShiftChangeRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShiftChangeRequests/OpenShiftChangeRequestsRequestBuilder.cs index 4665c14bc32..1ef0673af79 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShiftChangeRequests/OpenShiftChangeRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShiftChangeRequests/OpenShiftChangeRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public OpenShiftChangeRequestsRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OpenShiftChangeRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OpenShiftChangeRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShifts/Item/OpenShiftItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShifts/Item/OpenShiftItemRequestBuilder.cs index e3ea515ab1d..73b19d3b676 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShifts/Item/OpenShiftItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShifts/Item/OpenShiftItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OpenShift body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OpenShift body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShifts/OpenShiftsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShifts/OpenShiftsRequestBuilder.cs index 3d55c3420f3..c966122c82c 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShifts/OpenShiftsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/OpenShifts/OpenShiftsRequestBuilder.cs @@ -93,7 +93,7 @@ public OpenShiftsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OpenShift body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OpenShift body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/ScheduleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/ScheduleRequestBuilder.cs index a18125d3c25..561b9f56c2a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/ScheduleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/ScheduleRequestBuilder.cs @@ -174,7 +174,7 @@ public async Task DeleteAsync(Action PutAsync(global::Microsoft.Graph.Beta.Models.Schedule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -235,7 +235,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.Schedule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SchedulingGroups/Item/SchedulingGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SchedulingGroups/Item/SchedulingGroupItemRequestBuilder.cs index 73ad005dd72..492e8d33002 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SchedulingGroups/Item/SchedulingGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SchedulingGroups/Item/SchedulingGroupItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SchedulingGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SchedulingGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SchedulingGroups/SchedulingGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SchedulingGroups/SchedulingGroupsRequestBuilder.cs index 972994aaceb..ad2b50fd867 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SchedulingGroups/SchedulingGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SchedulingGroups/SchedulingGroupsRequestBuilder.cs @@ -93,7 +93,7 @@ public SchedulingGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SchedulingGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SchedulingGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Share/SharePostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Share/SharePostRequestBody.cs index 3aa6f56683a..9f735b71ad4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Share/SharePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Share/SharePostRequestBody.cs @@ -54,7 +54,7 @@ public SharePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.Share.SharePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.Share.SharePostRequestBody(); } /// @@ -76,7 +76,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteBoolValue("notifyTeam", NotifyTeam); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Share/ShareRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Share/ShareRequestBuilder.cs index ebfe4d4e548..e8f8ff23df3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Share/ShareRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Share/ShareRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Schedu public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.Share.SharePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.Share.SharePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Shifts/Item/ShiftItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Shifts/Item/ShiftItemRequestBuilder.cs index 0fbb1eef6f3..54bb3905f45 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Shifts/Item/ShiftItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Shifts/Item/ShiftItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Shift body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Shift body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Shifts/ShiftsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Shifts/ShiftsRequestBuilder.cs index 300ec695054..b3b92b42712 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Shifts/ShiftsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/Shifts/ShiftsRequestBuilder.cs @@ -93,7 +93,7 @@ public ShiftsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Shift body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Shift body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/ShiftsRoleDefinitions/Item/ShiftsRoleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/ShiftsRoleDefinitions/Item/ShiftsRoleDefinitionItemRequestBuilder.cs index 9786cf2c895..82cbe4bf934 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/ShiftsRoleDefinitions/Item/ShiftsRoleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/ShiftsRoleDefinitions/Item/ShiftsRoleDefinitionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ShiftsRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ShiftsRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/ShiftsRoleDefinitions/ShiftsRoleDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/ShiftsRoleDefinitions/ShiftsRoleDefinitionsRequestBuilder.cs index aca62c567ed..57160a1eb10 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/ShiftsRoleDefinitions/ShiftsRoleDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/ShiftsRoleDefinitions/ShiftsRoleDefinitionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ShiftsRoleDefinitionsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ShiftsRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ShiftsRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SwapShiftsChangeRequests/Item/SwapShiftsChangeRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SwapShiftsChangeRequests/Item/SwapShiftsChangeRequestItemRequestBuilder.cs index a1bf90ab843..2d554965fc2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SwapShiftsChangeRequests/Item/SwapShiftsChangeRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SwapShiftsChangeRequests/Item/SwapShiftsChangeRequestItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SwapShiftsChangeRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SwapShiftsChangeRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SwapShiftsChangeRequests/SwapShiftsChangeRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SwapShiftsChangeRequests/SwapShiftsChangeRequestsRequestBuilder.cs index c0410c2382c..182ac9188fa 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SwapShiftsChangeRequests/SwapShiftsChangeRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/SwapShiftsChangeRequests/SwapShiftsChangeRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public SwapShiftsChangeRequestsRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SwapShiftsChangeRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SwapShiftsChangeRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/ClockIn/ClockInPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/ClockIn/ClockInPostRequestBody.cs index 6f570e57852..bd729bdb0cf 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/ClockIn/ClockInPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/ClockIn/ClockInPostRequestBody.cs @@ -81,7 +81,7 @@ public ClockInPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.ClockIn.ClockInPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.ClockIn.ClockInPostRequestBody(); } /// @@ -104,7 +104,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("atApprovedLocation", AtApprovedLocation); writer.WriteBoolValue("isAtApprovedLocation", IsAtApprovedLocation); writer.WriteObjectValue("notes", Notes); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/ClockIn/ClockInRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/ClockIn/ClockInRequestBuilder.cs index a9b6f7d2bfd..722dc2b6eeb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/ClockIn/ClockInRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/ClockIn/ClockInRequestBuilder.cs @@ -52,7 +52,7 @@ public ClockInRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.ClockIn.ClockInPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.ClockIn.ClockInPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ClockOut/ClockOutPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ClockOut/ClockOutPostRequestBody.cs index ecaf38d6a9c..1191c7f7258 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ClockOut/ClockOutPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ClockOut/ClockOutPostRequestBody.cs @@ -65,7 +65,7 @@ public ClockOutPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.ClockOut.ClockOutPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.ClockOut.ClockOutPostRequestBody(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("atApprovedLocation", AtApprovedLocation); writer.WriteBoolValue("isAtApprovedLocation", IsAtApprovedLocation); writer.WriteObjectValue("notes", Notes); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ClockOut/ClockOutRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ClockOut/ClockOutRequestBuilder.cs index 2067bda6308..320a4a38137 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ClockOut/ClockOutRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ClockOut/ClockOutRequestBuilder.cs @@ -52,7 +52,7 @@ public ClockOutRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.ClockOut.ClockOutPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.ClockOut.ClockOutPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ConfirmForUser/ConfirmForUserPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ConfirmForUser/ConfirmForUserPostRequestBody.cs index a4065a47a60..a209dd45267 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ConfirmForUser/ConfirmForUserPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ConfirmForUser/ConfirmForUserPostRequestBody.cs @@ -52,7 +52,7 @@ public ConfirmForUserPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.ConfirmForUser.ConfirmForUserPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.ConfirmForUser.ConfirmForUserPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("userId", UserId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ConfirmForUser/ConfirmForUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ConfirmForUser/ConfirmForUserRequestBuilder.cs index 937c96d728c..8e52265f1e0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ConfirmForUser/ConfirmForUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/ConfirmForUser/ConfirmForUserRequestBuilder.cs @@ -51,7 +51,7 @@ public ConfirmForUserRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.ConfirmForUser.ConfirmForUserPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.ConfirmForUser.ConfirmForUserPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/EndBreak/EndBreakPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/EndBreak/EndBreakPostRequestBody.cs index dc65f0da287..047120d4932 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/EndBreak/EndBreakPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/EndBreak/EndBreakPostRequestBody.cs @@ -65,7 +65,7 @@ public EndBreakPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.EndBreak.EndBreakPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.EndBreak.EndBreakPostRequestBody(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("atApprovedLocation", AtApprovedLocation); writer.WriteBoolValue("isAtApprovedLocation", IsAtApprovedLocation); writer.WriteObjectValue("notes", Notes); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/EndBreak/EndBreakRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/EndBreak/EndBreakRequestBuilder.cs index b695244eb65..eaeafb494b5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/EndBreak/EndBreakRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/EndBreak/EndBreakRequestBuilder.cs @@ -52,7 +52,7 @@ public EndBreakRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.EndBreak.EndBreakPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.EndBreak.EndBreakPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/StartBreak/StartBreakPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/StartBreak/StartBreakPostRequestBody.cs index b0c572192e7..4c4706fa0a2 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/StartBreak/StartBreakPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/StartBreak/StartBreakPostRequestBody.cs @@ -65,7 +65,7 @@ public StartBreakPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.StartBreak.StartBreakPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.StartBreak.StartBreakPostRequestBody(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("atApprovedLocation", AtApprovedLocation); writer.WriteBoolValue("isAtApprovedLocation", IsAtApprovedLocation); writer.WriteObjectValue("notes", Notes); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/StartBreak/StartBreakRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/StartBreak/StartBreakRequestBuilder.cs index e0ad40ffafa..d15543b309e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/StartBreak/StartBreakRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/StartBreak/StartBreakRequestBuilder.cs @@ -52,7 +52,7 @@ public StartBreakRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.StartBreak.StartBreakPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.Schedule.TimeCards.Item.StartBreak.StartBreakPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/TimeCardItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/TimeCardItemRequestBuilder.cs index dc10b1722ba..cb19bd79388 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/TimeCardItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/Item/TimeCardItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TimeCard body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TimeCard body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/TimeCardsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/TimeCardsRequestBuilder.cs index 16d71c003f7..bc9ea490fb7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/TimeCardsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeCards/TimeCardsRequestBuilder.cs @@ -99,7 +99,7 @@ public TimeCardsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TimeCard body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TimeCard body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffReasons/Item/TimeOffReasonItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffReasons/Item/TimeOffReasonItemRequestBuilder.cs index b9ecbde1c69..27fe2405cac 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffReasons/Item/TimeOffReasonItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffReasons/Item/TimeOffReasonItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TimeOffReason body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TimeOffReason body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffReasons/TimeOffReasonsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffReasons/TimeOffReasonsRequestBuilder.cs index ba5cc00c9cb..f5819cf0dc4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffReasons/TimeOffReasonsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffReasons/TimeOffReasonsRequestBuilder.cs @@ -93,7 +93,7 @@ public TimeOffReasonsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TimeOffReason body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TimeOffReason body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffRequests/Item/TimeOffRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffRequests/Item/TimeOffRequestItemRequestBuilder.cs index cf755aa76fb..0155410ea39 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffRequests/Item/TimeOffRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffRequests/Item/TimeOffRequestItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TimeOffRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TimeOffRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffRequests/TimeOffRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffRequests/TimeOffRequestsRequestBuilder.cs index a728b5e1413..43f4e167047 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffRequests/TimeOffRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimeOffRequests/TimeOffRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public TimeOffRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TimeOffRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TimeOffRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimesOff/Item/TimeOffItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimesOff/Item/TimeOffItemRequestBuilder.cs index 4aa731618b1..1456bdc0553 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimesOff/Item/TimeOffItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimesOff/Item/TimeOffItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TimeOff body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TimeOff body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimesOff/TimesOffRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimesOff/TimesOffRequestBuilder.cs index 3910fa9e62c..b229c74f7c7 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimesOff/TimesOffRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Schedule/TimesOff/TimesOffRequestBuilder.cs @@ -93,7 +93,7 @@ public TimesOffRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TimeOff body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TimeOff body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/SendActivityNotification/SendActivityNotificationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/SendActivityNotification/SendActivityNotificationPostRequestBody.cs index a851abca091..c4c4abf16c0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/SendActivityNotification/SendActivityNotificationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/SendActivityNotification/SendActivityNotificationPostRequestBody.cs @@ -155,7 +155,7 @@ public SendActivityNotificationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Team.SendActivityNotification.SendActivityNotificationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Team.SendActivityNotification.SendActivityNotificationPostRequestBody(); } /// @@ -182,7 +182,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("activityType", ActivityType); writer.WriteLongValue("chainId", ChainId); writer.WriteStringValue("iconId", IconId); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/SendActivityNotification/SendActivityNotificationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/SendActivityNotification/SendActivityNotificationRequestBuilder.cs index 7e0bf1d78c7..c11d6f726ed 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/SendActivityNotification/SendActivityNotificationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/SendActivityNotification/SendActivityNotificationRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.SendAc public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Team.SendActivityNotification.SendActivityNotificationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Team.SendActivityNotification.SendActivityNotificationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/Item/Members/Item/TeamworkTagMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/Item/Members/Item/TeamworkTagMemberItemRequestBuilder.cs index 6a7aaf3abdb..b66c78e5b9a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/Item/Members/Item/TeamworkTagMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/Item/Members/Item/TeamworkTagMemberItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamworkTagMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamworkTagMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/Item/Members/MembersRequestBuilder.cs index 1cd80ec3a77..ad2981b88de 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/Item/Members/MembersRequestBuilder.cs @@ -93,7 +93,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamworkTagMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamworkTagMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/Item/TeamworkTagItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/Item/TeamworkTagItemRequestBuilder.cs index 5e4098c8b7e..5c40dd98594 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/Item/TeamworkTagItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/Item/TeamworkTagItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamworkTag body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamworkTag body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/TagsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/TagsRequestBuilder.cs index 2ce2a369038..28c52d4049f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/TagsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Tags/TagsRequestBuilder.cs @@ -93,7 +93,7 @@ public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamworkTag body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamworkTag body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/TeamRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/TeamRequestBuilder.cs index 8803ca4c621..8893c10c826 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/TeamRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/TeamRequestBuilder.cs @@ -228,7 +228,7 @@ public async Task DeleteAsync(Action PutAsync(global::Microsoft.Graph.Beta.Models.Team body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -289,7 +289,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.Team body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs index f394821775c..fe7ea7f075d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs @@ -47,8 +47,8 @@ public ConversationThreadItemRequestBuilder(string rawUrl, IRequestAdapter reque { } /// - /// Delete a thread object. - /// Find more info here + /// Delete conversationThread. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConversationThread body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action(requestInfo, global::Microsoft.Graph.Beta.Models.ConversationThread.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Delete a thread object. + /// Delete conversationThread. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationThread body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Attachments/AttachmentsRequestBuilder.cs index 3e1ba72e621..7390a64461e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Attachments/AttachmentsRequestBuilder.cs @@ -100,7 +100,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index aef1eb49dac..894ff1c03fb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index bab70792d09..fbd7f30471b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Extensions/ExtensionsRequestBuilder.cs index f09ef30b393..ec36f14ddc6 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 9dcd1fe455c..11279aabb5b 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Forward/ForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Forward/ForwardPostRequestBody.cs index ff82b6a75c9..7ec4219eb8a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Forward/ForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Forward/ForwardPostRequestBody.cs @@ -69,7 +69,7 @@ public ForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.Forward.ForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.Forward.ForwardPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Forward/ForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Forward/ForwardRequestBuilder.cs index ab7ddf8fd04..6e1bf1fae25 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Forward/ForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Forward/ForwardRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Threads.Ite public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/AttachmentsRequestBuilder.cs index bc4151bddc2..9a18cc49273 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/AttachmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index cafa3afa69e..5e8e8399fb0 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.InReplyTo.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.InReplyTo.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 487990f6952..b6a0a4fe048 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.InReplyTo.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.InReplyTo.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/ExtensionsRequestBuilder.cs index 58247d1ea7f..1a971aaf276 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/Item/ExtensionItemRequestBuilder.cs index ea5728a7ea3..3762dee13e5 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardPostRequestBody.cs index 728c0a153c5..bb473c7cca1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardPostRequestBody.cs @@ -69,7 +69,7 @@ public ForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.InReplyTo.Forward.ForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.InReplyTo.Forward.ForwardPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardRequestBuilder.cs index dfec416613d..6889a76cd7e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Forward/ForwardRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Threads.Ite public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.InReplyTo.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.InReplyTo.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Mentions/MentionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Mentions/MentionsRequestBuilder.cs index 10be2217ba8..f888ee54566 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Mentions/MentionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Mentions/MentionsRequestBuilder.cs @@ -93,7 +93,7 @@ public MentionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Mention body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Mention body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyPostRequestBody.cs index 3b139769319..ee24f4a3cd4 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyPostRequestBody.cs @@ -53,7 +53,7 @@ public ReplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.InReplyTo.Reply.ReplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.InReplyTo.Reply.ReplyPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("Post", Post); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs index 75c6e81116a..e5d9c4a8687 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/InReplyTo/Reply/ReplyRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Threads.Ite public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.InReplyTo.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.InReplyTo.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Mentions/MentionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Mentions/MentionsRequestBuilder.cs index abf1b6676f0..f3b0a43c14e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Mentions/MentionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Mentions/MentionsRequestBuilder.cs @@ -93,7 +93,7 @@ public MentionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Mention body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Mention body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/PostItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/PostItemRequestBuilder.cs index 611616aaf9c..48d288bdeff 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/PostItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/PostItemRequestBuilder.cs @@ -111,7 +111,7 @@ public PostItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.Post body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Post body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Reply/ReplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Reply/ReplyPostRequestBody.cs index c06208cf004..a0933103102 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Reply/ReplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Reply/ReplyPostRequestBody.cs @@ -53,7 +53,7 @@ public ReplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.Reply.ReplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.Reply.ReplyPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("Post", Post); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs index e5f5af9c9c7..7e0e64f0190 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/Item/Reply/ReplyRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Threads.Ite public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Posts.Item.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyPostRequestBody.cs index 0106d5d7eff..4e85e69cfcc 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyPostRequestBody.cs @@ -53,7 +53,7 @@ public ReplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Reply.ReplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Reply.ReplyPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("Post", Post); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs index 742b6a93cd6..db3d00e30f3 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs @@ -34,8 +34,8 @@ public ReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base { } /// - /// Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. - /// Find more info here + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Threads.Ite public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -59,7 +59,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.Threads.Ite await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. /// /// A /// The request body @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.Threads.Item.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/ThreadsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/ThreadsRequestBuilder.cs index 3eb35e68987..1e8c68684f1 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/ThreadsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/ThreadsRequestBuilder.cs @@ -95,7 +95,7 @@ public ThreadsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConversationThread body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationThread body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/Item/ValidateProperties/ValidatePropertiesPostRequestBody.cs index 9f437ad83f6..702fd7728fb 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/ValidateProperties/ValidatePropertiesPostRequestBody.cs @@ -74,7 +74,7 @@ public ValidatePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.Item.ValidateProperties.ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.Item.ValidateProperties.ValidatePropertiesPostRequestBody(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("mailNickname", MailNickname); writer.WriteGuidValue("onBehalfOfUserId", OnBehalfOfUserId); diff --git a/src/Microsoft.Graph/Generated/Groups/Item/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/ValidateProperties/ValidatePropertiesRequestBuilder.cs index 1aefa96ac66..28a6f9ec67e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/ValidateProperties/ValidatePropertiesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.ValidatePro public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.Item.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.Item.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Groups/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/Groups/ValidateProperties/ValidatePropertiesPostRequestBody.cs index ed210e79474..a6b361a6c8c 100644 --- a/src/Microsoft.Graph/Generated/Groups/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Groups/ValidateProperties/ValidatePropertiesPostRequestBody.cs @@ -90,7 +90,7 @@ public ValidatePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Groups.ValidateProperties.ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Groups.ValidateProperties.ValidatePropertiesPostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("entityType", EntityType); writer.WriteStringValue("mailNickname", MailNickname); diff --git a/src/Microsoft.Graph/Generated/Groups/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/ValidateProperties/ValidatePropertiesRequestBuilder.cs index 1aa9113e1ef..639530c60c8 100644 --- a/src/Microsoft.Graph/Generated/Groups/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/ValidateProperties/ValidatePropertiesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.ValidateProperti public async Task PostAsync(global::Microsoft.Graph.Beta.Groups.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Groups.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/GroupsWithUniqueName/GroupsWithUniqueNameRequestBuilder.cs b/src/Microsoft.Graph/Generated/GroupsWithUniqueName/GroupsWithUniqueNameRequestBuilder.cs index d3302e5a1e1..37b7c27d600 100644 --- a/src/Microsoft.Graph/Generated/GroupsWithUniqueName/GroupsWithUniqueNameRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/GroupsWithUniqueName/GroupsWithUniqueNameRequestBuilder.cs @@ -101,7 +101,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Group body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Group body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ApiConnectors/ApiConnectorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ApiConnectors/ApiConnectorsRequestBuilder.cs index 06917c7811f..9c6676e390a 100644 --- a/src/Microsoft.Graph/Generated/Identity/ApiConnectors/ApiConnectorsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ApiConnectors/ApiConnectorsRequestBuilder.cs @@ -95,7 +95,7 @@ public ApiConnectorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IdentityApiConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityApiConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ApiConnectors/Item/IdentityApiConnectorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ApiConnectors/Item/IdentityApiConnectorItemRequestBuilder.cs index 3f3a25506ff..2d42d30dca6 100644 --- a/src/Microsoft.Graph/Generated/Identity/ApiConnectors/Item/IdentityApiConnectorItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ApiConnectors/Item/IdentityApiConnectorItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityApiConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityApiConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ApiConnectors/Item/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Identity/ApiConnectors/Item/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs index 01fe12ecd9c..54218d8ad18 100644 --- a/src/Microsoft.Graph/Generated/Identity/ApiConnectors/Item/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Identity/ApiConnectors/Item/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs @@ -68,7 +68,7 @@ public UploadClientCertificatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Identity.ApiConnectors.Item.UploadClientCertificate.UploadClientCertificatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.ApiConnectors.Item.UploadClientCertificate.UploadClientCertificatePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("password", Password); writer.WriteStringValue("pkcs12Value", Pkcs12Value); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Identity/ApiConnectors/Item/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ApiConnectors/Item/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs index b179010f614..259b6626aeb 100644 --- a/src/Microsoft.Graph/Generated/Identity/ApiConnectors/Item/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ApiConnectors/Item/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs @@ -52,7 +52,7 @@ public UploadClientCertificateRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Identity.ApiConnectors.Item.UploadClientCertificate.UploadClientCertificatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Identity.ApiConnectors.Item.UploadClientCertificate.UploadClientCertificatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventListeners/AuthenticationEventListenersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventListeners/AuthenticationEventListenersRequestBuilder.cs index a72db78fc9c..4661f08c741 100644 --- a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventListeners/AuthenticationEventListenersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventListeners/AuthenticationEventListenersRequestBuilder.cs @@ -95,7 +95,7 @@ public AuthenticationEventListenersRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationEventListener body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationEventListener body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventListeners/Item/AuthenticationEventListenerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventListeners/Item/AuthenticationEventListenerItemRequestBuilder.cs index 69672804df0..7011f84a8db 100644 --- a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventListeners/Item/AuthenticationEventListenerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventListeners/Item/AuthenticationEventListenerItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationEventListener body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationEventListener body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/AuthenticationEventsFlowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/AuthenticationEventsFlowsRequestBuilder.cs index bbacccf917f..b04c6b67119 100644 --- a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/AuthenticationEventsFlowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/AuthenticationEventsFlowsRequestBuilder.cs @@ -101,7 +101,7 @@ public AuthenticationEventsFlowsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationEventsFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationEventsFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/AuthenticationEventsFlowItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/AuthenticationEventsFlowItemRequestBuilder.cs index 0919a567f85..a587e119e9b 100644 --- a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/AuthenticationEventsFlowItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/AuthenticationEventsFlowItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationEventsFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationEventsFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/Conditions/Applications/IncludeApplications/IncludeApplicationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/Conditions/Applications/IncludeApplications/IncludeApplicationsRequestBuilder.cs index 0902c35849e..ec3ff452e73 100644 --- a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/Conditions/Applications/IncludeApplications/IncludeApplicationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/Conditions/Applications/IncludeApplications/IncludeApplicationsRequestBuilder.cs @@ -95,7 +95,7 @@ public IncludeApplicationsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationConditionApplication body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationConditionApplication body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/Conditions/Applications/IncludeApplications/Item/AuthenticationConditionApplicationAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/Conditions/Applications/IncludeApplications/Item/AuthenticationConditionApplicationAppItemRequestBuilder.cs index a142890adaf..57bc5139bb9 100644 --- a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/Conditions/Applications/IncludeApplications/Item/AuthenticationConditionApplicationAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/Conditions/Applications/IncludeApplications/Item/AuthenticationConditionApplicationAppItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationConditionApplication body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationConditionApplication body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/Conditions/Applications/IncludeApplications/IncludeApplicationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/Conditions/Applications/IncludeApplications/IncludeApplicationsRequestBuilder.cs index 944bec35a48..464dd1ca9f1 100644 --- a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/Conditions/Applications/IncludeApplications/IncludeApplicationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/Conditions/Applications/IncludeApplications/IncludeApplicationsRequestBuilder.cs @@ -93,7 +93,7 @@ public IncludeApplicationsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationConditionApplication body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationConditionApplication body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/Conditions/Applications/IncludeApplications/Item/AuthenticationConditionApplicationAppItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/Conditions/Applications/IncludeApplications/Item/AuthenticationConditionApplicationAppItemRequestBuilder.cs index 4cbc58b457b..ccde449acb8 100644 --- a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/Conditions/Applications/IncludeApplications/Item/AuthenticationConditionApplicationAppItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/Conditions/Applications/IncludeApplications/Item/AuthenticationConditionApplicationAppItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationConditionApplication body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationConditionApplication body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAttributeCollection/GraphOnAttributeCollectionExternalUsersSelfServiceSignUp/Attributes/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAttributeCollection/GraphOnAttributeCollectionExternalUsersSelfServiceSignUp/Attributes/Ref/RefRequestBuilder.cs index 1e57c884719..218998ae401 100644 --- a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAttributeCollection/GraphOnAttributeCollectionExternalUsersSelfServiceSignUp/Attributes/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAttributeCollection/GraphOnAttributeCollectionExternalUsersSelfServiceSignUp/Attributes/Ref/RefRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAttributeCollection/graph.onAttributeCollectionExternalUsersSelfServiceSignUp/attributes/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAuthenticationMethodLoadStart/GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/IdentityProviders/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAuthenticationMethodLoadStart/GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/IdentityProviders/Ref/RefRequestBuilder.cs index 933a3737548..9efef26fb51 100644 --- a/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAuthenticationMethodLoadStart/GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/IdentityProviders/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/AuthenticationEventsFlows/Item/GraphExternalUsersSelfServiceSignUpEventsFlow/OnAuthenticationMethodLoadStart/GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/IdentityProviders/Ref/RefRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAuthenticationMethodLoadStart/graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/identityProviders/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/B2cUserFlowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/B2cUserFlowsRequestBuilder.cs index de0d72b78e0..d2d1225919c 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/B2cUserFlowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/B2cUserFlowsRequestBuilder.cs @@ -95,7 +95,7 @@ public B2cUserFlowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.B2cIdentityUserFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.B2cIdentityUserFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/B2cIdentityUserFlowItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/B2cIdentityUserFlowItemRequestBuilder.cs index 8b6d7f6a232..cb124ddb467 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/B2cIdentityUserFlowItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/B2cIdentityUserFlowItemRequestBuilder.cs @@ -123,7 +123,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.B2cIdentityUserFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -184,7 +184,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.B2cIdentityUserFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/IdentityProviders/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/IdentityProviders/Ref/RefRequestBuilder.cs index c82257eee19..7dac70aa3d3 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/IdentityProviders/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/IdentityProviders/Ref/RefRequestBuilder.cs @@ -101,7 +101,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/identity/b2cUserFlows/{b2cIdentityUserFlow%2Did}/identityProviders/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/DefaultPages/DefaultPagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/DefaultPages/DefaultPagesRequestBuilder.cs index c2365d8d467..444d56258b1 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/DefaultPages/DefaultPagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/DefaultPages/DefaultPagesRequestBuilder.cs @@ -94,7 +94,7 @@ public DefaultPagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/DefaultPages/Item/UserFlowLanguagePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/DefaultPages/Item/UserFlowLanguagePageItemRequestBuilder.cs index e6872bf51ae..17840eb6cdd 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/DefaultPages/Item/UserFlowLanguagePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/DefaultPages/Item/UserFlowLanguagePageItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/DefaultPages/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/DefaultPages/Item/Value/ContentRequestBuilder.cs index b20d947b214..bd128f7fef4 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/DefaultPages/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/DefaultPages/Item/Value/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/OverridesPages/Item/UserFlowLanguagePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/OverridesPages/Item/UserFlowLanguagePageItemRequestBuilder.cs index 2c202e5fe1c..57a51ac7a1e 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/OverridesPages/Item/UserFlowLanguagePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/OverridesPages/Item/UserFlowLanguagePageItemRequestBuilder.cs @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/OverridesPages/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/OverridesPages/Item/Value/ContentRequestBuilder.cs index 7cf19f240d1..8fea86f729a 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/OverridesPages/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/OverridesPages/Item/Value/ContentRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/OverridesPages/OverridesPagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/OverridesPages/OverridesPagesRequestBuilder.cs index 82418dd3f88..28631053bc1 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/OverridesPages/OverridesPagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/OverridesPages/OverridesPagesRequestBuilder.cs @@ -94,7 +94,7 @@ public OverridesPagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/UserFlowLanguageConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/UserFlowLanguageConfigurationItemRequestBuilder.cs index 9a83eba5d6c..24801c00eb0 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/UserFlowLanguageConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/Item/UserFlowLanguageConfigurationItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserFlowLanguageConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserFlowLanguageConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/LanguagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/LanguagesRequestBuilder.cs index 137d14d4161..9efde82c3a4 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/LanguagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/Languages/LanguagesRequestBuilder.cs @@ -94,7 +94,7 @@ public LanguagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserFlowLanguageConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserFlowLanguageConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/Item/IdentityUserFlowAttributeAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/Item/IdentityUserFlowAttributeAssignmentItemRequestBuilder.cs index c1e839db6ac..4bf6f3f7273 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/Item/IdentityUserFlowAttributeAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/Item/IdentityUserFlowAttributeAssignmentItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttributeAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttributeAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderPostRequestBody.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderPostRequestBody.cs index c4eabcd5ca7..224808b0342 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderPostRequestBody.cs @@ -53,7 +53,7 @@ public SetOrderPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Identity.B2cUserFlows.Item.UserAttributeAssignments.SetOrder.SetOrderPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.B2cUserFlows.Item.UserAttributeAssignments.SetOrder.SetOrderPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("newAssignmentOrder", NewAssignmentOrder); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderRequestBuilder.cs index 0f9db853fa2..4de1b231b94 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Identity.B2cUserFlows.I public async Task PostAsync(global::Microsoft.Graph.Beta.Identity.B2cUserFlows.Item.UserAttributeAssignments.SetOrder.SetOrderPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Identity.B2cUserFlows.Item.UserAttributeAssignments.SetOrder.SetOrderPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/UserAttributeAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/UserAttributeAssignmentsRequestBuilder.cs index ad4459e785e..40b300587d4 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/UserAttributeAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2cUserFlows/Item/UserAttributeAssignments/UserAttributeAssignmentsRequestBuilder.cs @@ -107,7 +107,7 @@ public UserAttributeAssignmentsRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttributeAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -149,7 +149,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttributeAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/B2xUserFlowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/B2xUserFlowsRequestBuilder.cs index f10e404acbb..f8c0df32f80 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/B2xUserFlowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/B2xUserFlowsRequestBuilder.cs @@ -95,7 +95,7 @@ public B2xUserFlowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.B2xIdentityUserFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.B2xIdentityUserFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/PostAttributeCollectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/PostAttributeCollectionRequestBuilder.cs index e020d29aad1..7c629099b30 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/PostAttributeCollectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/PostAttributeCollectionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityApiConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityApiConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/Ref/RefRequestBuilder.cs index 0f9fee605dc..b18cfc35937 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate b public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs index 0990a601148..6ebe049f354 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs @@ -68,7 +68,7 @@ public UploadClientCertificatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.ApiConnectorConfiguration.PostAttributeCollection.UploadClientCertificate.UploadClientCertificatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.ApiConnectorConfiguration.PostAttributeCollection.UploadClientCertificate.UploadClientCertificatePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("password", Password); writer.WriteStringValue("pkcs12Value", Pkcs12Value); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs index b922dd17c3c..9a54d8237ea 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostAttributeCollection/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs @@ -52,7 +52,7 @@ public UploadClientCertificateRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.ApiConnectorConfiguration.PostAttributeCollection.UploadClientCertificate.UploadClientCertificatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.ApiConnectorConfiguration.PostAttributeCollection.UploadClientCertificate.UploadClientCertificatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/PostFederationSignupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/PostFederationSignupRequestBuilder.cs index 990e3bdfaa0..f31a1786c51 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/PostFederationSignupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/PostFederationSignupRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityApiConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityApiConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/Ref/RefRequestBuilder.cs index c7347856b94..b20da4980e3 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate b public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs index fe25a97112e..0879aeb9279 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs @@ -68,7 +68,7 @@ public UploadClientCertificatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.ApiConnectorConfiguration.PostFederationSignup.UploadClientCertificate.UploadClientCertificatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.ApiConnectorConfiguration.PostFederationSignup.UploadClientCertificate.UploadClientCertificatePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("password", Password); writer.WriteStringValue("pkcs12Value", Pkcs12Value); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs index 8bf5b3d72a2..cfcad1fbc06 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PostFederationSignup/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs @@ -52,7 +52,7 @@ public UploadClientCertificateRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.ApiConnectorConfiguration.PostFederationSignup.UploadClientCertificate.UploadClientCertificatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.ApiConnectorConfiguration.PostFederationSignup.UploadClientCertificate.UploadClientCertificatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PreTokenIssuance/PreTokenIssuanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PreTokenIssuance/PreTokenIssuanceRequestBuilder.cs index 0469a9fe00c..ba688b6cbb7 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PreTokenIssuance/PreTokenIssuanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PreTokenIssuance/PreTokenIssuanceRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityApiConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityApiConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PreTokenIssuance/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PreTokenIssuance/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs index a390716eaea..6f61ba07919 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PreTokenIssuance/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PreTokenIssuance/UploadClientCertificate/UploadClientCertificatePostRequestBody.cs @@ -68,7 +68,7 @@ public UploadClientCertificatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.ApiConnectorConfiguration.PreTokenIssuance.UploadClientCertificate.UploadClientCertificatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.ApiConnectorConfiguration.PreTokenIssuance.UploadClientCertificate.UploadClientCertificatePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("password", Password); writer.WriteStringValue("pkcs12Value", Pkcs12Value); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PreTokenIssuance/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PreTokenIssuance/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs index b9a122845f5..67f82ac3a6b 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PreTokenIssuance/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/ApiConnectorConfiguration/PreTokenIssuance/UploadClientCertificate/UploadClientCertificateRequestBuilder.cs @@ -52,7 +52,7 @@ public UploadClientCertificateRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.ApiConnectorConfiguration.PreTokenIssuance.UploadClientCertificate.UploadClientCertificatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.ApiConnectorConfiguration.PreTokenIssuance.UploadClientCertificate.UploadClientCertificatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/B2xIdentityUserFlowItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/B2xIdentityUserFlowItemRequestBuilder.cs index a92b4bcc703..d7c5a1bd141 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/B2xIdentityUserFlowItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/B2xIdentityUserFlowItemRequestBuilder.cs @@ -128,7 +128,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.B2xIdentityUserFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -189,7 +189,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.B2xIdentityUserFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/DefaultPages/DefaultPagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/DefaultPages/DefaultPagesRequestBuilder.cs index 3031a86abb9..56e35fb5137 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/DefaultPages/DefaultPagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/DefaultPages/DefaultPagesRequestBuilder.cs @@ -93,7 +93,7 @@ public DefaultPagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/DefaultPages/Item/UserFlowLanguagePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/DefaultPages/Item/UserFlowLanguagePageItemRequestBuilder.cs index d0a63c1c2e2..da19cb330a8 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/DefaultPages/Item/UserFlowLanguagePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/DefaultPages/Item/UserFlowLanguagePageItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/DefaultPages/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/DefaultPages/Item/Value/ContentRequestBuilder.cs index 3ebed29e934..ca60bd60d82 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/DefaultPages/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/DefaultPages/Item/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/OverridesPages/Item/UserFlowLanguagePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/OverridesPages/Item/UserFlowLanguagePageItemRequestBuilder.cs index 20834db218c..2d9cc95831b 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/OverridesPages/Item/UserFlowLanguagePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/OverridesPages/Item/UserFlowLanguagePageItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/OverridesPages/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/OverridesPages/Item/Value/ContentRequestBuilder.cs index 37216fcaec3..5d6890c67dc 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/OverridesPages/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/OverridesPages/Item/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/OverridesPages/OverridesPagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/OverridesPages/OverridesPagesRequestBuilder.cs index ec41af4172d..3fd649d313c 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/OverridesPages/OverridesPagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/OverridesPages/OverridesPagesRequestBuilder.cs @@ -93,7 +93,7 @@ public OverridesPagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/UserFlowLanguageConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/UserFlowLanguageConfigurationItemRequestBuilder.cs index e4bb2baa979..92123bf6a75 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/UserFlowLanguageConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/Item/UserFlowLanguageConfigurationItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserFlowLanguageConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserFlowLanguageConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/LanguagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/LanguagesRequestBuilder.cs index 79807e607dc..31667906b3d 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/LanguagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/Languages/LanguagesRequestBuilder.cs @@ -94,7 +94,7 @@ public LanguagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserFlowLanguageConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserFlowLanguageConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/Item/IdentityUserFlowAttributeAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/Item/IdentityUserFlowAttributeAssignmentItemRequestBuilder.cs index a249a2bbec5..4c2d9213fd7 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/Item/IdentityUserFlowAttributeAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/Item/IdentityUserFlowAttributeAssignmentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttributeAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttributeAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderPostRequestBody.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderPostRequestBody.cs index 0e23d8716f6..6c8b157e0c1 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderPostRequestBody.cs @@ -53,7 +53,7 @@ public SetOrderPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.UserAttributeAssignments.SetOrder.SetOrderPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.UserAttributeAssignments.SetOrder.SetOrderPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("newAssignmentOrder", NewAssignmentOrder); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderRequestBuilder.cs index 8ee2d80795c..dad2588d8fd 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/SetOrder/SetOrderRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Identity.B2xUserFlows.I public async Task PostAsync(global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.UserAttributeAssignments.SetOrder.SetOrderPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Identity.B2xUserFlows.Item.UserAttributeAssignments.SetOrder.SetOrderPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/UserAttributeAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/UserAttributeAssignmentsRequestBuilder.cs index 8e5e97d02b3..2ce902e51ff 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/UserAttributeAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserAttributeAssignments/UserAttributeAssignmentsRequestBuilder.cs @@ -107,7 +107,7 @@ public UserAttributeAssignmentsRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttributeAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -149,7 +149,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttributeAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserFlowIdentityProviders/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserFlowIdentityProviders/Ref/RefRequestBuilder.cs index ef3261693af..410df47ab44 100644 --- a/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserFlowIdentityProviders/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/B2xUserFlows/Item/UserFlowIdentityProviders/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/identity/b2xUserFlows/{b2xIdentityUserFlow%2Did}/userFlowIdentityProviders/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationContextClassReferences/AuthenticationContextClassReferencesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationContextClassReferences/AuthenticationContextClassReferencesRequestBuilder.cs index b70e0c58557..a827eff536a 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationContextClassReferences/AuthenticationContextClassReferencesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationContextClassReferences/AuthenticationContextClassReferencesRequestBuilder.cs @@ -95,7 +95,7 @@ public AuthenticationContextClassReferencesRequestBuilder(string rawUrl, IReques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationContextClassReference body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationContextClassReference body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationContextClassReferences/Item/AuthenticationContextClassReferenceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationContextClassReferences/Item/AuthenticationContextClassReferenceItemRequestBuilder.cs index 153ae04fa44..4ebba2c12f8 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationContextClassReferences/Item/AuthenticationContextClassReferenceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationContextClassReferences/Item/AuthenticationContextClassReferenceItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationContextClassReference body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationContextClassReference body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/AuthenticationMethodModes/AuthenticationMethodModesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/AuthenticationMethodModes/AuthenticationMethodModesRequestBuilder.cs index 338a6b5a107..bea65c378b3 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/AuthenticationMethodModes/AuthenticationMethodModesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/AuthenticationMethodModes/AuthenticationMethodModesRequestBuilder.cs @@ -94,7 +94,7 @@ public AuthenticationMethodModesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodModeDetail body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodModeDetail body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/AuthenticationMethodModes/Item/AuthenticationMethodModeDetailItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/AuthenticationMethodModes/Item/AuthenticationMethodModeDetailItemRequestBuilder.cs index 06dcc8301cb..44879d5887a 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/AuthenticationMethodModes/Item/AuthenticationMethodModeDetailItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/AuthenticationMethodModes/Item/AuthenticationMethodModeDetailItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodModeDetail body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodModeDetail body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/AuthenticationStrengthRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/AuthenticationStrengthRequestBuilder.cs index 9b47fbd5f2e..19f2c74a06e 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/AuthenticationStrengthRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/AuthenticationStrengthRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesGetResponse.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesGetResponse.cs index 79fc2999d33..8e073dcec1f 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesGetResponse.cs @@ -36,7 +36,7 @@ public partial class FindByMethodModeWithAuthenticationMethodModesGetResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrength.Policies.FindByMethodModeWithAuthenticationMethodModes.FindByMethodModeWithAuthenticationMethodModesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrength.Policies.FindByMethodModeWithAuthenticationMethodModes.FindByMethodModeWithAuthenticationMethodModesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesResponse.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesResponse.cs index 612268368a8..6dfec633623 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesResponse.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesResponse.cs @@ -20,7 +20,7 @@ public partial class FindByMethodModeWithAuthenticationMethodModesResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrength.Policies.FindByMethodModeWithAuthenticationMethodModes.FindByMethodModeWithAuthenticationMethodModesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrength.Policies.FindByMethodModeWithAuthenticationMethodModes.FindByMethodModeWithAuthenticationMethodModesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/AuthenticationStrengthPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/AuthenticationStrengthPolicyItemRequestBuilder.cs index 372c51293dd..b93a7240ebf 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/AuthenticationStrengthPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/AuthenticationStrengthPolicyItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/CombinationConfigurations/CombinationConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/CombinationConfigurations/CombinationConfigurationsRequestBuilder.cs index 9b503b98d98..cf1f10603f9 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/CombinationConfigurations/CombinationConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/CombinationConfigurations/CombinationConfigurationsRequestBuilder.cs @@ -95,7 +95,7 @@ public CombinationConfigurationsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs index 8e63ccb6835..34ffaedb0fb 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsPostRequestBody.cs index 59773507800..a244c76db19 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsPostRequestBody.cs @@ -53,7 +53,7 @@ public UpdateAllowedCombinationsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrength.Policies.Item.UpdateAllowedCombinations.UpdateAllowedCombinationsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrength.Policies.Item.UpdateAllowedCombinations.UpdateAllowedCombinationsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfEnumValues("allowedCombinations", AllowedCombinations); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsRequestBuilder.cs index c440eb8f012..7eb3c3768ff 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsRequestBuilder.cs @@ -52,7 +52,7 @@ public UpdateAllowedCombinationsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrength.Policies.Item.UpdateAllowedCombinations.UpdateAllowedCombinationsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrength.Policies.Item.UpdateAllowedCombinations.UpdateAllowedCombinationsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/PoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/PoliciesRequestBuilder.cs index a2d7097a3f6..88ebc6423fb 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/PoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrength/Policies/PoliciesRequestBuilder.cs @@ -105,7 +105,7 @@ public PoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/AuthenticationMethodModes/AuthenticationMethodModesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/AuthenticationMethodModes/AuthenticationMethodModesRequestBuilder.cs index 25972fefcc3..ecbe8ba9686 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/AuthenticationMethodModes/AuthenticationMethodModesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/AuthenticationMethodModes/AuthenticationMethodModesRequestBuilder.cs @@ -97,7 +97,7 @@ public AuthenticationMethodModesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodModeDetail body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodModeDetail body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/AuthenticationMethodModes/Item/AuthenticationMethodModeDetailItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/AuthenticationMethodModes/Item/AuthenticationMethodModeDetailItemRequestBuilder.cs index 4c553a8200a..c6aa8ce1eaa 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/AuthenticationMethodModes/Item/AuthenticationMethodModeDetailItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/AuthenticationMethodModes/Item/AuthenticationMethodModeDetailItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodModeDetail body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodModeDetail body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/AuthenticationStrengthsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/AuthenticationStrengthsRequestBuilder.cs index 7857dc3f3c1..2c848f7451b 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/AuthenticationStrengthsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/AuthenticationStrengthsRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesGetResponse.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesGetResponse.cs index de60b75c7ad..701b4a6e546 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesGetResponse.cs @@ -36,7 +36,7 @@ public partial class FindByMethodModeWithAuthenticationMethodModesGetResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrengths.Policies.FindByMethodModeWithAuthenticationMethodModes.FindByMethodModeWithAuthenticationMethodModesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrengths.Policies.FindByMethodModeWithAuthenticationMethodModes.FindByMethodModeWithAuthenticationMethodModesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesResponse.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesResponse.cs index 9099a6c597f..b9f992614f2 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesResponse.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesResponse.cs @@ -20,7 +20,7 @@ public partial class FindByMethodModeWithAuthenticationMethodModesResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrengths.Policies.FindByMethodModeWithAuthenticationMethodModes.FindByMethodModeWithAuthenticationMethodModesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrengths.Policies.FindByMethodModeWithAuthenticationMethodModes.FindByMethodModeWithAuthenticationMethodModesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/AuthenticationStrengthPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/AuthenticationStrengthPolicyItemRequestBuilder.cs index 8d643ab8c38..2d2ec1cea53 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/AuthenticationStrengthPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/AuthenticationStrengthPolicyItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -184,7 +184,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/CombinationConfigurations/CombinationConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/CombinationConfigurations/CombinationConfigurationsRequestBuilder.cs index bf8a3a86a28..44f040d9b21 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/CombinationConfigurations/CombinationConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/CombinationConfigurations/CombinationConfigurationsRequestBuilder.cs @@ -97,7 +97,7 @@ public CombinationConfigurationsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs index a0e2c7e9e06..da347b89f4e 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsPostRequestBody.cs index 2c16322c898..196d25fd35b 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsPostRequestBody.cs @@ -53,7 +53,7 @@ public UpdateAllowedCombinationsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrengths.Policies.Item.UpdateAllowedCombinations.UpdateAllowedCombinationsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrengths.Policies.Item.UpdateAllowedCombinations.UpdateAllowedCombinationsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfEnumValues("allowedCombinations", AllowedCombinations); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsRequestBuilder.cs index 30795b3fa60..b2fadee7651 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsRequestBuilder.cs @@ -53,7 +53,7 @@ public UpdateAllowedCombinationsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrengths.Policies.Item.UpdateAllowedCombinations.UpdateAllowedCombinationsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Identity.ConditionalAccess.AuthenticationStrengths.Policies.Item.UpdateAllowedCombinations.UpdateAllowedCombinationsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/PoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/PoliciesRequestBuilder.cs index f077bb75200..333ce08d787 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/PoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/AuthenticationStrengths/Policies/PoliciesRequestBuilder.cs @@ -109,7 +109,7 @@ public PoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/ContinuousAccessEvaluationPolicy/ContinuousAccessEvaluationPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ContinuousAccessEvaluationPolicy/ContinuousAccessEvaluationPolicyRequestBuilder.cs index f45e2898285..8dc57f23ded 100644 --- a/src/Microsoft.Graph/Generated/Identity/ContinuousAccessEvaluationPolicy/ContinuousAccessEvaluationPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ContinuousAccessEvaluationPolicy/ContinuousAccessEvaluationPolicyRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ContinuousAccessEvaluationPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ContinuousAccessEvaluationPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/CustomAuthenticationExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/CustomAuthenticationExtensionsRequestBuilder.cs index 40f9d19762c..3beb7be78e1 100644 --- a/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/CustomAuthenticationExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/CustomAuthenticationExtensionsRequestBuilder.cs @@ -101,7 +101,7 @@ public CustomAuthenticationExtensionsRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomAuthenticationExtension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomAuthenticationExtension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/Item/CustomAuthenticationExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/Item/CustomAuthenticationExtensionItemRequestBuilder.cs index f385ad7b0ec..daca43efa26 100644 --- a/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/Item/CustomAuthenticationExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/Item/CustomAuthenticationExtensionItemRequestBuilder.cs @@ -64,8 +64,8 @@ public async Task DeleteAsync(Action - /// Read the properties and relationships of an authenticationEventListener object. The @odata.type property in the response object indicates the type of the authenticationEventListener object. The following derived types are currently supported. - /// Find more info here + /// Read the properties and relationships of a customAuthenticationExtension object. The following derived types are currently supported. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomAuthenticationExtension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -132,7 +132,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read the properties and relationships of an authenticationEventListener object. The @odata.type property in the response object indicates the type of the authenticationEventListener object. The following derived types are currently supported. + /// Read the properties and relationships of a customAuthenticationExtension object. The following derived types are currently supported. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomAuthenticationExtension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -190,7 +190,7 @@ public partial class CustomAuthenticationExtensionItemRequestBuilderDeleteReques { } /// - /// Read the properties and relationships of an authenticationEventListener object. The @odata.type property in the response object indicates the type of the authenticationEventListener object. The following derived types are currently supported. + /// Read the properties and relationships of a customAuthenticationExtension object. The following derived types are currently supported. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class CustomAuthenticationExtensionItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/ValidateAuthenticationConfiguration/ValidateAuthenticationConfigurationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/ValidateAuthenticationConfiguration/ValidateAuthenticationConfigurationPostRequestBody.cs index dc4a31004cd..89d962a4d6f 100644 --- a/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/ValidateAuthenticationConfiguration/ValidateAuthenticationConfigurationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/ValidateAuthenticationConfiguration/ValidateAuthenticationConfigurationPostRequestBody.cs @@ -69,7 +69,7 @@ public ValidateAuthenticationConfigurationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Identity.CustomAuthenticationExtensions.ValidateAuthenticationConfiguration.ValidateAuthenticationConfigurationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.CustomAuthenticationExtensions.ValidateAuthenticationConfiguration.ValidateAuthenticationConfigurationPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("authenticationConfiguration", AuthenticationConfiguration); writer.WriteObjectValue("endpointConfiguration", EndpointConfiguration); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/ValidateAuthenticationConfiguration/ValidateAuthenticationConfigurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/ValidateAuthenticationConfiguration/ValidateAuthenticationConfigurationRequestBuilder.cs index 8390f7d92a6..492a8dcf5d5 100644 --- a/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/ValidateAuthenticationConfiguration/ValidateAuthenticationConfigurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/CustomAuthenticationExtensions/ValidateAuthenticationConfiguration/ValidateAuthenticationConfigurationRequestBuilder.cs @@ -51,7 +51,7 @@ public ValidateAuthenticationConfigurationRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.Identity.CustomAuthenticationExtensions.ValidateAuthenticationConfiguration.ValidateAuthenticationConfigurationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Identity.CustomAuthenticationExtensions.ValidateAuthenticationConfiguration.ValidateAuthenticationConfigurationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesGetResponse.cs b/src/Microsoft.Graph/Generated/Identity/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesGetResponse.cs index c62fe6a2589..2f8d827e5db 100644 --- a/src/Microsoft.Graph/Generated/Identity/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Identity/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Identity.IdentityProviders.AvailableProviderTypes.AvailableProviderTypesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.IdentityProviders.AvailableProviderTypes.AvailableProviderTypesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Identity/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesResponse.cs b/src/Microsoft.Graph/Generated/Identity/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesResponse.cs index 98ead38d38d..787a3f901b3 100644 --- a/src/Microsoft.Graph/Generated/Identity/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesResponse.cs +++ b/src/Microsoft.Graph/Generated/Identity/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesResponse.cs @@ -20,7 +20,7 @@ public partial class AvailableProviderTypesResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Identity.IdentityProviders.AvailableProviderTypes.AvailableProviderTypesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Identity.IdentityProviders.AvailableProviderTypes.AvailableProviderTypesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Identity/IdentityProviders/IdentityProvidersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/IdentityProviders/IdentityProvidersRequestBuilder.cs index 650f5cc99fa..be4ccd8ec6d 100644 --- a/src/Microsoft.Graph/Generated/Identity/IdentityProviders/IdentityProvidersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/IdentityProviders/IdentityProvidersRequestBuilder.cs @@ -101,7 +101,7 @@ public IdentityProvidersRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IdentityProviderBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityProviderBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/IdentityProviders/Item/IdentityProviderBaseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/IdentityProviders/Item/IdentityProviderBaseItemRequestBuilder.cs index 5adac764ab1..f141efeab8e 100644 --- a/src/Microsoft.Graph/Generated/Identity/IdentityProviders/Item/IdentityProviderBaseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/IdentityProviders/Item/IdentityProviderBaseItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityProviderBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityProviderBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/IdentityRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/IdentityRequestBuilder.cs index aa050be7331..6899fe07bab 100644 --- a/src/Microsoft.Graph/Generated/Identity/IdentityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/IdentityRequestBuilder.cs @@ -140,7 +140,7 @@ public IdentityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityContainer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -182,7 +182,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityContainer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/Item/IdentityUserFlowAttributeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/Item/IdentityUserFlowAttributeItemRequestBuilder.cs index af82bebc582..8166d0c9872 100644 --- a/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/Item/IdentityUserFlowAttributeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/Item/IdentityUserFlowAttributeItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttribute body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttribute body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/UserFlowAttributesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/UserFlowAttributesRequestBuilder.cs index 4548f5eb3cd..17b6ac8c093 100644 --- a/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/UserFlowAttributesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/UserFlowAttributes/UserFlowAttributesRequestBuilder.cs @@ -95,7 +95,7 @@ public UserFlowAttributesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttribute body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttribute body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/UserFlows/Item/IdentityUserFlowItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/UserFlows/Item/IdentityUserFlowItemRequestBuilder.cs index c0e35097fe4..860567dd8e3 100644 --- a/src/Microsoft.Graph/Generated/Identity/UserFlows/Item/IdentityUserFlowItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/UserFlows/Item/IdentityUserFlowItemRequestBuilder.cs @@ -101,7 +101,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityUserFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityUserFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Identity/UserFlows/UserFlowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/UserFlows/UserFlowsRequestBuilder.cs index d39d59b29c2..e0d1b47ed63 100644 --- a/src/Microsoft.Graph/Generated/Identity/UserFlows/UserFlowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/UserFlows/UserFlowsRequestBuilder.cs @@ -99,7 +99,7 @@ public UserFlowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IdentityUserFlow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityUserFlow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/AccessReviewsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/AccessReviewsRequestBuilder.cs index f6f0d6ef4ec..5c458fd453d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/AccessReviewsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/AccessReviewsRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/DecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/DecisionsRequestBuilder.cs index 537a4d1d647..cff7cb791de 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/DecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/DecisionsRequestBuilder.cs @@ -110,7 +110,7 @@ public DecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index a0d6e055d10..b173443b8a3 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 8759c986de9..6066a30b1cb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs index d711971356b..9258f435701 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Insights/InsightsRequestBuilder.cs index f6207e2b54b..456c0f4ed57 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Insights/InsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Insights/InsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public InsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs index 87c304053fc..5ac667eb47a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs index 9cd750542da..dcf2b75a26e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public BatchRecordDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs index 7a9e6a9e49d..4a31c87da4f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Acce public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs index 9e1516a046e..190987995fd 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs @@ -93,7 +93,7 @@ public ContactedReviewersRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs index 6ffbf2f0819..0f995ebb1f1 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/DecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/DecisionsRequestBuilder.cs index 25f497abcdc..2019ae161d6 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/DecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/DecisionsRequestBuilder.cs @@ -110,7 +110,7 @@ public DecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 0e26236275c..7b7a91bc70d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index b998bb93360..a40ab5c0d17 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs index 80c91cb44f5..474bd8d7c34 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/Item/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/Item/Insights/InsightsRequestBuilder.cs index b70698ed978..4d9deb794c5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/Item/Insights/InsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/Item/Insights/InsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public InsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs index bd061a229e8..df49b2cc14e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs index dc89cb8dc37..65acbaa823c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public RecordAllDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs index 8bda64762e1..9ae39c70932 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Acce public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/InstanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/InstanceRequestBuilder.cs index 08d93bc7497..2f1729fb3b8 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/InstanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/InstanceRequestBuilder.cs @@ -162,7 +162,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -223,7 +223,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 7adb8c05d1b..f69900d30f6 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 6c30bd90d43..9cf0d588642 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/AccessReviewStageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/AccessReviewStageItemRequestBuilder.cs index cc7966bef79..8a5a4265b5e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/AccessReviewStageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/AccessReviewStageItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/DecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/DecisionsRequestBuilder.cs index 5f149f31f9d..75af46c033b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/DecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/DecisionsRequestBuilder.cs @@ -110,7 +110,7 @@ public DecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 0a99c60b3bc..3756b086c95 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index bc5b878ceba..acc3f86aca1 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs index 88c58a65abf..6c3d7d14851 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs index 7d1469e9ea3..b2547c846fe 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public InsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs index a4cb9d910ef..74f36c449ad 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs index f987acdc12a..be396caacd9 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public RecordAllDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs index 0e2688b2522..90087bbab59 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Acce public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.Item.Instance.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/StagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/StagesRequestBuilder.cs index 7b76bff2875..98d5a5f10bb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/StagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/Item/Instance/Stages/StagesRequestBuilder.cs @@ -104,7 +104,7 @@ public StagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs index b9bcc51ad0b..b04d75465e4 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public RecordAllDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs index 15ee3562119..dd3b58e62ab 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Acce public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/DefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/DefinitionsRequestBuilder.cs index 3edae97b507..55d96c623d1 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/DefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/DefinitionsRequestBuilder.cs @@ -106,7 +106,7 @@ public DefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewScheduleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewScheduleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index c5b38265a26..06362149b60 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 220556b3880..3f69c27e328 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/AccessReviewScheduleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/AccessReviewScheduleDefinitionItemRequestBuilder.cs index c35790d0dda..bd0422bd112 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/AccessReviewScheduleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/AccessReviewScheduleDefinitionItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PutAsync(global::Microsoft.Graph.Beta.Models.AccessReviewScheduleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewScheduleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index f0abd6a7915..610f537e1c9 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 997b6317875..7376b70694b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/InstancesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/InstancesRequestBuilder.cs index 4c275045859..f76fdb321d5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/InstancesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/InstancesRequestBuilder.cs @@ -105,7 +105,7 @@ public InstancesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/AccessReviewInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/AccessReviewInstanceItemRequestBuilder.cs index a129a8a9a83..2a2f0a1f6c3 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/AccessReviewInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/AccessReviewInstanceItemRequestBuilder.cs @@ -164,7 +164,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -225,7 +225,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs index 513414cd5db..2603a09d92e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public BatchRecordDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs index c51b418a176..3c75d79ec99 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Acce public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/ContactedReviewers/ContactedReviewersRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/ContactedReviewers/ContactedReviewersRequestBuilder.cs index 6358667870e..46e1177371b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/ContactedReviewers/ContactedReviewersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/ContactedReviewers/ContactedReviewersRequestBuilder.cs @@ -94,7 +94,7 @@ public ContactedReviewersRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs index 0086120af7e..c8e739f2343 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/DecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/DecisionsRequestBuilder.cs index 27fafe3cbac..fea439c96d3 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/DecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/DecisionsRequestBuilder.cs @@ -111,7 +111,7 @@ public DecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index ceb725c24a5..056b2940c2d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 951fe5b49a6..94e738664ba 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs index 73b49782c3a..fb472ee4609 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs @@ -109,7 +109,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs index 8ba0427d3f0..a802dc0cdd6 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public InsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs index 886204fdece..5964ee6b34e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs index e158c42eff2..bcbfa74c70b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public BatchRecordDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs index 19b5e9c6db1..126b5d58498 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Acce public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs index 9e496888ec1..134f54a2634 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs @@ -93,7 +93,7 @@ public ContactedReviewersRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs index 419b4c534ed..fa268e73174 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs index 189a3e74d13..c1d69fe64e0 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs @@ -156,7 +156,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -217,7 +217,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 48b8fd241b0..531c5a3e948 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 480e58a9cd6..428f13e01c8 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/AccessReviewStageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/AccessReviewStageItemRequestBuilder.cs index 2c2e7d9ee77..1e9ceb7e696 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/AccessReviewStageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/AccessReviewStageItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/DecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/DecisionsRequestBuilder.cs index 793293e4ee4..8f1068154d8 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/DecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/DecisionsRequestBuilder.cs @@ -110,7 +110,7 @@ public DecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index d6270b0cb40..a6c1eb53da3 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index eb8f711e258..d50b0f8c25f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs index 4ed30a26a19..6244a2bfdeb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs index d896d5f46f3..757640d6e2f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public InsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs index 4e27cc2cbb1..8b4997eb366 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs index 490bd1f2e86..92a93e7a3a3 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public RecordAllDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs index b1e794d5273..cbb6344e2fa 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Acce public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.Item.Instance.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/StagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/StagesRequestBuilder.cs index bb374305173..86ee6f5c613 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/StagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/Item/Instance/Stages/StagesRequestBuilder.cs @@ -104,7 +104,7 @@ public StagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs index 0fa53a6ff60..2413d611879 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public RecordAllDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs index f413fb296a1..e642be74a3f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Acce public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 9c8d71406c6..a6165bed1db 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 200df3e6e19..222bd463946 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/AccessReviewStageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/AccessReviewStageItemRequestBuilder.cs index 6510574782e..cd9ad2a700f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/AccessReviewStageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/AccessReviewStageItemRequestBuilder.cs @@ -110,7 +110,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -171,7 +171,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/DecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/DecisionsRequestBuilder.cs index d90b333750b..54a608a482b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/DecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/DecisionsRequestBuilder.cs @@ -111,7 +111,7 @@ public DecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index dde6c893cb8..1c1a75d988f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index b3890517bf0..ecb39665bdf 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs index 3945b2272b0..474f03b0685 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs @@ -110,7 +110,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -171,7 +171,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs index d45c5834bf4..864cbce78ae 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public InsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs index d42bc5e8406..d53b01dc17a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs index d38f01b31ba..3b4b8ee73e1 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public BatchRecordDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs index 734d6feff42..f0d5419686e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Acce public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs index c45f2b8159f..e3c43d5d46a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs @@ -93,7 +93,7 @@ public ContactedReviewersRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs index 7ea7e41b159..79f54882163 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/DecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/DecisionsRequestBuilder.cs index 95f93f068d0..b261d201786 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/DecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/DecisionsRequestBuilder.cs @@ -110,7 +110,7 @@ public DecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index a9b190e1960..764490345ba 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Instance.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Instance.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 6d156bf17d2..b5252c867ef 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Instance.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Instance.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs index 090ffedf06e..bd6eee8d12f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/InsightsRequestBuilder.cs index 53e96c92ea2..f52bcf3b695 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/InsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/InsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public InsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs index e4290bb29fa..5c82f7600f4 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs index 232e003d839..7e56e07ab43 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public RecordAllDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Instance.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Instance.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs index c5f33674603..3ddb839d1ee 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Acce public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Instance.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.Item.Instance.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs index 15cb17ea753..8c2ddaa73d9 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs @@ -156,7 +156,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -217,7 +217,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs index dc24d071f6f..b6959604c8b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public RecordAllDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs index 6c302c633da..4e37a83834f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Acce public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.AccessReviews.Definitions.Item.Instances.Item.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/StagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/StagesRequestBuilder.cs index c03e93a505f..7deafa5d912 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/StagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Definitions/Item/Instances/Item/Stages/StagesRequestBuilder.cs @@ -105,7 +105,7 @@ public StagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/HistoryDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/HistoryDefinitionsRequestBuilder.cs index 8915fd81384..87b7d6efbe3 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/HistoryDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/HistoryDefinitionsRequestBuilder.cs @@ -95,7 +95,7 @@ public HistoryDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewHistoryDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewHistoryDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/Item/AccessReviewHistoryDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/Item/AccessReviewHistoryDefinitionItemRequestBuilder.cs index ea7c7730395..78243679567 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/Item/AccessReviewHistoryDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/Item/AccessReviewHistoryDefinitionItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewHistoryDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewHistoryDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/Item/Instances/InstancesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/Item/Instances/InstancesRequestBuilder.cs index 973201ecc46..0a8ccad9fc5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/Item/Instances/InstancesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/Item/Instances/InstancesRequestBuilder.cs @@ -94,7 +94,7 @@ public InstancesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewHistoryInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewHistoryInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/Item/Instances/Item/AccessReviewHistoryInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/Item/Instances/Item/AccessReviewHistoryInstanceItemRequestBuilder.cs index 539152065d4..a6b64e759e3 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/Item/Instances/Item/AccessReviewHistoryInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/HistoryDefinitions/Item/Instances/Item/AccessReviewHistoryInstanceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewHistoryInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewHistoryInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Policy/PolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Policy/PolicyRequestBuilder.cs index 14f441680da..049d2fc0ac9 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Policy/PolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AccessReviews/Policy/PolicyRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequestBuilder.cs index 40fc39e7c8f..d479a5ad6f2 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AppConsentApprovalRoute body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppConsentApprovalRoute body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/AppConsentRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/AppConsentRequestsRequestBuilder.cs index 71f89301276..96447340fe6 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/AppConsentRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/AppConsentRequestsRequestBuilder.cs @@ -105,7 +105,7 @@ public AppConsentRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AppConsentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AppConsentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index afb8fcbe7c2..9c99e55d3f5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AppConsent.AppConsentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AppConsent.AppConsentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index e6706e8bbc2..7857b45657f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AppConsent.AppConsentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AppConsent.AppConsentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/AppConsentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/AppConsentRequestItemRequestBuilder.cs index f6954e6bab2..8adfbf1d923 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/AppConsentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/AppConsentRequestItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AppConsentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppConsentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 2fd91132bea..0eb73e6453f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AppConsent.AppConsentRequests.Item.UserConsentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AppConsent.AppConsentRequests.Item.UserConsentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index b7ff5f88b71..5fea83cc182 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.AppConsent.AppConsentRequests.Item.UserConsentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.AppConsent.AppConsentRequests.Item.UserConsentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/Approval/ApprovalRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/Approval/ApprovalRequestBuilder.cs index a4811dd9a34..f712b579644 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/Approval/ApprovalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/Approval/ApprovalRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/Approval/Steps/Item/ApprovalStepItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/Approval/Steps/Item/ApprovalStepItemRequestBuilder.cs index 61ba066c965..2e71fcca683 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/Approval/Steps/Item/ApprovalStepItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/Approval/Steps/Item/ApprovalStepItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/Approval/Steps/StepsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/Approval/Steps/StepsRequestBuilder.cs index fe004d7d79f..0286ed3dd1b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/Approval/Steps/StepsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/Approval/Steps/StepsRequestBuilder.cs @@ -93,7 +93,7 @@ public StepsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/UserConsentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/UserConsentRequestItemRequestBuilder.cs index 02bdc33be4f..be7a36d64f4 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/UserConsentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/Item/UserConsentRequestItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserConsentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserConsentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/UserConsentRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/UserConsentRequestsRequestBuilder.cs index 5110e1280f2..7e81eafcb2f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/UserConsentRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/AppConsent/AppConsentRequests/Item/UserConsentRequests/UserConsentRequestsRequestBuilder.cs @@ -105,7 +105,7 @@ public UserConsentRequestsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserConsentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserConsentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/AccessPackageAssignmentApprovalsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/AccessPackageAssignmentApprovalsRequestBuilder.cs index 7f0cc3b9662..55f465a72e0 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/AccessPackageAssignmentApprovalsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/AccessPackageAssignmentApprovalsRequestBuilder.cs @@ -104,7 +104,7 @@ public AccessPackageAssignmentApprovalsRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index addd96334fe..06b99f90fff 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 977527528d4..3b2f0b03e58 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/Item/ApprovalItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/Item/ApprovalItemRequestBuilder.cs index 3aef3581f0b..927c18117e0 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/Item/ApprovalItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/Item/ApprovalItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs index 32aa01fe2f1..069a614b13b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/Item/Steps/StepsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/Item/Steps/StepsRequestBuilder.cs index 65b4c4c2d7b..0443fbab905 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/Item/Steps/StepsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentApprovals/Item/Steps/StepsRequestBuilder.cs @@ -94,7 +94,7 @@ public StepsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/AccessPackageAssignmentPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/AccessPackageAssignmentPoliciesRequestBuilder.cs index 3c08b89ba52..19beb58b2eb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/AccessPackageAssignmentPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/AccessPackageAssignmentPoliciesRequestBuilder.cs @@ -99,7 +99,7 @@ public AccessPackageAssignmentPoliciesRequestBuilder(string rawUrl, IRequestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs index 160f95d8397..c82fa9b7d70 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs @@ -130,7 +130,7 @@ public async Task DeleteAsync(Action PutAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -194,7 +194,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs index 56c3ff6994f..407944b57d7 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs @@ -97,7 +97,7 @@ public CustomExtensionHandlersRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs index 1933ec973ef..7f9038d2c18 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs index aaf1733dcf8..49dfe87f4a5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs @@ -97,7 +97,7 @@ public CustomExtensionStageSettingsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs index a8e258aa385..d2a95b19597 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/AccessPackageAssignmentRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/AccessPackageAssignmentRequestsRequestBuilder.cs index ebfb5de4fe9..71127eedd4e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/AccessPackageAssignmentRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/AccessPackageAssignmentRequestsRequestBuilder.cs @@ -111,7 +111,7 @@ public AccessPackageAssignmentRequestsRequestBuilder(string rawUrl, IRequestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -155,7 +155,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 8d98189a873..c6c9dc5184e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index ca5e6b5d31c..d64bd230773 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs index 7902ad1c615..6243b39127e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs @@ -143,7 +143,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -207,7 +207,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Requestor/RequestorRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Requestor/RequestorRequestBuilder.cs index fec7681a179..5721e1297f5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Requestor/RequestorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Requestor/RequestorRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Resume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Resume/ResumePostRequestBody.cs index 13cc7227862..f610f9a3994 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Resume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Resume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.Item.Resume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.Item.Resume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Resume/ResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Resume/ResumeRequestBuilder.cs index f905f49fb55..28e10b8ab6e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Resume/ResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentRequests/Item/Resume/ResumeRequestBuilder.cs @@ -51,7 +51,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Enti public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.Item.Resume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentRequests.Item.Resume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/AccessPackageAssignmentResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/AccessPackageAssignmentResourceRolesRequestBuilder.cs index b6dd396e925..d11829c6359 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/AccessPackageAssignmentResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/AccessPackageAssignmentResourceRolesRequestBuilder.cs @@ -100,7 +100,7 @@ public AccessPackageAssignmentResourceRolesRequestBuilder(string rawUrl, IReques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageAssignmentResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageAssignmentResourceRoleItemRequestBuilder.cs index 18a84570f62..54a9e7e47cb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageAssignmentResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageAssignmentResourceRoleItemRequestBuilder.cs @@ -121,7 +121,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -182,7 +182,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 523834cbea5..2a685245f38 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 1e7a8266dd1..4a538f540e9 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index b6ee5eb76d6..94d77cec800 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index 6ab76ba1d7b..b11bd7eccdd 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index b09628c0491..344461c5146 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 244d30f1d13..5bb0f5f750d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index 35be5992b27..2321cd7a4b0 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index b9e74167883..924f2d4058f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs index b51279df89b..9933eab3e7b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 55b36cc969c..2e1cbad76c6 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 0c89ac42651..35d12ab6d41 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index f2b4da7dfd9..986eacced8b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index e2b649326e5..d87ffb94714 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 389d871fb99..d894accdfb3 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index 816470d7626..6b21fb2f4a6 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index eaa93140d39..e36699dcf24 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 6a79f0a1345..d1ed29761bf 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs index 443f46d1a75..9a535a0ea2e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageSubject/AccessPackageSubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageSubject/AccessPackageSubjectRequestBuilder.cs index 8a220559d07..45d7be28a54 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageSubject/AccessPackageSubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/Item/AccessPackageSubject/AccessPackageSubjectRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/My/MyGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/My/MyGetResponse.cs index bf0e1c272bf..19deba44334 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/My/MyGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/My/MyGetResponse.cs @@ -36,7 +36,7 @@ public partial class MyGetResponse : global::Microsoft.Graph.Beta.Models.BaseCol /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentResourceRoles.My.MyGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentResourceRoles.My.MyGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/My/MyResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/My/MyResponse.cs index 160e6c8a042..c79eb08fc02 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/My/MyResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignmentResourceRoles/My/MyResponse.cs @@ -20,7 +20,7 @@ public partial class MyResponse : global::Microsoft.Graph.Beta.IdentityGovernanc /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentResourceRoles.My.MyResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignmentResourceRoles.My.MyResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AccessPackageAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AccessPackageAssignmentsRequestBuilder.cs index 0ab4ed8bc51..1ce4d73c753 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AccessPackageAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AccessPackageAssignmentsRequestBuilder.cs @@ -124,7 +124,7 @@ public AccessPackageAssignmentsRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccess/AdditionalAccessGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccess/AdditionalAccessGetResponse.cs index 710d68e117f..2a78fa93da2 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccess/AdditionalAccessGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccess/AdditionalAccessGetResponse.cs @@ -36,7 +36,7 @@ public partial class AdditionalAccessGetResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.AdditionalAccess.AdditionalAccessGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.AdditionalAccess.AdditionalAccessGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccess/AdditionalAccessResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccess/AdditionalAccessResponse.cs index 784417109a3..2b7f6170773 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccess/AdditionalAccessResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccess/AdditionalAccessResponse.cs @@ -20,7 +20,7 @@ public partial class AdditionalAccessResponse : global::Microsoft.Graph.Beta.Ide /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.AdditionalAccess.AdditionalAccessResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.AdditionalAccess.AdditionalAccessResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse.cs index 518029346a6..9f6827cd6c5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId.AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId.AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse.cs index 36b8398b582..883fdd2e458 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId/AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse.cs @@ -20,7 +20,7 @@ public partial class AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId.AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageId.AdditionalAccessWithAccessPackageIdWithIncompatibleAccessPackageIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 445f4548ed3..ec766430007 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 753ebc73119..6b3b4a51edf 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/AccessPackageAssignmentPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/AccessPackageAssignmentPoliciesRequestBuilder.cs index 18512698625..83b6e50a65d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/AccessPackageAssignmentPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/AccessPackageAssignmentPoliciesRequestBuilder.cs @@ -97,7 +97,7 @@ public AccessPackageAssignmentPoliciesRequestBuilder(string rawUrl, IRequestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs index cb6c2f6eb67..c8d83e4f690 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -191,7 +191,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs index 85806fd7ad0..5f1a152834f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs @@ -97,7 +97,7 @@ public CustomExtensionHandlersRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs index 5c758176c3f..0740605effe 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs index eb5ea280d89..331811bf217 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs @@ -97,7 +97,7 @@ public CustomExtensionStageSettingsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs index ffa486129ad..45d69ddd582 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageRequestBuilder.cs index 951a86a2c65..752d85a0686 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageRequestBuilder.cs @@ -155,7 +155,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -216,7 +216,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/AccessPackageResourceRoleScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/AccessPackageResourceRoleScopesRequestBuilder.cs index b1a28284486..c4144afeb34 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/AccessPackageResourceRoleScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/AccessPackageResourceRoleScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRoleScopesRequestBuilder(string rawUrl, IRequestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 38eed6084f4..9fc6d04b995 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 058289f66ec..2975c553ae0 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index 48dc022e45c..379013e0561 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index 4ea3be57fe3..9d9dbe4249f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 51a25d1a2ba..22a1e9381f6 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 3bd4e868113..92251ae0c06 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index eb0c8642cbf..f8ff877aa1d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 489f57a8bc7..d2b015d2600 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs index e9c7e4188ec..ab64754c7fc 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRoleScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRoleScopeItemRequestBuilder.cs index 916676992c2..df9b0e01ebe 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRoleScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRoleScopeItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index f4460e8a908..b4a8a74d35c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index d3872569560..bc653be1668 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index d2a20833415..79277164a9d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index b6f46efb19a..5333c84159d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 0ff29d4f748..a70679dd6c5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index 2e5bdcf26e9..6c22a00af18 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index 806a47a62b0..3b584479c89 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 3e76c90a009..7b347c5fa61 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs index 7eed7fd97d1..733ccb7f3b8 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsPostResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsPostResponse.cs index e46e63510f9..385a5d717a9 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetApplicablePolicyRequirementsPostResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.GetApplicablePolicyRequirements.GetApplicablePolicyRequirementsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.GetApplicablePolicyRequirements.GetApplicablePolicyRequirementsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsResponse.cs index 513b425d24f..9542f68196a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsResponse.cs @@ -20,7 +20,7 @@ public partial class GetApplicablePolicyRequirementsResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.GetApplicablePolicyRequirements.GetApplicablePolicyRequirementsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.GetApplicablePolicyRequirements.GetApplicablePolicyRequirementsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/IncompatibleAccessPackages/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/IncompatibleAccessPackages/Ref/RefRequestBuilder.cs index 2acd2fb911c..47c91f55f7e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/IncompatibleAccessPackages/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/IncompatibleAccessPackages/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackage/incompatibleAccessPackages/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/IncompatibleGroups/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/IncompatibleGroups/Ref/RefRequestBuilder.cs index 2afd5e42325..8e7b10244be 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/IncompatibleGroups/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/IncompatibleGroups/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/identityGovernance/entitlementManagement/accessPackageAssignments/{accessPackageAssignment%2Did}/accessPackage/incompatibleGroups/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/MoveToCatalog/MoveToCatalogPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/MoveToCatalog/MoveToCatalogPostRequestBody.cs index 6fb12cfbfd2..f99585c4221 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/MoveToCatalog/MoveToCatalogPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/MoveToCatalog/MoveToCatalogPostRequestBody.cs @@ -52,7 +52,7 @@ public MoveToCatalogPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.MoveToCatalog.MoveToCatalogPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.MoveToCatalog.MoveToCatalogPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("catalogId", CatalogId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/MoveToCatalog/MoveToCatalogRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/MoveToCatalog/MoveToCatalogRequestBuilder.cs index 0502ec91787..94822e6ddc4 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/MoveToCatalog/MoveToCatalogRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackage/MoveToCatalog/MoveToCatalogRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Enti public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.MoveToCatalog.MoveToCatalogPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackage.MoveToCatalog.MoveToCatalogPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentItemRequestBuilder.cs index 32c1b0bd502..5a5e093ec10 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/AccessPackageAssignmentPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/AccessPackageAssignmentPolicyRequestBuilder.cs index ee3a6be7b68..ce039fcedd5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/AccessPackageAssignmentPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/AccessPackageAssignmentPolicyRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -191,7 +191,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs index 5a7bd862d88..f23586d42ce 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs @@ -97,7 +97,7 @@ public CustomExtensionHandlersRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs index e6e8e124123..e7358ffcce7 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs index 09d5772b6fd..9128353e6d0 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs @@ -97,7 +97,7 @@ public CustomExtensionStageSettingsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs index b7a78c59859..f9dbacde5d8 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentPolicy/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/AccessPackageAssignmentRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/AccessPackageAssignmentRequestsRequestBuilder.cs index e9860fe5a84..80f9aeb5135 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/AccessPackageAssignmentRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/AccessPackageAssignmentRequestsRequestBuilder.cs @@ -109,7 +109,7 @@ public AccessPackageAssignmentRequestsRequestBuilder(string rawUrl, IRequestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 72219a469c1..b82e79b768c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index ea97e879b96..4754c1c1322 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs index 658a3ef83df..62205bb2633 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs @@ -141,7 +141,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -205,7 +205,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Requestor/RequestorRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Requestor/RequestorRequestBuilder.cs index 0bb881c5cab..52851e43d9c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Requestor/RequestorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Requestor/RequestorRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Resume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Resume/ResumePostRequestBody.cs index 3b4ba2bc2ab..3a88ff2450e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Resume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Resume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentRequests.Item.Resume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentRequests.Item.Resume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Resume/ResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Resume/ResumeRequestBuilder.cs index 956aeaa23d3..285b1fe28cf 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Resume/ResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentRequests/Item/Resume/ResumeRequestBuilder.cs @@ -51,7 +51,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Enti public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentRequests.Item.Resume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentRequests.Item.Resume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/AccessPackageAssignmentResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/AccessPackageAssignmentResourceRolesRequestBuilder.cs index d20f082750c..aadf4ca057d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/AccessPackageAssignmentResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/AccessPackageAssignmentResourceRolesRequestBuilder.cs @@ -99,7 +99,7 @@ public AccessPackageAssignmentResourceRolesRequestBuilder(string rawUrl, IReques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageAssignmentResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageAssignmentResourceRoleItemRequestBuilder.cs index d84536b5851..add8bff6637 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageAssignmentResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageAssignmentResourceRoleItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 14319760437..933c757bdeb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 11c276d2fa8..e2cded913c9 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index 1ba863f4717..708996ff9c3 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index 8b6216adc57..188975635d1 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 7e2a3b58756..8d7dd74ad0e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index ebfd6153898..1e6bf70ceb9 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index 68462d06f54..f2ff2c4c199 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 2670a6280c4..ff78ff86383 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs index fad7e6de234..1428d0fd8d9 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 93580d52468..abfdb25a429 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 47608984c9b..cd293953013 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index dbb38c9742f..f033ac0fde8 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index e07ef653253..a73e7ec0a20 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 0d14fa20950..fe9cd31c8d6 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index 81274d0f2ab..2004bc1ff2f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index 69ec8ba8b4f..0194809448c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 0c0103ba66a..e805a417ecf 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs index d0749ad99bc..ed369e0df03 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageSubject/AccessPackageSubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageSubject/AccessPackageSubjectRequestBuilder.cs index c2a66f4bdcc..4d86b038d05 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageSubject/AccessPackageSubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/Item/AccessPackageSubject/AccessPackageSubjectRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/My/MyGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/My/MyGetResponse.cs index dea4a3d9ebe..ac26b794018 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/My/MyGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/My/MyGetResponse.cs @@ -36,7 +36,7 @@ public partial class MyGetResponse : global::Microsoft.Graph.Beta.Models.BaseCol /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentResourceRoles.My.MyGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentResourceRoles.My.MyGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/My/MyResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/My/MyResponse.cs index af7c9f22c5b..9ec3ab4e737 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/My/MyResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/AccessPackageAssignmentResourceRoles/My/MyResponse.cs @@ -20,7 +20,7 @@ public partial class MyResponse : global::Microsoft.Graph.Beta.IdentityGovernanc /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentResourceRoles.My.MyResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageAssignments.Item.AccessPackageAssignmentResourceRoles.My.MyResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/Target/TargetRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/Target/TargetRequestBuilder.cs index 57ea77d0e5e..744985e63a4 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/Target/TargetRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageAssignments/Item/Target/TargetRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/AccessPackageCatalogsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/AccessPackageCatalogsRequestBuilder.cs index 068a7a06af9..f4197719aa2 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/AccessPackageCatalogsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/AccessPackageCatalogsRequestBuilder.cs @@ -106,7 +106,7 @@ public AccessPackageCatalogsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageCatalog body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -150,7 +150,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageCatalog body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCatalogItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCatalogItemRequestBuilder.cs index 570541b9ef5..588ebc2cb62 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCatalogItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCatalogItemRequestBuilder.cs @@ -156,7 +156,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageCatalog body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -220,7 +220,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageCatalog body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/AccessPackageCustomWorkflowExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/AccessPackageCustomWorkflowExtensionsRequestBuilder.cs index 82c90a78e88..f81af55423e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/AccessPackageCustomWorkflowExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/AccessPackageCustomWorkflowExtensionsRequestBuilder.cs @@ -98,7 +98,7 @@ public AccessPackageCustomWorkflowExtensionsRequestBuilder(string rawUrl, IReque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomCalloutExtension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomCalloutExtension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/Item/CustomCalloutExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/Item/CustomCalloutExtensionItemRequestBuilder.cs index 89e0555d2b4..79131dab08f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/Item/CustomCalloutExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageCustomWorkflowExtensions/Item/CustomCalloutExtensionItemRequestBuilder.cs @@ -58,8 +58,8 @@ public async Task DeleteAsync(Action - /// Read the properties and relationships of an accessPackageAssignmentWorkflowExtension object. - /// Find more info here + /// Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -83,8 +83,8 @@ public async Task DeleteAsync(Action(requestInfo, global::Microsoft.Graph.Beta.Models.CustomCalloutExtension.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of an accessPackageAssignmentWorkflowExtension object. - /// Find more info here + /// Update the properties of an accessPackageAssignmentRequestWorkflowExtension object. + /// Find more info here /// /// A /// The request body @@ -101,7 +101,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomCalloutExtension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -130,7 +130,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read the properties and relationships of an accessPackageAssignmentWorkflowExtension object. + /// Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -150,7 +150,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of an accessPackageAssignmentWorkflowExtension object. + /// Update the properties of an accessPackageAssignmentRequestWorkflowExtension object. /// /// A /// The request body @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomCalloutExtension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -191,7 +191,7 @@ public partial class CustomCalloutExtensionItemRequestBuilderDeleteRequestConfig { } /// - /// Read the properties and relationships of an accessPackageAssignmentWorkflowExtension object. + /// Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class CustomCalloutExtensionItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 4d1774720b4..677712a56fc 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -98,7 +98,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 2d6333c7cf0..297193c1315 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -191,7 +191,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 7e132a54e82..88786119615 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -97,7 +97,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index b4d8d262e34..9c67ba7502c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index eef14b56a9a..f33e576df55 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -97,7 +97,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 8e6e95580a7..d1b25763e82 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -184,7 +184,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index cbc2dd23a36..0bcdf7f09ff 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -97,7 +97,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index 13fefba30d0..b78bb40aced 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 9133562e5ee..4a1e5970afc 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index 423afd00da5..5b7e29690f2 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index 4afd8781670..b0c443c5986 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -97,7 +97,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 18ba243b965..ad3fedf2ed9 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -191,7 +191,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 3eea87ebac2..68dc3ecfe24 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -97,7 +97,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 6ae12f96b8a..169fd238e3f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -184,7 +184,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index 7c0841d82d3..e59bd8d087a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -97,7 +97,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 14d2338806e..9f5a28e1572 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index abe5b48b820..a407c2af686 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index 5c2c98d6a06..92cc6e8f757 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -97,7 +97,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 38e7e0aa593..861a8a6ccb8 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index c25e426b529..7a5a2ba116b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/AccessPackageResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/AccessPackageResourcesRequestBuilder.cs index e6cb2490464..8ccef262061 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/AccessPackageResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/AccessPackageResourcesRequestBuilder.cs @@ -98,7 +98,7 @@ public AccessPackageResourcesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceItemRequestBuilder.cs index 6542e3f160b..f0544e89a2c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceItemRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -191,7 +191,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 6d472ed345a..209fba8c8ac 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -97,7 +97,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 4a4bc4b0ffd..cdcf3fbf7cf 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -184,7 +184,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index 047bc206810..0dd437c3def 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -97,7 +97,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 62b506d9238..7d45cf5d32a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 3acd3b9ddb4..3c86587c78d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index c62def3cc4e..2206a93de47 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index e8730977cc9..97acc776d6f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -97,7 +97,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 905ff03e58b..b0103bec28b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -184,7 +184,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index b34ab4e0dc9..5a4addedbc4 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -97,7 +97,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 5937dafb326..47239e5504b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index 7dfea3770d6..fc89bc2e97e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 67f9154c81b..23387c077cf 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/CustomAccessPackageWorkflowExtensions/CustomAccessPackageWorkflowExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/CustomAccessPackageWorkflowExtensions/CustomAccessPackageWorkflowExtensionsRequestBuilder.cs index fdbb0bf43bb..302966ebd71 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/CustomAccessPackageWorkflowExtensions/CustomAccessPackageWorkflowExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/CustomAccessPackageWorkflowExtensions/CustomAccessPackageWorkflowExtensionsRequestBuilder.cs @@ -99,7 +99,7 @@ public CustomAccessPackageWorkflowExtensionsRequestBuilder(string rawUrl, IReque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomAccessPackageWorkflowExtension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomAccessPackageWorkflowExtension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/CustomAccessPackageWorkflowExtensions/Item/CustomAccessPackageWorkflowExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/CustomAccessPackageWorkflowExtensions/Item/CustomAccessPackageWorkflowExtensionItemRequestBuilder.cs index 7cf5ba93934..c5825020eb7 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/CustomAccessPackageWorkflowExtensions/Item/CustomAccessPackageWorkflowExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Item/CustomAccessPackageWorkflowExtensions/Item/CustomAccessPackageWorkflowExtensionItemRequestBuilder.cs @@ -35,8 +35,8 @@ public CustomAccessPackageWorkflowExtensionItemRequestBuilder(string rawUrl, IRe { } /// - /// Delete an accessPackageAssignmentRequestWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies:1. First retrieve the accessPackageCatalogId by calling the Get accessPackageAssignmentPolicies operation and appending ?$expand=accessPackage($expand=accessPackageCatalog) to the query. For example, https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies?$expand=accessPackage($expand=accessPackageCatalog).2. Use the access package catalog ID and retrieve the ID of the accessPackageCustomWorkflowExtension object that you want to delete by running the List accessPackageCustomWorkflowExtensions operation.3. Call the Update accessPackageAssignmentPolicy operation to remove the custom workflow extension object from the policy. For an example, see Example 3: Remove the customExtensionStageSettings from a policy. - /// Find more info here + /// Delete an accessPackageAssignmentWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies:1. First retrieve the accessPackageCatalogId by calling the Get accessPackageAssignmentPolicies operation and appending ?$expand=accessPackage($expand=accessPackageCatalog) to the query. For example, https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies?$expand=accessPackage($expand=accessPackageCatalog).2. Use the access package catalog ID and retrieve the ID of the accessPackageCustomWorkflowExtension object that you want to delete by running the List accessPackageCustomWorkflowExtensions operation.3. Call the Update accessPackageAssignmentPolicy operation to remove the custom workflow extension object from the policy. For an example, see Example 3: Remove the customExtensionStageSettings from a policy. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomAccessPackageWorkflowExtension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action(requestInfo, global::Microsoft.Graph.Beta.Models.CustomAccessPackageWorkflowExtension.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Delete an accessPackageAssignmentRequestWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies:1. First retrieve the accessPackageCatalogId by calling the Get accessPackageAssignmentPolicies operation and appending ?$expand=accessPackage($expand=accessPackageCatalog) to the query. For example, https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies?$expand=accessPackage($expand=accessPackageCatalog).2. Use the access package catalog ID and retrieve the ID of the accessPackageCustomWorkflowExtension object that you want to delete by running the List accessPackageCustomWorkflowExtensions operation.3. Call the Update accessPackageAssignmentPolicy operation to remove the custom workflow extension object from the policy. For an example, see Example 3: Remove the customExtensionStageSettings from a policy. + /// Delete an accessPackageAssignmentWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies:1. First retrieve the accessPackageCatalogId by calling the Get accessPackageAssignmentPolicies operation and appending ?$expand=accessPackage($expand=accessPackageCatalog) to the query. For example, https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageAssignmentPolicies?$expand=accessPackage($expand=accessPackageCatalog).2. Use the access package catalog ID and retrieve the ID of the accessPackageCustomWorkflowExtension object that you want to delete by running the List accessPackageCustomWorkflowExtensions operation.3. Call the Update accessPackageAssignmentPolicy operation to remove the custom workflow extension object from the policy. For an example, see Example 3: Remove the customExtensionStageSettings from a policy. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomAccessPackageWorkflowExtension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Search/SearchGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Search/SearchGetResponse.cs index 6d36e503f6e..c08fee0e82b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Search/SearchGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Search/SearchGetResponse.cs @@ -36,7 +36,7 @@ public partial class SearchGetResponse : global::Microsoft.Graph.Beta.Models.Bas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Search.SearchGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Search.SearchGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Search/SearchResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Search/SearchResponse.cs index e5525daa430..bf5206c0f27 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Search/SearchResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogs/Search/SearchResponse.cs @@ -20,7 +20,7 @@ public partial class SearchResponse : global::Microsoft.Graph.Beta.IdentityGover /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Search.SearchResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackageCatalogs.Search.SearchResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogsWithUniqueName/AccessPackageCatalogsWithUniqueNameRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogsWithUniqueName/AccessPackageCatalogsWithUniqueNameRequestBuilder.cs index e90b2e217e8..ea0dd5de2b6 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogsWithUniqueName/AccessPackageCatalogsWithUniqueNameRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageCatalogsWithUniqueName/AccessPackageCatalogsWithUniqueNameRequestBuilder.cs @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageCatalog body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -168,7 +168,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageCatalog body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceEnvironments/AccessPackageResourceEnvironmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceEnvironments/AccessPackageResourceEnvironmentsRequestBuilder.cs index 0185ae69c0e..9cfc08e8bcb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceEnvironments/AccessPackageResourceEnvironmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceEnvironments/AccessPackageResourceEnvironmentsRequestBuilder.cs @@ -94,7 +94,7 @@ public AccessPackageResourceEnvironmentsRequestBuilder(string rawUrl, IRequestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceEnvironment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceEnvironment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceEnvironments/Item/AccessPackageResourceEnvironmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceEnvironments/Item/AccessPackageResourceEnvironmentItemRequestBuilder.cs index e1acb19d664..666ef5c0ecc 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceEnvironments/Item/AccessPackageResourceEnvironmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceEnvironments/Item/AccessPackageResourceEnvironmentItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceEnvironment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceEnvironment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRequests/AccessPackageResourceRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRequests/AccessPackageResourceRequestsRequestBuilder.cs index fddc6a447aa..92bac27536e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRequests/AccessPackageResourceRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRequests/AccessPackageResourceRequestsRequestBuilder.cs @@ -95,7 +95,7 @@ public AccessPackageResourceRequestsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRequests/Item/AccessPackageResourceRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRequests/Item/AccessPackageResourceRequestItemRequestBuilder.cs index bab1103e5c3..b25d908e417 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRequests/Item/AccessPackageResourceRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRequests/Item/AccessPackageResourceRequestItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRequests/Item/Requestor/RequestorRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRequests/Item/Requestor/RequestorRequestBuilder.cs index 64b2544822f..fcdfb371c1e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRequests/Item/Requestor/RequestorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRequests/Item/Requestor/RequestorRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/AccessPackageResourceRoleScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/AccessPackageResourceRoleScopesRequestBuilder.cs index 2de6ec2cc2f..75c4b40b1c9 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/AccessPackageResourceRoleScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/AccessPackageResourceRoleScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRoleScopesRequestBuilder(string rawUrl, IRequestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 22217a99ac7..59ba0a0a4a5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 22bc36df472..f0ea3620d37 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index b45c89e9024..b4294bd5247 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index 2cb4e3b56d1..2dc38de660b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 0a321d2e32b..5461bf87f19 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index ae9ae4cf40d..1e8f6f850e5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index cab177021db..f704bad57f0 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 7e188918887..8b3bd343db2 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs index fb1880368d1..8426763c519 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRoleScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRoleScopeItemRequestBuilder.cs index 84fa4a50fb5..d0b204339ab 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRoleScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRoleScopeItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 66c32de3736..707d536955f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 235cfd8d48b..c30ed872174 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index a574abb1ebf..57e443ddc58 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index 8d2915661ef..54352bbb158 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 0fd9076ab96..b002081f903 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index dd5b4e48618..0497fbbbaeb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index d089c73cefd..1b0b34bb1c8 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index c1c9e611e8b..63ae0fbc54d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs index 6def6a491b1..e9166387d13 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/AccessPackageResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/AccessPackageResourcesRequestBuilder.cs index c52553e408e..ac4cdd32229 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/AccessPackageResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/AccessPackageResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourcesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceItemRequestBuilder.cs index c551f592a0a..569f190570e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index ab357f53cd8..0dd58f62f28 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 3f7d7fc3aa5..371965ca685 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index 7f23bf5baea..f661ae73381 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index d99cbb6d407..63d7b93b3da 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 76178fd472f..ce124158260 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index e265b2e8fcb..64d34dd3040 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index cf09682e5ee..4a56d500f4b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index ad481ef9c07..fc3ca70c8ad 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index b444b3ae9c6..b5ee24b9a08 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index e0e93acc2a8..85e5fad59a1 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index 501291dc606..b5fdc8decad 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index d2f2f1eb18a..f110b75ed9e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackageResources/Item/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/AccessPackagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/AccessPackagesRequestBuilder.cs index aefd3f8b80c..bebb3180bad 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/AccessPackagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/AccessPackagesRequestBuilder.cs @@ -112,7 +112,7 @@ public AccessPackagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -154,7 +154,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index cee93a181cd..8a3cb639311 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 12f997affa6..374e5d5f46c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/AccessPackageAssignmentPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/AccessPackageAssignmentPoliciesRequestBuilder.cs index 55bf391f39d..da71afed5be 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/AccessPackageAssignmentPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/AccessPackageAssignmentPoliciesRequestBuilder.cs @@ -97,7 +97,7 @@ public AccessPackageAssignmentPoliciesRequestBuilder(string rawUrl, IRequestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs index 5e1561002a9..95bea701522 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/AccessPackageAssignmentPolicyItemRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -191,7 +191,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs index ce4b3aad114..ec0ba59d2da 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/CustomExtensionHandlersRequestBuilder.cs @@ -97,7 +97,7 @@ public CustomExtensionHandlersRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs index eb714bbf039..8176ff2c0d8 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionHandlers/Item/CustomExtensionHandlerItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionHandler body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs index 7eb0116686b..2c0cfac40c2 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/CustomExtensionStageSettingsRequestBuilder.cs @@ -97,7 +97,7 @@ public CustomExtensionStageSettingsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs index 65a88000b53..a5c796e28eb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageAssignmentPolicies/Item/CustomExtensionStageSettings/Item/CustomExtensionStageSettingItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageItemRequestBuilder.cs index e1a1df80962..2d1dbf93829 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageItemRequestBuilder.cs @@ -117,8 +117,8 @@ public async Task DeleteAsync(Action - /// Retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. - /// Find more info here + /// Retrieve the properties and relationships of an accessPackage object. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -158,7 +158,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -186,7 +186,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. + /// Retrieve the properties and relationships of an accessPackage object. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -219,7 +219,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -244,7 +244,7 @@ public partial class AccessPackageItemRequestBuilderDeleteRequestConfiguration : { } /// - /// Retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. + /// Retrieve the properties and relationships of an accessPackage object. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class AccessPackageItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/AccessPackageResourceRoleScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/AccessPackageResourceRoleScopesRequestBuilder.cs index 6d80c26c25e..1c567b50328 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/AccessPackageResourceRoleScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/AccessPackageResourceRoleScopesRequestBuilder.cs @@ -94,7 +94,7 @@ public AccessPackageResourceRoleScopesRequestBuilder(string rawUrl, IRequestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index fe499711f57..9555358977e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 9828b2bef09..d0db6fc16bc 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index 13befd38fd3..76007aed555 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index a0e8650b3c6..91fd33d6c34 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index c5e513b3334..229276172e2 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 6241da082bf..704f2e8196d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index 1cd83055bbd..4f182550203 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index e1f1b225016..78022bce7cd 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs index fae5f0e750d..29cde5eda64 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRole/AccessPackageResourceRoleRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRoleScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRoleScopeItemRequestBuilder.cs index 325335e7150..446d014dd66 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRoleScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceRoleScopeItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index 274e48f92c5..1ecc29aef8f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs index 5a491742f34..d22dfa94bbb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/AccessPackageResourceRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceRolesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs index d2d5cdc4ee5..68587992ff5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index 85087c4021a..6936e8a822d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 10f2b849edf..ac5cb12afcf 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs index 331956446ab..1bba8f43f95 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceRoles/Item/AccessPackageResourceRoleItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs index 4bc34c27fb5..63d4c4295c0 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/AccessPackageResourceScopesRequestBuilder.cs @@ -93,7 +93,7 @@ public AccessPackageResourceScopesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs index 1cb881bcd10..8ae78bb032b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResource/AccessPackageResourceScopes/Item/AccessPackageResourceScopeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs index 8ab73260a1a..7a9064d2252 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/AccessPackageResourceRoleScopes/Item/AccessPackageResourceScope/AccessPackageResourceScopeRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsPostResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsPostResponse.cs index 97ae35feb15..c3ef144fc2a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetApplicablePolicyRequirementsPostResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.GetApplicablePolicyRequirements.GetApplicablePolicyRequirementsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.GetApplicablePolicyRequirements.GetApplicablePolicyRequirementsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsResponse.cs index 659f4d219bb..98bedcfc681 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsResponse.cs @@ -20,7 +20,7 @@ public partial class GetApplicablePolicyRequirementsResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.GetApplicablePolicyRequirements.GetApplicablePolicyRequirementsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.GetApplicablePolicyRequirements.GetApplicablePolicyRequirementsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleAccessPackages/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleAccessPackages/Ref/RefRequestBuilder.cs index 6461b3ab186..81f5d788d47 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleAccessPackages/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleAccessPackages/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/incompatibleAccessPackages/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleGroups/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleGroups/Ref/RefRequestBuilder.cs index 1f2f4060f5f..ac7b2bf52f5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleGroups/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/IncompatibleGroups/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/identityGovernance/entitlementManagement/accessPackages/{accessPackage%2Did}/incompatibleGroups/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/MoveToCatalog/MoveToCatalogPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/MoveToCatalog/MoveToCatalogPostRequestBody.cs index eba15c21691..a825bbf4f8d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/MoveToCatalog/MoveToCatalogPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/MoveToCatalog/MoveToCatalogPostRequestBody.cs @@ -52,7 +52,7 @@ public MoveToCatalogPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.MoveToCatalog.MoveToCatalogPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.MoveToCatalog.MoveToCatalogPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("catalogId", CatalogId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/MoveToCatalog/MoveToCatalogRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/MoveToCatalog/MoveToCatalogRequestBuilder.cs index 5eb05ba3e84..89e83b04429 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/MoveToCatalog/MoveToCatalogRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Item/MoveToCatalog/MoveToCatalogRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Enti public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.MoveToCatalog.MoveToCatalogPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Item.MoveToCatalog.MoveToCatalogPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Search/SearchGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Search/SearchGetResponse.cs index d3b3f72487c..140e44c2811 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Search/SearchGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Search/SearchGetResponse.cs @@ -36,7 +36,7 @@ public partial class SearchGetResponse : global::Microsoft.Graph.Beta.Models.Bas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Search.SearchGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Search.SearchGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Search/SearchResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Search/SearchResponse.cs index f53097e1c9b..e3cd21b5e93 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Search/SearchResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackages/Search/SearchResponse.cs @@ -20,7 +20,7 @@ public partial class SearchResponse : global::Microsoft.Graph.Beta.IdentityGover /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Search.SearchResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackages.Search.SearchResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/AccessPackagesWithUniqueNameRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/AccessPackagesWithUniqueNameRequestBuilder.cs index 533e602b37f..05818f1f1ec 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/AccessPackagesWithUniqueNameRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/AccessPackagesWithUniqueNameRequestBuilder.cs @@ -72,8 +72,8 @@ public async Task DeleteAsync(Action - /// Retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. - /// Find more info here + /// Retrieve the properties and relationships of an accessPackage object. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. + /// Retrieve the properties and relationships of an accessPackage object. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -174,7 +174,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -199,7 +199,7 @@ public partial class AccessPackagesWithUniqueNameRequestBuilderDeleteRequestConf { } /// - /// Retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. + /// Retrieve the properties and relationships of an accessPackage object. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class AccessPackagesWithUniqueNameRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsPostResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsPostResponse.cs index cf7cb0631cd..4d9ae50506c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetApplicablePolicyRequirementsPostResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackagesWithUniqueName.GetApplicablePolicyRequirements.GetApplicablePolicyRequirementsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackagesWithUniqueName.GetApplicablePolicyRequirements.GetApplicablePolicyRequirementsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsResponse.cs index b41a21a7d3e..78128625e5e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/GetApplicablePolicyRequirements/GetApplicablePolicyRequirementsResponse.cs @@ -20,7 +20,7 @@ public partial class GetApplicablePolicyRequirementsResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackagesWithUniqueName.GetApplicablePolicyRequirements.GetApplicablePolicyRequirementsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackagesWithUniqueName.GetApplicablePolicyRequirements.GetApplicablePolicyRequirementsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/MoveToCatalog/MoveToCatalogPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/MoveToCatalog/MoveToCatalogPostRequestBody.cs index 081fc4c687c..5e0ba525b05 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/MoveToCatalog/MoveToCatalogPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/MoveToCatalog/MoveToCatalogPostRequestBody.cs @@ -52,7 +52,7 @@ public MoveToCatalogPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackagesWithUniqueName.MoveToCatalog.MoveToCatalogPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackagesWithUniqueName.MoveToCatalog.MoveToCatalogPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("catalogId", CatalogId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/MoveToCatalog/MoveToCatalogRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/MoveToCatalog/MoveToCatalogRequestBuilder.cs index 9c6002c0804..eac7197286c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/MoveToCatalog/MoveToCatalogRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AccessPackagesWithUniqueName/MoveToCatalog/MoveToCatalogRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Enti public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackagesWithUniqueName.MoveToCatalog.MoveToCatalogPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AccessPackagesWithUniqueName.MoveToCatalog.MoveToCatalogPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/AssignmentRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/AssignmentRequestsRequestBuilder.cs index a2a1aab82e9..13ef48b97cc 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/AssignmentRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/AssignmentRequestsRequestBuilder.cs @@ -111,7 +111,7 @@ public AssignmentRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -155,7 +155,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index b0f74769c61..36f7bc3d469 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AssignmentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AssignmentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index e33106bcd35..e5117fa1188 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AssignmentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AssignmentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs index 25f7bd2f106..e96b113229a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/AccessPackageAssignmentRequestItemRequestBuilder.cs @@ -141,7 +141,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -205,7 +205,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/Requestor/RequestorRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/Requestor/RequestorRequestBuilder.cs index 88d6c4701ad..c6973a60e65 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/Requestor/RequestorRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/Requestor/RequestorRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/Resume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/Resume/ResumePostRequestBody.cs index 80097617750..c845fd2646d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/Resume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/Resume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AssignmentRequests.Item.Resume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AssignmentRequests.Item.Resume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/Resume/ResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/Resume/ResumeRequestBuilder.cs index c0cd5c55019..1aecd84e6ba 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/Resume/ResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/AssignmentRequests/Item/Resume/ResumeRequestBuilder.cs @@ -51,7 +51,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Enti public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AssignmentRequests.Item.Resume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.EntitlementManagement.AssignmentRequests.Item.Resume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/ConnectedOrganizationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/ConnectedOrganizationsRequestBuilder.cs index 1b66b6a7729..28db2debb81 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/ConnectedOrganizationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/ConnectedOrganizationsRequestBuilder.cs @@ -95,7 +95,7 @@ public ConnectedOrganizationsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConnectedOrganization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConnectedOrganization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/Item/ConnectedOrganizationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/Item/ConnectedOrganizationItemRequestBuilder.cs index f6f1fedaa5a..4d650e36c66 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/Item/ConnectedOrganizationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/Item/ConnectedOrganizationItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConnectedOrganization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConnectedOrganization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/Item/ExternalSponsors/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/Item/ExternalSponsors/Ref/RefRequestBuilder.cs index 25f55dd9065..0608c197463 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/Item/ExternalSponsors/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/Item/ExternalSponsors/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/identityGovernance/entitlementManagement/connectedOrganizations/{connectedOrganization%2Did}/externalSponsors/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/Item/InternalSponsors/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/Item/InternalSponsors/Ref/RefRequestBuilder.cs index ad820d5a5fe..86249dbdb52 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/Item/InternalSponsors/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/ConnectedOrganizations/Item/InternalSponsors/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/identityGovernance/entitlementManagement/connectedOrganizations/{connectedOrganization%2Did}/internalSponsors/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/EntitlementManagementRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/EntitlementManagementRequestBuilder.cs index c034f3bb6c8..feda69dd56d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/EntitlementManagementRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/EntitlementManagementRequestBuilder.cs @@ -210,7 +210,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EntitlementManagement body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -281,7 +281,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EntitlementManagement body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/Settings/SettingsRequestBuilder.cs index 95c392a10f3..6f506a4e078 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/Settings/SettingsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EntitlementManagementSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EntitlementManagementSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/Subjects/Item/AccessPackageSubjectItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/Subjects/Item/AccessPackageSubjectItemRequestBuilder.cs index d9713735657..08776a304fc 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/Subjects/Item/AccessPackageSubjectItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/Subjects/Item/AccessPackageSubjectItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/Subjects/SubjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/Subjects/SubjectsRequestBuilder.cs index 06c8162bc05..667b1cb570c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/Subjects/SubjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/Subjects/SubjectsRequestBuilder.cs @@ -94,7 +94,7 @@ public SubjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/SubjectsWithObjectId/SubjectsWithObjectIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/SubjectsWithObjectId/SubjectsWithObjectIdRequestBuilder.cs index b94161819c6..b44f488a4ac 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/SubjectsWithObjectId/SubjectsWithObjectIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/EntitlementManagement/SubjectsWithObjectId/SubjectsWithObjectIdRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessPackageSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/IdentityGovernanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/IdentityGovernanceRequestBuilder.cs index 5ee10e5153f..2be033addae 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/IdentityGovernanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/IdentityGovernanceRequestBuilder.cs @@ -128,7 +128,7 @@ public IdentityGovernanceRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.IdentityGovernance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.IdentityGovernance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/CustomTaskExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/CustomTaskExtensionsRequestBuilder.cs index dd246ecd9d8..cf3cf9a1054 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/CustomTaskExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/CustomTaskExtensionsRequestBuilder.cs @@ -95,7 +95,7 @@ public CustomTaskExtensionsRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.CustomTaskExtension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.CustomTaskExtension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs index 77524d1a207..eb3769d8f8e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CustomTaskExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CustomTaskExtensionItemRequestBuilder.cs index 05d268e713e..43ddb87c146 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CustomTaskExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/CustomTaskExtensionItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.CustomTaskExtension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.CustomTaskExtension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs index d9bc577b6a9..d05145c9f5c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/CustomTaskExtensions/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs index 5a9b4998fa6..a882ba61add 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs index a546c52176b..5eb0a1e318f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/ActivatePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/ActivatePostRequestBody.cs index 03dbd56c1c3..fee80a7c258 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/ActivatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/ActivatePostRequestBody.cs @@ -53,7 +53,7 @@ public ActivatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.MicrosoftGraphIdentityGovernanceActivate.ActivatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.MicrosoftGraphIdentityGovernanceActivate.ActivatePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("subjects", Subjects); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/MicrosoftGraphIdentityGovernanceActivateRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/MicrosoftGraphIdentityGovernanceActivateRequestBuilder.cs index 40b0ab10052..56d4379d865 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/MicrosoftGraphIdentityGovernanceActivateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/MicrosoftGraphIdentityGovernanceActivateRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.MicrosoftGraphIdentityGovernanceActivate.ActivatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.MicrosoftGraphIdentityGovernanceActivate.ActivatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/CreateNewVersionPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/CreateNewVersionPostRequestBody.cs index daac61d6efc..a873ac6b1c2 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/CreateNewVersionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/CreateNewVersionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateNewVersionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.MicrosoftGraphIdentityGovernanceCreateNewVersion.CreateNewVersionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.MicrosoftGraphIdentityGovernanceCreateNewVersion.CreateNewVersionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("workflow", Workflow); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder.cs index 8d150bed59f..99621cf5f8a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder.cs @@ -52,7 +52,7 @@ public MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder(string raw public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.MicrosoftGraphIdentityGovernanceCreateNewVersion.CreateNewVersionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.MicrosoftGraphIdentityGovernanceCreateNewVersion.CreateNewVersionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs index 1199c6b3d7d..58477e76ed4 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs index 9e732beb6bc..a9416bf019f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index c45ff414004..c1a0f113a73 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index cde34b3e29c..de47c04a08c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs index b0aa50c6c61..55844d58312 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs index 2c2a4a29254..72458a9d7b2 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index f7ffbc6a3a1..a96bc9eb5be 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs index fbdd6124069..4fc3a8b93e5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs @@ -85,8 +85,8 @@ public UserProcessingResultsRequestBuilder(string rawUrl, IRequestAdapter reques /// Usage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.Item.UserProcessingResults.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/RunsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/RunsRequestBuilder.cs index 47750fb5bba..592c9e46f89 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/RunsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Runs/RunsRequestBuilder.cs @@ -85,8 +85,8 @@ public RunsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( /// Usage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Runs.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs index 18ca0e0ca76..d687b8d5789 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs index 035c60e30a2..e1d63887933 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index 7836900c42d..bd2497611ca 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/TaskReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/TaskReportsRequestBuilder.cs index 867fe6c99d2..c0e1ece3267 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/TaskReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/TaskReports/TaskReportsRequestBuilder.cs @@ -85,8 +85,8 @@ public TaskReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Usage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.TaskReports.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.TaskReports.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskItemRequestBuilder.cs index 775a1088e7d..fd7099417a5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs index c52b09b8ea3..b63aa3b91df 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs index a8ef10ed0d5..9285a5c4ca8 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index 351cda915f3..fccd5f0bf9c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/TasksRequestBuilder.cs index 4aa326df873..f6d7bcdf9bf 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Tasks/TasksRequestBuilder.cs @@ -93,7 +93,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index 73368bade97..ebc76a8a13e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs index fa03f7012c9..a4f8a1355d2 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs index 3da3184cfb3..345bda480fa 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index 56ba7bc4253..bb0be3da8cb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs index f3090502b3c..a27c7625100 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs @@ -85,8 +85,8 @@ public UserProcessingResultsRequestBuilder(string rawUrl, IRequestAdapter reques /// Usage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.UserProcessingResults.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs index f34ec1340c5..fd3e40e94a8 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs index 4197037f07d..e39d9e7402c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskItemRequestBuilder.cs index bd1f77550d0..d6c9ae73bac 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs index 0ab9218a7d7..3df1bf61925 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs index 8b93f8e145d..dc62a1faad5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.DeletedItems.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index 0baffd18b47..1a4fb466e24 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/TasksRequestBuilder.cs index 948ff3c8485..63c6438be2c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/DeletedItems/Workflows/Item/Versions/Item/Tasks/TasksRequestBuilder.cs @@ -93,7 +93,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/InsightsRequestBuilder.cs index 6f442360e81..4932b00e94a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/InsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/InsightsRequestBuilder.cs @@ -91,8 +91,8 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -103,8 +103,8 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -115,8 +115,8 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceWorkflowsProcessedByCategoryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceWorkflowsProcessedByCategoryWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphIdentityGovernanceWorkflowsProcessedByCategoryWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceWorkflowsProcessedByCategoryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceWorkflowsProcessedByCategoryWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -127,8 +127,8 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphIdentityGovernanceWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -148,7 +148,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.Insights body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -209,7 +209,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.Insights body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime/TopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime/TopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeGetResponse.cs index 9d00ba03654..ed1d387318a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime/TopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime/TopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class TopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeGet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime.TopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime.TopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime/TopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime/TopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeResponse.cs index a0cbcbb23e2..628c79c0aea 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime/TopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime/TopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class TopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeRes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime.TopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceTopTasksProcessedSummaryWithStartDateTimeWithEndDateTime.TopTasksProcessedSummaryWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime/TopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime/TopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeGetResponse.cs index d97a3e86f57..ba9149249e1 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime/TopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime/TopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class TopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTim /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime.TopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime.TopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime/TopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime/TopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeResponse.cs index 2cbfbee9f00..880e4f7c36f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime/TopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Insights/MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime/TopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class TopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTim /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime.TopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Insights.MicrosoftGraphIdentityGovernanceTopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTime.TopWorkflowsProcessedSummaryWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/LifecycleWorkflowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/LifecycleWorkflowsRequestBuilder.cs index 1a4e652e2b6..0b682286280 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/LifecycleWorkflowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/LifecycleWorkflowsRequestBuilder.cs @@ -138,7 +138,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.LifecycleWorkflowsContainer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -199,7 +199,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.LifecycleWorkflowsContainer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Settings/SettingsRequestBuilder.cs index 014f673b348..a1c61049598 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Settings/SettingsRequestBuilder.cs @@ -76,7 +76,7 @@ public SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.LifecycleManagementSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -118,7 +118,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.LifecycleManagementSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs index 4c0ad7636a4..1e0093c7e9d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.WorkflowTemplates.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.WorkflowTemplates.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs index aa829f07173..338bc55f499 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.WorkflowTemplates.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.WorkflowTemplates.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index c25f49474c9..c479b3dc071 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/WorkflowTemplates/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs index 3c159fbf488..faf388ab27c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs index 67d6c7c64d3..0b17d9c1fb3 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/ActivatePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/ActivatePostRequestBody.cs index 894104c4077..2d918b5fedf 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/ActivatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/ActivatePostRequestBody.cs @@ -53,7 +53,7 @@ public ActivatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.MicrosoftGraphIdentityGovernanceActivate.ActivatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.MicrosoftGraphIdentityGovernanceActivate.ActivatePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("subjects", Subjects); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/MicrosoftGraphIdentityGovernanceActivateRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/MicrosoftGraphIdentityGovernanceActivateRequestBuilder.cs index edf61751cf8..f1de8a7c83b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/MicrosoftGraphIdentityGovernanceActivateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceActivate/MicrosoftGraphIdentityGovernanceActivateRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.MicrosoftGraphIdentityGovernanceActivate.ActivatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.MicrosoftGraphIdentityGovernanceActivate.ActivatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/CreateNewVersionPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/CreateNewVersionPostRequestBody.cs index 262151c1920..bd649189915 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/CreateNewVersionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/CreateNewVersionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateNewVersionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.MicrosoftGraphIdentityGovernanceCreateNewVersion.CreateNewVersionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.MicrosoftGraphIdentityGovernanceCreateNewVersion.CreateNewVersionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("workflow", Workflow); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder.cs index de571f260e1..b807ebf13d8 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/MicrosoftGraphIdentityGovernanceCreateNewVersion/MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder.cs @@ -52,7 +52,7 @@ public MicrosoftGraphIdentityGovernanceCreateNewVersionRequestBuilder(string raw public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.MicrosoftGraphIdentityGovernanceCreateNewVersion.CreateNewVersionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.MicrosoftGraphIdentityGovernanceCreateNewVersion.CreateNewVersionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs index 02ba681117a..7d84403593f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs index ac9467f1cac..cd9a027fafc 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index 62e8c9e6c7f..fa261977835 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index 332a2482adc..e8a6b3dc289 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs index f18b6fe3e35..ad08d37dedb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs index fd691dc77a3..a36c4ef855d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index 6257b869df3..7adc3f1b86b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs index 0c943edea01..23ab461d518 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs @@ -86,8 +86,8 @@ public UserProcessingResultsRequestBuilder(string rawUrl, IRequestAdapter reques /// Usage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.Item.UserProcessingResults.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/RunsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/RunsRequestBuilder.cs index 0ce65f05efc..f312dc6cf5d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/RunsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Runs/RunsRequestBuilder.cs @@ -86,8 +86,8 @@ public RunsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( /// Usage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Runs.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs index 0b20c349ab7..0b1d9a9df8d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs index faa9265fce1..1afe3038d73 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.TaskReports.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index dc2f945c075..5cb49a67c69 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/TaskReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/TaskReportsRequestBuilder.cs index 62237afe9a7..41e95cd7c62 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/TaskReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/TaskReports/TaskReportsRequestBuilder.cs @@ -86,8 +86,8 @@ public TaskReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Usage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.TaskReports.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.TaskReports.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskItemRequestBuilder.cs index 1b5512beefb..5c4e5fb7034 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs index 13b72b2c3c2..4b22f215e41 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs index ca6572e6e25..f21c46f77ac 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index 84551e99f79..aecec21a07b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/TasksRequestBuilder.cs index 24b0b0a088c..92b3c1a8587 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Tasks/TasksRequestBuilder.cs @@ -94,7 +94,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index 66ce8b5cfc6..88c9ee0e933 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs index 788c7f88b77..443b8b4036c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs index 8bf6670733a..63990edb381 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index 71e405bc8f7..6d105125a17 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs index 498fa68c2c4..7bec50ecf5c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/UserProcessingResults/UserProcessingResultsRequestBuilder.cs @@ -86,8 +86,8 @@ public UserProcessingResultsRequestBuilder(string rawUrl, IRequestAdapter reques /// Usage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.UserProcessingResults.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTime.MicrosoftGraphIdentityGovernanceSummaryWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs index 76817905a5d..e528850caea 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/CreatedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs index 66deb9a7eb3..05a6c320bb9 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/LastModifiedBy/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskItemRequestBuilder.cs index f8e2966a4e1..a41c8afad85 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs index 7db588e040a..02d656c1db6 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/MicrosoftGraphIdentityGovernanceResumeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Life public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs index dba4a241261..8cb212318d2 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/MicrosoftGraphIdentityGovernanceResume/ResumePostRequestBody.cs @@ -85,7 +85,7 @@ public ResumePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.LifecycleWorkflows.Workflows.Item.Versions.Item.Tasks.Item.TaskProcessingResults.Item.MicrosoftGraphIdentityGovernanceResume.ResumePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("data", Data); writer.WriteStringValue("source", Source); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs index 2ab5c2ea982..500bc644222 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/Item/TaskProcessingResults/Item/Subject/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/TasksRequestBuilder.cs index c560a8cddb2..48c285d3a7b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/Versions/Item/Tasks/TasksRequestBuilder.cs @@ -94,7 +94,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/WorkflowItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/WorkflowItemRequestBuilder.cs index bec968f2f3d..ad95570a6db 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/WorkflowItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/Item/WorkflowItemRequestBuilder.cs @@ -165,7 +165,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.Workflow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -226,7 +226,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.Workflow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/WorkflowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/WorkflowsRequestBuilder.cs index 7d11237e00e..bf9ecee4864 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/WorkflowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/LifecycleWorkflows/Workflows/WorkflowsRequestBuilder.cs @@ -95,7 +95,7 @@ public WorkflowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IdentityGovernance.Workflow body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityGovernance.Workflow body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/AwsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/AwsRequestBuilder.cs index 2963ec66574..080112dda19 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/AwsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/AwsRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PermissionsAnalytics body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionsAnalytics body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/Findings/FindingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/Findings/FindingsRequestBuilder.cs index a2258073364..ed0fd92b029 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/Findings/FindingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/Findings/FindingsRequestBuilder.cs @@ -93,7 +93,7 @@ public FindingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Finding body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Finding body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/Findings/Item/FindingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/Findings/Item/FindingItemRequestBuilder.cs index a5e8b6da019..5d4bfc70c7b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/Findings/Item/FindingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/Findings/Item/FindingItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Finding body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Finding body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/PermissionsCreepIndexDistributions/Item/PermissionsCreepIndexDistributionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/PermissionsCreepIndexDistributions/Item/PermissionsCreepIndexDistributionItemRequestBuilder.cs index f7aea561f0e..9d085510464 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/PermissionsCreepIndexDistributions/Item/PermissionsCreepIndexDistributionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/PermissionsCreepIndexDistributions/Item/PermissionsCreepIndexDistributionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistribution body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistribution body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/PermissionsCreepIndexDistributions/PermissionsCreepIndexDistributionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/PermissionsCreepIndexDistributions/PermissionsCreepIndexDistributionsRequestBuilder.cs index ea639b8218b..c457fca45f0 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/PermissionsCreepIndexDistributions/PermissionsCreepIndexDistributionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Aws/PermissionsCreepIndexDistributions/PermissionsCreepIndexDistributionsRequestBuilder.cs @@ -94,7 +94,7 @@ public PermissionsCreepIndexDistributionsRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistribution body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistribution body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/AzureRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/AzureRequestBuilder.cs index 2f2bbff3c74..42353b7bd50 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/AzureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/AzureRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PermissionsAnalytics body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionsAnalytics body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/Findings/FindingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/Findings/FindingsRequestBuilder.cs index acd4bfe8eca..ba41152d7f6 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/Findings/FindingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/Findings/FindingsRequestBuilder.cs @@ -93,7 +93,7 @@ public FindingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Finding body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Finding body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/Findings/Item/FindingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/Findings/Item/FindingItemRequestBuilder.cs index 099c67d9f4d..a257a167a04 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/Findings/Item/FindingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/Findings/Item/FindingItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Finding body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Finding body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/PermissionsCreepIndexDistributions/Item/PermissionsCreepIndexDistributionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/PermissionsCreepIndexDistributions/Item/PermissionsCreepIndexDistributionItemRequestBuilder.cs index 3f3f1dae56d..2fc5e37b0fd 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/PermissionsCreepIndexDistributions/Item/PermissionsCreepIndexDistributionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/PermissionsCreepIndexDistributions/Item/PermissionsCreepIndexDistributionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistribution body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistribution body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/PermissionsCreepIndexDistributions/PermissionsCreepIndexDistributionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/PermissionsCreepIndexDistributions/PermissionsCreepIndexDistributionsRequestBuilder.cs index 0e5e4e4843d..5001093a2a1 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/PermissionsCreepIndexDistributions/PermissionsCreepIndexDistributionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Azure/PermissionsCreepIndexDistributions/PermissionsCreepIndexDistributionsRequestBuilder.cs @@ -93,7 +93,7 @@ public PermissionsCreepIndexDistributionsRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistribution body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistribution body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/Findings/FindingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/Findings/FindingsRequestBuilder.cs index 58fe2c8d0e4..4a85ca7e87f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/Findings/FindingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/Findings/FindingsRequestBuilder.cs @@ -93,7 +93,7 @@ public FindingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Finding body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Finding body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/Findings/Item/FindingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/Findings/Item/FindingItemRequestBuilder.cs index a301989d17c..9e364d4b076 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/Findings/Item/FindingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/Findings/Item/FindingItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Finding body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Finding body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/GcpRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/GcpRequestBuilder.cs index 69d0db8bad2..285c33fde04 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/GcpRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/GcpRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PermissionsAnalytics body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionsAnalytics body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/PermissionsCreepIndexDistributions/Item/PermissionsCreepIndexDistributionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/PermissionsCreepIndexDistributions/Item/PermissionsCreepIndexDistributionItemRequestBuilder.cs index 2456991cce0..9efd4671795 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/PermissionsCreepIndexDistributions/Item/PermissionsCreepIndexDistributionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/PermissionsCreepIndexDistributions/Item/PermissionsCreepIndexDistributionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistribution body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistribution body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/PermissionsCreepIndexDistributions/PermissionsCreepIndexDistributionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/PermissionsCreepIndexDistributions/PermissionsCreepIndexDistributionsRequestBuilder.cs index b4d0c385ef0..6c884879e16 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/PermissionsCreepIndexDistributions/PermissionsCreepIndexDistributionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/Gcp/PermissionsCreepIndexDistributions/PermissionsCreepIndexDistributionsRequestBuilder.cs @@ -93,7 +93,7 @@ public PermissionsCreepIndexDistributionsRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistribution body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistribution body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/PermissionsAnalyticsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/PermissionsAnalyticsRequestBuilder.cs index 343967e9bed..b24c3fb519b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/PermissionsAnalyticsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsAnalytics/PermissionsAnalyticsRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PermissionsAnalyticsAggregation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionsAnalyticsAggregation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/PermissionsManagementRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/PermissionsManagementRequestBuilder.cs index 3adbb22fe61..029bdbd9d26 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/PermissionsManagementRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/PermissionsManagementRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PermissionsManagement body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionsManagement body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/PermissionsRequestChanges/Item/PermissionsRequestChangeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/PermissionsRequestChanges/Item/PermissionsRequestChangeItemRequestBuilder.cs index 35f65ebe84b..f50db4cf2d2 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/PermissionsRequestChanges/Item/PermissionsRequestChangeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/PermissionsRequestChanges/Item/PermissionsRequestChangeItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PermissionsRequestChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionsRequestChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/PermissionsRequestChanges/PermissionsRequestChangesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/PermissionsRequestChanges/PermissionsRequestChangesRequestBuilder.cs index 9ddae6c2b8d..5adb8662fc2 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/PermissionsRequestChanges/PermissionsRequestChangesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/PermissionsRequestChanges/PermissionsRequestChangesRequestBuilder.cs @@ -94,7 +94,7 @@ public PermissionsRequestChangesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PermissionsRequestChange body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionsRequestChange body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 9cf268750ac..f454103b73a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PermissionsManagement.ScheduledPermissionsApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PermissionsManagement.ScheduledPermissionsApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index f208671c6a3..ae8b28646b8 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PermissionsManagement.ScheduledPermissionsApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PermissionsManagement.ScheduledPermissionsApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/Item/ApprovalItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/Item/ApprovalItemRequestBuilder.cs index acbcca76592..7680d2f77b7 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/Item/ApprovalItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/Item/ApprovalItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs index d83434202e4..1bb90dc8c74 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/Item/Steps/StepsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/Item/Steps/StepsRequestBuilder.cs index 58541c4ec94..91fa64954e2 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/Item/Steps/StepsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/Item/Steps/StepsRequestBuilder.cs @@ -93,7 +93,7 @@ public StepsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/ScheduledPermissionsApprovalsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/ScheduledPermissionsApprovalsRequestBuilder.cs index 885b8d986af..d3f5032b3a4 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/ScheduledPermissionsApprovalsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsApprovals/ScheduledPermissionsApprovalsRequestBuilder.cs @@ -104,7 +104,7 @@ public ScheduledPermissionsApprovalsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index ef51d23c8f3..f000e73de4d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PermissionsManagement.ScheduledPermissionsRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PermissionsManagement.ScheduledPermissionsRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 946d75e3772..19e08294a18 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PermissionsManagement.ScheduledPermissionsRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PermissionsManagement.ScheduledPermissionsRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsRequests/ScheduledPermissionsRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsRequests/ScheduledPermissionsRequestsRequestBuilder.cs index 1f56ccd1b5c..10f6a495730 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsRequests/ScheduledPermissionsRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PermissionsManagement/ScheduledPermissionsRequests/ScheduledPermissionsRequestsRequestBuilder.cs @@ -86,7 +86,7 @@ public ScheduledPermissionsRequestsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ScheduledPermissionsRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -128,7 +128,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ScheduledPermissionsRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/AssignmentApprovalsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/AssignmentApprovalsRequestBuilder.cs index 1c72dfc4f06..61dc22b734f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/AssignmentApprovalsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/AssignmentApprovalsRequestBuilder.cs @@ -104,7 +104,7 @@ public AssignmentApprovalsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index ed76ebdff1f..90b692a4f79 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index a127a42741b..ae0427b6ea8 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/ApprovalItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/ApprovalItemRequestBuilder.cs index ca00dfe20f1..76696cf12d5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/ApprovalItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/ApprovalItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs index 0258c1f5657..0ebf18476ce 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Steps/StepsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Steps/StepsRequestBuilder.cs index 00dcfaccb2d..ac028a50d48 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Steps/StepsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentApprovals/Item/Steps/StepsRequestBuilder.cs @@ -93,7 +93,7 @@ public StepsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/AssignmentScheduleInstancesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/AssignmentScheduleInstancesRequestBuilder.cs index aefbfe4aea2..b58e8823e57 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/AssignmentScheduleInstancesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/AssignmentScheduleInstancesRequestBuilder.cs @@ -105,7 +105,7 @@ public AssignmentScheduleInstancesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index f2cdc93b5c4..2c3c0d08f15 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 1cf45ca36f4..a1a0bbb3151 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleInstances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder.cs index 02a76d6381f..274ef5a395e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleInstances/Item/PrivilegedAccessGroupAssignmentScheduleInstanceItemRequestBuilder.cs @@ -115,7 +115,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -176,7 +176,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/AssignmentScheduleRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/AssignmentScheduleRequestsRequestBuilder.cs index 334e29ba7af..7c47a3d3e30 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/AssignmentScheduleRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/AssignmentScheduleRequestsRequestBuilder.cs @@ -106,7 +106,7 @@ public AssignmentScheduleRequestsRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 6b1decd4d63..3da8f66748c 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index fc211d103c1..1067a568bdc 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentScheduleRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder.cs index e12f3ff0ce5..fe01158b0e1 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentScheduleRequests/Item/PrivilegedAccessGroupAssignmentScheduleRequestItemRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -188,7 +188,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/AssignmentSchedulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/AssignmentSchedulesRequestBuilder.cs index c2956264dd4..ea24ca24106 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/AssignmentSchedulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/AssignmentSchedulesRequestBuilder.cs @@ -105,7 +105,7 @@ public AssignmentSchedulesRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentSchedule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentSchedule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 3b8cd48261e..c2b3e946e00 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index b97f0c0c151..f9b3fa73416 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.AssignmentSchedules.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder.cs index 13534ad7147..5fbf83459da 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/AssignmentSchedules/Item/PrivilegedAccessGroupAssignmentScheduleItemRequestBuilder.cs @@ -115,7 +115,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentSchedule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -176,7 +176,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentSchedule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/EligibilityScheduleInstancesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/EligibilityScheduleInstancesRequestBuilder.cs index 7dedc8510e0..bd642b0da6b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/EligibilityScheduleInstancesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/EligibilityScheduleInstancesRequestBuilder.cs @@ -105,7 +105,7 @@ public EligibilityScheduleInstancesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 52fcebb0eb0..44cbb1d7a74 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 1d4466d66fa..60e6e305d6f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleInstances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder.cs index 337448d409d..5e1570c04d5 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleInstances/Item/PrivilegedAccessGroupEligibilityScheduleInstanceItemRequestBuilder.cs @@ -109,7 +109,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/EligibilityScheduleRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/EligibilityScheduleRequestsRequestBuilder.cs index 3f1bedebc63..08175ca3ddb 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/EligibilityScheduleRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/EligibilityScheduleRequestsRequestBuilder.cs @@ -106,7 +106,7 @@ public EligibilityScheduleRequestsRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index c6ac5e1c0f4..f2c610e2a88 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 197bbe168ba..25eb8baee55 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.EligibilityScheduleRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder.cs index 933a0368515..07e9e848aec 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilityScheduleRequests/Item/PrivilegedAccessGroupEligibilityScheduleRequestItemRequestBuilder.cs @@ -121,7 +121,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -182,7 +182,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/EligibilitySchedulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/EligibilitySchedulesRequestBuilder.cs index ea7613c862b..c4258f2edd3 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/EligibilitySchedulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/EligibilitySchedulesRequestBuilder.cs @@ -105,7 +105,7 @@ public EligibilitySchedulesRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilitySchedule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilitySchedule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 38d3498477b..c01a2c1a290 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index f2cd9afaad4..eefcdddf575 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.PrivilegedAccess.Group.EligibilitySchedules.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder.cs index e6745875d53..c331992f358 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/EligibilitySchedules/Item/PrivilegedAccessGroupEligibilityScheduleItemRequestBuilder.cs @@ -109,7 +109,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilitySchedule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilitySchedule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/GroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/GroupRequestBuilder.cs index 1340ed6bbfe..7fee85d965f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/GroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/Group/GroupRequestBuilder.cs @@ -138,7 +138,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -199,7 +199,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/PrivilegedAccessRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/PrivilegedAccessRequestBuilder.cs index bc4784b5a6f..62fc96466ec 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/PrivilegedAccessRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/PrivilegedAccess/PrivilegedAccessRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccessRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccessRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertConfigurations/AlertConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertConfigurations/AlertConfigurationsRequestBuilder.cs index 1ab6bbd2fcf..e2b1e638ce1 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertConfigurations/AlertConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertConfigurations/AlertConfigurationsRequestBuilder.cs @@ -94,7 +94,7 @@ public AlertConfigurationsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertConfigurations/Item/UnifiedRoleManagementAlertConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertConfigurations/Item/UnifiedRoleManagementAlertConfigurationItemRequestBuilder.cs index fc0307e3636..f1f22f0f8e7 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertConfigurations/Item/UnifiedRoleManagementAlertConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertConfigurations/Item/UnifiedRoleManagementAlertConfigurationItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertDefinitions/AlertDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertDefinitions/AlertDefinitionsRequestBuilder.cs index ec332a1b9d0..514fe869171 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertDefinitions/AlertDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertDefinitions/AlertDefinitionsRequestBuilder.cs @@ -94,7 +94,7 @@ public AlertDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertDefinitions/Item/UnifiedRoleManagementAlertDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertDefinitions/Item/UnifiedRoleManagementAlertDefinitionItemRequestBuilder.cs index e27702c8aeb..a4ee6689dc9 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertDefinitions/Item/UnifiedRoleManagementAlertDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/AlertDefinitions/Item/UnifiedRoleManagementAlertDefinitionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/AlertsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/AlertsRequestBuilder.cs index 31a697b31d2..b7401c542bd 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/AlertsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/AlertsRequestBuilder.cs @@ -100,7 +100,7 @@ public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlert body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlert body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Item/AlertIncidents/AlertIncidentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Item/AlertIncidents/AlertIncidentsRequestBuilder.cs index 93789c6922d..7d6343b8d8b 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Item/AlertIncidents/AlertIncidentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Item/AlertIncidents/AlertIncidentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AlertIncidentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertIncident body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertIncident body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Item/AlertIncidents/Item/UnifiedRoleManagementAlertIncidentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Item/AlertIncidents/Item/UnifiedRoleManagementAlertIncidentItemRequestBuilder.cs index a8f37612209..7199176903f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Item/AlertIncidents/Item/UnifiedRoleManagementAlertIncidentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Item/AlertIncidents/Item/UnifiedRoleManagementAlertIncidentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertIncident body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertIncident body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Item/UnifiedRoleManagementAlertItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Item/UnifiedRoleManagementAlertItemRequestBuilder.cs index 5778f52c7f7..1419629a113 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Item/UnifiedRoleManagementAlertItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Item/UnifiedRoleManagementAlertItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlert body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlert body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Refresh/RefreshPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Refresh/RefreshPostRequestBody.cs index 72bf9b5ce17..d2b52877613 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Refresh/RefreshPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Refresh/RefreshPostRequestBody.cs @@ -68,7 +68,7 @@ public RefreshPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityGovernance.RoleManagementAlerts.Alerts.Refresh.RefreshPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityGovernance.RoleManagementAlerts.Alerts.Refresh.RefreshPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("scopeId", ScopeId); writer.WriteStringValue("scopeType", ScopeType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Refresh/RefreshRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Refresh/RefreshRequestBuilder.cs index b875e7c2926..f73134c62f6 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Refresh/RefreshRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Alerts/Refresh/RefreshRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.Role public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityGovernance.RoleManagementAlerts.Alerts.Refresh.RefreshPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityGovernance.RoleManagementAlerts.Alerts.Refresh.RefreshPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Operations/Item/LongRunningOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Operations/Item/LongRunningOperationItemRequestBuilder.cs index aac6751cb7e..f2fea0b2c80 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Operations/Item/LongRunningOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Operations/Item/LongRunningOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.LongRunningOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.LongRunningOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Operations/OperationsRequestBuilder.cs index e0352667a15..85d99ac2872 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.LongRunningOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.LongRunningOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/RoleManagementAlertsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/RoleManagementAlertsRequestBuilder.cs index 44633106b43..bf8b19f9bb4 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/RoleManagementAlertsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/RoleManagementAlerts/RoleManagementAlertsRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RoleManagementAlert body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RoleManagementAlert body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/AgreementAcceptances/AgreementAcceptancesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/AgreementAcceptances/AgreementAcceptancesRequestBuilder.cs index 18c85fb7e16..a780affed34 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/AgreementAcceptances/AgreementAcceptancesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/AgreementAcceptances/AgreementAcceptancesRequestBuilder.cs @@ -93,7 +93,7 @@ public AgreementAcceptancesRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/AgreementAcceptances/Item/AgreementAcceptanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/AgreementAcceptances/Item/AgreementAcceptanceItemRequestBuilder.cs index 818183bfee9..24ce3823f63 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/AgreementAcceptances/Item/AgreementAcceptanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/AgreementAcceptances/Item/AgreementAcceptanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/AgreementsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/AgreementsRequestBuilder.cs index 2718517a8fe..48d45327e4d 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/AgreementsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/AgreementsRequestBuilder.cs @@ -95,7 +95,7 @@ public AgreementsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Agreement body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Agreement body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Acceptances/AcceptancesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Acceptances/AcceptancesRequestBuilder.cs index 53263a53e25..e668bf0715f 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Acceptances/AcceptancesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Acceptances/AcceptancesRequestBuilder.cs @@ -94,7 +94,7 @@ public AcceptancesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Acceptances/Item/AgreementAcceptanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Acceptances/Item/AgreementAcceptanceItemRequestBuilder.cs index 58176bc5eb2..3c05e02f91e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Acceptances/Item/AgreementAcceptanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Acceptances/Item/AgreementAcceptanceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementAcceptance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/AgreementItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/AgreementItemRequestBuilder.cs index 34273ef8ede..953e942a4ee 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/AgreementItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/AgreementItemRequestBuilder.cs @@ -76,8 +76,8 @@ public async Task DeleteAsync(Action - /// Retrieve the properties and relationships of an agreement object. - /// Find more info here + /// Retrieve all files related to an agreement. This includes the default file and all localized files. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -117,7 +117,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Agreement body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -145,7 +145,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve the properties and relationships of an agreement object. + /// Retrieve all files related to an agreement. This includes the default file and all localized files. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -178,7 +178,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Agreement body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -203,7 +203,7 @@ public partial class AgreementItemRequestBuilderDeleteRequestConfiguration : Req { } /// - /// Retrieve the properties and relationships of an agreement object. + /// Retrieve all files related to an agreement. This includes the default file and all localized files. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class AgreementItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/FileRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/FileRequestBuilder.cs index efcccbc0689..3acc49c67c9 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/FileRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/FileRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AgreementFile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/Item/AgreementFileLocalizationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/Item/AgreementFileLocalizationItemRequestBuilder.cs index f94105e1e85..97b9c28e1bc 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/Item/AgreementFileLocalizationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/Item/AgreementFileLocalizationItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs index a67fc66aeca..1d16cd3a25a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/Item/Versions/VersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/Item/Versions/VersionsRequestBuilder.cs index 7f029e9ccd2..7a7eee46ae7 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/Item/Versions/VersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/Item/Versions/VersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public VersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/LocalizationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/LocalizationsRequestBuilder.cs index 859184d571a..a0017ae7c9e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/LocalizationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/FileNamespace/Localizations/LocalizationsRequestBuilder.cs @@ -93,7 +93,7 @@ public LocalizationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/FilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/FilesRequestBuilder.cs index 5464cb5c795..b79a274bc79 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/FilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/FilesRequestBuilder.cs @@ -94,7 +94,7 @@ public FilesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/Item/AgreementFileLocalizationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/Item/AgreementFileLocalizationItemRequestBuilder.cs index a82241b9db3..dda8c7fb175 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/Item/AgreementFileLocalizationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/Item/AgreementFileLocalizationItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileLocalization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs index 1642de15067..f31a608274a 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/Item/Versions/Item/AgreementFileVersionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/Item/Versions/VersionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/Item/Versions/VersionsRequestBuilder.cs index 1cf3660630c..dea952cbc31 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/Item/Versions/VersionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/Files/Item/Versions/VersionsRequestBuilder.cs @@ -93,7 +93,7 @@ public VersionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AgreementFileVersion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/TermsOfUseRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/TermsOfUseRequestBuilder.cs index 1cd24d787ca..68d020e9d33 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/TermsOfUseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/TermsOfUseRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TermsOfUseContainer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TermsOfUseContainer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/IdentityProtectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/IdentityProtectionRequestBuilder.cs index b5728fe5567..817d7a51919 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/IdentityProtectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/IdentityProtectionRequestBuilder.cs @@ -98,7 +98,7 @@ public IdentityProtectionRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityProtectionRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -140,7 +140,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityProtectionRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskDetections/Item/RiskDetectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskDetections/Item/RiskDetectionItemRequestBuilder.cs index eb2ae8bdf36..18a2e7f6260 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskDetections/Item/RiskDetectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskDetections/Item/RiskDetectionItemRequestBuilder.cs @@ -57,8 +57,8 @@ public async Task DeleteAsync(Action - /// Retrieve the properties of a riskDetection object. - /// Find more info here + /// Retrieve the properties of a collection of riskDetection objects. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RiskDetection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -125,7 +125,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve the properties of a riskDetection object. + /// Retrieve the properties of a collection of riskDetection objects. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RiskDetection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -183,7 +183,7 @@ public partial class RiskDetectionItemRequestBuilderDeleteRequestConfiguration : { } /// - /// Retrieve the properties of a riskDetection object. + /// Retrieve the properties of a collection of riskDetection objects. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RiskDetectionItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskDetections/RiskDetectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskDetections/RiskDetectionsRequestBuilder.cs index 2b0b322badc..cdae8627eb1 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskDetections/RiskDetectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskDetections/RiskDetectionsRequestBuilder.cs @@ -94,7 +94,7 @@ public RiskDetectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RiskDetection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RiskDetection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs index 4e09af81038..d5255cd359e 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs @@ -52,7 +52,7 @@ public ConfirmCompromisedPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityProtection.RiskyServicePrincipals.ConfirmCompromised.ConfirmCompromisedPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityProtection.RiskyServicePrincipals.ConfirmCompromised.ConfirmCompromisedPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("servicePrincipalIds", ServicePrincipalIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs index 228d4bc5300..c59db5c57c2 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityProtection.Risk public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityProtection.RiskyServicePrincipals.ConfirmCompromised.ConfirmCompromisedPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityProtection.RiskyServicePrincipals.ConfirmCompromised.ConfirmCompromisedPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Dismiss/DismissPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Dismiss/DismissPostRequestBody.cs index 39ddb583d86..339e21f8665 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Dismiss/DismissPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Dismiss/DismissPostRequestBody.cs @@ -52,7 +52,7 @@ public DismissPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityProtection.RiskyServicePrincipals.Dismiss.DismissPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityProtection.RiskyServicePrincipals.Dismiss.DismissPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("servicePrincipalIds", ServicePrincipalIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Dismiss/DismissRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Dismiss/DismissRequestBuilder.cs index 3af5131071b..8d7274dd0cd 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Dismiss/DismissRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Dismiss/DismissRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityProtection.Risk public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityProtection.RiskyServicePrincipals.Dismiss.DismissPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityProtection.RiskyServicePrincipals.Dismiss.DismissPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Item/History/HistoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Item/History/HistoryRequestBuilder.cs index f3fca56ec50..d7e7d2612f7 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Item/History/HistoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Item/History/HistoryRequestBuilder.cs @@ -94,7 +94,7 @@ public HistoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RiskyServicePrincipalHistoryItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RiskyServicePrincipalHistoryItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Item/History/Item/RiskyServicePrincipalHistoryItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Item/History/Item/RiskyServicePrincipalHistoryItemItemRequestBuilder.cs index 9d69a741eeb..3e709269516 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Item/History/Item/RiskyServicePrincipalHistoryItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Item/History/Item/RiskyServicePrincipalHistoryItemItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RiskyServicePrincipalHistoryItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RiskyServicePrincipalHistoryItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Item/RiskyServicePrincipalItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Item/RiskyServicePrincipalItemRequestBuilder.cs index b1f12381eb0..9fcedd5cd8f 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Item/RiskyServicePrincipalItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/Item/RiskyServicePrincipalItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RiskyServicePrincipal body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RiskyServicePrincipal body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/RiskyServicePrincipalsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/RiskyServicePrincipalsRequestBuilder.cs index 3b8a50bcb83..dce39efe345 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/RiskyServicePrincipalsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyServicePrincipals/RiskyServicePrincipalsRequestBuilder.cs @@ -106,7 +106,7 @@ public RiskyServicePrincipalsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RiskyServicePrincipal body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RiskyServicePrincipal body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs index 2c0400b2f14..a65ac050008 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs @@ -52,7 +52,7 @@ public ConfirmCompromisedPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityProtection.RiskyUsers.ConfirmCompromised.ConfirmCompromisedPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityProtection.RiskyUsers.ConfirmCompromised.ConfirmCompromisedPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("userIds", UserIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs index f399e6e3361..8f7a5db9b53 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityProtection.Risk public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityProtection.RiskyUsers.ConfirmCompromised.ConfirmCompromisedPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityProtection.RiskyUsers.ConfirmCompromised.ConfirmCompromisedPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmSafe/ConfirmSafePostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmSafe/ConfirmSafePostRequestBody.cs index 407749cb033..f6d470604da 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmSafe/ConfirmSafePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmSafe/ConfirmSafePostRequestBody.cs @@ -52,7 +52,7 @@ public ConfirmSafePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityProtection.RiskyUsers.ConfirmSafe.ConfirmSafePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityProtection.RiskyUsers.ConfirmSafe.ConfirmSafePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("userIds", UserIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmSafe/ConfirmSafeRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmSafe/ConfirmSafeRequestBuilder.cs index 30d5ed2b417..ca826aa8c4e 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmSafe/ConfirmSafeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/ConfirmSafe/ConfirmSafeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityProtection.Risk public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityProtection.RiskyUsers.ConfirmSafe.ConfirmSafePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityProtection.RiskyUsers.ConfirmSafe.ConfirmSafePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Dismiss/DismissPostRequestBody.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Dismiss/DismissPostRequestBody.cs index 944b6e4e56b..80b59a1fc5c 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Dismiss/DismissPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Dismiss/DismissPostRequestBody.cs @@ -52,7 +52,7 @@ public DismissPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.IdentityProtection.RiskyUsers.Dismiss.DismissPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityProtection.RiskyUsers.Dismiss.DismissPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("userIds", UserIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Dismiss/DismissRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Dismiss/DismissRequestBuilder.cs index 427ad50fc66..842af0d3bbb 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Dismiss/DismissRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Dismiss/DismissRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityProtection.Risk public async Task PostAsync(global::Microsoft.Graph.Beta.IdentityProtection.RiskyUsers.Dismiss.DismissPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.IdentityProtection.RiskyUsers.Dismiss.DismissPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/HistoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/HistoryRequestBuilder.cs index 9b87b54b4bc..2d0e4264994 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/HistoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/HistoryRequestBuilder.cs @@ -94,7 +94,7 @@ public HistoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RiskyUserHistoryItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RiskyUserHistoryItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/Item/RiskyUserHistoryItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/Item/RiskyUserHistoryItemItemRequestBuilder.cs index 8a344296bc8..0a467276990 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/Item/RiskyUserHistoryItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/History/Item/RiskyUserHistoryItemItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RiskyUserHistoryItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RiskyUserHistoryItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/RiskyUserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/RiskyUserItemRequestBuilder.cs index 99f42c34f60..4c32b19304b 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/RiskyUserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/Item/RiskyUserItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RiskyUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RiskyUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/RiskyUsersRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/RiskyUsersRequestBuilder.cs index 6fd9f399921..3127fd8a723 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/RiskyUsersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/RiskyUsers/RiskyUsersRequestBuilder.cs @@ -112,7 +112,7 @@ public RiskyUsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RiskyUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -154,7 +154,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RiskyUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/ServicePrincipalRiskDetections/Item/ServicePrincipalRiskDetectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/ServicePrincipalRiskDetections/Item/ServicePrincipalRiskDetectionItemRequestBuilder.cs index e9596803978..d6f53022bf4 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/ServicePrincipalRiskDetections/Item/ServicePrincipalRiskDetectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/ServicePrincipalRiskDetections/Item/ServicePrincipalRiskDetectionItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServicePrincipalRiskDetection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServicePrincipalRiskDetection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProtection/ServicePrincipalRiskDetections/ServicePrincipalRiskDetectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProtection/ServicePrincipalRiskDetections/ServicePrincipalRiskDetectionsRequestBuilder.cs index e85745e62a8..2109564a048 100644 --- a/src/Microsoft.Graph/Generated/IdentityProtection/ServicePrincipalRiskDetections/ServicePrincipalRiskDetectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProtection/ServicePrincipalRiskDetections/ServicePrincipalRiskDetectionsRequestBuilder.cs @@ -94,7 +94,7 @@ public ServicePrincipalRiskDetectionsRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ServicePrincipalRiskDetection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ServicePrincipalRiskDetection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesGetResponse.cs b/src/Microsoft.Graph/Generated/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesGetResponse.cs index a059f58565f..eea933ca012 100644 --- a/src/Microsoft.Graph/Generated/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityProviders.AvailableProviderTypes.AvailableProviderTypesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityProviders.AvailableProviderTypes.AvailableProviderTypesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesResponse.cs b/src/Microsoft.Graph/Generated/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesResponse.cs index 79b325db482..c0801b3499c 100644 --- a/src/Microsoft.Graph/Generated/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesResponse.cs +++ b/src/Microsoft.Graph/Generated/IdentityProviders/AvailableProviderTypes/AvailableProviderTypesResponse.cs @@ -20,7 +20,7 @@ public partial class AvailableProviderTypesResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.IdentityProviders.AvailableProviderTypes.AvailableProviderTypesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.IdentityProviders.AvailableProviderTypes.AvailableProviderTypesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/IdentityProviders/IdentityProvidersRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProviders/IdentityProvidersRequestBuilder.cs index 3da3868a13b..44e4277b814 100644 --- a/src/Microsoft.Graph/Generated/IdentityProviders/IdentityProvidersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProviders/IdentityProvidersRequestBuilder.cs @@ -106,7 +106,7 @@ public IdentityProvidersRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.IdentityProvider body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -150,7 +150,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityProvider body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/IdentityProviders/Item/IdentityProviderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityProviders/Item/IdentityProviderItemRequestBuilder.cs index 25fcf084640..cb83fb5c274 100644 --- a/src/Microsoft.Graph/Generated/IdentityProviders/Item/IdentityProviderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityProviders/Item/IdentityProviderItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentityProvider body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentityProvider body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/DataLossPreventionPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/DataLossPreventionPoliciesRequestBuilder.cs index 5c408b99268..f09860e8330 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/DataLossPreventionPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/DataLossPreventionPoliciesRequestBuilder.cs @@ -99,7 +99,7 @@ public DataLossPreventionPoliciesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluatePostRequestBody.cs b/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluatePostRequestBody.cs index d4583cf9673..bcfbaa59dca 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluatePostRequestBody.cs @@ -85,7 +85,7 @@ public EvaluatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.InformationProtection.DataLossPreventionPolicies.Evaluate.EvaluatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.DataLossPreventionPolicies.Evaluate.EvaluatePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("evaluationInput", EvaluationInput); writer.WriteObjectValue("notificationInfo", NotificationInfo); writer.WriteStringValue("target", Target); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluateRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluateRequestBuilder.cs index 9ba928ecf55..ab76fac8ec4 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluateRequestBuilder.cs @@ -51,7 +51,7 @@ public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.InformationProtection.DataLossPreventionPolicies.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.InformationProtection.DataLossPreventionPolicies.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/Item/DataLossPreventionPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/Item/DataLossPreventionPolicyItemRequestBuilder.cs index 1322f099286..84006453dd4 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/Item/DataLossPreventionPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/DataLossPreventionPolicies/Item/DataLossPreventionPolicyItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/DecryptBuffer/DecryptBufferPostRequestBody.cs b/src/Microsoft.Graph/Generated/InformationProtection/DecryptBuffer/DecryptBufferPostRequestBody.cs index 45376b0fe5c..aa3e4d2a698 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/DecryptBuffer/DecryptBufferPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/DecryptBuffer/DecryptBufferPostRequestBody.cs @@ -68,7 +68,7 @@ public DecryptBufferPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.InformationProtection.DecryptBuffer.DecryptBufferPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.DecryptBuffer.DecryptBufferPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("encryptedBuffer", EncryptedBuffer); writer.WriteByteArrayValue("publishingLicense", PublishingLicense); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/DecryptBuffer/DecryptBufferRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/DecryptBuffer/DecryptBufferRequestBuilder.cs index 8a7e3bd20b7..c07412b010b 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/DecryptBuffer/DecryptBufferRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/DecryptBuffer/DecryptBufferRequestBuilder.cs @@ -52,7 +52,7 @@ public DecryptBufferRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.InformationProtection.DecryptBuffer.DecryptBufferPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.InformationProtection.DecryptBuffer.DecryptBufferPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/EncryptBuffer/EncryptBufferPostRequestBody.cs b/src/Microsoft.Graph/Generated/InformationProtection/EncryptBuffer/EncryptBufferPostRequestBody.cs index 9e2caa3e24f..59b43fa3df1 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/EncryptBuffer/EncryptBufferPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/EncryptBuffer/EncryptBufferPostRequestBody.cs @@ -58,7 +58,7 @@ public EncryptBufferPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.InformationProtection.EncryptBuffer.EncryptBufferPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.EncryptBuffer.EncryptBufferPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("buffer", Buffer); writer.WriteGuidValue("labelId", LabelId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/EncryptBuffer/EncryptBufferRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/EncryptBuffer/EncryptBufferRequestBuilder.cs index 4d01510a60c..afc4e337df5 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/EncryptBuffer/EncryptBufferRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/EncryptBuffer/EncryptBufferRequestBuilder.cs @@ -52,7 +52,7 @@ public EncryptBufferRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.InformationProtection.EncryptBuffer.EncryptBufferPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.InformationProtection.EncryptBuffer.EncryptBufferPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/InformationProtectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/InformationProtectionRequestBuilder.cs index ef9ca939686..df660f1b07f 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/InformationProtectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/InformationProtectionRequestBuilder.cs @@ -134,7 +134,7 @@ public InformationProtectionRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.InformationProtection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -176,7 +176,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InformationProtection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostRequestBody.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostRequestBody.cs index a06c916b64d..07bdb0ec177 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluateApplicationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteObjectValue("labelingOptions", LabelingOptions); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostResponse.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostResponse.cs index fa70ea4986b..7982b69d2ef 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostResponse.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostResponse.cs @@ -36,7 +36,7 @@ public partial class EvaluateApplicationPostResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationRequestBuilder.cs index e6530b6a9ca..eead6d55f18 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationRequestBuilder.cs @@ -52,7 +52,7 @@ public EvaluateApplicationRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsEvaluateApplicationPostResponseAsync(global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -79,7 +79,7 @@ public EvaluateApplicationRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -103,7 +103,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationResponse.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationResponse.cs index dd3804eaec9..e71ced32361 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationResponse.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationResponse.cs @@ -20,7 +20,7 @@ public partial class EvaluateApplicationResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationResponse(); } } diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs index 39c9035bb99..16fd0408e9c 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluateClassificationResultsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("classificationResults", ClassificationResults); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs index 20360494749..f365189021c 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs @@ -36,7 +36,7 @@ public partial class EvaluateClassificationResultsPostResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsRequestBuilder.cs index 16087950179..be1aa5458c1 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsRequestBuilder.cs @@ -52,7 +52,7 @@ public EvaluateClassificationResultsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsEvaluateClassificationResultsPostResponseAsync(global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -79,7 +79,7 @@ public EvaluateClassificationResultsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -103,7 +103,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsResponse.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsResponse.cs index faa54407340..b0b423d95df 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsResponse.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsResponse.cs @@ -20,7 +20,7 @@ public partial class EvaluateClassificationResultsResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostRequestBody.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostRequestBody.cs index 4d7ace3d819..4ee0fb13483 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluateRemovalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteObjectValue("downgradeJustification", DowngradeJustification); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostResponse.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostResponse.cs index 9df982ba2c0..e7759dc84d0 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostResponse.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostResponse.cs @@ -36,7 +36,7 @@ public partial class EvaluateRemovalPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalRequestBuilder.cs index 0bf88d6ebba..45c0b8a1e4b 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalRequestBuilder.cs @@ -52,7 +52,7 @@ public EvaluateRemovalRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsEvaluateRemovalPostResponseAsync(global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -79,7 +79,7 @@ public EvaluateRemovalRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -103,7 +103,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalResponse.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalResponse.cs index 42bbb604e3e..869e9d90c92 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalResponse.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalResponse.cs @@ -20,7 +20,7 @@ public partial class EvaluateRemovalResponse : global::Microsoft.Graph.Beta.Info /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalResponse(); } } diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelPostRequestBody.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelPostRequestBody.cs index 4cf655e2915..6a35ae76c29 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelPostRequestBody.cs @@ -53,7 +53,7 @@ public ExtractLabelPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.ExtractLabel.ExtractLabelPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.ExtractLabel.ExtractLabelPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelRequestBuilder.cs index e9c84de0675..3005fbb4bb2 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelRequestBuilder.cs @@ -53,7 +53,7 @@ public ExtractLabelRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.ExtractLabel.ExtractLabelPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.InformationProtection.Policy.Labels.ExtractLabel.ExtractLabelPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/Item/InformationProtectionLabelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/Item/InformationProtectionLabelItemRequestBuilder.cs index b1243f40fac..a316a7b6318 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/Item/InformationProtectionLabelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/Item/InformationProtectionLabelItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InformationProtectionLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InformationProtectionLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/LabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/LabelsRequestBuilder.cs index 736339e64df..edf76cfc82c 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/LabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/Labels/LabelsRequestBuilder.cs @@ -125,7 +125,7 @@ public LabelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.InformationProtectionLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.InformationProtectionLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/Policy/PolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/Policy/PolicyRequestBuilder.cs index 784fc89c28a..957469570c3 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/Policy/PolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/Policy/PolicyRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InformationProtectionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InformationProtectionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs index dc681b24e4e..a9075c29d32 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs @@ -101,7 +101,7 @@ public ComputeRightsAndInheritancePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("delegatedUserEmail", DelegatedUserEmail); writer.WriteStringValue("locale", Locale); writer.WriteCollectionOfObjectValues("protectedContents", ProtectedContents); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs index 341846916a1..d329b7f9034 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs @@ -52,7 +52,7 @@ public ComputeRightsAndInheritanceRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs index 1bde3612809..086243febd1 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.Evaluate.EvaluatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.Evaluate.EvaluatePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("currentLabel", CurrentLabel); writer.WriteCollectionOfObjectValues("discoveredSensitiveTypes", DiscoveredSensitiveTypes); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs index 1e873b3a412..80436c568ee 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs @@ -51,7 +51,7 @@ public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs index 529d8f7582f..2c6b0283d63 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs index edae54f5340..caec73996b1 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs @@ -101,7 +101,7 @@ public ComputeRightsAndInheritancePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("delegatedUserEmail", DelegatedUserEmail); writer.WriteStringValue("locale", Locale); writer.WriteCollectionOfObjectValues("protectedContents", ProtectedContents); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs index 30e8c20f670..dccd92503e7 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs @@ -52,7 +52,7 @@ public ComputeRightsAndInheritanceRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs index 7aaaf077475..25440a0a746 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("currentLabel", CurrentLabel); writer.WriteCollectionOfObjectValues("discoveredSensitiveTypes", DiscoveredSensitiveTypes); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs index 5eb36bb3574..e831bc87116 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs @@ -51,7 +51,7 @@ public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.InformationProtection.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs index f2c0b4a4d59..ade210eba91 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs index 3b8939c534c..c9648f589aa 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs @@ -120,7 +120,7 @@ public SublabelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs index c673a3da5e3..cf86c707e29 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs @@ -120,7 +120,7 @@ public SensitivityLabelsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityPolicySettings/SensitivityPolicySettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityPolicySettings/SensitivityPolicySettingsRequestBuilder.cs index 14cbe3830d4..efbb8324638 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SensitivityPolicySettings/SensitivityPolicySettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SensitivityPolicySettings/SensitivityPolicySettingsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SensitivityPolicySettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityPolicySettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SignDigest/SignDigestPostRequestBody.cs b/src/Microsoft.Graph/Generated/InformationProtection/SignDigest/SignDigestPostRequestBody.cs index 24fb7f883c3..793afcb1447 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SignDigest/SignDigestPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SignDigest/SignDigestPostRequestBody.cs @@ -52,7 +52,7 @@ public SignDigestPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.InformationProtection.SignDigest.SignDigestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.SignDigest.SignDigestPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("digest", Digest); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/InformationProtection/SignDigest/SignDigestRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/SignDigest/SignDigestRequestBuilder.cs index bac8069c74f..a4e1fe47b5a 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/SignDigest/SignDigestRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/SignDigest/SignDigestRequestBuilder.cs @@ -52,7 +52,7 @@ public SignDigestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.InformationProtection.SignDigest.SignDigestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.InformationProtection.SignDigest.SignDigestPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/Item/Results/Item/ThreatAssessmentResultItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/Item/Results/Item/ThreatAssessmentResultItemRequestBuilder.cs index 60ddc27d7f4..92c9810c64c 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/Item/Results/Item/ThreatAssessmentResultItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/Item/Results/Item/ThreatAssessmentResultItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ThreatAssessmentResult body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ThreatAssessmentResult body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/Item/Results/ResultsRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/Item/Results/ResultsRequestBuilder.cs index 2b23bc561fe..a5d10c871e0 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/Item/Results/ResultsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/Item/Results/ResultsRequestBuilder.cs @@ -93,7 +93,7 @@ public ResultsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ThreatAssessmentResult body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ThreatAssessmentResult body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/Item/ThreatAssessmentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/Item/ThreatAssessmentRequestItemRequestBuilder.cs index cb8df03cd98..5de0d0b479c 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/Item/ThreatAssessmentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/Item/ThreatAssessmentRequestItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/ThreatAssessmentRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/ThreatAssessmentRequestsRequestBuilder.cs index 1fbc54ddf54..103702af64a 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/ThreatAssessmentRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/ThreatAssessmentRequests/ThreatAssessmentRequestsRequestBuilder.cs @@ -95,7 +95,7 @@ public ThreatAssessmentRequestsRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/VerifySignature/VerifySignaturePostRequestBody.cs b/src/Microsoft.Graph/Generated/InformationProtection/VerifySignature/VerifySignaturePostRequestBody.cs index faf1afbcec6..6338d2ea4c2 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/VerifySignature/VerifySignaturePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/VerifySignature/VerifySignaturePostRequestBody.cs @@ -84,7 +84,7 @@ public VerifySignaturePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.InformationProtection.VerifySignature.VerifySignaturePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.InformationProtection.VerifySignature.VerifySignaturePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("digest", Digest); writer.WriteByteArrayValue("signature", Signature); writer.WriteStringValue("signingKeyId", SigningKeyId); diff --git a/src/Microsoft.Graph/Generated/InformationProtection/VerifySignature/VerifySignatureRequestBuilder.cs b/src/Microsoft.Graph/Generated/InformationProtection/VerifySignature/VerifySignatureRequestBuilder.cs index c376d816bf0..29a192f0542 100644 --- a/src/Microsoft.Graph/Generated/InformationProtection/VerifySignature/VerifySignatureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/InformationProtection/VerifySignature/VerifySignatureRequestBuilder.cs @@ -52,7 +52,7 @@ public VerifySignatureRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.InformationProtection.VerifySignature.VerifySignaturePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.InformationProtection.VerifySignature.VerifySignaturePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Invitations/InvitationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Invitations/InvitationsRequestBuilder.cs index 780600e82e5..c2b3bcb297a 100644 --- a/src/Microsoft.Graph/Generated/Invitations/InvitationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Invitations/InvitationsRequestBuilder.cs @@ -93,7 +93,7 @@ public InvitationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Invitation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Invitation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Invitations/InvitedUser/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Invitations/InvitedUser/MailboxSettings/MailboxSettingsRequestBuilder.cs index 955fffc4d87..e82d23e1835 100644 --- a/src/Microsoft.Graph/Generated/Invitations/InvitedUser/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Invitations/InvitedUser/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Activities/ActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Activities/ActivitiesRequestBuilder.cs index 5f49ff5689d..25d8194b86a 100644 --- a/src/Microsoft.Graph/Generated/Me/Activities/ActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Activities/ActivitiesRequestBuilder.cs @@ -99,7 +99,7 @@ public ActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Activities/Item/HistoryItems/HistoryItemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Activities/Item/HistoryItems/HistoryItemsRequestBuilder.cs index 29ddfaee4e9..6fa63f534e9 100644 --- a/src/Microsoft.Graph/Generated/Me/Activities/Item/HistoryItems/HistoryItemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Activities/Item/HistoryItems/HistoryItemsRequestBuilder.cs @@ -93,7 +93,7 @@ public HistoryItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ActivityHistoryItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ActivityHistoryItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Activities/Item/HistoryItems/Item/ActivityHistoryItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Activities/Item/HistoryItems/Item/ActivityHistoryItemItemRequestBuilder.cs index 94e81f856f2..1430e287786 100644 --- a/src/Microsoft.Graph/Generated/Me/Activities/Item/HistoryItems/Item/ActivityHistoryItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Activities/Item/HistoryItems/Item/ActivityHistoryItemItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ActivityHistoryItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ActivityHistoryItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Activities/Item/UserActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Activities/Item/UserActivityItemRequestBuilder.cs index 14f08deb686..81d1afcfd22 100644 --- a/src/Microsoft.Graph/Generated/Me/Activities/Item/UserActivityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Activities/Item/UserActivityItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Activities/Recent/RecentGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Activities/Recent/RecentGetResponse.cs index cba649c296f..4b1fd7aed2e 100644 --- a/src/Microsoft.Graph/Generated/Me/Activities/Recent/RecentGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Activities/Recent/RecentGetResponse.cs @@ -36,7 +36,7 @@ public partial class RecentGetResponse : global::Microsoft.Graph.Beta.Models.Bas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Activities.Recent.RecentGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Activities.Recent.RecentGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Activities/Recent/RecentResponse.cs b/src/Microsoft.Graph/Generated/Me/Activities/Recent/RecentResponse.cs index b8d35f860c9..89711698b80 100644 --- a/src/Microsoft.Graph/Generated/Me/Activities/Recent/RecentResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Activities/Recent/RecentResponse.cs @@ -20,7 +20,7 @@ public partial class RecentResponse : global::Microsoft.Graph.Beta.Me.Activities /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Activities.Recent.RecentResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Activities.Recent.RecentResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Analytics/ActivityStatistics/ActivityStatisticsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Analytics/ActivityStatistics/ActivityStatisticsRequestBuilder.cs index ee749ac2559..3e9e00857b7 100644 --- a/src/Microsoft.Graph/Generated/Me/Analytics/ActivityStatistics/ActivityStatisticsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Analytics/ActivityStatistics/ActivityStatisticsRequestBuilder.cs @@ -93,7 +93,7 @@ public ActivityStatisticsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ActivityStatistics body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ActivityStatistics body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Analytics/ActivityStatistics/Item/ActivityStatisticsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Analytics/ActivityStatistics/Item/ActivityStatisticsItemRequestBuilder.cs index bff64d2ea9c..748c5684d46 100644 --- a/src/Microsoft.Graph/Generated/Me/Analytics/ActivityStatistics/Item/ActivityStatisticsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Analytics/ActivityStatistics/Item/ActivityStatisticsItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ActivityStatistics body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ActivityStatistics body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Analytics/AnalyticsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Analytics/AnalyticsRequestBuilder.cs index ec7e85f8c04..9603723553e 100644 --- a/src/Microsoft.Graph/Generated/Me/Analytics/AnalyticsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Analytics/AnalyticsRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserAnalytics body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserAnalytics body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/AppConsentRequestsForApprovalRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/AppConsentRequestsForApprovalRequestBuilder.cs index 53d9ce50ccf..e76e32d582f 100644 --- a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/AppConsentRequestsForApprovalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/AppConsentRequestsForApprovalRequestBuilder.cs @@ -104,7 +104,7 @@ public AppConsentRequestsForApprovalRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AppConsentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AppConsentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index a89c3eb987b..dfcff4d2a63 100644 --- a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.AppConsentRequestsForApproval.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.AppConsentRequestsForApproval.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 09bc1e37452..ebe14561838 100644 --- a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.AppConsentRequestsForApproval.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.AppConsentRequestsForApproval.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/AppConsentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/AppConsentRequestItemRequestBuilder.cs index 964e555349a..89cb404de25 100644 --- a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/AppConsentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/AppConsentRequestItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AppConsentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppConsentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index cffbc2f3691..5819de427d2 100644 --- a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.AppConsentRequestsForApproval.Item.UserConsentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.AppConsentRequestsForApproval.Item.UserConsentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 3c2ff23a010..38a652b2494 100644 --- a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.AppConsentRequestsForApproval.Item.UserConsentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.AppConsentRequestsForApproval.Item.UserConsentRequests.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/Approval/ApprovalRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/Approval/ApprovalRequestBuilder.cs index a4cf7f948f5..774988f81ec 100644 --- a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/Approval/ApprovalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/Approval/ApprovalRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/Approval/Steps/Item/ApprovalStepItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/Approval/Steps/Item/ApprovalStepItemRequestBuilder.cs index 88fe7f8604c..66b5f38397e 100644 --- a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/Approval/Steps/Item/ApprovalStepItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/Approval/Steps/Item/ApprovalStepItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/Approval/Steps/StepsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/Approval/Steps/StepsRequestBuilder.cs index 84fa50b0a7a..db2a9a79df1 100644 --- a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/Approval/Steps/StepsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/Approval/Steps/StepsRequestBuilder.cs @@ -93,7 +93,7 @@ public StepsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/UserConsentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/UserConsentRequestItemRequestBuilder.cs index 1c3017272ec..5abbc6fe46f 100644 --- a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/UserConsentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/Item/UserConsentRequestItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserConsentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserConsentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/UserConsentRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/UserConsentRequestsRequestBuilder.cs index 94ea6091b92..9998f3b3be8 100644 --- a/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/UserConsentRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/AppConsentRequestsForApproval/Item/UserConsentRequests/UserConsentRequestsRequestBuilder.cs @@ -104,7 +104,7 @@ public UserConsentRequestsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserConsentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserConsentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/AppRoleAssignments/AppRoleAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/AppRoleAssignments/AppRoleAssignmentsRequestBuilder.cs index 00e161aa501..5c8e3e0b25a 100644 --- a/src/Microsoft.Graph/Generated/Me/AppRoleAssignments/AppRoleAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/AppRoleAssignments/AppRoleAssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AppRoleAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AppRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AppRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/AppRoleAssignments/Item/AppRoleAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/AppRoleAssignments/Item/AppRoleAssignmentItemRequestBuilder.cs index e563d953f4c..6b0c655fa1c 100644 --- a/src/Microsoft.Graph/Generated/Me/AppRoleAssignments/Item/AppRoleAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/AppRoleAssignments/Item/AppRoleAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AppRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Approvals/ApprovalsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Approvals/ApprovalsRequestBuilder.cs index b6dbf635ae3..2b8142eab18 100644 --- a/src/Microsoft.Graph/Generated/Me/Approvals/ApprovalsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Approvals/ApprovalsRequestBuilder.cs @@ -104,7 +104,7 @@ public ApprovalsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Approvals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Approvals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 9749ea5fd02..d235d8258bc 100644 --- a/src/Microsoft.Graph/Generated/Me/Approvals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Approvals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Approvals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Approvals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Approvals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/Me/Approvals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index bffbfee74f0..b29b78e09f3 100644 --- a/src/Microsoft.Graph/Generated/Me/Approvals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Approvals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Approvals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Approvals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Approvals/Item/ApprovalItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Approvals/Item/ApprovalItemRequestBuilder.cs index 3e2492879cf..4e0a40abb77 100644 --- a/src/Microsoft.Graph/Generated/Me/Approvals/Item/ApprovalItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Approvals/Item/ApprovalItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Approvals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Approvals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs index dd23c326162..31b6e6f82bb 100644 --- a/src/Microsoft.Graph/Generated/Me/Approvals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Approvals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Approvals/Item/Steps/StepsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Approvals/Item/Steps/StepsRequestBuilder.cs index 9c6fe3937b4..ece369df55b 100644 --- a/src/Microsoft.Graph/Generated/Me/Approvals/Item/Steps/StepsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Approvals/Item/Steps/StepsRequestBuilder.cs @@ -93,7 +93,7 @@ public StepsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ApprovalStep body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/AssignLicense/AssignLicensePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/AssignLicense/AssignLicensePostRequestBody.cs index 4b71dd4837e..fff1f2b1f54 100644 --- a/src/Microsoft.Graph/Generated/Me/AssignLicense/AssignLicensePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/AssignLicense/AssignLicensePostRequestBody.cs @@ -69,7 +69,7 @@ public AssignLicensePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.AssignLicense.AssignLicensePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.AssignLicense.AssignLicensePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("addLicenses", AddLicenses); writer.WriteCollectionOfPrimitiveValues("removeLicenses", RemoveLicenses); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/AssignLicense/AssignLicenseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/AssignLicense/AssignLicenseRequestBuilder.cs index dab0c8cd19b..28ef3489ca8 100644 --- a/src/Microsoft.Graph/Generated/Me/AssignLicense/AssignLicenseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/AssignLicense/AssignLicenseRequestBuilder.cs @@ -52,7 +52,7 @@ public AssignLicenseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.AssignLicense.AssignLicensePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.AssignLicense.AssignLicensePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/AuthenticationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/AuthenticationRequestBuilder.cs index 33a7504bcf8..4af38cf4a06 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/AuthenticationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/AuthenticationRequestBuilder.cs @@ -198,7 +198,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Authentication body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -259,7 +259,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Authentication body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/EmailMethods/EmailMethodsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/EmailMethods/EmailMethodsRequestBuilder.cs index 2c775bc69a8..2624efa7e0e 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/EmailMethods/EmailMethodsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/EmailMethods/EmailMethodsRequestBuilder.cs @@ -94,7 +94,7 @@ public EmailMethodsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EmailAuthenticationMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EmailAuthenticationMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/EmailMethods/Item/EmailAuthenticationMethodItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/EmailMethods/Item/EmailAuthenticationMethodItemRequestBuilder.cs index e73b8fae5e1..fe6953efa79 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/EmailMethods/Item/EmailAuthenticationMethodItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/EmailMethods/Item/EmailAuthenticationMethodItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EmailAuthenticationMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EmailAuthenticationMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/ExternalAuthenticationMethods/ExternalAuthenticationMethodsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/ExternalAuthenticationMethods/ExternalAuthenticationMethodsRequestBuilder.cs index 9341ef33242..c52bf5023c0 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/ExternalAuthenticationMethods/ExternalAuthenticationMethodsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/ExternalAuthenticationMethods/ExternalAuthenticationMethodsRequestBuilder.cs @@ -94,7 +94,7 @@ public ExternalAuthenticationMethodsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ExternalAuthenticationMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalAuthenticationMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/ExternalAuthenticationMethods/Item/ExternalAuthenticationMethodItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/ExternalAuthenticationMethods/Item/ExternalAuthenticationMethodItemRequestBuilder.cs index 50fb698f76d..69129901fd5 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/ExternalAuthenticationMethods/Item/ExternalAuthenticationMethodItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/ExternalAuthenticationMethods/Item/ExternalAuthenticationMethodItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalAuthenticationMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalAuthenticationMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivate/AssignAndActivatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivate/AssignAndActivatePostRequestBody.cs index 839d835780e..d74727a718c 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivate/AssignAndActivatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivate/AssignAndActivatePostRequestBody.cs @@ -85,7 +85,7 @@ public AssignAndActivatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Authentication.HardwareOathMethods.AssignAndActivate.AssignAndActivatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Authentication.HardwareOathMethods.AssignAndActivate.AssignAndActivatePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("device", Device); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("verificationCode", VerificationCode); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivate/AssignAndActivateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivate/AssignAndActivateRequestBuilder.cs index 5c8a246b3ae..db93b5c4852 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivate/AssignAndActivateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivate/AssignAndActivateRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Authentication.Hardw public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Authentication.HardwareOathMethods.AssignAndActivate.AssignAndActivatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Authentication.HardwareOathMethods.AssignAndActivate.AssignAndActivatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivateBySerialNumber/AssignAndActivateBySerialNumberPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivateBySerialNumber/AssignAndActivateBySerialNumberPostRequestBody.cs index a0fe2a702a9..86ca6f203cd 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivateBySerialNumber/AssignAndActivateBySerialNumberPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivateBySerialNumber/AssignAndActivateBySerialNumberPostRequestBody.cs @@ -84,7 +84,7 @@ public AssignAndActivateBySerialNumberPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Authentication.HardwareOathMethods.AssignAndActivateBySerialNumber.AssignAndActivateBySerialNumberPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Authentication.HardwareOathMethods.AssignAndActivateBySerialNumber.AssignAndActivateBySerialNumberPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("serialNumber", SerialNumber); writer.WriteStringValue("verificationCode", VerificationCode); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivateBySerialNumber/AssignAndActivateBySerialNumberRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivateBySerialNumber/AssignAndActivateBySerialNumberRequestBuilder.cs index 7fe25092129..9bfa474f153 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivateBySerialNumber/AssignAndActivateBySerialNumberRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/AssignAndActivateBySerialNumber/AssignAndActivateBySerialNumberRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Authentication.Hardw public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Authentication.HardwareOathMethods.AssignAndActivateBySerialNumber.AssignAndActivateBySerialNumberPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Authentication.HardwareOathMethods.AssignAndActivateBySerialNumber.AssignAndActivateBySerialNumberPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/HardwareOathMethodsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/HardwareOathMethodsRequestBuilder.cs index 0ff63c462ba..602ff711d1f 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/HardwareOathMethodsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/HardwareOathMethodsRequestBuilder.cs @@ -107,7 +107,7 @@ public HardwareOathMethodsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HardwareOathAuthenticationMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -149,7 +149,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareOathAuthenticationMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Activate/ActivatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Activate/ActivatePostRequestBody.cs index bbd888f3fac..7447e9328a8 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Activate/ActivatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Activate/ActivatePostRequestBody.cs @@ -68,7 +68,7 @@ public ActivatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Authentication.HardwareOathMethods.Item.Activate.ActivatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Authentication.HardwareOathMethods.Item.Activate.ActivatePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("verificationCode", VerificationCode); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Activate/ActivateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Activate/ActivateRequestBuilder.cs index eb1065a9fa1..6e18f364203 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Activate/ActivateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Activate/ActivateRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Authentication.Hardw public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Authentication.HardwareOathMethods.Item.Activate.ActivatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Authentication.HardwareOathMethods.Item.Activate.ActivatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs index 6d435f51dc6..34a371f9339 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/DeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/DeviceRequestBuilder.cs index b6abcb7e4df..3647cd44c6f 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/DeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/DeviceRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/HardwareOathDevices/HardwareOathDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/HardwareOathDevices/HardwareOathDevicesRequestBuilder.cs index 5d67466a39d..80d87c20226 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/HardwareOathDevices/HardwareOathDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/HardwareOathDevices/HardwareOathDevicesRequestBuilder.cs @@ -93,7 +93,7 @@ public HardwareOathDevicesRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/HardwareOathDevices/Item/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/HardwareOathDevices/Item/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs index e5800781884..145938e6263 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/HardwareOathDevices/Item/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/HardwareOathDevices/Item/AssignTo/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/HardwareOathDevices/Item/HardwareOathTokenAuthenticationMethodDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/HardwareOathDevices/Item/HardwareOathTokenAuthenticationMethodDeviceItemRequestBuilder.cs index a4bff6221ca..c7e648d3677 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/HardwareOathDevices/Item/HardwareOathTokenAuthenticationMethodDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/HardwareOathMethods/Item/Device/HardwareOathDevices/Item/HardwareOathTokenAuthenticationMethodDeviceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/AuthenticationMethodItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/AuthenticationMethodItemRequestBuilder.cs index 9512463cc31..7a24486b978 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/AuthenticationMethodItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/AuthenticationMethodItemRequestBuilder.cs @@ -93,7 +93,7 @@ public AuthenticationMethodItemRequestBuilder(string rawUrl, IRequestAdapter req public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/ResetPassword/ResetPasswordPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/ResetPassword/ResetPasswordPostRequestBody.cs index 0509f51b4e4..f6ab4029b47 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/ResetPassword/ResetPasswordPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/ResetPassword/ResetPasswordPostRequestBody.cs @@ -52,7 +52,7 @@ public ResetPasswordPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Authentication.Methods.Item.ResetPassword.ResetPasswordPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Authentication.Methods.Item.ResetPassword.ResetPasswordPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("newPassword", NewPassword); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/ResetPassword/ResetPasswordRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/ResetPassword/ResetPasswordRequestBuilder.cs index e2fb0da5561..2652a584b3a 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/ResetPassword/ResetPasswordRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/Methods/Item/ResetPassword/ResetPasswordRequestBuilder.cs @@ -52,7 +52,7 @@ public ResetPasswordRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Authentication.Methods.Item.ResetPassword.ResetPasswordPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Authentication.Methods.Item.ResetPassword.ResetPasswordPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/Methods/MethodsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/Methods/MethodsRequestBuilder.cs index 1a0f143cac0..e8e216efbaf 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/Methods/MethodsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/Methods/MethodsRequestBuilder.cs @@ -94,7 +94,7 @@ public MethodsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/Operations/Item/LongRunningOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/Operations/Item/LongRunningOperationItemRequestBuilder.cs index 3134ede34fd..0f86feea323 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/Operations/Item/LongRunningOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/Operations/Item/LongRunningOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.LongRunningOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.LongRunningOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/Operations/OperationsRequestBuilder.cs index 58a747359cf..424e68002c2 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.LongRunningOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.LongRunningOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/PasswordMethods/PasswordMethodsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/PasswordMethods/PasswordMethodsRequestBuilder.cs index 0cd4f4e98d7..85dcbd24032 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/PasswordMethods/PasswordMethodsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/PasswordMethods/PasswordMethodsRequestBuilder.cs @@ -94,7 +94,7 @@ public PasswordMethodsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PasswordAuthenticationMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PasswordAuthenticationMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/PhoneMethods/Item/PhoneAuthenticationMethodItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/PhoneMethods/Item/PhoneAuthenticationMethodItemRequestBuilder.cs index e24ed9e7a92..0f73d010d5e 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/PhoneMethods/Item/PhoneAuthenticationMethodItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/PhoneMethods/Item/PhoneAuthenticationMethodItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PhoneAuthenticationMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PhoneAuthenticationMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/PhoneMethods/PhoneMethodsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/PhoneMethods/PhoneMethodsRequestBuilder.cs index f56f86d77d0..d2b288957ae 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/PhoneMethods/PhoneMethodsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/PhoneMethods/PhoneMethodsRequestBuilder.cs @@ -94,7 +94,7 @@ public PhoneMethodsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PhoneAuthenticationMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PhoneAuthenticationMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/Pin/PinRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/Pin/PinRequestBuilder.cs index feb3dec58d0..78027ccaf1c 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/Pin/PinRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/Pin/PinRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.QrPin body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.QrPin body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/Pin/UpdatePin/UpdatePinPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/Pin/UpdatePin/UpdatePinPostRequestBody.cs index f7ff1cd8599..06e3b8bccd5 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/Pin/UpdatePin/UpdatePinPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/Pin/UpdatePin/UpdatePinPostRequestBody.cs @@ -68,7 +68,7 @@ public UpdatePinPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Authentication.QrCodePinMethod.Pin.UpdatePin.UpdatePinPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Authentication.QrCodePinMethod.Pin.UpdatePin.UpdatePinPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("currentPin", CurrentPin); writer.WriteStringValue("newPin", NewPin); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/Pin/UpdatePin/UpdatePinRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/Pin/UpdatePin/UpdatePinRequestBuilder.cs index 9a662c333fb..c571332fa32 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/Pin/UpdatePin/UpdatePinRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/Pin/UpdatePin/UpdatePinRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Authentication.QrCod public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Authentication.QrCodePinMethod.Pin.UpdatePin.UpdatePinPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Authentication.QrCodePinMethod.Pin.UpdatePin.UpdatePinPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/StandardQRCode/StandardQRCodeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/StandardQRCode/StandardQRCodeRequestBuilder.cs index 6d5576358a8..bb658ff50e3 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/StandardQRCode/StandardQRCodeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/StandardQRCode/StandardQRCodeRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.QrCode body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.QrCode body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/TemporaryQRCode/TemporaryQRCodeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/TemporaryQRCode/TemporaryQRCodeRequestBuilder.cs index 2c44369eed3..012c8daacc0 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/TemporaryQRCode/TemporaryQRCodeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/QrCodePinMethod/TemporaryQRCode/TemporaryQRCodeRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.QrCode body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.QrCode body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/Requirements/RequirementsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/Requirements/RequirementsRequestBuilder.cs index 3d4bbec715f..39923f9b126 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/Requirements/RequirementsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/Requirements/RequirementsRequestBuilder.cs @@ -74,7 +74,7 @@ public RequirementsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.StrongAuthenticationRequirements body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.StrongAuthenticationRequirements body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/SignInPreferences/SignInPreferencesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/SignInPreferences/SignInPreferencesRequestBuilder.cs index 2a09b5f3989..55b7b6bd907 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/SignInPreferences/SignInPreferencesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/SignInPreferences/SignInPreferencesRequestBuilder.cs @@ -74,7 +74,7 @@ public SignInPreferencesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.SignInPreferences body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SignInPreferences body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Authentication/TemporaryAccessPassMethods/TemporaryAccessPassMethodsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Authentication/TemporaryAccessPassMethods/TemporaryAccessPassMethodsRequestBuilder.cs index 11d191eff2b..75dfe3356f9 100644 --- a/src/Microsoft.Graph/Generated/Me/Authentication/TemporaryAccessPassMethods/TemporaryAccessPassMethodsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Authentication/TemporaryAccessPassMethods/TemporaryAccessPassMethodsRequestBuilder.cs @@ -93,7 +93,7 @@ public TemporaryAccessPassMethodsRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TemporaryAccessPassAuthenticationMethod body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TemporaryAccessPassAuthenticationMethod body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs index 09a01af3153..e756104be5b 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs @@ -36,7 +36,7 @@ public partial class AllowedCalendarSharingRolesWithUserGetResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendar.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfEnumValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs index 3548b599e67..99a443b2e37 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs @@ -20,7 +20,7 @@ public partial class AllowedCalendarSharingRolesWithUserResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendar.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/CalendarPermissions/CalendarPermissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/CalendarPermissions/CalendarPermissionsRequestBuilder.cs index ef9e6e19f91..a5d67f194e1 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/CalendarPermissions/CalendarPermissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/CalendarPermissions/CalendarPermissionsRequestBuilder.cs @@ -93,7 +93,7 @@ public CalendarPermissionsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs index 9cec50e5f53..f9d2cda958e 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/CalendarRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/CalendarRequestBuilder.cs index 43c3e951e5c..32985b7eb1e 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/CalendarRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/CalendarRequestBuilder.cs @@ -117,7 +117,7 @@ public CalendarRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.Calendar body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Calendar body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/CalendarView/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendar/CalendarView/Delta/DeltaGetResponse.cs index 155391e9890..a7c3be0f5e2 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/CalendarView/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/CalendarView/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendar.CalendarView.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.CalendarView.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/CalendarView/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendar/CalendarView/Delta/DeltaResponse.cs index af9c0040166..aa3c38fe836 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/CalendarView/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/CalendarView/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Calendar.Ca /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendar.CalendarView.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.CalendarView.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Delta/DeltaGetResponse.cs index f7da87eba85..09b947dfcf7 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendar.Events.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.Events.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Delta/DeltaResponse.cs index a5d8548a671..87117f15dbd 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Calendar.Ev /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendar.Events.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.Events.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/EventsRequestBuilder.cs index 9038bd017a1..d2d1774a4e4 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/EventsRequestBuilder.cs @@ -100,7 +100,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Accept/AcceptPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Accept/AcceptPostRequestBody.cs index 170e9f881b7..701bf381217 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Accept/AcceptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Accept/AcceptPostRequestBody.cs @@ -58,7 +58,7 @@ public AcceptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Accept.AcceptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Accept.AcceptPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteBoolValue("SendResponse", SendResponse); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Accept/AcceptRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Accept/AcceptRequestBuilder.cs index df68c2d85dd..8f096ba3323 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Accept/AcceptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Accept/AcceptRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Accept.AcceptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Accept.AcceptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Attachments/AttachmentsRequestBuilder.cs index 5f6d9307066..134c648f651 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Attachments/AttachmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index 6f9f62c2efa..a790f514523 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 1c03e44a13e..c945ca6b890 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Cancel/CancelPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Cancel/CancelPostRequestBody.cs index e1eb3cf7af2..45bcf1605ad 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Cancel/CancelPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Cancel/CancelPostRequestBody.cs @@ -52,7 +52,7 @@ public CancelPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Cancel.CancelPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Cancel.CancelPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Cancel/CancelRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Cancel/CancelRequestBuilder.cs index 9e5933fc567..ab47d148330 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Cancel/CancelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Cancel/CancelRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Decline/DeclinePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Decline/DeclinePostRequestBody.cs index 88bcb1cd16c..eb2776ac729 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Decline/DeclinePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Decline/DeclinePostRequestBody.cs @@ -75,7 +75,7 @@ public DeclinePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Decline.DeclinePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Decline.DeclinePostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("ProposedNewTime", ProposedNewTime); writer.WriteBoolValue("SendResponse", SendResponse); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Decline/DeclineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Decline/DeclineRequestBuilder.cs index cb7b5a668e5..0ed8ad20ecb 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Decline/DeclineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Decline/DeclineRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Decline.DeclinePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Decline.DeclinePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/EventItemRequestBuilder.cs index c9e4f73ce2a..68c32ac05ef 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/EventItemRequestBuilder.cs @@ -168,7 +168,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -229,7 +229,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Extensions/ExtensionsRequestBuilder.cs index 06ef73b271d..9c6af799d05 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index ca7f2ecd8bd..2520f735b40 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Forward/ForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Forward/ForwardPostRequestBody.cs index 9d46f2f7a63..ad97aad7c9a 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Forward/ForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Forward/ForwardPostRequestBody.cs @@ -69,7 +69,7 @@ public ForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Forward.ForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Forward.ForwardPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Forward/ForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Forward/ForwardRequestBuilder.cs index 849542065fa..3dffb06ff2d 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Forward/ForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Forward/ForwardRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Instances/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Instances/Delta/DeltaGetResponse.cs index aab9122a01f..a1b7d1de6ce 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Instances/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Instances/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Instances.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Instances.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Instances/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Instances/Delta/DeltaResponse.cs index 8da749f2f8e..98b337fd1d5 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Instances/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/Instances/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Calendar.Ev /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Instances.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.Instances.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs index 85aff38aef2..c97b580e62e 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs @@ -53,7 +53,7 @@ public SnoozeReminderPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("NewReminderTime", NewReminderTime); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs index d91e5bf61af..9d54794afd8 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs index 13c236a7d3d..66056ec02f7 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs @@ -75,7 +75,7 @@ public TentativelyAcceptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("ProposedNewTime", ProposedNewTime); writer.WriteBoolValue("SendResponse", SendResponse); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs index ed30422769e..b1bd567885c 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendar.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetSchedulePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetSchedulePostRequestBody.cs index f112a3aa968..5bffadf1d87 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetSchedulePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetSchedulePostRequestBody.cs @@ -91,7 +91,7 @@ public GetSchedulePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendar.GetSchedule.GetSchedulePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.GetSchedule.GetSchedulePostRequestBody(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("AvailabilityViewInterval", AvailabilityViewInterval); writer.WriteObjectValue("EndTime", EndTime); writer.WriteCollectionOfPrimitiveValues("Schedules", Schedules); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetSchedulePostResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetSchedulePostResponse.cs index 46fe0d1ed7d..c377764998d 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetSchedulePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetSchedulePostResponse.cs @@ -36,7 +36,7 @@ public partial class GetSchedulePostResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendar.GetSchedule.GetSchedulePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.GetSchedule.GetSchedulePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetScheduleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetScheduleRequestBuilder.cs index e40b6e977db..8505b9a7039 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetScheduleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetScheduleRequestBuilder.cs @@ -51,7 +51,7 @@ public GetScheduleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsGetSchedulePostResponseAsync(global::Microsoft.Graph.Beta.Me.Calendar.GetSchedule.GetSchedulePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetScheduleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendar.GetSchedule.GetSchedulePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendar.GetSchedule.GetSchedulePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetScheduleResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetScheduleResponse.cs index 15a49a790e5..e9d67d692c3 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetScheduleResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendar/GetSchedule/GetScheduleResponse.cs @@ -20,7 +20,7 @@ public partial class GetScheduleResponse : global::Microsoft.Graph.Beta.Me.Calen /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendar.GetSchedule.GetScheduleResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendar.GetSchedule.GetScheduleResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/CalendarGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/CalendarGroupsRequestBuilder.cs index a25c9b0ae52..bb6e2e7fe12 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/CalendarGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/CalendarGroupsRequestBuilder.cs @@ -95,7 +95,7 @@ public CalendarGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CalendarGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CalendarGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/CalendarGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/CalendarGroupItemRequestBuilder.cs index a94dca7b962..e721beb3d20 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/CalendarGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/CalendarGroupItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CalendarGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CalendarGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/CalendarsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/CalendarsRequestBuilder.cs index f7e07800a10..f6f3cbe5b7e 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/CalendarsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/CalendarsRequestBuilder.cs @@ -101,7 +101,7 @@ public CalendarsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Calendar body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Calendar body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Delta/DeltaGetResponse.cs index e0c5e1f6aed..3a5166cb909 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Delta/DeltaResponse.cs index d4c2320b9a4..86de305993f 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.CalendarGro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs index 0be0151746c..585429a16ac 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs @@ -36,7 +36,7 @@ public partial class AllowedCalendarSharingRolesWithUserGetResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfEnumValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs index f86c9e7e1d0..e795062b430 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs @@ -20,7 +20,7 @@ public partial class AllowedCalendarSharingRolesWithUserResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarItemRequestBuilder.cs index 9bcc8cb3408..861c3703b4b 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarItemRequestBuilder.cs @@ -137,7 +137,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Calendar body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -198,7 +198,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Calendar body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarPermissions/CalendarPermissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarPermissions/CalendarPermissionsRequestBuilder.cs index eb097da98ed..ecebca1fff6 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarPermissions/CalendarPermissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarPermissions/CalendarPermissionsRequestBuilder.cs @@ -93,7 +93,7 @@ public CalendarPermissionsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs index d853f225ae1..9f65ef52b12 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarView/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarView/Delta/DeltaGetResponse.cs index 2df2c4d8939..58e6dc9cf0d 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarView/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarView/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.CalendarView.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.CalendarView.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarView/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarView/Delta/DeltaResponse.cs index d8444313ac6..9ee386109aa 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarView/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/CalendarView/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.CalendarGro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.CalendarView.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.CalendarView.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Delta/DeltaGetResponse.cs index 4296da8fb30..8d7e5c977fe 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Delta/DeltaResponse.cs index 77a1d577458..15850c4c28e 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.CalendarGro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/EventsRequestBuilder.cs index 295625dddb6..dfc4f3c9928 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/EventsRequestBuilder.cs @@ -99,7 +99,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Accept/AcceptPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Accept/AcceptPostRequestBody.cs index 02b40c868c6..8dc0fbeb945 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Accept/AcceptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Accept/AcceptPostRequestBody.cs @@ -58,7 +58,7 @@ public AcceptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Accept.AcceptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Accept.AcceptPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteBoolValue("SendResponse", SendResponse); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Accept/AcceptRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Accept/AcceptRequestBuilder.cs index ce6d66a253e..5629f66d653 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Accept/AcceptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Accept/AcceptRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Accept.AcceptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Accept.AcceptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Attachments/AttachmentsRequestBuilder.cs index 8abfd2a25d5..9a60437ad01 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Attachments/AttachmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index 073fce6d1d4..90d551284e5 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 3626b1f68db..8e9e39ca1bf 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Cancel/CancelPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Cancel/CancelPostRequestBody.cs index de9ee7be879..b447bcf8453 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Cancel/CancelPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Cancel/CancelPostRequestBody.cs @@ -52,7 +52,7 @@ public CancelPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Cancel.CancelPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Cancel.CancelPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Cancel/CancelRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Cancel/CancelRequestBuilder.cs index 25fab47004a..1dc95de1b64 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Cancel/CancelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Cancel/CancelRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Decline/DeclinePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Decline/DeclinePostRequestBody.cs index 6ebb621ae2c..04772475c88 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Decline/DeclinePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Decline/DeclinePostRequestBody.cs @@ -75,7 +75,7 @@ public DeclinePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Decline.DeclinePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Decline.DeclinePostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("ProposedNewTime", ProposedNewTime); writer.WriteBoolValue("SendResponse", SendResponse); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Decline/DeclineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Decline/DeclineRequestBuilder.cs index 7f07962da7d..e0e3f12d0a4 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Decline/DeclineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Decline/DeclineRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Decline.DeclinePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Decline.DeclinePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs index 475af02604c..888152c3473 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/EventItemRequestBuilder.cs @@ -168,7 +168,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -229,7 +229,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Extensions/ExtensionsRequestBuilder.cs index fb5c5d0844e..5fb553186ef 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 10614a86204..dc9ebbee36f 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Forward/ForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Forward/ForwardPostRequestBody.cs index 0dde1718079..6f8dbdc7b14 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Forward/ForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Forward/ForwardPostRequestBody.cs @@ -69,7 +69,7 @@ public ForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Forward.ForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Forward.ForwardPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Forward/ForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Forward/ForwardRequestBuilder.cs index 799f3219254..40cb58272a3 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Forward/ForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Forward/ForwardRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Instances/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Instances/Delta/DeltaGetResponse.cs index b87e50cd765..de7feabd0a1 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Instances/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Instances/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Instances.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Instances.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Instances/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Instances/Delta/DeltaResponse.cs index 7c3a30d1115..848d27894d2 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Instances/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/Instances/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.CalendarGro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Instances.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.Instances.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs index 5e662a0e657..68ee43835d0 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs @@ -53,7 +53,7 @@ public SnoozeReminderPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("NewReminderTime", NewReminderTime); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs index 3615b303a6a..b7cf8f03ee0 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs index cd1de7b155d..6ab429a842b 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs @@ -75,7 +75,7 @@ public TentativelyAcceptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("ProposedNewTime", ProposedNewTime); writer.WriteBoolValue("SendResponse", SendResponse); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs index f8cd1d1f934..b9442d420ed 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetSchedulePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetSchedulePostRequestBody.cs index 220db42fa42..c00152d8683 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetSchedulePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetSchedulePostRequestBody.cs @@ -91,7 +91,7 @@ public GetSchedulePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.GetSchedule.GetSchedulePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.GetSchedule.GetSchedulePostRequestBody(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("AvailabilityViewInterval", AvailabilityViewInterval); writer.WriteObjectValue("EndTime", EndTime); writer.WriteCollectionOfPrimitiveValues("Schedules", Schedules); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetSchedulePostResponse.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetSchedulePostResponse.cs index 13faf3e1089..f944a0408e0 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetSchedulePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetSchedulePostResponse.cs @@ -36,7 +36,7 @@ public partial class GetSchedulePostResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.GetSchedule.GetSchedulePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.GetSchedule.GetSchedulePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetScheduleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetScheduleRequestBuilder.cs index bcadc013fd1..3435a806578 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetScheduleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetScheduleRequestBuilder.cs @@ -51,7 +51,7 @@ public GetScheduleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsGetSchedulePostResponseAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.GetSchedule.GetSchedulePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetScheduleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.GetSchedule.GetSchedulePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.GetSchedule.GetSchedulePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetScheduleResponse.cs b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetScheduleResponse.cs index b150955dbf3..115ce5462c8 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetScheduleResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarGroups/Item/Calendars/Item/GetSchedule/GetScheduleResponse.cs @@ -20,7 +20,7 @@ public partial class GetScheduleResponse : global::Microsoft.Graph.Beta.Me.Calen /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.GetSchedule.GetScheduleResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarGroups.Item.Calendars.Item.GetSchedule.GetScheduleResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarView/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/CalendarView/Delta/DeltaGetResponse.cs index 7eeeb839738..996d1b3e579 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarView/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarView/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CalendarView.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarView.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CalendarView/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/CalendarView/Delta/DeltaResponse.cs index 8e5b7387013..f7c9f8c8e12 100644 --- a/src/Microsoft.Graph/Generated/Me/CalendarView/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CalendarView/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.CalendarVie /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CalendarView.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CalendarView.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/CalendarsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/CalendarsRequestBuilder.cs index f8a6ad07cd6..6a9c5169878 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/CalendarsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/CalendarsRequestBuilder.cs @@ -101,7 +101,7 @@ public CalendarsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Calendar body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Calendar body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Delta/DeltaGetResponse.cs index aa687b87c48..a23c1289c9c 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendars.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Delta/DeltaResponse.cs index 61b1f40cc7b..df1a62b844e 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Calendars.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendars.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs index 25934fb9de4..3541af94af7 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserGetResponse.cs @@ -36,7 +36,7 @@ public partial class AllowedCalendarSharingRolesWithUserGetResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendars.Item.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfEnumValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs index 698da140b09..fba296f0190 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/AllowedCalendarSharingRolesWithUser/AllowedCalendarSharingRolesWithUserResponse.cs @@ -20,7 +20,7 @@ public partial class AllowedCalendarSharingRolesWithUserResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendars.Item.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.AllowedCalendarSharingRolesWithUser.AllowedCalendarSharingRolesWithUserResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarItemRequestBuilder.cs index cf71a8525fc..7b2383759a3 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarItemRequestBuilder.cs @@ -137,7 +137,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Calendar body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -198,7 +198,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Calendar body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarPermissions/CalendarPermissionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarPermissions/CalendarPermissionsRequestBuilder.cs index 4d8c76baf1d..40645f88059 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarPermissions/CalendarPermissionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarPermissions/CalendarPermissionsRequestBuilder.cs @@ -93,7 +93,7 @@ public CalendarPermissionsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs index b2b3a247cd0..87c49ac1d7e 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarPermissions/Item/CalendarPermissionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CalendarPermission body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarView/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarView/Delta/DeltaGetResponse.cs index d02f5c22ba5..8884b91abca 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarView/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarView/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendars.Item.CalendarView.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.CalendarView.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarView/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarView/Delta/DeltaResponse.cs index 672a0dc7a95..cb9c9b4237c 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarView/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/CalendarView/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Calendars.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendars.Item.CalendarView.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.CalendarView.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Delta/DeltaGetResponse.cs index a846e267749..f52f116324d 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Delta/DeltaResponse.cs index a2c2ee0499a..1fa98d54556 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Calendars.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/EventsRequestBuilder.cs index 23504c86e53..b28b429d4bb 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/EventsRequestBuilder.cs @@ -100,7 +100,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Accept/AcceptPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Accept/AcceptPostRequestBody.cs index 8c47bc28c2f..668c94ba9ed 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Accept/AcceptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Accept/AcceptPostRequestBody.cs @@ -58,7 +58,7 @@ public AcceptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Accept.AcceptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Accept.AcceptPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteBoolValue("SendResponse", SendResponse); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Accept/AcceptRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Accept/AcceptRequestBuilder.cs index 92e868c5ade..592b3a212fe 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Accept/AcceptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Accept/AcceptRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.Event public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Accept.AcceptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Accept.AcceptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Attachments/AttachmentsRequestBuilder.cs index bcb84d66d47..3140c815cf7 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Attachments/AttachmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index 25f69f3afbc..9c215b123b9 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 6986392e908..97b64e40a77 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Cancel/CancelPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Cancel/CancelPostRequestBody.cs index 2ca45e4483e..24c0e35c592 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Cancel/CancelPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Cancel/CancelPostRequestBody.cs @@ -52,7 +52,7 @@ public CancelPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Cancel.CancelPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Cancel.CancelPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Cancel/CancelRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Cancel/CancelRequestBuilder.cs index 7b8c96f2dff..493eebda81d 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Cancel/CancelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Cancel/CancelRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.Event public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Decline/DeclinePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Decline/DeclinePostRequestBody.cs index 0ee89b5c2a3..46fb5d5ddd7 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Decline/DeclinePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Decline/DeclinePostRequestBody.cs @@ -75,7 +75,7 @@ public DeclinePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Decline.DeclinePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Decline.DeclinePostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("ProposedNewTime", ProposedNewTime); writer.WriteBoolValue("SendResponse", SendResponse); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Decline/DeclineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Decline/DeclineRequestBuilder.cs index 971b44567d4..9f0bf5ce2aa 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Decline/DeclineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Decline/DeclineRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.Event public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Decline.DeclinePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Decline.DeclinePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/EventItemRequestBuilder.cs index 5d25403598e..445cba21e7a 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/EventItemRequestBuilder.cs @@ -168,7 +168,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -229,7 +229,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Extensions/ExtensionsRequestBuilder.cs index 8336e0645d6..dd1f9b92a8b 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index ceb2ca8b462..92882de7fb1 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Forward/ForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Forward/ForwardPostRequestBody.cs index 566a067833c..a49eb81a84d 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Forward/ForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Forward/ForwardPostRequestBody.cs @@ -69,7 +69,7 @@ public ForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Forward.ForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Forward.ForwardPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Forward/ForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Forward/ForwardRequestBuilder.cs index 331d9e55ba1..2ae4496f2d9 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Forward/ForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Forward/ForwardRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.Event public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Instances/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Instances/Delta/DeltaGetResponse.cs index 7d8db5920a3..dd490262469 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Instances/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Instances/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Instances.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Instances.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Instances/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Instances/Delta/DeltaResponse.cs index 98d351e0883..c41f3d7678a 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Instances/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/Instances/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Calendars.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Instances.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.Instances.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs index fcdc10cd520..e0f2bc24d09 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs @@ -53,7 +53,7 @@ public SnoozeReminderPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("NewReminderTime", NewReminderTime); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs index d2ce9dbb04e..d4a80e75cd4 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.Event public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs index 478272f4588..88ded34a3af 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs @@ -75,7 +75,7 @@ public TentativelyAcceptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("ProposedNewTime", ProposedNewTime); writer.WriteBoolValue("SendResponse", SendResponse); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs index e4e9d20434c..069f81b7c91 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.Event public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendars.Item.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetSchedulePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetSchedulePostRequestBody.cs index a7d0078ce29..b3d752fb8ab 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetSchedulePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetSchedulePostRequestBody.cs @@ -91,7 +91,7 @@ public GetSchedulePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Calendars.Item.GetSchedule.GetSchedulePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.GetSchedule.GetSchedulePostRequestBody(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("AvailabilityViewInterval", AvailabilityViewInterval); writer.WriteObjectValue("EndTime", EndTime); writer.WriteCollectionOfPrimitiveValues("Schedules", Schedules); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetSchedulePostResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetSchedulePostResponse.cs index f950476ebb9..370d54e4fe8 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetSchedulePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetSchedulePostResponse.cs @@ -36,7 +36,7 @@ public partial class GetSchedulePostResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendars.Item.GetSchedule.GetSchedulePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.GetSchedule.GetSchedulePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetScheduleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetScheduleRequestBuilder.cs index 973aa4f8081..fba5dc81170 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetScheduleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetScheduleRequestBuilder.cs @@ -51,7 +51,7 @@ public GetScheduleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsGetSchedulePostResponseAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.GetSchedule.GetSchedulePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetScheduleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Calendars.Item.GetSchedule.GetSchedulePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Calendars.Item.GetSchedule.GetSchedulePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetScheduleResponse.cs b/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetScheduleResponse.cs index 70416939d97..0a3e26e2bc0 100644 --- a/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetScheduleResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Calendars/Item/GetSchedule/GetScheduleResponse.cs @@ -20,7 +20,7 @@ public partial class GetScheduleResponse : global::Microsoft.Graph.Beta.Me.Calen /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Calendars.Item.GetSchedule.GetScheduleResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Calendars.Item.GetSchedule.GetScheduleResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/ChangePassword/ChangePasswordPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ChangePassword/ChangePasswordPostRequestBody.cs index cdfee3f550c..50ea9da1485 100644 --- a/src/Microsoft.Graph/Generated/Me/ChangePassword/ChangePasswordPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ChangePassword/ChangePasswordPostRequestBody.cs @@ -68,7 +68,7 @@ public ChangePasswordPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ChangePassword.ChangePasswordPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ChangePassword.ChangePasswordPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("currentPassword", CurrentPassword); writer.WriteStringValue("newPassword", NewPassword); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/ChangePassword/ChangePasswordRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ChangePassword/ChangePasswordRequestBuilder.cs index f6a56f81782..68cc8ac6faf 100644 --- a/src/Microsoft.Graph/Generated/Me/ChangePassword/ChangePasswordRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ChangePassword/ChangePasswordRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ChangePassword.Chang public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ChangePassword.ChangePasswordPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ChangePassword.ChangePasswordPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/AllMessages/AllMessagesGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/AllMessages/AllMessagesGetResponse.cs index 08641cb7804..30b8a198b33 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/AllMessages/AllMessagesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/AllMessages/AllMessagesGetResponse.cs @@ -36,7 +36,7 @@ public partial class AllMessagesGetResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.AllMessages.AllMessagesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.AllMessages.AllMessagesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/AllMessages/AllMessagesResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/AllMessages/AllMessagesResponse.cs index 3ad078ba21b..167bc12628d 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/AllMessages/AllMessagesResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/AllMessages/AllMessagesResponse.cs @@ -20,7 +20,7 @@ public partial class AllMessagesResponse : global::Microsoft.Graph.Beta.Me.Chats /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.AllMessages.AllMessagesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.AllMessages.AllMessagesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/ChatsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/ChatsRequestBuilder.cs index 7f5b9492061..74c6f8d64b6 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/ChatsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/ChatsRequestBuilder.cs @@ -111,7 +111,7 @@ public ChatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Chat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Chat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/GetAllMessages/GetAllMessagesGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/GetAllMessages/GetAllMessagesGetResponse.cs index b2f4721de32..bf2304e627d 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/GetAllMessages/GetAllMessagesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/GetAllMessages/GetAllMessagesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllMessagesGetResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.GetAllMessages.GetAllMessagesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.GetAllMessages.GetAllMessagesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/GetAllMessages/GetAllMessagesResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/GetAllMessages/GetAllMessagesResponse.cs index 3d9013832fe..e2732cfc0ed 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/GetAllMessages/GetAllMessagesResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/GetAllMessages/GetAllMessagesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllMessagesResponse : global::Microsoft.Graph.Beta.Me.Ch /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.GetAllMessages.GetAllMessagesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.GetAllMessages.GetAllMessagesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/GetAllRetainedMessages/GetAllRetainedMessagesGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/GetAllRetainedMessages/GetAllRetainedMessagesGetResponse.cs index f3648cb3647..1168a68b393 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/GetAllRetainedMessages/GetAllRetainedMessagesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/GetAllRetainedMessages/GetAllRetainedMessagesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllRetainedMessagesGetResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.GetAllRetainedMessages.GetAllRetainedMessagesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.GetAllRetainedMessages.GetAllRetainedMessagesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/GetAllRetainedMessages/GetAllRetainedMessagesResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/GetAllRetainedMessages/GetAllRetainedMessagesResponse.cs index bd4726da752..dc750fbebb8 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/GetAllRetainedMessages/GetAllRetainedMessagesResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/GetAllRetainedMessages/GetAllRetainedMessagesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllRetainedMessagesResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.GetAllRetainedMessages.GetAllRetainedMessagesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.GetAllRetainedMessages.GetAllRetainedMessagesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/ChatItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/ChatItemRequestBuilder.cs index b52ec39bc9b..0073f42bd5b 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/ChatItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/ChatItemRequestBuilder.cs @@ -186,7 +186,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Chat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -247,7 +247,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Chat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/HideForUser/HideForUserPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/HideForUser/HideForUserPostRequestBody.cs index ae60a4169da..392c713eaf9 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/HideForUser/HideForUserPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/HideForUser/HideForUserPostRequestBody.cs @@ -69,7 +69,7 @@ public HideForUserPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.HideForUser.HideForUserPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.HideForUser.HideForUserPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("tenantId", TenantId); writer.WriteObjectValue("user", User); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/HideForUser/HideForUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/HideForUser/HideForUserRequestBuilder.cs index a56454fdc3a..9d07a586a0f 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/HideForUser/HideForUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/HideForUser/HideForUserRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.HideForUs public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.HideForUser.HideForUserPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.HideForUser.HideForUserPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/InstalledAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/InstalledAppsRequestBuilder.cs index 781937ec39f..d20619142a4 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/InstalledAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/InstalledAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public InstalledAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamsAppInstallation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAppInstallation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/TeamsAppInstallationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/TeamsAppInstallationItemRequestBuilder.cs index 52584d2cd6d..c025f4ce76b 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/TeamsAppInstallationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/TeamsAppInstallationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsAppInstallation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAppInstallation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs index aa6b85bee07..7f302b0f3c1 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradePostRequestBody.cs @@ -53,7 +53,7 @@ public UpgradePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.InstalledApps.Item.Upgrade.UpgradePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.InstalledApps.Item.Upgrade.UpgradePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("consentedPermissionSet", ConsentedPermissionSet); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs index 1592b60e81d..4f32624bfc6 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/InstalledApps/Item/Upgrade/UpgradeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Installed public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.InstalledApps.Item.Upgrade.UpgradePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.InstalledApps.Item.Upgrade.UpgradePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/LastMessagePreview/LastMessagePreviewRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/LastMessagePreview/LastMessagePreviewRequestBuilder.cs index ab39f6e4b63..acd29524d1a 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/LastMessagePreview/LastMessagePreviewRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/LastMessagePreview/LastMessagePreviewRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessageInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatReadForUser/MarkChatReadForUserPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatReadForUser/MarkChatReadForUserPostRequestBody.cs index cf961976dbf..24f82ff1ed0 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatReadForUser/MarkChatReadForUserPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatReadForUser/MarkChatReadForUserPostRequestBody.cs @@ -69,7 +69,7 @@ public MarkChatReadForUserPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.MarkChatReadForUser.MarkChatReadForUserPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.MarkChatReadForUser.MarkChatReadForUserPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("tenantId", TenantId); writer.WriteObjectValue("user", User); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatReadForUser/MarkChatReadForUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatReadForUser/MarkChatReadForUserRequestBuilder.cs index 9e43134ac70..9dbed6400a3 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatReadForUser/MarkChatReadForUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatReadForUser/MarkChatReadForUserRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.MarkChatR public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.MarkChatReadForUser.MarkChatReadForUserPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.MarkChatReadForUser.MarkChatReadForUserPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserPostRequestBody.cs index 58f95fccec4..d29cf06268f 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserPostRequestBody.cs @@ -75,7 +75,7 @@ public MarkChatUnreadForUserPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.MarkChatUnreadForUser.MarkChatUnreadForUserPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.MarkChatUnreadForUser.MarkChatUnreadForUserPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastMessageReadDateTime", LastMessageReadDateTime); writer.WriteStringValue("tenantId", TenantId); writer.WriteObjectValue("user", User); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserRequestBuilder.cs index 4d99222c1cf..efc173cb6b9 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/MarkChatUnreadForUser/MarkChatUnreadForUserRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.MarkChatU public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.MarkChatUnreadForUser.MarkChatUnreadForUserPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.MarkChatUnreadForUser.MarkChatUnreadForUserPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddPostRequestBody.cs index 47b93e932cf..5f936775de6 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddPostRequestBody.cs @@ -53,7 +53,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Add.AddPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddPostResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddPostResponse.cs index 25b5492eac2..b44a7bb0115 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddPostResponse.cs @@ -36,7 +36,7 @@ public partial class AddPostResponse : global::Microsoft.Graph.Beta.Models.BaseC /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Add.AddPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Add.AddPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddRequestBuilder.cs index 6d592e29f1e..c7c7419afb3 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddRequestBuilder.cs @@ -51,7 +51,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsAddPostResponseAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddResponse.cs index 52cd6bc09a6..af7e023156b 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Add/AddResponse.cs @@ -20,7 +20,7 @@ public partial class AddResponse : global::Microsoft.Graph.Beta.Me.Chats.Item.Me /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Add.AddResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Add.AddResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs index e1c01fbcfe3..243784406b6 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Item/ConversationMemberItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/MembersRequestBuilder.cs index 844e0722a0d..dc2b0b20ede 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/MembersRequestBuilder.cs @@ -106,7 +106,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConversationMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemovePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemovePostRequestBody.cs index 977b60bf978..57c3b62d825 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemovePostRequestBody.cs @@ -53,7 +53,7 @@ public RemovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Remove.RemovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Remove.RemovePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("values", Values); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemovePostResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemovePostResponse.cs index 3be33085133..edd5dbdf55a 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemovePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemovePostResponse.cs @@ -36,7 +36,7 @@ public partial class RemovePostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Remove.RemovePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Remove.RemovePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemoveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemoveRequestBuilder.cs index f3b13025018..ab51ee9c893 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemoveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemoveRequestBuilder.cs @@ -51,7 +51,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsRemovePostResponseAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Remove.RemovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemoveResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemoveResponse.cs index 2931533af5f..4bde78bb69d 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemoveResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Members/Remove/RemoveResponse.cs @@ -20,7 +20,7 @@ public partial class RemoveResponse : global::Microsoft.Graph.Beta.Me.Chats.Item /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Remove.RemoveResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Members.Remove.RemoveResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Delta/DeltaGetResponse.cs index 0fa7cdd29a2..3523fb4bd8b 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Delta/DeltaResponse.cs index 5135471ea91..d2a5bf851cf 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Chats.Item. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs index a99f872e039..ec095f32306 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatPostRequestBody.cs @@ -85,7 +85,7 @@ public ForwardToChatPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("additionalMessage", AdditionalMessage); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteCollectionOfPrimitiveValues("targetChatIds", TargetChatIds); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatPostResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatPostResponse.cs index c083aeed049..1561c2ced72 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatPostResponse.cs @@ -36,7 +36,7 @@ public partial class ForwardToChatPostResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.ForwardToChat.ForwardToChatPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.ForwardToChat.ForwardToChatPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs index f0dced3ef03..0f84249bdac 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatRequestBuilder.cs @@ -51,7 +51,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsForwardToChatPostResponseAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatResponse.cs index a57d204fe84..606c31f01fa 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ForwardToChat/ForwardToChatResponse.cs @@ -20,7 +20,7 @@ public partial class ForwardToChatResponse : global::Microsoft.Graph.Beta.Me.Cha /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.ForwardToChat.ForwardToChatResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.ForwardToChat.ForwardToChatResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/ChatMessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/ChatMessageItemRequestBuilder.cs index 35497fcc656..713be329d42 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/ChatMessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/ChatMessageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs index 0c3f28a0971..126958f3867 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/HostedContents/HostedContentsRequestBuilder.cs @@ -93,7 +93,7 @@ public HostedContentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs index d7cf1d5bf23..1d9f0954a34 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs index 365abf57b11..26a0d274494 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/HostedContents/Item/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Delta/DeltaGetResponse.cs index d7efa49c23d..bdc4635f98d 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Delta/DeltaResponse.cs index 87b766b7fca..7d19e61c6d4 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Chats.Item. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs index cc06b532339..23fa34230f4 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostRequestBody.cs @@ -85,7 +85,7 @@ public ForwardToChatPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("additionalMessage", AdditionalMessage); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteCollectionOfPrimitiveValues("targetChatIds", TargetChatIds); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs index ac241a890d0..8c876e44c6a 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatPostResponse.cs @@ -36,7 +36,7 @@ public partial class ForwardToChatPostResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs index 678843632ad..61b3e0ae320 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatRequestBuilder.cs @@ -51,7 +51,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsForwardToChatPostResponseAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public ForwardToChatRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs index 7220752bf64..bb54b615a89 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ForwardToChat/ForwardToChatResponse.cs @@ -20,7 +20,7 @@ public partial class ForwardToChatResponse : global::Microsoft.Graph.Beta.Me.Cha /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.ForwardToChat.ForwardToChatResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs index 45045866071..56ab6ab91d5 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/ChatMessageItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs index 18abb12480b..058ecfd5046 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/HostedContents/HostedContentsRequestBuilder.cs @@ -93,7 +93,7 @@ public HostedContentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs index 7f17e502684..9d7edb22ed6 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/ChatMessageHostedContentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs index 9e00e295393..3153b84a6db 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/HostedContents/Item/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs index ca537bb192e..5eff8d0dcee 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public SetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs index 898cad56666..859e284cf8d 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/SetReaction/SetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs index b097b1f1eb8..8da10aa8719 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public UnsetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs index b6e3bcc7c11..76ea21a3b68 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/Item/UnsetReaction/UnsetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 75a2d30bffe..e3a523fee49 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -111,7 +111,7 @@ public RepliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs index c799d6a5d26..c99ddf058a1 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs @@ -69,7 +69,7 @@ public ReplyWithQuotePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteObjectValue("replyMessage", ReplyMessage); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs index 8b59548cbc9..a74c293d341 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs @@ -52,7 +52,7 @@ public ReplyWithQuoteRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.Replies.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.cs index cbc3d51d6af..256bc1c4124 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/SetReaction/SetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public SetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.SetReaction.SetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.SetReaction.SetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.cs index bf1ff4bade7..b3fb8644344 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/SetReaction/SetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.SetReaction.SetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs index 68ed61f8171..1152e7fe43b 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionPostRequestBody.cs @@ -52,7 +52,7 @@ public UnsetReactionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reactionType", ReactionType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs index 29057ced80a..da4dbdb1c5f 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/UnsetReaction/UnsetReactionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.Item.UnsetReaction.UnsetReactionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs index 6514c975f97..f206a24dbd8 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs @@ -111,7 +111,7 @@ public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChatMessage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs index d5f34b8a603..08b72154647 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuotePostRequestBody.cs @@ -69,7 +69,7 @@ public ReplyWithQuotePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("messageIds", MessageIds); writer.WriteObjectValue("replyMessage", ReplyMessage); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs index e3edb6aa8c2..550d15a286a 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/ReplyWithQuote/ReplyWithQuoteRequestBuilder.cs @@ -52,7 +52,7 @@ public ReplyWithQuoteRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.Messages.ReplyWithQuote.ReplyWithQuotePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Operations/Item/TeamsAsyncOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Operations/Item/TeamsAsyncOperationItemRequestBuilder.cs index b2061e96196..3971d329608 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Operations/Item/TeamsAsyncOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Operations/Item/TeamsAsyncOperationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsAsyncOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAsyncOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Operations/OperationsRequestBuilder.cs index 61fe143c296..2822b36de9a 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamsAsyncOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsAsyncOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs index 0bcd8cff351..85f76e2c23b 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/PermissionGrants/PermissionGrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/PermissionGrants/PermissionGrantsRequestBuilder.cs index 3cb68c63d49..a5013d7d3bb 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/PermissionGrants/PermissionGrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/PermissionGrants/PermissionGrantsRequestBuilder.cs @@ -93,7 +93,7 @@ public PermissionGrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/PinnedMessages/Item/PinnedChatMessageInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/PinnedMessages/Item/PinnedChatMessageInfoItemRequestBuilder.cs index 2cb67e66ec0..a41c0e67633 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/PinnedMessages/Item/PinnedChatMessageInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/PinnedMessages/Item/PinnedChatMessageInfoItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PinnedChatMessageInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PinnedChatMessageInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/PinnedMessages/PinnedMessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/PinnedMessages/PinnedMessagesRequestBuilder.cs index 1e0d5a07a01..24313fdfc6c 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/PinnedMessages/PinnedMessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/PinnedMessages/PinnedMessagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PinnedMessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PinnedChatMessageInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PinnedChatMessageInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserPostRequestBody.cs index c98820a2c00..a5193fea677 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserPostRequestBody.cs @@ -53,7 +53,7 @@ public RemoveAllAccessForUserPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.RemoveAllAccessForUser.RemoveAllAccessForUserPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.RemoveAllAccessForUser.RemoveAllAccessForUserPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("user", User); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserRequestBuilder.cs index 4c0c021fe25..6d50d5fee8e 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/RemoveAllAccessForUser/RemoveAllAccessForUserRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.RemoveAll public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.RemoveAllAccessForUser.RemoveAllAccessForUserPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.RemoveAllAccessForUser.RemoveAllAccessForUserPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/SendActivityNotification/SendActivityNotificationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/SendActivityNotification/SendActivityNotificationPostRequestBody.cs index b80a5a24e44..78b39de7077 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/SendActivityNotification/SendActivityNotificationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/SendActivityNotification/SendActivityNotificationPostRequestBody.cs @@ -155,7 +155,7 @@ public SendActivityNotificationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.SendActivityNotification.SendActivityNotificationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.SendActivityNotification.SendActivityNotificationPostRequestBody(); } /// @@ -182,7 +182,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("activityType", ActivityType); writer.WriteLongValue("chainId", ChainId); writer.WriteStringValue("iconId", IconId); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/SendActivityNotification/SendActivityNotificationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/SendActivityNotification/SendActivityNotificationRequestBuilder.cs index 755ec7d781c..9d173608150 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/SendActivityNotification/SendActivityNotificationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/SendActivityNotification/SendActivityNotificationRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.SendActiv public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.SendActivityNotification.SendActivityNotificationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.SendActivityNotification.SendActivityNotificationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Tabs/Item/TeamsTabItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Tabs/Item/TeamsTabItemRequestBuilder.cs index 043e74587b6..c295d668298 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Tabs/Item/TeamsTabItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Tabs/Item/TeamsTabItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Tabs/TabsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Tabs/TabsRequestBuilder.cs index b047516ac00..524c91e1a81 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Tabs/TabsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Tabs/TabsRequestBuilder.cs @@ -93,7 +93,7 @@ public TabsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TeamsTab body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/UnhideForUser/UnhideForUserPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/UnhideForUser/UnhideForUserPostRequestBody.cs index ae2daf96569..7931f82eba4 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/UnhideForUser/UnhideForUserPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/UnhideForUser/UnhideForUserPostRequestBody.cs @@ -69,7 +69,7 @@ public UnhideForUserPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Chats.Item.UnhideForUser.UnhideForUserPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Chats.Item.UnhideForUser.UnhideForUserPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("tenantId", TenantId); writer.WriteObjectValue("user", User); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/UnhideForUser/UnhideForUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/UnhideForUser/UnhideForUserRequestBuilder.cs index 27630a976ed..aa5c532e278 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/UnhideForUser/UnhideForUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/UnhideForUser/UnhideForUserRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.UnhideFor public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Chats.Item.UnhideForUser.UnhideForUserPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Chats.Item.UnhideForUser.UnhideForUserPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs index a5285573571..de64cec5251 100644 --- a/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CheckMemberGroups.CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CheckMemberGroups.CheckMemberGroupsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsPostResponse.cs index 52b30328b69..f6a11c116fb 100644 --- a/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CheckMemberGroups.CheckMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CheckMemberGroups.CheckMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs index e240a685507..1faddc00c61 100644 --- a/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsCheckMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.Me.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsResponse.cs index 55c1bbfa3ba..feaa011517e 100644 --- a/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CheckMemberGroups/CheckMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberGroupsResponse : global::Microsoft.Graph.Beta.Me /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CheckMemberGroups.CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CheckMemberGroups.CheckMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs index 0403fbe2959..52be07a1f23 100644 --- a/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CheckMemberObjects.CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CheckMemberObjects.CheckMemberObjectsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsPostResponse.cs index d857f638ed9..1aeeefca30d 100644 --- a/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CheckMemberObjects.CheckMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CheckMemberObjects.CheckMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs index a03c1d62462..4128efde655 100644 --- a/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsCheckMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.Me.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsResponse.cs index 2f9fc488890..bab4f8bf901 100644 --- a/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CheckMemberObjects/CheckMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberObjectsResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CheckMemberObjects.CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CheckMemberObjects.CheckMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CloudClipboard/CloudClipboardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CloudClipboard/CloudClipboardRequestBuilder.cs index 8575b3332ba..e4dd5cdc057 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudClipboard/CloudClipboardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudClipboard/CloudClipboardRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudClipboardRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudClipboardRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CloudClipboard/Items/Item/CloudClipboardItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CloudClipboard/Items/Item/CloudClipboardItemItemRequestBuilder.cs index 8583d6a2b32..fd9df85d30a 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudClipboard/Items/Item/CloudClipboardItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudClipboard/Items/Item/CloudClipboardItemItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudClipboardItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudClipboardItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CloudClipboard/Items/ItemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CloudClipboard/Items/ItemsRequestBuilder.cs index 9a1863f123f..3d63da11012 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudClipboard/Items/ItemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudClipboard/Items/ItemsRequestBuilder.cs @@ -94,7 +94,7 @@ public ItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudClipboardItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudClipboardItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/CloudPCsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/CloudPCsRequestBuilder.cs index b9657ed707e..c587df0a371 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/CloudPCsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/CloudPCsRequestBuilder.cs @@ -119,7 +119,7 @@ public CloudPCsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CloudPC body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -161,7 +161,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPC body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdGetResponse.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdGetResponse.cs index 6b84abe2e55..976ffc9e8c0 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetProvisionedCloudPCsWithGroupIdWithServicePlanIdGetRespon /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CloudPCs.GetProvisionedCloudPCsWithGroupIdWithServicePlanId.GetProvisionedCloudPCsWithGroupIdWithServicePlanIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.GetProvisionedCloudPCsWithGroupIdWithServicePlanId.GetProvisionedCloudPCsWithGroupIdWithServicePlanIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdResponse.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdResponse.cs index 02733984679..4a8f48010d6 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/GetProvisionedCloudPCsWithGroupIdWithServicePlanId/GetProvisionedCloudPCsWithGroupIdWithServicePlanIdResponse.cs @@ -20,7 +20,7 @@ public partial class GetProvisionedCloudPCsWithGroupIdWithServicePlanIdResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CloudPCs.GetProvisionedCloudPCsWithGroupIdWithServicePlanId.GetProvisionedCloudPCsWithGroupIdWithServicePlanIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.GetProvisionedCloudPCsWithGroupIdWithServicePlanId.GetProvisionedCloudPCsWithGroupIdWithServicePlanIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypePostRequestBody.cs index 6144f48998b..f53778a0a29 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypePostRequestBody.cs @@ -43,7 +43,7 @@ public ChangeUserAccountTypePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CloudPCs.Item.ChangeUserAccountType.ChangeUserAccountTypePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.ChangeUserAccountType.ChangeUserAccountTypePostRequestBody(); } /// @@ -63,7 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("userAccountType", UserAccountType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypeRequestBuilder.cs index 25508957c83..54998e15512 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/ChangeUserAccountType/ChangeUserAccountTypeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Change public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.ChangeUserAccountType.ChangeUserAccountTypePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.ChangeUserAccountType.ChangeUserAccountTypePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/CloudPCItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/CloudPCItemRequestBuilder.cs index 7d745eb12d0..f90b7134172 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/CloudPCItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/CloudPCItemRequestBuilder.cs @@ -229,7 +229,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CloudPC body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -290,7 +290,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CloudPC body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/CreateSnapshot/CreateSnapshotPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/CreateSnapshot/CreateSnapshotPostRequestBody.cs index 1c27736beda..5b16f6b998a 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/CreateSnapshot/CreateSnapshotPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/CreateSnapshot/CreateSnapshotPostRequestBody.cs @@ -59,7 +59,7 @@ public CreateSnapshotPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CloudPCs.Item.CreateSnapshot.CreateSnapshotPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.CreateSnapshot.CreateSnapshotPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("accessTier", AccessTier); writer.WriteStringValue("storageAccountId", StorageAccountId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/CreateSnapshot/CreateSnapshotRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/CreateSnapshot/CreateSnapshotRequestBuilder.cs index 74009a846f2..aaa3d3b6383 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/CreateSnapshot/CreateSnapshotRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/CreateSnapshot/CreateSnapshotRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Create public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.CreateSnapshot.CreateSnapshotPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.CreateSnapshot.CreateSnapshotPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryGetResponse.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryGetResponse.cs index 995fbc7c99c..151fbf10f12 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetCloudPcConnectivityHistoryGetResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.GetCloudPcConnectivityHistory.GetCloudPcConnectivityHistoryGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.GetCloudPcConnectivityHistory.GetCloudPcConnectivityHistoryGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryResponse.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryResponse.cs index 710ee451596..90256bb5d0b 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetCloudPcConnectivityHistory/GetCloudPcConnectivityHistoryResponse.cs @@ -20,7 +20,7 @@ public partial class GetCloudPcConnectivityHistoryResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.GetCloudPcConnectivityHistory.GetCloudPcConnectivityHistoryResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.GetCloudPcConnectivityHistory.GetCloudPcConnectivityHistoryResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetCloudPcLaunchInfo/GetCloudPcLaunchInfoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetCloudPcLaunchInfo/GetCloudPcLaunchInfoRequestBuilder.cs index 4c237fc7378..d6a8705f081 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetCloudPcLaunchInfo/GetCloudPcLaunchInfoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetCloudPcLaunchInfo/GetCloudPcLaunchInfoRequestBuilder.cs @@ -35,7 +35,7 @@ public GetCloudPcLaunchInfoRequestBuilder(string rawUrl, IRequestAdapter request { } /// - /// Get the cloudPCLaunchInfo for a specific cloudPC. + /// Get the cloudPCLaunchInfo for a specific cloudPC that belongs to the current signed-in user. /// Find more info here /// /// A @@ -59,7 +59,7 @@ public GetCloudPcLaunchInfoRequestBuilder(string rawUrl, IRequestAdapter request return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.CloudPcLaunchInfo.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Get the cloudPCLaunchInfo for a specific cloudPC. + /// Get the cloudPCLaunchInfo for a specific cloudPC that belongs to the current signed-in user. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsGetResponse.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsGetResponse.cs index bcf3aa5754f..ee7608100c9 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetSupportedCloudPcRemoteActionsGetResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.GetSupportedCloudPcRemoteActions.GetSupportedCloudPcRemoteActionsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.GetSupportedCloudPcRemoteActions.GetSupportedCloudPcRemoteActionsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsResponse.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsResponse.cs index 9c3efbbe3d6..1109735c19a 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/GetSupportedCloudPcRemoteActions/GetSupportedCloudPcRemoteActionsResponse.cs @@ -20,7 +20,7 @@ public partial class GetSupportedCloudPcRemoteActionsResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.GetSupportedCloudPcRemoteActions.GetSupportedCloudPcRemoteActionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.GetSupportedCloudPcRemoteActions.GetSupportedCloudPcRemoteActionsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Rename/RenamePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Rename/RenamePostRequestBody.cs index 619783c8f67..14cc1240d6f 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Rename/RenamePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Rename/RenamePostRequestBody.cs @@ -52,7 +52,7 @@ public RenamePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Rename.RenamePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Rename.RenamePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Rename/RenameRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Rename/RenameRequestBuilder.cs index aee3e65768d..7c83c655513 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Rename/RenameRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Rename/RenameRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Rename public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Rename.RenamePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Rename.RenamePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Reprovision/ReprovisionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Reprovision/ReprovisionPostRequestBody.cs index e3c45e99c65..0f9c7161f4d 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Reprovision/ReprovisionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Reprovision/ReprovisionPostRequestBody.cs @@ -49,7 +49,7 @@ public ReprovisionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Reprovision.ReprovisionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Reprovision.ReprovisionPostRequestBody(); } /// @@ -70,7 +70,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("osVersion", OsVersion); writer.WriteEnumValue("userAccountType", UserAccountType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Reprovision/ReprovisionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Reprovision/ReprovisionRequestBuilder.cs index 9742d058377..53b0b19017c 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Reprovision/ReprovisionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Reprovision/ReprovisionRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Reprov public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Reprovision.ReprovisionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Reprovision.ReprovisionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Resize/ResizePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Resize/ResizePostRequestBody.cs index f8aef548ad9..ec2c1411cac 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Resize/ResizePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Resize/ResizePostRequestBody.cs @@ -52,7 +52,7 @@ public ResizePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Resize.ResizePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Resize.ResizePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("targetServicePlanId", TargetServicePlanId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Resize/ResizeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Resize/ResizeRequestBuilder.cs index da20e1dbaec..8a1c73536e7 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Resize/ResizeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Resize/ResizeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Resize public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Resize.ResizePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Resize.ResizePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Restore/RestorePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Restore/RestorePostRequestBody.cs index 7b49395ce24..a7e605d1b6d 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Restore/RestorePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Restore/RestorePostRequestBody.cs @@ -52,7 +52,7 @@ public RestorePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Restore.RestorePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Restore.RestorePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("cloudPcSnapshotId", CloudPcSnapshotId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Restore/RestoreRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Restore/RestoreRequestBuilder.cs index cc9c4fd0030..1440048c426 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Restore/RestoreRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/Restore/RestoreRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Restor public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Restore.RestorePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.Restore.RestorePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsGetResponse.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsGetResponse.cs index 49760054632..34e89ce2a08 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrieveCloudPCRemoteActionResultsGetResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.RetrieveCloudPCRemoteActionResults.RetrieveCloudPCRemoteActionResultsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.RetrieveCloudPCRemoteActionResults.RetrieveCloudPCRemoteActionResultsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsResponse.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsResponse.cs index ba04bade430..5a98103c576 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveCloudPCRemoteActionResults/RetrieveCloudPCRemoteActionResultsResponse.cs @@ -20,7 +20,7 @@ public partial class RetrieveCloudPCRemoteActionResultsResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.RetrieveCloudPCRemoteActionResults.RetrieveCloudPCRemoteActionResultsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.RetrieveCloudPCRemoteActionResults.RetrieveCloudPCRemoteActionResultsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsGetResponse.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsGetResponse.cs index 840393de5be..988baf468fb 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrieveSnapshotsGetResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.RetrieveSnapshots.RetrieveSnapshotsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.RetrieveSnapshots.RetrieveSnapshotsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsResponse.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsResponse.cs index 732ef2ce1fd..2654a555b92 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/RetrieveSnapshots/RetrieveSnapshotsResponse.cs @@ -20,7 +20,7 @@ public partial class RetrieveSnapshotsResponse : global::Microsoft.Graph.Beta.Me /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.RetrieveSnapshots.RetrieveSnapshotsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.RetrieveSnapshots.RetrieveSnapshotsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/SetReviewStatus/SetReviewStatusPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/SetReviewStatus/SetReviewStatusPostRequestBody.cs index 7937ea7b30f..51587f1c325 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/SetReviewStatus/SetReviewStatusPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/SetReviewStatus/SetReviewStatusPostRequestBody.cs @@ -53,7 +53,7 @@ public SetReviewStatusPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CloudPCs.Item.SetReviewStatus.SetReviewStatusPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.Item.SetReviewStatus.SetReviewStatusPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("reviewStatus", ReviewStatus); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/SetReviewStatus/SetReviewStatusRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/SetReviewStatus/SetReviewStatusRequestBuilder.cs index 105b44e44d3..4a65b4d0b22 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/SetReviewStatus/SetReviewStatusRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/Item/SetReviewStatus/SetReviewStatusRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.SetRev public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.SetReviewStatus.SetReviewStatusPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CloudPCs.Item.SetReviewStatus.SetReviewStatusPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusGetResponse.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusGetResponse.cs index 8dbdba1f32c..236f6d3cd1e 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrieveCloudPcCountByStatusGetResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CloudPCs.RetrieveCloudPcCountByStatus.RetrieveCloudPcCountByStatusGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.RetrieveCloudPcCountByStatus.RetrieveCloudPcCountByStatusGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusResponse.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusResponse.cs index d34edd77804..a2369ef9a8e 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/RetrieveCloudPcCountByStatus/RetrieveCloudPcCountByStatusResponse.cs @@ -20,7 +20,7 @@ public partial class RetrieveCloudPcCountByStatusResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CloudPCs.RetrieveCloudPcCountByStatus.RetrieveCloudPcCountByStatusResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.RetrieveCloudPcCountByStatus.RetrieveCloudPcCountByStatusResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizePostRequestBody.cs index 7e7fcaf471e..0bff9ad0ddf 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizePostRequestBody.cs @@ -68,7 +68,7 @@ public ValidateBulkResizePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.CloudPCs.ValidateBulkResize.ValidateBulkResizePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.ValidateBulkResize.ValidateBulkResizePostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("cloudPcIds", CloudPcIds); writer.WriteStringValue("targetServicePlanId", TargetServicePlanId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizePostResponse.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizePostResponse.cs index 20168b2dd56..a096d9d9521 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizePostResponse.cs @@ -36,7 +36,7 @@ public partial class ValidateBulkResizePostResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CloudPCs.ValidateBulkResize.ValidateBulkResizePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.ValidateBulkResize.ValidateBulkResizePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizeRequestBuilder.cs index d645e28cee4..9d12571d990 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizeRequestBuilder.cs @@ -51,7 +51,7 @@ public ValidateBulkResizeRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsValidateBulkResizePostResponseAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.ValidateBulkResize.ValidateBulkResizePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public ValidateBulkResizeRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Me.CloudPCs.ValidateBulkResize.ValidateBulkResizePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.CloudPCs.ValidateBulkResize.ValidateBulkResizePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizeResponse.cs b/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizeResponse.cs index e644e51c4a5..09fa4209b9a 100644 --- a/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizeResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/CloudPCs/ValidateBulkResize/ValidateBulkResizeResponse.cs @@ -20,7 +20,7 @@ public partial class ValidateBulkResizeResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.CloudPCs.ValidateBulkResize.ValidateBulkResizeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.CloudPCs.ValidateBulkResize.ValidateBulkResizeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/CallSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/CallSettingsRequestBuilder.cs index 1cd9365d958..f53566111b0 100644 --- a/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/CallSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/CallSettingsRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegates/DelegatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegates/DelegatesRequestBuilder.cs index 749b7612976..0920f256a87 100644 --- a/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegates/DelegatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegates/DelegatesRequestBuilder.cs @@ -94,7 +94,7 @@ public DelegatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DelegationSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DelegationSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegates/Item/DelegationSettingsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegates/Item/DelegationSettingsItemRequestBuilder.cs index 98925cd7bbc..9916f451146 100644 --- a/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegates/Item/DelegationSettingsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegates/Item/DelegationSettingsItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DelegationSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DelegationSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegators/DelegatorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegators/DelegatorsRequestBuilder.cs index 1c2a4f6f3b6..8c0ed52a8e7 100644 --- a/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegators/DelegatorsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegators/DelegatorsRequestBuilder.cs @@ -94,7 +94,7 @@ public DelegatorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DelegationSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DelegationSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegators/Item/DelegationSettingsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegators/Item/DelegationSettingsItemRequestBuilder.cs index 8196f8b1c15..f6673c1d149 100644 --- a/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegators/Item/DelegationSettingsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Communications/CallSettings/Delegators/Item/DelegationSettingsItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DelegationSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DelegationSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Communications/CommunicationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Communications/CommunicationsRequestBuilder.cs index c9ba757c714..0b03c425613 100644 --- a/src/Microsoft.Graph/Generated/Me/Communications/CommunicationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Communications/CommunicationsRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserCloudCommunication body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserCloudCommunication body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/ContactFoldersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/ContactFoldersRequestBuilder.cs index 0e60e91b091..7625a5a403e 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/ContactFoldersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/ContactFoldersRequestBuilder.cs @@ -101,7 +101,7 @@ public ContactFoldersRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ContactFolder body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ContactFolder body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Delta/DeltaGetResponse.cs index 584c51c1d49..8d54d57ecca 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ContactFolders.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ContactFolders.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Delta/DeltaResponse.cs index 9659ec134b2..a6f85b02cc2 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.ContactFold /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ContactFolders.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ContactFolders.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs index 2e1db9bcb9d..d9a081d9b8c 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs @@ -101,7 +101,7 @@ public ChildFoldersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ContactFolder body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ContactFolder body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Delta/DeltaGetResponse.cs index 5a28420f5b7..50e0ccfaa6f 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ContactFolders.Item.ChildFolders.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ContactFolders.Item.ChildFolders.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Delta/DeltaResponse.cs index 169065fc398..3feff8c2e70 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.ContactFold /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ContactFolders.Item.ChildFolders.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ContactFolders.Item.ChildFolders.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/ContactFolderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/ContactFolderItemRequestBuilder.cs index cfe838da275..8b249e97183 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/ContactFolderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/ContactFolderItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ContactFolder body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ContactFolder body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/ContactsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/ContactsRequestBuilder.cs index 6d56aa67eab..f63d5d8774f 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/ContactsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/ContactsRequestBuilder.cs @@ -99,7 +99,7 @@ public ContactsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Contact body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Contact body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Delta/DeltaGetResponse.cs index ff80db77115..801b9cac9e0 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ContactFolders.Item.ChildFolders.Item.Contacts.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ContactFolders.Item.ChildFolders.Item.Contacts.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Delta/DeltaResponse.cs index 692dd4c6ed0..84ecc18d466 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.ContactFold /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ContactFolders.Item.ChildFolders.Item.Contacts.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ContactFolders.Item.ChildFolders.Item.Contacts.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/ContactItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/ContactItemRequestBuilder.cs index 4f372241cc9..c505d6cd5f7 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/ContactItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/ContactItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Contact body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Contact body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Extensions/ExtensionsRequestBuilder.cs index 7ad0321e13f..75eb69818c3 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 07e308c8170..ec09d55b693 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Photo/PhotoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Photo/PhotoRequestBuilder.cs index 54a4b17f24e..8f370c1d80b 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Photo/PhotoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Photo/PhotoRequestBuilder.cs @@ -80,7 +80,7 @@ public PhotoRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.ProfilePhoto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -122,7 +122,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProfilePhoto body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Photo/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Photo/Value/ContentRequestBuilder.cs index 1d5a947fff4..0873c2aee81 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Photo/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ChildFolders/Item/Contacts/Item/Photo/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ContactFolderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ContactFolderItemRequestBuilder.cs index 84e3fee38fb..b9584707638 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ContactFolderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/ContactFolderItemRequestBuilder.cs @@ -117,7 +117,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ContactFolder body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -178,7 +178,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ContactFolder body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/ContactsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/ContactsRequestBuilder.cs index 4eb04f8fdf0..18130bc95b6 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/ContactsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/ContactsRequestBuilder.cs @@ -101,7 +101,7 @@ public ContactsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Contact body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Contact body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Delta/DeltaGetResponse.cs index c6dcc9064ec..ecf1d620079 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ContactFolders.Item.Contacts.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ContactFolders.Item.Contacts.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Delta/DeltaResponse.cs index 8d8e67a1f1c..b0886e78026 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.ContactFold /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ContactFolders.Item.Contacts.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ContactFolders.Item.Contacts.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/ContactItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/ContactItemRequestBuilder.cs index e1b706de8b3..0dd4db6616d 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/ContactItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/ContactItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Contact body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Contact body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Extensions/ExtensionsRequestBuilder.cs index 05b821460cb..ca958425273 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 456241a4710..2285e0fc68e 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Photo/PhotoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Photo/PhotoRequestBuilder.cs index 01ed0ee6ba7..900a302bce4 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Photo/PhotoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Photo/PhotoRequestBuilder.cs @@ -80,7 +80,7 @@ public PhotoRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.ProfilePhoto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -122,7 +122,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProfilePhoto body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Photo/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Photo/Value/ContentRequestBuilder.cs index 77fa4f728fb..04d6ee21cae 100644 --- a/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Photo/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ContactFolders/Item/Contacts/Item/Photo/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Contacts/ContactsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Contacts/ContactsRequestBuilder.cs index d4017019226..64b8426d99c 100644 --- a/src/Microsoft.Graph/Generated/Me/Contacts/ContactsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Contacts/ContactsRequestBuilder.cs @@ -101,7 +101,7 @@ public ContactsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Contact body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Contact body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Contacts/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Contacts/Delta/DeltaGetResponse.cs index 19f22bd27f2..afd9b23e5fe 100644 --- a/src/Microsoft.Graph/Generated/Me/Contacts/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Contacts/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Contacts.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Contacts.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Contacts/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Contacts/Delta/DeltaResponse.cs index 06b5d625d56..8679ed1c38b 100644 --- a/src/Microsoft.Graph/Generated/Me/Contacts/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Contacts/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Contacts.De /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Contacts.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Contacts.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Contacts/Item/ContactItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Contacts/Item/ContactItemRequestBuilder.cs index 994407d10b6..419bbde3a01 100644 --- a/src/Microsoft.Graph/Generated/Me/Contacts/Item/ContactItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Contacts/Item/ContactItemRequestBuilder.cs @@ -117,7 +117,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Contact body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -178,7 +178,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Contact body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Contacts/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Contacts/Item/Extensions/ExtensionsRequestBuilder.cs index 825368b0218..6698512ab7f 100644 --- a/src/Microsoft.Graph/Generated/Me/Contacts/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Contacts/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Contacts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Contacts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index b20ff03caf0..cc7a4935783 100644 --- a/src/Microsoft.Graph/Generated/Me/Contacts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Contacts/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Contacts/Item/Photo/PhotoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Contacts/Item/Photo/PhotoRequestBuilder.cs index 1af329b97bc..cfa1dbac8f1 100644 --- a/src/Microsoft.Graph/Generated/Me/Contacts/Item/Photo/PhotoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Contacts/Item/Photo/PhotoRequestBuilder.cs @@ -80,7 +80,7 @@ public PhotoRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.ProfilePhoto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -122,7 +122,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProfilePhoto body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Contacts/Item/Photo/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Contacts/Item/Photo/Value/ContentRequestBuilder.cs index 2d2fc62b1a9..e9b71c80543 100644 --- a/src/Microsoft.Graph/Generated/Me/Contacts/Item/Photo/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Contacts/Item/Photo/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ConvertExternalToInternalMemberUser/ConvertExternalToInternalMemberUserPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ConvertExternalToInternalMemberUser/ConvertExternalToInternalMemberUserPostRequestBody.cs index d6b6f6086fe..6ecfc012cf6 100644 --- a/src/Microsoft.Graph/Generated/Me/ConvertExternalToInternalMemberUser/ConvertExternalToInternalMemberUserPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ConvertExternalToInternalMemberUser/ConvertExternalToInternalMemberUserPostRequestBody.cs @@ -85,7 +85,7 @@ public ConvertExternalToInternalMemberUserPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ConvertExternalToInternalMemberUser.ConvertExternalToInternalMemberUserPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ConvertExternalToInternalMemberUser.ConvertExternalToInternalMemberUserPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("mail", Mail); writer.WriteObjectValue("passwordProfile", PasswordProfile); writer.WriteStringValue("userPrincipalName", UserPrincipalName); diff --git a/src/Microsoft.Graph/Generated/Me/ConvertExternalToInternalMemberUser/ConvertExternalToInternalMemberUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ConvertExternalToInternalMemberUser/ConvertExternalToInternalMemberUserRequestBuilder.cs index 1b3d78a9cc2..923ab2f55c5 100644 --- a/src/Microsoft.Graph/Generated/Me/ConvertExternalToInternalMemberUser/ConvertExternalToInternalMemberUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ConvertExternalToInternalMemberUser/ConvertExternalToInternalMemberUserRequestBuilder.cs @@ -52,7 +52,7 @@ public ConvertExternalToInternalMemberUserRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ConvertExternalToInternalMemberUser.ConvertExternalToInternalMemberUserPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ConvertExternalToInternalMemberUser.ConvertExternalToInternalMemberUserPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/Activities/ActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/Activities/ActivitiesRequestBuilder.cs index 0fb264894d5..8b3271a15f6 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/Activities/ActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/Activities/ActivitiesRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ActivitiesContainer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ActivitiesContainer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/Activities/ContentActivities/ContentActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/Activities/ContentActivities/ContentActivitiesRequestBuilder.cs index 28fd096ae51..d57ef05c56a 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/Activities/ContentActivities/ContentActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/Activities/ContentActivities/ContentActivitiesRequestBuilder.cs @@ -94,7 +94,7 @@ public ContentActivitiesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ContentActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ContentActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/Activities/ContentActivities/Item/ContentActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/Activities/ContentActivities/Item/ContentActivityItemRequestBuilder.cs index 41f6d77d7e5..b1b82ee3899 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/Activities/ContentActivities/Item/ContentActivityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/Activities/ContentActivities/Item/ContentActivityItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ContentActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ContentActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/DataSecurityAndGovernanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/DataSecurityAndGovernanceRequestBuilder.cs index 94587807dc2..968e0aadb55 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/DataSecurityAndGovernanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/DataSecurityAndGovernanceRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserDataSecurityAndGovernance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserDataSecurityAndGovernance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProcessContent/ProcessContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProcessContent/ProcessContentPostRequestBody.cs index 595ddfb9667..83f37efb5d3 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProcessContent/ProcessContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProcessContent/ProcessContentPostRequestBody.cs @@ -53,7 +53,7 @@ public ProcessContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.ProcessContent.ProcessContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.ProcessContent.ProcessContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentToProcess", ContentToProcess); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProcessContent/ProcessContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProcessContent/ProcessContentRequestBuilder.cs index 0b0dd0c7288..eca383e1b39 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProcessContent/ProcessContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProcessContent/ProcessContentRequestBuilder.cs @@ -52,7 +52,7 @@ public ProcessContentRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.ProcessContent.ProcessContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.ProcessContent.ProcessContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputePostRequestBody.cs index bd0f1aff715..990f6252009 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputePostRequestBody.cs @@ -97,7 +97,7 @@ public ComputePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.ProtectionScopes.Compute.ComputePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.ProtectionScopes.Compute.ComputePostRequestBody(); } /// @@ -121,7 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("activities", Activities); writer.WriteObjectValue("deviceMetadata", DeviceMetadata); writer.WriteObjectValue("integratedAppMetadata", IntegratedAppMetadata); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputePostResponse.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputePostResponse.cs index 5e53bf71ee4..88c75d79983 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputePostResponse.cs @@ -36,7 +36,7 @@ public partial class ComputePostResponse : global::Microsoft.Graph.Beta.Models.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.ProtectionScopes.Compute.ComputePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.ProtectionScopes.Compute.ComputePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputeRequestBuilder.cs index fc1c8e8f702..f630be3c783 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputeRequestBuilder.cs @@ -50,7 +50,7 @@ public ComputeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsComputePostResponseAsync(global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.ProtectionScopes.Compute.ComputePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public ComputeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.ProtectionScopes.Compute.ComputePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.ProtectionScopes.Compute.ComputePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputeResponse.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputeResponse.cs index 80205bd609f..09d645e6fb4 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputeResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/Compute/ComputeResponse.cs @@ -20,7 +20,7 @@ public partial class ComputeResponse : global::Microsoft.Graph.Beta.Me.DataSecur /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.ProtectionScopes.Compute.ComputeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.ProtectionScopes.Compute.ComputeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/ProtectionScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/ProtectionScopesRequestBuilder.cs index 7078c6898a6..cf79ba41391 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/ProtectionScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/ProtectionScopes/ProtectionScopesRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserProtectionScopeContainer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserProtectionScopeContainer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs index bd57471fe52..a3f77a0e54d 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs @@ -101,7 +101,7 @@ public ComputeRightsAndInheritancePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("delegatedUserEmail", DelegatedUserEmail); writer.WriteStringValue("locale", Locale); writer.WriteCollectionOfObjectValues("protectedContents", ProtectedContents); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs index 6bdd1e86a34..9d19e98504b 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs @@ -52,7 +52,7 @@ public ComputeRightsAndInheritanceRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs index a366c26117b..fd4ccde5291 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.Evaluate.EvaluatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.Evaluate.EvaluatePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("currentLabel", CurrentLabel); writer.WriteCollectionOfObjectValues("discoveredSensitiveTypes", DiscoveredSensitiveTypes); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs index cc02622681a..b3190d7c55b 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs @@ -51,7 +51,7 @@ public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs index a7821d0da73..cb9bcf00de3 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs index 2c3fb2462d5..7fa57a03a1a 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs @@ -101,7 +101,7 @@ public ComputeRightsAndInheritancePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("delegatedUserEmail", DelegatedUserEmail); writer.WriteStringValue("locale", Locale); writer.WriteCollectionOfObjectValues("protectedContents", ProtectedContents); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs index dc4ef8e83fc..841898b8f82 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs @@ -52,7 +52,7 @@ public ComputeRightsAndInheritanceRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs index 81fb7b20325..1e86ed4abb7 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("currentLabel", CurrentLabel); writer.WriteCollectionOfObjectValues("discoveredSensitiveTypes", DiscoveredSensitiveTypes); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs index 82b3b987ca7..f676b213461 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs @@ -51,7 +51,7 @@ public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.DataSecurityAndGovernance.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs index a42dfb61da9..f387fc3c558 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs index 67ac501ec91..52eecfcf5f2 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs @@ -120,7 +120,7 @@ public SublabelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/SensitivityLabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/SensitivityLabelsRequestBuilder.cs index f95823e38aa..0d3f2edbc86 100644 --- a/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/SensitivityLabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DataSecurityAndGovernance/SensitivityLabels/SensitivityLabelsRequestBuilder.cs @@ -120,7 +120,7 @@ public SensitivityLabelsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsPostRequestBody.cs index 897d2fefda3..f13afc93a5a 100644 --- a/src/Microsoft.Graph/Generated/Me/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsPostRequestBody.cs @@ -52,7 +52,7 @@ public DeletePasswordSingleSignOnCredentialsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.DeletePasswordSingleSignOnCredentials.DeletePasswordSingleSignOnCredentialsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DeletePasswordSingleSignOnCredentials.DeletePasswordSingleSignOnCredentialsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsRequestBuilder.cs index c17335661b5..a665405e727 100644 --- a/src/Microsoft.Graph/Generated/Me/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DeletePasswordSingleSignOnCredentials/DeletePasswordSingleSignOnCredentialsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DeletePasswordSingle public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DeletePasswordSingleSignOnCredentials.DeletePasswordSingleSignOnCredentialsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.DeletePasswordSingleSignOnCredentials.DeletePasswordSingleSignOnCredentialsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationPostRequestBody.cs index eb0741a847f..6816e313f0b 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateEnrollmentNotificationConfigurationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.CreateEnrollmentNotificationConfiguration.CreateEnrollmentNotificationConfigurationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.CreateEnrollmentNotificationConfiguration.CreateEnrollmentNotificationConfigurationPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("deviceEnrollmentNotificationConfigurations", DeviceEnrollmentNotificationConfigurations); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationRequestBuilder.cs index 7d8f0d32a6e..885de177b1c 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/CreateEnrollmentNotificationConfiguration/CreateEnrollmentNotificationConfigurationRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConf public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.CreateEnrollmentNotificationConfiguration.CreateEnrollmentNotificationConfigurationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.CreateEnrollmentNotificationConfiguration.CreateEnrollmentNotificationConfigurationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/DeviceEnrollmentConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/DeviceEnrollmentConfigurationsRequestBuilder.cs index 6e98eb609f8..46bb01277e9 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/DeviceEnrollmentConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/DeviceEnrollmentConfigurationsRequestBuilder.cs @@ -105,7 +105,7 @@ public DeviceEnrollmentConfigurationsRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceEnrollmentConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceEnrollmentConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs index 0f8128ec31a..e2a0af1fe9c 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostRequestBody.cs @@ -52,7 +52,7 @@ public HasPayloadLinksPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("payloadIds", PayloadIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs index a8e1109c2c7..bd37dbdea85 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksPostResponse.cs @@ -36,7 +36,7 @@ public partial class HasPayloadLinksPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs index 4a9b2279ac4..b90292e03d4 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksRequestBuilder.cs @@ -50,7 +50,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsHasPayloadLinksPostResponseAsync(global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public HasPayloadLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs index 79260f182d2..b22cdd670e2 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/HasPayloadLinks/HasPayloadLinksResponse.cs @@ -20,7 +20,7 @@ public partial class HasPayloadLinksResponse : global::Microsoft.Graph.Beta.Me.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.HasPayloadLinks.HasPayloadLinksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assign/AssignPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assign/AssignPostRequestBody.cs index fb0d361ce7f..c0b63c018c9 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assign/AssignPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assign/AssignPostRequestBody.cs @@ -53,7 +53,7 @@ public AssignPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.Item.Assign.AssignPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.Item.Assign.AssignPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("enrollmentConfigurationAssignments", EnrollmentConfigurationAssignments); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assign/AssignRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assign/AssignRequestBuilder.cs index f30456ddcef..a509080091f 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assign/AssignRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assign/AssignRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConf public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.Item.Assign.AssignPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs index 554c704d57a..4dcac8069ad 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assignments/AssignmentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EnrollmentConfigurationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EnrollmentConfigurationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assignments/Item/EnrollmentConfigurationAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assignments/Item/EnrollmentConfigurationAssignmentItemRequestBuilder.cs index 45b44648048..db57c169cad 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assignments/Item/EnrollmentConfigurationAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/Assignments/Item/EnrollmentConfigurationAssignmentItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EnrollmentConfigurationAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EnrollmentConfigurationAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs index ceccb6d9ff9..dfc48c9b5f8 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/DeviceEnrollmentConfigurationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceEnrollmentConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceEnrollmentConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityPostRequestBody.cs index 007a23f5f00..f1570c5b756 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityPostRequestBody.cs @@ -42,7 +42,7 @@ public SetPriorityPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.Item.SetPriority.SetPriorityPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.Item.SetPriority.SetPriorityPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("priority", Priority); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityRequestBuilder.cs index 5c3aa61fad7..36304492be9 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceEnrollmentConfigurations/Item/SetPriority/SetPriorityRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConf public async Task PostAsync(global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.Item.SetPriority.SetPriorityPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.DeviceEnrollmentConfigurations.Item.SetPriority.SetPriorityPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DeviceManagementTroubleshootingEvents/DeviceManagementTroubleshootingEventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DeviceManagementTroubleshootingEvents/DeviceManagementTroubleshootingEventsRequestBuilder.cs index a1d9e1b34ef..094e981b426 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceManagementTroubleshootingEvents/DeviceManagementTroubleshootingEventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceManagementTroubleshootingEvents/DeviceManagementTroubleshootingEventsRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceManagementTroubleshootingEventsRequestBuilder(string rawUrl, IReque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DeviceManagementTroubleshootingEvents/Item/DeviceManagementTroubleshootingEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DeviceManagementTroubleshootingEvents/Item/DeviceManagementTroubleshootingEventItemRequestBuilder.cs index 39f0baa1118..9c5a28d5b60 100644 --- a/src/Microsoft.Graph/Generated/Me/DeviceManagementTroubleshootingEvents/Item/DeviceManagementTroubleshootingEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DeviceManagementTroubleshootingEvents/Item/DeviceManagementTroubleshootingEventItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Devices/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Devices/Delta/DeltaGetResponse.cs index 24e7d4f8cd0..e6f043a2649 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Devices.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Devices.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Devices/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Devices/Delta/DeltaResponse.cs index 8c691951e96..733f0230736 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Devices.Del /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Devices.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Devices.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Devices/DevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/DevicesRequestBuilder.cs index 26a8e4cec8a..441655b9c51 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/DevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/DevicesRequestBuilder.cs @@ -99,7 +99,7 @@ public DevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Device body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Device body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Devices/Item/Commands/CommandsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/Commands/CommandsRequestBuilder.cs index 78a771b1eb5..d02822ac706 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Item/Commands/CommandsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/Commands/CommandsRequestBuilder.cs @@ -93,7 +93,7 @@ public CommandsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Command body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Command body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Devices/Item/Commands/Item/CommandItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/Commands/Item/CommandItemRequestBuilder.cs index 27d3a1161be..348b5e1acec 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Item/Commands/Item/CommandItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/Commands/Item/CommandItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Command body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Command body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Devices/Item/DeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/DeviceItemRequestBuilder.cs index 9c9e2750159..acb541f6e3e 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Item/DeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/DeviceItemRequestBuilder.cs @@ -144,7 +144,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Device body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -205,7 +205,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Device body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Devices/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/Extensions/ExtensionsRequestBuilder.cs index f0c6bcd2038..1ebbc578967 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Devices/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index c34d7b9ff3e..809d80d6bc1 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Devices/Item/RegisteredOwners/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/RegisteredOwners/Ref/RefRequestBuilder.cs index f47c6be532b..379c2c99f0d 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Item/RegisteredOwners/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/RegisteredOwners/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/me/devices/{device%2Did}/registeredOwners/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Devices/Item/RegisteredUsers/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/RegisteredUsers/Ref/RefRequestBuilder.cs index 14743e72524..ee4f8366069 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Item/RegisteredUsers/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/RegisteredUsers/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/me/devices/{device%2Did}/registeredUsers/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Devices/Item/UsageRights/Item/UsageRightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/UsageRights/Item/UsageRightItemRequestBuilder.cs index 2d0db3d5f22..a7718c129b4 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Item/UsageRights/Item/UsageRightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/UsageRights/Item/UsageRightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UsageRight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UsageRight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Devices/Item/UsageRights/UsageRightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Devices/Item/UsageRights/UsageRightsRequestBuilder.cs index b538040b51e..03bd04d0015 100644 --- a/src/Microsoft.Graph/Generated/Me/Devices/Item/UsageRights/UsageRightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Devices/Item/UsageRights/UsageRightsRequestBuilder.cs @@ -93,7 +93,7 @@ public UsageRightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UsageRight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UsageRight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/DevicesWithDeviceId/DevicesWithDeviceIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/DevicesWithDeviceId/DevicesWithDeviceIdRequestBuilder.cs index 95fcf4d7473..dcc3196d2bd 100644 --- a/src/Microsoft.Graph/Generated/Me/DevicesWithDeviceId/DevicesWithDeviceIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/DevicesWithDeviceId/DevicesWithDeviceIdRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Device body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Device body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/AssignedRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/AssignedRolesRequestBuilder.cs index f350e2c1e6e..e9850173921 100644 --- a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/AssignedRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/AssignedRolesRequestBuilder.cs @@ -94,7 +94,7 @@ public AssignedRolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EngagementRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/EngagementRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/EngagementRoleItemRequestBuilder.cs index c0aad3f197f..1fc97a752dc 100644 --- a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/EngagementRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/EngagementRoleItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EngagementRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/Members/Item/EngagementRoleMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/Members/Item/EngagementRoleMemberItemRequestBuilder.cs index 8115ac4bb11..cf8327f5e74 100644 --- a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/Members/Item/EngagementRoleMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/Members/Item/EngagementRoleMemberItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EngagementRoleMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementRoleMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/Members/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/Members/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs index ea494641050..b511f9f9c95 100644 --- a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/Members/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/Members/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/Members/MembersRequestBuilder.cs index 4b72065f9fa..e095076f467 100644 --- a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/AssignedRoles/Item/Members/MembersRequestBuilder.cs @@ -93,7 +93,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EngagementRoleMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EngagementRoleMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/EmployeeExperienceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/EmployeeExperienceRequestBuilder.cs index d3ff9590d4a..24898d5ab28 100644 --- a/src/Microsoft.Graph/Generated/Me/EmployeeExperience/EmployeeExperienceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/EmployeeExperience/EmployeeExperienceRequestBuilder.cs @@ -119,7 +119,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EmployeeExperienceUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -180,7 +180,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EmployeeExperienceUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Events/Delta/DeltaGetResponse.cs index 85b0c9c60fc..234f7fa1306 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Events.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Events.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Events/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Events/Delta/DeltaResponse.cs index 8fb8d17bd55..0728cb09fc8 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Events.Delt /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Events.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Events.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Events/EventsRequestBuilder.cs index 91653041881..2413845e93b 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/EventsRequestBuilder.cs @@ -101,7 +101,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Accept/AcceptPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Accept/AcceptPostRequestBody.cs index 058fea51a84..180fd17fce6 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Accept/AcceptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Accept/AcceptPostRequestBody.cs @@ -58,7 +58,7 @@ public AcceptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Events.Item.Accept.AcceptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Events.Item.Accept.AcceptPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteBoolValue("SendResponse", SendResponse); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Accept/AcceptRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Accept/AcceptRequestBuilder.cs index f95ca196313..dbcf15033a4 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Accept/AcceptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Accept/AcceptRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Events.Item.Accept.A public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Events.Item.Accept.AcceptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Events.Item.Accept.AcceptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Attachments/AttachmentsRequestBuilder.cs index 9c862404601..084d198ba84 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Attachments/AttachmentsRequestBuilder.cs @@ -84,8 +84,8 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - /// Find more info here + /// Use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. + /// Find more info here /// /// A /// The request body @@ -101,7 +101,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -129,7 +129,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Use this API to add an attachment to an existing event. This operation limits the size of the attachment you can add to under 3 MB. If an organizer adds an attachment to a meeting event, the organizer can subsequently update the event to send the attachment and update the event for each attendee as well. /// /// A /// The request body @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index 5f42d47d5ce..78955b7dd2e 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index d4b715b00be..e1e79c64afe 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Events.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Cancel/CancelPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Cancel/CancelPostRequestBody.cs index a47a2520a49..825aa843e2e 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Cancel/CancelPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Cancel/CancelPostRequestBody.cs @@ -52,7 +52,7 @@ public CancelPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Events.Item.Cancel.CancelPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Events.Item.Cancel.CancelPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Cancel/CancelRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Cancel/CancelRequestBuilder.cs index fe1e8a90d24..73b9c00a27b 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Cancel/CancelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Cancel/CancelRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Events.Item.Cancel.C public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Events.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Events.Item.Cancel.CancelPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Decline/DeclinePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Decline/DeclinePostRequestBody.cs index eda6c588dd6..fe128a77d78 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Decline/DeclinePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Decline/DeclinePostRequestBody.cs @@ -75,7 +75,7 @@ public DeclinePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Events.Item.Decline.DeclinePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Events.Item.Decline.DeclinePostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("ProposedNewTime", ProposedNewTime); writer.WriteBoolValue("SendResponse", SendResponse); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Decline/DeclineRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Decline/DeclineRequestBuilder.cs index db97a7d6f3e..3856da83a6e 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Decline/DeclineRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Decline/DeclineRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Events.Item.Decline. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Events.Item.Decline.DeclinePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Events.Item.Decline.DeclinePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/EventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/EventItemRequestBuilder.cs index 01a0dfc838d..e4c3d6014fa 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/EventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/EventItemRequestBuilder.cs @@ -171,7 +171,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -232,7 +232,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Event body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Extensions/ExtensionsRequestBuilder.cs index f531a2bcc10..2c615e55bb2 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 6a8926edc6a..d68785fffd3 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Forward/ForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Forward/ForwardPostRequestBody.cs index c40536fee83..4bcfdf64aa1 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Forward/ForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Forward/ForwardPostRequestBody.cs @@ -69,7 +69,7 @@ public ForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Events.Item.Forward.ForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Events.Item.Forward.ForwardPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Forward/ForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Forward/ForwardRequestBuilder.cs index f27baa504a1..604e84a10a0 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Forward/ForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Forward/ForwardRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Events.Item.Forward. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Events.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Events.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Instances/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Instances/Delta/DeltaGetResponse.cs index ce5959b894b..73f32853e08 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Instances/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Instances/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Events.Item.Instances.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Events.Item.Instances.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/Instances/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/Instances/Delta/DeltaResponse.cs index 2c52c013cff..e8b68717731 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/Instances/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/Instances/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Events.Item /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Events.Item.Instances.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Events.Item.Instances.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs index 3961ba27b12..51eb899cce8 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/SnoozeReminder/SnoozeReminderPostRequestBody.cs @@ -53,7 +53,7 @@ public SnoozeReminderPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("NewReminderTime", NewReminderTime); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs index b94fc1ee880..22c708ca700 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/SnoozeReminder/SnoozeReminderRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Events.Item.SnoozeRe public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Events.Item.SnoozeReminder.SnoozeReminderPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs index 5efce14e252..fb9432d3642 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/TentativelyAccept/TentativelyAcceptPostRequestBody.cs @@ -75,7 +75,7 @@ public TentativelyAcceptPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("ProposedNewTime", ProposedNewTime); writer.WriteBoolValue("SendResponse", SendResponse); diff --git a/src/Microsoft.Graph/Generated/Me/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs index 8ec1de1ab86..175508d6478 100644 --- a/src/Microsoft.Graph/Generated/Me/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Events/Item/TentativelyAccept/TentativelyAcceptRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Events.Item.Tentativ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Events.Item.TentativelyAccept.TentativelyAcceptPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ExportPersonalData/ExportPersonalDataPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ExportPersonalData/ExportPersonalDataPostRequestBody.cs index dba41947eaf..997f4a4157f 100644 --- a/src/Microsoft.Graph/Generated/Me/ExportPersonalData/ExportPersonalDataPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ExportPersonalData/ExportPersonalDataPostRequestBody.cs @@ -52,7 +52,7 @@ public ExportPersonalDataPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ExportPersonalData.ExportPersonalDataPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ExportPersonalData.ExportPersonalDataPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("storageLocation", StorageLocation); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ExportPersonalData/ExportPersonalDataRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ExportPersonalData/ExportPersonalDataRequestBuilder.cs index affa7d879c1..9d049c4c449 100644 --- a/src/Microsoft.Graph/Generated/Me/ExportPersonalData/ExportPersonalDataRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ExportPersonalData/ExportPersonalDataRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ExportPersonalData.E public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ExportPersonalData.ExportPersonalDataPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ExportPersonalData.ExportPersonalDataPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Extensions/ExtensionsRequestBuilder.cs index 0be548a8d73..7fd4e4b0c22 100644 --- a/src/Microsoft.Graph/Generated/Me/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Extensions/Item/ExtensionItemRequestBuilder.cs index a487c67dd8f..795b05eba0b 100644 --- a/src/Microsoft.Graph/Generated/Me/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/FindMeetingTimes/FindMeetingTimesPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/FindMeetingTimes/FindMeetingTimesPostRequestBody.cs index 371f4b61e77..8d27c23139e 100644 --- a/src/Microsoft.Graph/Generated/Me/FindMeetingTimes/FindMeetingTimesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/FindMeetingTimes/FindMeetingTimesPostRequestBody.cs @@ -115,7 +115,7 @@ public FindMeetingTimesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.FindMeetingTimes.FindMeetingTimesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.FindMeetingTimes.FindMeetingTimesPostRequestBody(); } /// @@ -142,7 +142,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendees", Attendees); writer.WriteBoolValue("isOrganizerOptional", IsOrganizerOptional); writer.WriteObjectValue("locationConstraint", LocationConstraint); diff --git a/src/Microsoft.Graph/Generated/Me/FindMeetingTimes/FindMeetingTimesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/FindMeetingTimes/FindMeetingTimesRequestBuilder.cs index fae9d68c1f1..3043ecf0956 100644 --- a/src/Microsoft.Graph/Generated/Me/FindMeetingTimes/FindMeetingTimesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/FindMeetingTimes/FindMeetingTimesRequestBuilder.cs @@ -52,7 +52,7 @@ public FindMeetingTimesRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Me.FindMeetingTimes.FindMeetingTimesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.FindMeetingTimes.FindMeetingTimesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/FindRoomLists/FindRoomListsGetResponse.cs b/src/Microsoft.Graph/Generated/Me/FindRoomLists/FindRoomListsGetResponse.cs index dac790fd73d..3fe5b227357 100644 --- a/src/Microsoft.Graph/Generated/Me/FindRoomLists/FindRoomListsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/FindRoomLists/FindRoomListsGetResponse.cs @@ -36,7 +36,7 @@ public partial class FindRoomListsGetResponse : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.FindRoomLists.FindRoomListsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.FindRoomLists.FindRoomListsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/FindRoomLists/FindRoomListsResponse.cs b/src/Microsoft.Graph/Generated/Me/FindRoomLists/FindRoomListsResponse.cs index 81f8f4a46b0..5e546a901bf 100644 --- a/src/Microsoft.Graph/Generated/Me/FindRoomLists/FindRoomListsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/FindRoomLists/FindRoomListsResponse.cs @@ -20,7 +20,7 @@ public partial class FindRoomListsResponse : global::Microsoft.Graph.Beta.Me.Fin /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.FindRoomLists.FindRoomListsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.FindRoomLists.FindRoomListsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/FindRooms/FindRoomsGetResponse.cs b/src/Microsoft.Graph/Generated/Me/FindRooms/FindRoomsGetResponse.cs index 0cde7450206..e5de826df57 100644 --- a/src/Microsoft.Graph/Generated/Me/FindRooms/FindRoomsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/FindRooms/FindRoomsGetResponse.cs @@ -36,7 +36,7 @@ public partial class FindRoomsGetResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.FindRooms.FindRoomsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.FindRooms.FindRoomsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/FindRooms/FindRoomsResponse.cs b/src/Microsoft.Graph/Generated/Me/FindRooms/FindRoomsResponse.cs index 6ed5cb121a7..e4cf4eb64a3 100644 --- a/src/Microsoft.Graph/Generated/Me/FindRooms/FindRoomsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/FindRooms/FindRoomsResponse.cs @@ -20,7 +20,7 @@ public partial class FindRoomsResponse : global::Microsoft.Graph.Beta.Me.FindRoo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.FindRooms.FindRoomsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.FindRooms.FindRoomsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/FindRoomsWithRoomList/FindRoomsWithRoomListGetResponse.cs b/src/Microsoft.Graph/Generated/Me/FindRoomsWithRoomList/FindRoomsWithRoomListGetResponse.cs index 94b55a6134e..7b15f65a23b 100644 --- a/src/Microsoft.Graph/Generated/Me/FindRoomsWithRoomList/FindRoomsWithRoomListGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/FindRoomsWithRoomList/FindRoomsWithRoomListGetResponse.cs @@ -36,7 +36,7 @@ public partial class FindRoomsWithRoomListGetResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.FindRoomsWithRoomList.FindRoomsWithRoomListGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.FindRoomsWithRoomList.FindRoomsWithRoomListGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/FindRoomsWithRoomList/FindRoomsWithRoomListResponse.cs b/src/Microsoft.Graph/Generated/Me/FindRoomsWithRoomList/FindRoomsWithRoomListResponse.cs index 8d7092fd164..851c28418c8 100644 --- a/src/Microsoft.Graph/Generated/Me/FindRoomsWithRoomList/FindRoomsWithRoomListResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/FindRoomsWithRoomList/FindRoomsWithRoomListResponse.cs @@ -20,7 +20,7 @@ public partial class FindRoomsWithRoomListResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.FindRoomsWithRoomList.FindRoomsWithRoomListResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.FindRoomsWithRoomList.FindRoomsWithRoomListResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddPostRequestBody.cs index ba6ec74986c..9897f00e4a0 100644 --- a/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddPostRequestBody.cs @@ -53,7 +53,7 @@ public AddPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.FollowedSites.Add.AddPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.FollowedSites.Add.AddPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddPostResponse.cs b/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddPostResponse.cs index 83ddd472d37..96ff73fb1ed 100644 --- a/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddPostResponse.cs @@ -36,7 +36,7 @@ public partial class AddPostResponse : global::Microsoft.Graph.Beta.Models.BaseC /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.FollowedSites.Add.AddPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.FollowedSites.Add.AddPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddRequestBuilder.cs index 9c8f92fa65e..6075f76aeff 100644 --- a/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddRequestBuilder.cs @@ -51,7 +51,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsAddPostResponseAsync(global::Microsoft.Graph.Beta.Me.FollowedSites.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public AddRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Me.FollowedSites.Add.AddPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.FollowedSites.Add.AddPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddResponse.cs b/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddResponse.cs index 2e7efed2ccd..bca5a6b6786 100644 --- a/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/FollowedSites/Add/AddResponse.cs @@ -20,7 +20,7 @@ public partial class AddResponse : global::Microsoft.Graph.Beta.Me.FollowedSites /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.FollowedSites.Add.AddResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.FollowedSites.Add.AddResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemovePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemovePostRequestBody.cs index aa4a2e7ba2d..a12d0bcdcba 100644 --- a/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemovePostRequestBody.cs @@ -53,7 +53,7 @@ public RemovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.FollowedSites.Remove.RemovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.FollowedSites.Remove.RemovePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemovePostResponse.cs b/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemovePostResponse.cs index 57481bfa1fe..7bf872f236a 100644 --- a/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemovePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemovePostResponse.cs @@ -36,7 +36,7 @@ public partial class RemovePostResponse : global::Microsoft.Graph.Beta.Models.Ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.FollowedSites.Remove.RemovePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.FollowedSites.Remove.RemovePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemoveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemoveRequestBuilder.cs index 885db0c1799..07205db18ba 100644 --- a/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemoveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemoveRequestBuilder.cs @@ -51,7 +51,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsRemovePostResponseAsync(global::Microsoft.Graph.Beta.Me.FollowedSites.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public RemoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Me.FollowedSites.Remove.RemovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.FollowedSites.Remove.RemovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemoveResponse.cs b/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemoveResponse.cs index 6e19c0aa0ba..4ec3da413f2 100644 --- a/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemoveResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/FollowedSites/Remove/RemoveResponse.cs @@ -20,7 +20,7 @@ public partial class RemoveResponse : global::Microsoft.Graph.Beta.Me.FollowedSi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.FollowedSites.Remove.RemoveResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.FollowedSites.Remove.RemoveResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/GetEffectiveDeviceEnrollmentConfigurations/GetEffectiveDeviceEnrollmentConfigurationsGetResponse.cs b/src/Microsoft.Graph/Generated/Me/GetEffectiveDeviceEnrollmentConfigurations/GetEffectiveDeviceEnrollmentConfigurationsGetResponse.cs index 859ae620457..c9d17de0339 100644 --- a/src/Microsoft.Graph/Generated/Me/GetEffectiveDeviceEnrollmentConfigurations/GetEffectiveDeviceEnrollmentConfigurationsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetEffectiveDeviceEnrollmentConfigurations/GetEffectiveDeviceEnrollmentConfigurationsGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetEffectiveDeviceEnrollmentConfigurationsGetResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetEffectiveDeviceEnrollmentConfigurations.GetEffectiveDeviceEnrollmentConfigurationsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetEffectiveDeviceEnrollmentConfigurations.GetEffectiveDeviceEnrollmentConfigurationsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/GetEffectiveDeviceEnrollmentConfigurations/GetEffectiveDeviceEnrollmentConfigurationsResponse.cs b/src/Microsoft.Graph/Generated/Me/GetEffectiveDeviceEnrollmentConfigurations/GetEffectiveDeviceEnrollmentConfigurationsResponse.cs index 0b5fdf82a9f..887064db168 100644 --- a/src/Microsoft.Graph/Generated/Me/GetEffectiveDeviceEnrollmentConfigurations/GetEffectiveDeviceEnrollmentConfigurationsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetEffectiveDeviceEnrollmentConfigurations/GetEffectiveDeviceEnrollmentConfigurationsResponse.cs @@ -20,7 +20,7 @@ public partial class GetEffectiveDeviceEnrollmentConfigurationsResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetEffectiveDeviceEnrollmentConfigurations.GetEffectiveDeviceEnrollmentConfigurationsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetEffectiveDeviceEnrollmentConfigurations.GetEffectiveDeviceEnrollmentConfigurationsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/GetLoggedOnManagedDevices/GetLoggedOnManagedDevicesGetResponse.cs b/src/Microsoft.Graph/Generated/Me/GetLoggedOnManagedDevices/GetLoggedOnManagedDevicesGetResponse.cs index c34efd8d410..39cf92a2310 100644 --- a/src/Microsoft.Graph/Generated/Me/GetLoggedOnManagedDevices/GetLoggedOnManagedDevicesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetLoggedOnManagedDevices/GetLoggedOnManagedDevicesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetLoggedOnManagedDevicesGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetLoggedOnManagedDevices.GetLoggedOnManagedDevicesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetLoggedOnManagedDevices.GetLoggedOnManagedDevicesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/GetLoggedOnManagedDevices/GetLoggedOnManagedDevicesResponse.cs b/src/Microsoft.Graph/Generated/Me/GetLoggedOnManagedDevices/GetLoggedOnManagedDevicesResponse.cs index 5b1fd3a781c..dc1a49381a8 100644 --- a/src/Microsoft.Graph/Generated/Me/GetLoggedOnManagedDevices/GetLoggedOnManagedDevicesResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetLoggedOnManagedDevices/GetLoggedOnManagedDevicesResponse.cs @@ -20,7 +20,7 @@ public partial class GetLoggedOnManagedDevicesResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetLoggedOnManagedDevices.GetLoggedOnManagedDevicesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetLoggedOnManagedDevices.GetLoggedOnManagedDevicesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsPostRequestBody.cs index c14291d71ee..58827a4f0de 100644 --- a/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsPostRequestBody.cs @@ -59,7 +59,7 @@ public GetMailTipsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.GetMailTips.GetMailTipsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetMailTips.GetMailTipsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("EmailAddresses", EmailAddresses); writer.WriteEnumValue("MailTipsOptions", MailTipsOptions); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsPostResponse.cs b/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsPostResponse.cs index 535512102b7..31554a29052 100644 --- a/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetMailTipsPostResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetMailTips.GetMailTipsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetMailTips.GetMailTipsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsRequestBuilder.cs index 601cd5deadc..37d87c8ad4b 100644 --- a/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMailTipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsGetMailTipsPostResponseAsync(global::Microsoft.Graph.Beta.Me.GetMailTips.GetMailTipsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMailTipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Me.GetMailTips.GetMailTipsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.GetMailTips.GetMailTipsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsResponse.cs b/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsResponse.cs index 2eaa7314422..3017b72df77 100644 --- a/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetMailTips/GetMailTipsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMailTipsResponse : global::Microsoft.Graph.Beta.Me.GetMa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetMailTips.GetMailTipsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetMailTips.GetMailTipsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/GetManagedAppDiagnosticStatuses/GetManagedAppDiagnosticStatusesGetResponse.cs b/src/Microsoft.Graph/Generated/Me/GetManagedAppDiagnosticStatuses/GetManagedAppDiagnosticStatusesGetResponse.cs index 7458794a8de..183093448b8 100644 --- a/src/Microsoft.Graph/Generated/Me/GetManagedAppDiagnosticStatuses/GetManagedAppDiagnosticStatusesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetManagedAppDiagnosticStatuses/GetManagedAppDiagnosticStatusesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetManagedAppDiagnosticStatusesGetResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetManagedAppDiagnosticStatuses.GetManagedAppDiagnosticStatusesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetManagedAppDiagnosticStatuses.GetManagedAppDiagnosticStatusesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/GetManagedAppDiagnosticStatuses/GetManagedAppDiagnosticStatusesResponse.cs b/src/Microsoft.Graph/Generated/Me/GetManagedAppDiagnosticStatuses/GetManagedAppDiagnosticStatusesResponse.cs index bbb45aabd62..bf785052971 100644 --- a/src/Microsoft.Graph/Generated/Me/GetManagedAppDiagnosticStatuses/GetManagedAppDiagnosticStatusesResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetManagedAppDiagnosticStatuses/GetManagedAppDiagnosticStatusesResponse.cs @@ -20,7 +20,7 @@ public partial class GetManagedAppDiagnosticStatusesResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetManagedAppDiagnosticStatuses.GetManagedAppDiagnosticStatusesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetManagedAppDiagnosticStatuses.GetManagedAppDiagnosticStatusesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/GetManagedAppPolicies/GetManagedAppPoliciesGetResponse.cs b/src/Microsoft.Graph/Generated/Me/GetManagedAppPolicies/GetManagedAppPoliciesGetResponse.cs index 8ab6794fe31..a0917545a32 100644 --- a/src/Microsoft.Graph/Generated/Me/GetManagedAppPolicies/GetManagedAppPoliciesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetManagedAppPolicies/GetManagedAppPoliciesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetManagedAppPoliciesGetResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetManagedAppPolicies.GetManagedAppPoliciesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetManagedAppPolicies.GetManagedAppPoliciesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/GetManagedAppPolicies/GetManagedAppPoliciesResponse.cs b/src/Microsoft.Graph/Generated/Me/GetManagedAppPolicies/GetManagedAppPoliciesResponse.cs index e851dea44ad..cd5242bf59a 100644 --- a/src/Microsoft.Graph/Generated/Me/GetManagedAppPolicies/GetManagedAppPoliciesResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetManagedAppPolicies/GetManagedAppPoliciesResponse.cs @@ -20,7 +20,7 @@ public partial class GetManagedAppPoliciesResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetManagedAppPolicies.GetManagedAppPoliciesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetManagedAppPolicies.GetManagedAppPoliciesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithAppFailures/GetManagedDevicesWithAppFailuresGetResponse.cs b/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithAppFailures/GetManagedDevicesWithAppFailuresGetResponse.cs index 9bc6c70fac9..f5adce11d30 100644 --- a/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithAppFailures/GetManagedDevicesWithAppFailuresGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithAppFailures/GetManagedDevicesWithAppFailuresGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetManagedDevicesWithAppFailures.GetManagedDevicesWithAppFailuresGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetManagedDevicesWithAppFailures.GetManagedDevicesWithAppFailuresGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithAppFailures/GetManagedDevicesWithAppFailuresResponse.cs b/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithAppFailures/GetManagedDevicesWithAppFailuresResponse.cs index 7863b0f051d..7e2fd53ea9e 100644 --- a/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithAppFailures/GetManagedDevicesWithAppFailuresResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithAppFailures/GetManagedDevicesWithAppFailuresResponse.cs @@ -20,7 +20,7 @@ public partial class GetManagedDevicesWithAppFailuresResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetManagedDevicesWithAppFailures.GetManagedDevicesWithAppFailuresResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetManagedDevicesWithAppFailures.GetManagedDevicesWithAppFailuresResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithFailedOrPendingApps/GetManagedDevicesWithFailedOrPendingAppsGetResponse.cs b/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithFailedOrPendingApps/GetManagedDevicesWithFailedOrPendingAppsGetResponse.cs index d339fd25490..30177a459a6 100644 --- a/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithFailedOrPendingApps/GetManagedDevicesWithFailedOrPendingAppsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithFailedOrPendingApps/GetManagedDevicesWithFailedOrPendingAppsGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetManagedDevicesWithFailedOrPendingAppsGetResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetManagedDevicesWithFailedOrPendingApps.GetManagedDevicesWithFailedOrPendingAppsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetManagedDevicesWithFailedOrPendingApps.GetManagedDevicesWithFailedOrPendingAppsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithFailedOrPendingApps/GetManagedDevicesWithFailedOrPendingAppsResponse.cs b/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithFailedOrPendingApps/GetManagedDevicesWithFailedOrPendingAppsResponse.cs index c452de896b8..d9b2bb0f0bf 100644 --- a/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithFailedOrPendingApps/GetManagedDevicesWithFailedOrPendingAppsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetManagedDevicesWithFailedOrPendingApps/GetManagedDevicesWithFailedOrPendingAppsResponse.cs @@ -20,7 +20,7 @@ public partial class GetManagedDevicesWithFailedOrPendingAppsResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetManagedDevicesWithFailedOrPendingApps.GetManagedDevicesWithFailedOrPendingAppsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetManagedDevicesWithFailedOrPendingApps.GetManagedDevicesWithFailedOrPendingAppsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsPostRequestBody.cs index 62125c030d0..7ccdf4d7fae 100644 --- a/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.GetMemberGroups.GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetMemberGroups.GetMemberGroupsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsPostResponse.cs index 9272175316f..3cdff08e9cc 100644 --- a/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetMemberGroups.GetMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetMemberGroups.GetMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsRequestBuilder.cs index 5ba92c2fc79..afcb2192c84 100644 --- a/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsGetMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.Me.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Me.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsResponse.cs index 6b76022cb5f..a1787e75117 100644 --- a/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetMemberGroups/GetMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberGroupsResponse : global::Microsoft.Graph.Beta.Me.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetMemberGroups.GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetMemberGroups.GetMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsPostRequestBody.cs index 1567ad698ad..517404fb62f 100644 --- a/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.GetMemberObjects.GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetMemberObjects.GetMemberObjectsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsPostResponse.cs index 6118fa525a4..8e47ad493a8 100644 --- a/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetMemberObjects.GetMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetMemberObjects.GetMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsRequestBuilder.cs index fdb9dc25e16..3e3bdf7ad99 100644 --- a/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.Me.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Me.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsResponse.cs index c9f9bf02db2..a8a292d8f64 100644 --- a/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetMemberObjects/GetMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberObjectsResponse : global::Microsoft.Graph.Beta.Me. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetMemberObjects.GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetMemberObjects.GetMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsPostResponse.cs b/src/Microsoft.Graph/Generated/Me/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsPostResponse.cs index 35cf9b91f08..a4cf0d8537b 100644 --- a/src/Microsoft.Graph/Generated/Me/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetPasswordSingleSignOnCredentialsPostResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetPasswordSingleSignOnCredentials.GetPasswordSingleSignOnCredentialsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetPasswordSingleSignOnCredentials.GetPasswordSingleSignOnCredentialsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsResponse.cs b/src/Microsoft.Graph/Generated/Me/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsResponse.cs index dca66ca5fa6..5dacb0fa056 100644 --- a/src/Microsoft.Graph/Generated/Me/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/GetPasswordSingleSignOnCredentials/GetPasswordSingleSignOnCredentialsResponse.cs @@ -20,7 +20,7 @@ public partial class GetPasswordSingleSignOnCredentialsResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.GetPasswordSingleSignOnCredentials.GetPasswordSingleSignOnCredentialsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.GetPasswordSingleSignOnCredentials.GetPasswordSingleSignOnCredentialsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/InferenceClassification/InferenceClassificationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InferenceClassification/InferenceClassificationRequestBuilder.cs index 483e9ac390f..a71d086a46c 100644 --- a/src/Microsoft.Graph/Generated/Me/InferenceClassification/InferenceClassificationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InferenceClassification/InferenceClassificationRequestBuilder.cs @@ -80,7 +80,7 @@ public InferenceClassificationRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.InferenceClassification body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -122,7 +122,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InferenceClassification body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InferenceClassification/Overrides/Item/InferenceClassificationOverrideItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InferenceClassification/Overrides/Item/InferenceClassificationOverrideItemRequestBuilder.cs index 71f089de223..be83fce938d 100644 --- a/src/Microsoft.Graph/Generated/Me/InferenceClassification/Overrides/Item/InferenceClassificationOverrideItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InferenceClassification/Overrides/Item/InferenceClassificationOverrideItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InferenceClassificationOverride body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InferenceClassificationOverride body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InferenceClassification/Overrides/OverridesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InferenceClassification/Overrides/OverridesRequestBuilder.cs index 5086a74bacd..a59276cbdb7 100644 --- a/src/Microsoft.Graph/Generated/Me/InferenceClassification/Overrides/OverridesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InferenceClassification/Overrides/OverridesRequestBuilder.cs @@ -95,7 +95,7 @@ public OverridesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.InferenceClassificationOverride body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.InferenceClassificationOverride body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/DataLossPreventionPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/DataLossPreventionPoliciesRequestBuilder.cs index f65415fcb21..df6393a8464 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/DataLossPreventionPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/DataLossPreventionPoliciesRequestBuilder.cs @@ -99,7 +99,7 @@ public DataLossPreventionPoliciesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluatePostRequestBody.cs index 0b8048112ae..6d156487944 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluatePostRequestBody.cs @@ -85,7 +85,7 @@ public EvaluatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.InformationProtection.DataLossPreventionPolicies.Evaluate.EvaluatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.DataLossPreventionPolicies.Evaluate.EvaluatePostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("evaluationInput", EvaluationInput); writer.WriteObjectValue("notificationInfo", NotificationInfo); writer.WriteStringValue("target", Target); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluateRequestBuilder.cs index 467dc452102..370c05e84ce 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/Evaluate/EvaluateRequestBuilder.cs @@ -51,7 +51,7 @@ public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.DataLossPreventionPolicies.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.InformationProtection.DataLossPreventionPolicies.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/Item/DataLossPreventionPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/Item/DataLossPreventionPolicyItemRequestBuilder.cs index 8ad8ad2d8ec..b3928ddf839 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/Item/DataLossPreventionPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/DataLossPreventionPolicies/Item/DataLossPreventionPolicyItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/DecryptBuffer/DecryptBufferPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/DecryptBuffer/DecryptBufferPostRequestBody.cs index 0e37b65a49d..779ec20e176 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/DecryptBuffer/DecryptBufferPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/DecryptBuffer/DecryptBufferPostRequestBody.cs @@ -68,7 +68,7 @@ public DecryptBufferPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.InformationProtection.DecryptBuffer.DecryptBufferPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.DecryptBuffer.DecryptBufferPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("encryptedBuffer", EncryptedBuffer); writer.WriteByteArrayValue("publishingLicense", PublishingLicense); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/DecryptBuffer/DecryptBufferRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/DecryptBuffer/DecryptBufferRequestBuilder.cs index 6814f4ff6c2..0182b06840a 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/DecryptBuffer/DecryptBufferRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/DecryptBuffer/DecryptBufferRequestBuilder.cs @@ -52,7 +52,7 @@ public DecryptBufferRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.DecryptBuffer.DecryptBufferPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.InformationProtection.DecryptBuffer.DecryptBufferPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/EncryptBuffer/EncryptBufferPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/EncryptBuffer/EncryptBufferPostRequestBody.cs index d06c2c4aa20..e8216c5d18b 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/EncryptBuffer/EncryptBufferPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/EncryptBuffer/EncryptBufferPostRequestBody.cs @@ -58,7 +58,7 @@ public EncryptBufferPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.InformationProtection.EncryptBuffer.EncryptBufferPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.EncryptBuffer.EncryptBufferPostRequestBody(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("buffer", Buffer); writer.WriteGuidValue("labelId", LabelId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/EncryptBuffer/EncryptBufferRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/EncryptBuffer/EncryptBufferRequestBuilder.cs index 65acbdbec5d..31540c544b0 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/EncryptBuffer/EncryptBufferRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/EncryptBuffer/EncryptBufferRequestBuilder.cs @@ -52,7 +52,7 @@ public EncryptBufferRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.EncryptBuffer.EncryptBufferPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.InformationProtection.EncryptBuffer.EncryptBufferPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/InformationProtectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/InformationProtectionRequestBuilder.cs index 6728294255c..0a41933e930 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/InformationProtectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/InformationProtectionRequestBuilder.cs @@ -156,7 +156,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InformationProtection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -217,7 +217,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InformationProtection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostRequestBody.cs index 44263a9fe77..d01ede13b31 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluateApplicationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteObjectValue("labelingOptions", LabelingOptions); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostResponse.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostResponse.cs index 9df136c9a33..68cd53d7bef 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationPostResponse.cs @@ -36,7 +36,7 @@ public partial class EvaluateApplicationPostResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationRequestBuilder.cs index 6d4d582a673..b182786f4fb 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationRequestBuilder.cs @@ -52,7 +52,7 @@ public EvaluateApplicationRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsEvaluateApplicationPostResponseAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -79,7 +79,7 @@ public EvaluateApplicationRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -103,7 +103,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationResponse.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationResponse.cs index 090f5d519c4..1cdbe6e6f3b 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateApplication/EvaluateApplicationResponse.cs @@ -20,7 +20,7 @@ public partial class EvaluateApplicationResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateApplication.EvaluateApplicationResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs index 59a475733f7..a93c41eac1e 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluateClassificationResultsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("classificationResults", ClassificationResults); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs index c495b35a5f3..e39ca1aa06b 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs @@ -36,7 +36,7 @@ public partial class EvaluateClassificationResultsPostResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsRequestBuilder.cs index ea26e068899..b0a8675d6c9 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsRequestBuilder.cs @@ -52,7 +52,7 @@ public EvaluateClassificationResultsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsEvaluateClassificationResultsPostResponseAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -79,7 +79,7 @@ public EvaluateClassificationResultsRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -103,7 +103,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsResponse.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsResponse.cs index 49877cfffbe..b48abca571d 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateClassificationResults/EvaluateClassificationResultsResponse.cs @@ -20,7 +20,7 @@ public partial class EvaluateClassificationResultsResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateClassificationResults.EvaluateClassificationResultsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostRequestBody.cs index 2c4f7b3edcc..f9c57a093b9 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluateRemovalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteObjectValue("downgradeJustification", DowngradeJustification); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostResponse.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostResponse.cs index 39e11a6730d..74fba7bc30a 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalPostResponse.cs @@ -36,7 +36,7 @@ public partial class EvaluateRemovalPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalRequestBuilder.cs index 10e9cbbde92..da7d3493f6f 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalRequestBuilder.cs @@ -52,7 +52,7 @@ public EvaluateRemovalRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsEvaluateRemovalPostResponseAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -79,7 +79,7 @@ public EvaluateRemovalRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -103,7 +103,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalResponse.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalResponse.cs index 269653b4484..e4743c56595 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/EvaluateRemoval/EvaluateRemovalResponse.cs @@ -20,7 +20,7 @@ public partial class EvaluateRemovalResponse : global::Microsoft.Graph.Beta.Me.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.EvaluateRemoval.EvaluateRemovalResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelPostRequestBody.cs index f1cfb8136c7..e94c35c064a 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelPostRequestBody.cs @@ -53,7 +53,7 @@ public ExtractLabelPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.ExtractLabel.ExtractLabelPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.ExtractLabel.ExtractLabelPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelRequestBuilder.cs index b772736b777..a4d17fc80d2 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/ExtractLabel/ExtractLabelRequestBuilder.cs @@ -53,7 +53,7 @@ public ExtractLabelRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.ExtractLabel.ExtractLabelPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.InformationProtection.Policy.Labels.ExtractLabel.ExtractLabelPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/Item/InformationProtectionLabelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/Item/InformationProtectionLabelItemRequestBuilder.cs index 16d7913b968..777f163ade2 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/Item/InformationProtectionLabelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/Item/InformationProtectionLabelItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InformationProtectionLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InformationProtectionLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/LabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/LabelsRequestBuilder.cs index 007de23e4aa..04dfd687090 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/LabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/Labels/LabelsRequestBuilder.cs @@ -126,7 +126,7 @@ public LabelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.InformationProtectionLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.InformationProtectionLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/PolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/PolicyRequestBuilder.cs index 90c88ccad2d..8855c7333df 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/PolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/Policy/PolicyRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InformationProtectionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InformationProtectionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs index 33651ad555a..142dd0b6c2e 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs @@ -101,7 +101,7 @@ public ComputeRightsAndInheritancePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("delegatedUserEmail", DelegatedUserEmail); writer.WriteStringValue("locale", Locale); writer.WriteCollectionOfObjectValues("protectedContents", ProtectedContents); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs index dfe96bd63a2..3e468714b66 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs @@ -52,7 +52,7 @@ public ComputeRightsAndInheritanceRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs index e269b47aeab..e4c3f9ba969 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Evaluate/EvaluatePostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.Evaluate.EvaluatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.Evaluate.EvaluatePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("currentLabel", CurrentLabel); writer.WriteCollectionOfObjectValues("discoveredSensitiveTypes", DiscoveredSensitiveTypes); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs index b44f8d587c3..8ac2901b6f9 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Evaluate/EvaluateRequestBuilder.cs @@ -51,7 +51,7 @@ public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs index 0d3e11f1ad4..16b72831ed8 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs index 55958254abd..c3e6946b869 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritancePostRequestBody.cs @@ -101,7 +101,7 @@ public ComputeRightsAndInheritancePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("delegatedUserEmail", DelegatedUserEmail); writer.WriteStringValue("locale", Locale); writer.WriteCollectionOfObjectValues("protectedContents", ProtectedContents); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs index c28b400074c..4253dbc6cd4 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/ComputeRightsAndInheritance/ComputeRightsAndInheritanceRequestBuilder.cs @@ -52,7 +52,7 @@ public ComputeRightsAndInheritanceRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.Item.Sublabels.ComputeRightsAndInheritance.ComputeRightsAndInheritancePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs index 26856ab1eb3..fa88b9ba903 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluatePostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("currentLabel", CurrentLabel); writer.WriteCollectionOfObjectValues("discoveredSensitiveTypes", DiscoveredSensitiveTypes); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs index aa77cc9fab5..6fe107697df 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/Evaluate/EvaluateRequestBuilder.cs @@ -51,7 +51,7 @@ public EvaluateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.InformationProtection.SensitivityLabels.Item.Sublabels.Evaluate.EvaluatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs index 404b7bf5797..b99c9586508 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/Item/SensitivityLabelItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs index 3c065608018..04f4814b357 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/Item/Sublabels/SublabelsRequestBuilder.cs @@ -120,7 +120,7 @@ public SublabelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs index 516e7809c21..e03aa06b108 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs @@ -120,7 +120,7 @@ public SensitivityLabelsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityPolicySettings/SensitivityPolicySettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityPolicySettings/SensitivityPolicySettingsRequestBuilder.cs index bdb29a8ad65..1d684f87cd0 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityPolicySettings/SensitivityPolicySettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SensitivityPolicySettings/SensitivityPolicySettingsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SensitivityPolicySettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SensitivityPolicySettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SignDigest/SignDigestPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SignDigest/SignDigestPostRequestBody.cs index 44a75fa4112..936cb189a6e 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SignDigest/SignDigestPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SignDigest/SignDigestPostRequestBody.cs @@ -52,7 +52,7 @@ public SignDigestPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.InformationProtection.SignDigest.SignDigestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.SignDigest.SignDigestPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("digest", Digest); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/SignDigest/SignDigestRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/SignDigest/SignDigestRequestBuilder.cs index 46c7a0df098..e8d164f8376 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/SignDigest/SignDigestRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/SignDigest/SignDigestRequestBuilder.cs @@ -52,7 +52,7 @@ public SignDigestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.SignDigest.SignDigestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.InformationProtection.SignDigest.SignDigestPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/Item/Results/Item/ThreatAssessmentResultItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/Item/Results/Item/ThreatAssessmentResultItemRequestBuilder.cs index c9ff3f68154..44218c1c30c 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/Item/Results/Item/ThreatAssessmentResultItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/Item/Results/Item/ThreatAssessmentResultItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ThreatAssessmentResult body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ThreatAssessmentResult body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/Item/Results/ResultsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/Item/Results/ResultsRequestBuilder.cs index 992778c7344..20f536cab01 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/Item/Results/ResultsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/Item/Results/ResultsRequestBuilder.cs @@ -93,7 +93,7 @@ public ResultsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ThreatAssessmentResult body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ThreatAssessmentResult body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/Item/ThreatAssessmentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/Item/ThreatAssessmentRequestItemRequestBuilder.cs index e9cb909a5a6..8efc7158277 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/Item/ThreatAssessmentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/Item/ThreatAssessmentRequestItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/ThreatAssessmentRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/ThreatAssessmentRequestsRequestBuilder.cs index e584fb90bfb..c281c4871d5 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/ThreatAssessmentRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/ThreatAssessmentRequests/ThreatAssessmentRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public ThreatAssessmentRequestsRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/VerifySignature/VerifySignaturePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/VerifySignature/VerifySignaturePostRequestBody.cs index dbae9a83f44..10d60c0852f 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/VerifySignature/VerifySignaturePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/VerifySignature/VerifySignaturePostRequestBody.cs @@ -84,7 +84,7 @@ public VerifySignaturePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.InformationProtection.VerifySignature.VerifySignaturePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InformationProtection.VerifySignature.VerifySignaturePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("digest", Digest); writer.WriteByteArrayValue("signature", Signature); writer.WriteStringValue("signingKeyId", SigningKeyId); diff --git a/src/Microsoft.Graph/Generated/Me/InformationProtection/VerifySignature/VerifySignatureRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/InformationProtection/VerifySignature/VerifySignatureRequestBuilder.cs index 368881ef1a3..da099ea92c9 100644 --- a/src/Microsoft.Graph/Generated/Me/InformationProtection/VerifySignature/VerifySignatureRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/InformationProtection/VerifySignature/VerifySignatureRequestBuilder.cs @@ -52,7 +52,7 @@ public VerifySignatureRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Me.InformationProtection.VerifySignature.VerifySignaturePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.InformationProtection.VerifySignature.VerifySignaturePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Insights/InsightsRequestBuilder.cs index 1b501b95010..16a04814b5f 100644 --- a/src/Microsoft.Graph/Generated/Me/Insights/InsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Insights/InsightsRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemInsights body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemInsights body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Insights/Shared/Item/SharedInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Insights/Shared/Item/SharedInsightItemRequestBuilder.cs index 21bfa6b174b..03a45cb5857 100644 --- a/src/Microsoft.Graph/Generated/Me/Insights/Shared/Item/SharedInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Insights/Shared/Item/SharedInsightItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SharedInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SharedInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Insights/Shared/SharedRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Insights/Shared/SharedRequestBuilder.cs index f8019a86dff..dcba02a6f1a 100644 --- a/src/Microsoft.Graph/Generated/Me/Insights/Shared/SharedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Insights/Shared/SharedRequestBuilder.cs @@ -93,7 +93,7 @@ public SharedRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SharedInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SharedInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Insights/Trending/Item/TrendingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Insights/Trending/Item/TrendingItemRequestBuilder.cs index cc8a22920d1..a2a2f3151f2 100644 --- a/src/Microsoft.Graph/Generated/Me/Insights/Trending/Item/TrendingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Insights/Trending/Item/TrendingItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Trending body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Trending body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Insights/Trending/TrendingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Insights/Trending/TrendingRequestBuilder.cs index 855f9bc902e..b42f294691e 100644 --- a/src/Microsoft.Graph/Generated/Me/Insights/Trending/TrendingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Insights/Trending/TrendingRequestBuilder.cs @@ -94,7 +94,7 @@ public TrendingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Trending body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Trending body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Insights/Used/Item/UsedInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Insights/Used/Item/UsedInsightItemRequestBuilder.cs index e4c0617c112..1076e2e4e2e 100644 --- a/src/Microsoft.Graph/Generated/Me/Insights/Used/Item/UsedInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Insights/Used/Item/UsedInsightItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UsedInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UsedInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Insights/Used/UsedRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Insights/Used/UsedRequestBuilder.cs index d927f3aa105..9a44a10da8f 100644 --- a/src/Microsoft.Graph/Generated/Me/Insights/Used/UsedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Insights/Used/UsedRequestBuilder.cs @@ -94,7 +94,7 @@ public UsedRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UsedInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UsedInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/InvalidateAllRefreshTokens/InvalidateAllRefreshTokensPostResponse.cs b/src/Microsoft.Graph/Generated/Me/InvalidateAllRefreshTokens/InvalidateAllRefreshTokensPostResponse.cs index c2e5d9dfc84..294e85bce5a 100644 --- a/src/Microsoft.Graph/Generated/Me/InvalidateAllRefreshTokens/InvalidateAllRefreshTokensPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/InvalidateAllRefreshTokens/InvalidateAllRefreshTokensPostResponse.cs @@ -42,7 +42,7 @@ public InvalidateAllRefreshTokensPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.InvalidateAllRefreshTokens.InvalidateAllRefreshTokensPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InvalidateAllRefreshTokens.InvalidateAllRefreshTokensPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/InvalidateAllRefreshTokens/InvalidateAllRefreshTokensResponse.cs b/src/Microsoft.Graph/Generated/Me/InvalidateAllRefreshTokens/InvalidateAllRefreshTokensResponse.cs index b00f91c800d..a461f232159 100644 --- a/src/Microsoft.Graph/Generated/Me/InvalidateAllRefreshTokens/InvalidateAllRefreshTokensResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/InvalidateAllRefreshTokens/InvalidateAllRefreshTokensResponse.cs @@ -20,7 +20,7 @@ public partial class InvalidateAllRefreshTokensResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.InvalidateAllRefreshTokens.InvalidateAllRefreshTokensResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.InvalidateAllRefreshTokens.InvalidateAllRefreshTokensResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/IsManagedAppUserBlocked/IsManagedAppUserBlockedGetResponse.cs b/src/Microsoft.Graph/Generated/Me/IsManagedAppUserBlocked/IsManagedAppUserBlockedGetResponse.cs index 14619ea01d5..dae8c34387a 100644 --- a/src/Microsoft.Graph/Generated/Me/IsManagedAppUserBlocked/IsManagedAppUserBlockedGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/IsManagedAppUserBlocked/IsManagedAppUserBlockedGetResponse.cs @@ -42,7 +42,7 @@ public IsManagedAppUserBlockedGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.IsManagedAppUserBlocked.IsManagedAppUserBlockedGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.IsManagedAppUserBlocked.IsManagedAppUserBlockedGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/IsManagedAppUserBlocked/IsManagedAppUserBlockedResponse.cs b/src/Microsoft.Graph/Generated/Me/IsManagedAppUserBlocked/IsManagedAppUserBlockedResponse.cs index 286f9d04f35..ea7e4ac13a2 100644 --- a/src/Microsoft.Graph/Generated/Me/IsManagedAppUserBlocked/IsManagedAppUserBlockedResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/IsManagedAppUserBlocked/IsManagedAppUserBlockedResponse.cs @@ -20,7 +20,7 @@ public partial class IsManagedAppUserBlockedResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.IsManagedAppUserBlocked.IsManagedAppUserBlockedResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.IsManagedAppUserBlocked.IsManagedAppUserBlockedResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/JoinedGroups/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/JoinedGroups/Delta/DeltaGetResponse.cs index 05fbd624b90..87b666c33e9 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedGroups/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedGroups/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.JoinedGroups.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.JoinedGroups.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/JoinedGroups/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/JoinedGroups/Delta/DeltaResponse.cs index 0f629659554..9beddbf8f4d 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedGroups/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedGroups/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.JoinedGroup /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.JoinedGroups.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.JoinedGroups.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/JoinedGroups/EvaluateDynamicMembership/EvaluateDynamicMembershipPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/JoinedGroups/EvaluateDynamicMembership/EvaluateDynamicMembershipPostRequestBody.cs index 7a8aa64a85c..f9fad935d3c 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedGroups/EvaluateDynamicMembership/EvaluateDynamicMembershipPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedGroups/EvaluateDynamicMembership/EvaluateDynamicMembershipPostRequestBody.cs @@ -68,7 +68,7 @@ public EvaluateDynamicMembershipPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.JoinedGroups.EvaluateDynamicMembership.EvaluateDynamicMembershipPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.JoinedGroups.EvaluateDynamicMembership.EvaluateDynamicMembershipPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("memberId", MemberId); writer.WriteStringValue("membershipRule", MembershipRule); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/JoinedGroups/EvaluateDynamicMembership/EvaluateDynamicMembershipRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedGroups/EvaluateDynamicMembership/EvaluateDynamicMembershipRequestBuilder.cs index 31ed67907bb..5030f11de43 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedGroups/EvaluateDynamicMembership/EvaluateDynamicMembershipRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedGroups/EvaluateDynamicMembership/EvaluateDynamicMembershipRequestBuilder.cs @@ -52,7 +52,7 @@ public EvaluateDynamicMembershipRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Me.JoinedGroups.EvaluateDynamicMembership.EvaluateDynamicMembershipPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.JoinedGroups.EvaluateDynamicMembership.EvaluateDynamicMembershipPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/LicenseDetails/Item/LicenseDetailsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/LicenseDetails/Item/LicenseDetailsItemRequestBuilder.cs index 0fa945ced59..dbb86dc84c6 100644 --- a/src/Microsoft.Graph/Generated/Me/LicenseDetails/Item/LicenseDetailsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/LicenseDetails/Item/LicenseDetailsItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.LicenseDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.LicenseDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/LicenseDetails/LicenseDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/LicenseDetails/LicenseDetailsRequestBuilder.cs index b87825de559..e9a9ed1b0f1 100644 --- a/src/Microsoft.Graph/Generated/Me/LicenseDetails/LicenseDetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/LicenseDetails/LicenseDetailsRequestBuilder.cs @@ -100,7 +100,7 @@ public LicenseDetailsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.LicenseDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.LicenseDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Delta/DeltaGetResponse.cs index b2621203687..10983662912 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.MailFolders.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Delta/DeltaResponse.cs index eedeeb85122..08bdf0520d5 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.MailFolders /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.MailFolders.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs index 9b2348e2b71..492f16ee241 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/ChildFoldersRequestBuilder.cs @@ -84,8 +84,8 @@ public ChildFoldersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MailFolderCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a new mailSearchFolder in the specified user's mailbox. - /// Find more info here + /// Use this API to create a new child mailFolder. If you intend a new folder to be hidden, you must set the isHidden property to true on creation. + /// Find more info here /// /// A /// The request body @@ -101,7 +101,7 @@ public ChildFoldersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MailFolder body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -129,7 +129,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a new mailSearchFolder in the specified user's mailbox. + /// Use this API to create a new child mailFolder. If you intend a new folder to be hidden, you must set the isHidden property to true on creation. /// /// A /// The request body @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MailFolder body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Delta/DeltaGetResponse.cs index fefe0ed92aa..8282ce022c8 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Delta/DeltaResponse.cs index 64ec46b0842..f47db6e6f52 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.MailFolders /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Copy/CopyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Copy/CopyPostRequestBody.cs index bfe6bb211b4..388f9ebabda 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Copy/CopyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Copy/CopyPostRequestBody.cs @@ -52,7 +52,7 @@ public CopyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Copy.CopyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Copy.CopyPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("DestinationId", DestinationId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Copy/CopyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Copy/CopyRequestBuilder.cs index 7af7ba445b9..bf12a824354 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Copy/CopyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Copy/CopyRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Copy.CopyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Copy.CopyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/MailFolderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/MailFolderItemRequestBuilder.cs index 16b073afa6e..5e6fb13fb7d 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/MailFolderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/MailFolderItemRequestBuilder.cs @@ -144,7 +144,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MailFolder body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -205,7 +205,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailFolder body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/MessageRules/Item/MessageRuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/MessageRules/Item/MessageRuleItemRequestBuilder.cs index 161abf6effa..f47ce1c4257 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/MessageRules/Item/MessageRuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/MessageRules/Item/MessageRuleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MessageRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MessageRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/MessageRules/MessageRulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/MessageRules/MessageRulesRequestBuilder.cs index 0fa64b850bc..9956b008097 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/MessageRules/MessageRulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/MessageRules/MessageRulesRequestBuilder.cs @@ -93,7 +93,7 @@ public MessageRulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MessageRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MessageRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Delta/DeltaGetResponse.cs index 73334f19598..bcb3b48b62a 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Delta/DeltaResponse.cs index a8412aebd12..79ea83c36cb 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.MailFolders /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index f1d3a257ce3..73f132e0adc 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index 1e9d6e7d352..fb8a926e438 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index d4908179c86..09be3526912 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Copy/CopyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Copy/CopyPostRequestBody.cs index 057c42c31ce..972c1bde439 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Copy/CopyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Copy/CopyPostRequestBody.cs @@ -52,7 +52,7 @@ public CopyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Copy.CopyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Copy.CopyPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("DestinationId", DestinationId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Copy/CopyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Copy/CopyRequestBuilder.cs index 880c379c0f2..45421c21f0d 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Copy/CopyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Copy/CopyRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Copy.CopyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Copy.CopyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateForward/CreateForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateForward/CreateForwardPostRequestBody.cs index b7088841fde..9ca1d6d15d7 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateForward/CreateForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateForward/CreateForwardPostRequestBody.cs @@ -85,7 +85,7 @@ public CreateForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.CreateForward.CreateForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.CreateForward.CreateForwardPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateForward/CreateForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateForward/CreateForwardRequestBuilder.cs index 28434af9697..567a366c00c 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateForward/CreateForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateForward/CreateForwardRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateForwardRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.CreateForward.CreateForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.CreateForward.CreateForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReply/CreateReplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReply/CreateReplyPostRequestBody.cs index 570c66512de..9af0ba5bb4b 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReply/CreateReplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReply/CreateReplyPostRequestBody.cs @@ -69,7 +69,7 @@ public CreateReplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.CreateReply.CreateReplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.CreateReply.CreateReplyPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReply/CreateReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReply/CreateReplyRequestBuilder.cs index d992806a4fe..8f1e4ba501c 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReply/CreateReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReply/CreateReplyRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.CreateReply.CreateReplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.CreateReply.CreateReplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllPostRequestBody.cs index 4d6821c68c5..d6d3fabf178 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllPostRequestBody.cs @@ -69,7 +69,7 @@ public CreateReplyAllPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.CreateReplyAll.CreateReplyAllPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.CreateReplyAll.CreateReplyAllPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllRequestBuilder.cs index f131ea477b7..ca0ff84983f 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateReplyAllRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.CreateReplyAll.CreateReplyAllPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.CreateReplyAll.CreateReplyAllPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Extensions/ExtensionsRequestBuilder.cs index eac8f1f7931..d2a8f39ddad 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index dbd17754672..0b396ff8d6c 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Forward/ForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Forward/ForwardPostRequestBody.cs index 2af36e84932..7003ebdbe06 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Forward/ForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Forward/ForwardPostRequestBody.cs @@ -85,7 +85,7 @@ public ForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Forward.ForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Forward.ForwardPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Forward/ForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Forward/ForwardRequestBuilder.cs index 165ce2196a5..f7e92731c2c 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Forward/ForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Forward/ForwardRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Chi public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkPostRequestBody.cs index 1e262181f20..74580a01ba0 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkPostRequestBody.cs @@ -42,7 +42,7 @@ public MarkAsJunkPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.MarkAsJunk.MarkAsJunkPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.MarkAsJunk.MarkAsJunkPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("MoveToJunk", MoveToJunk); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkRequestBuilder.cs index a6cb060364c..84a7e518726 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkRequestBuilder.cs @@ -53,7 +53,7 @@ public MarkAsJunkRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.MarkAsJunk.MarkAsJunkPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.MarkAsJunk.MarkAsJunkPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkPostRequestBody.cs index b37e6320543..5ec5c5cf96e 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkPostRequestBody.cs @@ -42,7 +42,7 @@ public MarkAsNotJunkPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.MarkAsNotJunk.MarkAsNotJunkPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.MarkAsNotJunk.MarkAsNotJunkPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("MoveToInbox", MoveToInbox); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkRequestBuilder.cs index 62cae58a48d..f4357dda9cd 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkRequestBuilder.cs @@ -53,7 +53,7 @@ public MarkAsNotJunkRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.MarkAsNotJunk.MarkAsNotJunkPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.MarkAsNotJunk.MarkAsNotJunkPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Mentions/MentionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Mentions/MentionsRequestBuilder.cs index 7cf8664b48d..11b3d47b806 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Mentions/MentionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Mentions/MentionsRequestBuilder.cs @@ -93,7 +93,7 @@ public MentionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Mention body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Mention body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MessageItemRequestBuilder.cs index 93e1739e44c..931d4452d4f 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/MessageItemRequestBuilder.cs @@ -204,7 +204,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Message body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -265,7 +265,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Message body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Move/MovePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Move/MovePostRequestBody.cs index 2315f28a329..4b607813528 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Move/MovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Move/MovePostRequestBody.cs @@ -52,7 +52,7 @@ public MovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Move.MovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Move.MovePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("DestinationId", DestinationId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Move/MoveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Move/MoveRequestBuilder.cs index 16357096697..c2b19eff2b0 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Move/MoveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Move/MoveRequestBuilder.cs @@ -52,7 +52,7 @@ public MoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Move.MovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Move.MovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Reply/ReplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Reply/ReplyPostRequestBody.cs index a44a0a815ba..e13e8d92941 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Reply/ReplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Reply/ReplyPostRequestBody.cs @@ -69,7 +69,7 @@ public ReplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Reply.ReplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Reply.ReplyPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Reply/ReplyRequestBuilder.cs index e58d75d6036..ab2b9bba0dd 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Reply/ReplyRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Chi public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReplyAll/ReplyAllPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReplyAll/ReplyAllPostRequestBody.cs index c8095b13c7f..9a28d338e06 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReplyAll/ReplyAllPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReplyAll/ReplyAllPostRequestBody.cs @@ -69,7 +69,7 @@ public ReplyAllPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.ReplyAll.ReplyAllPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.ReplyAll.ReplyAllPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReplyAll/ReplyAllRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReplyAll/ReplyAllRequestBuilder.cs index 6369e51cc2f..72396840b8e 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReplyAll/ReplyAllRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReplyAll/ReplyAllRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Chi public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.ReplyAll.ReplyAllPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.ReplyAll.ReplyAllPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReportMessage/ReportMessagePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReportMessage/ReportMessagePostRequestBody.cs index 37d79684f2a..c3b3e3259b1 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReportMessage/ReportMessagePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReportMessage/ReportMessagePostRequestBody.cs @@ -49,7 +49,7 @@ public ReportMessagePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.ReportMessage.ReportMessagePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.ReportMessage.ReportMessagePostRequestBody(); } /// @@ -70,7 +70,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("IsMessageMoveRequested", IsMessageMoveRequested); writer.WriteEnumValue("ReportAction", ReportAction); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReportMessage/ReportMessageRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReportMessage/ReportMessageRequestBuilder.cs index 49a3d90d663..d237e40c5b1 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReportMessage/ReportMessageRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/ReportMessage/ReportMessageRequestBuilder.cs @@ -51,7 +51,7 @@ public ReportMessageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.ReportMessage.ReportMessagePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Messages.Item.ReportMessage.ReportMessagePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Value/ContentRequestBuilder.cs index 7cb496c23f1..c11ae05717a 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/Item/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/MessagesRequestBuilder.cs index e4984fa6a14..3f9d4a8ce06 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Messages/MessagesRequestBuilder.cs @@ -99,7 +99,7 @@ public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Message body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Message body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Move/MovePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Move/MovePostRequestBody.cs index 1b24846e9bb..9b9e1b61dde 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Move/MovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Move/MovePostRequestBody.cs @@ -52,7 +52,7 @@ public MovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Move.MovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Move.MovePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("DestinationId", DestinationId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Move/MoveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Move/MoveRequestBuilder.cs index 514d5a15541..60d9c69a14c 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Move/MoveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/Move/MoveRequestBuilder.cs @@ -52,7 +52,7 @@ public MoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Move.MovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.Move.MovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStatePostRequestBody.cs index de4aa958e8f..9761eb74f52 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStatePostRequestBody.cs @@ -48,7 +48,7 @@ public UpdateAllMessagesReadStatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.UpdateAllMessagesReadState.UpdateAllMessagesReadStatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.UpdateAllMessagesReadState.UpdateAllMessagesReadStatePostRequestBody(); } /// @@ -69,7 +69,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isRead", IsRead); writer.WriteBoolValue("suppressReadReceipts", SuppressReadReceipts); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStateRequestBuilder.cs index 5cace7566c9..96da4149df0 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/ChildFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStateRequestBuilder.cs @@ -51,7 +51,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Chi public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.UpdateAllMessagesReadState.UpdateAllMessagesReadStatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.ChildFolders.Item.UpdateAllMessagesReadState.UpdateAllMessagesReadStatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Copy/CopyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Copy/CopyPostRequestBody.cs index f73087144b7..b3301c9dd6c 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Copy/CopyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Copy/CopyPostRequestBody.cs @@ -52,7 +52,7 @@ public CopyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.Copy.CopyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Copy.CopyPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("DestinationId", DestinationId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Copy/CopyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Copy/CopyRequestBuilder.cs index 5774b8a3947..23d45e28c20 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Copy/CopyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Copy/CopyRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Copy.CopyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Copy.CopyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs index 111f2a2db54..614f5f207b7 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs @@ -153,7 +153,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MailFolder body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -214,7 +214,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailFolder body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MessageRules/Item/MessageRuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MessageRules/Item/MessageRuleItemRequestBuilder.cs index 5c73080d838..5e69785a85f 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MessageRules/Item/MessageRuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MessageRules/Item/MessageRuleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MessageRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MessageRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MessageRules/MessageRulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MessageRules/MessageRulesRequestBuilder.cs index 508ad3d1e76..62c434470b4 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MessageRules/MessageRulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MessageRules/MessageRulesRequestBuilder.cs @@ -93,7 +93,7 @@ public MessageRulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MessageRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MessageRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Delta/DeltaGetResponse.cs index 04b4777b078..b68e2cb1f54 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Delta/DeltaResponse.cs index 0b3c54c923e..009784b3926 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.MailFolders /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index f66f0e41ae3..ad4ae0d0c85 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index a6656263ede..9d05ba6792a 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index c7f10e71b43..273877318fe 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Copy/CopyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Copy/CopyPostRequestBody.cs index 0ab22b3ddf4..8c8bd05c716 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Copy/CopyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Copy/CopyPostRequestBody.cs @@ -52,7 +52,7 @@ public CopyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Copy.CopyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Copy.CopyPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("DestinationId", DestinationId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Copy/CopyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Copy/CopyRequestBuilder.cs index 59724e1cc88..de52673c929 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Copy/CopyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Copy/CopyRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Copy.CopyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Copy.CopyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateForward/CreateForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateForward/CreateForwardPostRequestBody.cs index 18e6ac6f3ac..c82cfa75341 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateForward/CreateForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateForward/CreateForwardPostRequestBody.cs @@ -85,7 +85,7 @@ public CreateForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.CreateForward.CreateForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.CreateForward.CreateForwardPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateForward/CreateForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateForward/CreateForwardRequestBuilder.cs index b6038ca0e5c..e135085e9ec 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateForward/CreateForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateForward/CreateForwardRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateForwardRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.CreateForward.CreateForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.CreateForward.CreateForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReply/CreateReplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReply/CreateReplyPostRequestBody.cs index 576446fcb18..92901addf97 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReply/CreateReplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReply/CreateReplyPostRequestBody.cs @@ -69,7 +69,7 @@ public CreateReplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.CreateReply.CreateReplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.CreateReply.CreateReplyPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReply/CreateReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReply/CreateReplyRequestBuilder.cs index 8925f6b635f..ceb74e32f80 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReply/CreateReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReply/CreateReplyRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.CreateReply.CreateReplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.CreateReply.CreateReplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllPostRequestBody.cs index d8f9eabd6c8..43214fc5f71 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllPostRequestBody.cs @@ -69,7 +69,7 @@ public CreateReplyAllPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.CreateReplyAll.CreateReplyAllPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.CreateReplyAll.CreateReplyAllPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllRequestBuilder.cs index 0996dd4759b..b01dc2d1f1c 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/CreateReplyAll/CreateReplyAllRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateReplyAllRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.CreateReplyAll.CreateReplyAllPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.CreateReplyAll.CreateReplyAllPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Extensions/ExtensionsRequestBuilder.cs index 749297af95b..617ba3a3923 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 59e857f2b93..0c5f492aa11 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Forward/ForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Forward/ForwardPostRequestBody.cs index d4455c095fd..5c757e95474 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Forward/ForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Forward/ForwardPostRequestBody.cs @@ -85,7 +85,7 @@ public ForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Forward.ForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Forward.ForwardPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Forward/ForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Forward/ForwardRequestBuilder.cs index f4326c04b6f..7c8de79ff14 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Forward/ForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Forward/ForwardRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Mes public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkPostRequestBody.cs index 7949a85acdd..c5ea2ae2a81 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkPostRequestBody.cs @@ -42,7 +42,7 @@ public MarkAsJunkPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.MarkAsJunk.MarkAsJunkPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.MarkAsJunk.MarkAsJunkPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("MoveToJunk", MoveToJunk); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkRequestBuilder.cs index a7e62c64063..da51b7169ad 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsJunk/MarkAsJunkRequestBuilder.cs @@ -53,7 +53,7 @@ public MarkAsJunkRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.MarkAsJunk.MarkAsJunkPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.MarkAsJunk.MarkAsJunkPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkPostRequestBody.cs index 7ddde432dd7..9d3a783e6ea 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkPostRequestBody.cs @@ -42,7 +42,7 @@ public MarkAsNotJunkPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.MarkAsNotJunk.MarkAsNotJunkPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.MarkAsNotJunk.MarkAsNotJunkPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("MoveToInbox", MoveToInbox); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkRequestBuilder.cs index e1c360b381d..96bc924a2a8 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MarkAsNotJunk/MarkAsNotJunkRequestBuilder.cs @@ -53,7 +53,7 @@ public MarkAsNotJunkRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.MarkAsNotJunk.MarkAsNotJunkPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.MarkAsNotJunk.MarkAsNotJunkPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Mentions/MentionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Mentions/MentionsRequestBuilder.cs index 782ef992207..08e2cf23a32 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Mentions/MentionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Mentions/MentionsRequestBuilder.cs @@ -93,7 +93,7 @@ public MentionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Mention body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Mention body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MessageItemRequestBuilder.cs index 6f453c7a2b1..e0b1c3c0303 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/MessageItemRequestBuilder.cs @@ -204,7 +204,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Message body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -265,7 +265,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Message body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Move/MovePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Move/MovePostRequestBody.cs index ace07051dba..abe6a829fe4 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Move/MovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Move/MovePostRequestBody.cs @@ -52,7 +52,7 @@ public MovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Move.MovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Move.MovePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("DestinationId", DestinationId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Move/MoveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Move/MoveRequestBuilder.cs index a761c0095f1..ec884be1a93 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Move/MoveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Move/MoveRequestBuilder.cs @@ -52,7 +52,7 @@ public MoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Move.MovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Move.MovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Reply/ReplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Reply/ReplyPostRequestBody.cs index c000e786150..478c78bb728 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Reply/ReplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Reply/ReplyPostRequestBody.cs @@ -69,7 +69,7 @@ public ReplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Reply.ReplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Reply.ReplyPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Reply/ReplyRequestBuilder.cs index f4175de60e9..89d95933c4d 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Reply/ReplyRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Mes public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReplyAll/ReplyAllPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReplyAll/ReplyAllPostRequestBody.cs index a638fb8d8a3..31abdad7ed5 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReplyAll/ReplyAllPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReplyAll/ReplyAllPostRequestBody.cs @@ -69,7 +69,7 @@ public ReplyAllPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.ReplyAll.ReplyAllPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.ReplyAll.ReplyAllPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReplyAll/ReplyAllRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReplyAll/ReplyAllRequestBuilder.cs index 4e85983a41f..3b1c56d593e 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReplyAll/ReplyAllRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReplyAll/ReplyAllRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Mes public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.ReplyAll.ReplyAllPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.ReplyAll.ReplyAllPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReportMessage/ReportMessagePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReportMessage/ReportMessagePostRequestBody.cs index f5571d1a9d9..2778e4e55b2 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReportMessage/ReportMessagePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReportMessage/ReportMessagePostRequestBody.cs @@ -49,7 +49,7 @@ public ReportMessagePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.ReportMessage.ReportMessagePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.ReportMessage.ReportMessagePostRequestBody(); } /// @@ -70,7 +70,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("IsMessageMoveRequested", IsMessageMoveRequested); writer.WriteEnumValue("ReportAction", ReportAction); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReportMessage/ReportMessageRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReportMessage/ReportMessageRequestBuilder.cs index 121f6548ba4..5a462d0ea14 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReportMessage/ReportMessageRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/ReportMessage/ReportMessageRequestBuilder.cs @@ -51,7 +51,7 @@ public ReportMessageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.ReportMessage.ReportMessagePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Messages.Item.ReportMessage.ReportMessagePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Value/ContentRequestBuilder.cs index 4478207b553..4f63a853211 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/Item/Value/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/MessagesRequestBuilder.cs index e93bcab8d2e..b408144d4a7 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Messages/MessagesRequestBuilder.cs @@ -101,7 +101,7 @@ public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Message body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Message body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Move/MovePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Move/MovePostRequestBody.cs index f997499d77e..5397d0eb388 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Move/MovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Move/MovePostRequestBody.cs @@ -52,7 +52,7 @@ public MovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.Move.MovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.Move.MovePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("DestinationId", DestinationId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Move/MoveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Move/MoveRequestBuilder.cs index 49c1f8758ab..c89d0b68452 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Move/MoveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/Move/MoveRequestBuilder.cs @@ -52,7 +52,7 @@ public MoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Move.MovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Move.MovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStatePostRequestBody.cs index 7f9bd89fb6f..6e0a8d0b06f 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStatePostRequestBody.cs @@ -48,7 +48,7 @@ public UpdateAllMessagesReadStatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.MailFolders.Item.UpdateAllMessagesReadState.UpdateAllMessagesReadStatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.MailFolders.Item.UpdateAllMessagesReadState.UpdateAllMessagesReadStatePostRequestBody(); } /// @@ -69,7 +69,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isRead", IsRead); writer.WriteBoolValue("suppressReadReceipts", SuppressReadReceipts); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStateRequestBuilder.cs index 1de3103591e..be92bbcfcf6 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/UpdateAllMessagesReadState/UpdateAllMessagesReadStateRequestBuilder.cs @@ -51,7 +51,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.Upd public async Task PostAsync(global::Microsoft.Graph.Beta.Me.MailFolders.Item.UpdateAllMessagesReadState.UpdateAllMessagesReadStatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.MailFolders.Item.UpdateAllMessagesReadState.UpdateAllMessagesReadStatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/MailFoldersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/MailFoldersRequestBuilder.cs index 24c5cd51910..01051a73838 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/MailFoldersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/MailFoldersRequestBuilder.cs @@ -101,7 +101,7 @@ public MailFoldersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MailFolder body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MailFolder body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailboxSettings/MailboxSettingsRequestBuilder.cs index a5196689405..f881dbd40b0 100644 --- a/src/Microsoft.Graph/Generated/Me/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -76,7 +76,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -118,7 +118,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedAppLogCollectionRequests/Item/ManagedAppLogCollectionRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedAppLogCollectionRequests/Item/ManagedAppLogCollectionRequestItemRequestBuilder.cs index bce984ebfb6..48ef831efcb 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedAppLogCollectionRequests/Item/ManagedAppLogCollectionRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedAppLogCollectionRequests/Item/ManagedAppLogCollectionRequestItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedAppLogCollectionRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppLogCollectionRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedAppLogCollectionRequests/ManagedAppLogCollectionRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedAppLogCollectionRequests/ManagedAppLogCollectionRequestsRequestBuilder.cs index 57d09daebef..a70174b0635 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedAppLogCollectionRequests/ManagedAppLogCollectionRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedAppLogCollectionRequests/ManagedAppLogCollectionRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public ManagedAppLogCollectionRequestsRequestBuilder(string rawUrl, IRequestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedAppLogCollectionRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedAppLogCollectionRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnGetResponse.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnGetResponse.cs index 5a14e4d1d0f..2089e9ccf51 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnGetResponse.cs @@ -36,7 +36,7 @@ public partial class AppDiagnosticsWithUpnGetResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ManagedDevices.AppDiagnosticsWithUpn.AppDiagnosticsWithUpnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.AppDiagnosticsWithUpn.AppDiagnosticsWithUpnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnResponse.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnResponse.cs index 043d5aed3e2..c51b933e048 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/AppDiagnosticsWithUpn/AppDiagnosticsWithUpnResponse.cs @@ -20,7 +20,7 @@ public partial class AppDiagnosticsWithUpnResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ManagedDevices.AppDiagnosticsWithUpn.AppDiagnosticsWithUpnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.AppDiagnosticsWithUpn.AppDiagnosticsWithUpnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsPostRequestBody.cs index 10c9b0f701f..692113c69ce 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsPostRequestBody.cs @@ -53,7 +53,7 @@ public DownloadAppDiagnosticsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.DownloadAppDiagnostics.DownloadAppDiagnosticsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.DownloadAppDiagnostics.DownloadAppDiagnosticsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("request", Request); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsRequestBuilder.cs index f427f8f2f21..67a966fb677 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadAppDiagnostics/DownloadAppDiagnosticsRequestBuilder.cs @@ -50,7 +50,7 @@ public DownloadAppDiagnosticsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.DownloadAppDiagnostics.DownloadAppDiagnosticsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.DownloadAppDiagnostics.DownloadAppDiagnosticsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticPostRequestBody.cs index e39199dae18..0a0cd55af54 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticPostRequestBody.cs @@ -53,7 +53,7 @@ public DownloadPowerliftAppDiagnosticPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.DownloadPowerliftAppDiagnostic.DownloadPowerliftAppDiagnosticPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.DownloadPowerliftAppDiagnostic.DownloadPowerliftAppDiagnosticPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("request", Request); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticRequestBuilder.cs index bacefd3ea27..9801d5d4321 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/DownloadPowerliftAppDiagnostic/DownloadPowerliftAppDiagnosticRequestBuilder.cs @@ -50,7 +50,7 @@ public DownloadPowerliftAppDiagnosticRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.DownloadPowerliftAppDiagnostic.DownloadPowerliftAppDiagnosticPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.DownloadPowerliftAppDiagnostic.DownloadPowerliftAppDiagnosticPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/octet-stream, application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/ExecuteAction/ExecuteActionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/ExecuteAction/ExecuteActionPostRequestBody.cs index d306ed691ec..b2f1f8edcc2 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/ExecuteAction/ExecuteActionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/ExecuteAction/ExecuteActionPostRequestBody.cs @@ -173,7 +173,7 @@ public ExecuteActionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.ExecuteAction.ExecuteActionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.ExecuteAction.ExecuteActionPostRequestBody(); } /// @@ -203,7 +203,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("actionName", ActionName); writer.WriteStringValue("carrierUrl", CarrierUrl); writer.WriteStringValue("deprovisionReason", DeprovisionReason); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/ExecuteAction/ExecuteActionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/ExecuteAction/ExecuteActionRequestBuilder.cs index 477bd37dd8e..ee8114e6b98 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/ExecuteAction/ExecuteActionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/ExecuteAction/ExecuteActionRequestBuilder.cs @@ -51,7 +51,7 @@ public ExecuteActionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.ExecuteAction.ExecuteActionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.ExecuteAction.ExecuteActionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimPostRequestBody.cs index b6cea53a5ca..81d9e15e16c 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimPostRequestBody.cs @@ -52,7 +52,7 @@ public ActivateDeviceEsimPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.ActivateDeviceEsim.ActivateDeviceEsimPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.ActivateDeviceEsim.ActivateDeviceEsimPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("carrierUrl", CarrierUrl); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimRequestBuilder.cs index 3ad037b2d4d..59c76f3d702 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ActivateDeviceEsim/ActivateDeviceEsimRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.ActivateDeviceEsim.ActivateDeviceEsimPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.ActivateDeviceEsim.ActivateDeviceEsimPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/AssignmentFilterEvaluationStatusDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/AssignmentFilterEvaluationStatusDetailsRequestBuilder.cs index b262831d3da..742d77ff53c 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/AssignmentFilterEvaluationStatusDetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/AssignmentFilterEvaluationStatusDetailsRequestBuilder.cs @@ -93,7 +93,7 @@ public AssignmentFilterEvaluationStatusDetailsRequestBuilder(string rawUrl, IReq public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/Item/AssignmentFilterEvaluationStatusDetailsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/Item/AssignmentFilterEvaluationStatusDetailsItemRequestBuilder.cs index 62bb13ae275..12ab369c2bd 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/Item/AssignmentFilterEvaluationStatusDetailsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/AssignmentFilterEvaluationStatusDetails/Item/AssignmentFilterEvaluationStatusDetailsItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsPostRequestBody.cs index f58c7bde8fd..00e7dfd33a9 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsPostRequestBody.cs @@ -53,7 +53,7 @@ public ChangeAssignmentsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.ChangeAssignments.ChangeAssignmentsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.ChangeAssignments.ChangeAssignmentsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("deviceAssignmentItems", DeviceAssignmentItems); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsRequestBuilder.cs index b39151248a0..08f85f87930 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ChangeAssignments/ChangeAssignmentsRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.ChangeAssignments.ChangeAssignmentsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.ChangeAssignments.ChangeAssignmentsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDevicePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDevicePostRequestBody.cs index 169f3c274c3..6b12acfa835 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDevicePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDevicePostRequestBody.cs @@ -42,7 +42,7 @@ public CleanWindowsDevicePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.CleanWindowsDevice.CleanWindowsDevicePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.CleanWindowsDevice.CleanWindowsDevicePostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("keepUserData", KeepUserData); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDeviceRequestBuilder.cs index 2f6f922d511..c4b5eabd1ad 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CleanWindowsDevice/CleanWindowsDeviceRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.CleanWindowsDevice.CleanWindowsDevicePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.CleanWindowsDevice.CleanWindowsDevicePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestPostRequestBody.cs index 3f25ccd6fcd..86376da449c 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateDeviceLogCollectionRequestPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.CreateDeviceLogCollectionRequest.CreateDeviceLogCollectionRequestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.CreateDeviceLogCollectionRequest.CreateDeviceLogCollectionRequestPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("templateType", TemplateType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestRequestBuilder.cs index 3804f8150bd..a82fd0c3d08 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/CreateDeviceLogCollectionRequest/CreateDeviceLogCollectionRequestRequestBuilder.cs @@ -51,7 +51,7 @@ public CreateDeviceLogCollectionRequestRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.CreateDeviceLogCollectionRequest.CreateDeviceLogCollectionRequestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.CreateDeviceLogCollectionRequest.CreateDeviceLogCollectionRequestPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDevicePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDevicePostRequestBody.cs index 0d5413ebf11..ef83b35d13b 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDevicePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDevicePostRequestBody.cs @@ -52,7 +52,7 @@ public DeleteUserFromSharedAppleDevicePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.DeleteUserFromSharedAppleDevice.DeleteUserFromSharedAppleDevicePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.DeleteUserFromSharedAppleDevice.DeleteUserFromSharedAppleDevicePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("userPrincipalName", UserPrincipalName); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDeviceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDeviceRequestBuilder.cs index cfd4a11e73c..3e3278d9146 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDeviceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeleteUserFromSharedAppleDevice/DeleteUserFromSharedAppleDeviceRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.DeleteUserFromSharedAppleDevice.DeleteUserFromSharedAppleDevicePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.DeleteUserFromSharedAppleDevice.DeleteUserFromSharedAppleDevicePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Deprovision/DeprovisionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Deprovision/DeprovisionPostRequestBody.cs index 173e696f38e..ab71922eca1 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Deprovision/DeprovisionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Deprovision/DeprovisionPostRequestBody.cs @@ -52,7 +52,7 @@ public DeprovisionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.Deprovision.DeprovisionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.Deprovision.DeprovisionPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deprovisionReason", DeprovisionReason); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Deprovision/DeprovisionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Deprovision/DeprovisionRequestBuilder.cs index 0a6a0331ac9..344d98b9688 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Deprovision/DeprovisionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Deprovision/DeprovisionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.Deprovision.DeprovisionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.Deprovision.DeprovisionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCategory/DeviceCategoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCategory/DeviceCategoryRequestBuilder.cs index 210d675b5af..ce0d338a0d8 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCategory/DeviceCategoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCategory/DeviceCategoryRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCategory/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCategory/Ref/RefRequestBuilder.cs index 0bd2d9af463..6e434bedd6e 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCategory/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCategory/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate b public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCompliancePolicyStates/DeviceCompliancePolicyStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCompliancePolicyStates/DeviceCompliancePolicyStatesRequestBuilder.cs index d0a68d4c4ed..9d69bbf0233 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCompliancePolicyStates/DeviceCompliancePolicyStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCompliancePolicyStates/DeviceCompliancePolicyStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceCompliancePolicyStatesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCompliancePolicyStates/Item/DeviceCompliancePolicyStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCompliancePolicyStates/Item/DeviceCompliancePolicyStateItemRequestBuilder.cs index e2ff3bafd66..55fb47d83ed 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCompliancePolicyStates/Item/DeviceCompliancePolicyStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceCompliancePolicyStates/Item/DeviceCompliancePolicyStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceConfigurationStates/DeviceConfigurationStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceConfigurationStates/DeviceConfigurationStatesRequestBuilder.cs index 2150b3a6e76..b3ace88a941 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceConfigurationStates/DeviceConfigurationStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceConfigurationStates/DeviceConfigurationStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceConfigurationStatesRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceConfigurationStates/Item/DeviceConfigurationStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceConfigurationStates/Item/DeviceConfigurationStateItemRequestBuilder.cs index c8dc6538baa..978bb307991 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceConfigurationStates/Item/DeviceConfigurationStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceConfigurationStates/Item/DeviceConfigurationStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceConfigurationState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceConfigurationState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceHealthScriptStates/DeviceHealthScriptStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceHealthScriptStates/DeviceHealthScriptStatesRequestBuilder.cs index 9d05cf247b6..3674f80488b 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceHealthScriptStates/DeviceHealthScriptStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceHealthScriptStates/DeviceHealthScriptStatesRequestBuilder.cs @@ -81,7 +81,7 @@ public DeviceHealthScriptStatesRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -123,7 +123,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceHealthScriptStates/WithIdWithPolicyIdWithDeviceId/WithIdWithPolicyIdWithDeviceIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceHealthScriptStates/WithIdWithPolicyIdWithDeviceId/WithIdWithPolicyIdWithDeviceIdRequestBuilder.cs index fbf4361011e..d5ac6b1f9a0 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceHealthScriptStates/WithIdWithPolicyIdWithDeviceId/WithIdWithPolicyIdWithDeviceIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/DeviceHealthScriptStates/WithIdWithPolicyIdWithDeviceId/WithIdWithPolicyIdWithDeviceIdRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/EnableLostMode/EnableLostModePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/EnableLostMode/EnableLostModePostRequestBody.cs index d4a9dc9fc65..c49ce57d453 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/EnableLostMode/EnableLostModePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/EnableLostMode/EnableLostModePostRequestBody.cs @@ -84,7 +84,7 @@ public EnableLostModePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.EnableLostMode.EnableLostModePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.EnableLostMode.EnableLostModePostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("footer", Footer); writer.WriteStringValue("message", Message); writer.WriteStringValue("phoneNumber", PhoneNumber); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/EnableLostMode/EnableLostModeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/EnableLostMode/EnableLostModeRequestBuilder.cs index e60fc60e82c..f42ccf506ce 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/EnableLostMode/EnableLostModeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/EnableLostMode/EnableLostModeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.EnableLostMode.EnableLostModePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.EnableLostMode.EnableLostModePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyGetResponse.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyGetResponse.cs index e7ea6b64100..c086369a6b0 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyGetResponse.cs @@ -52,7 +52,7 @@ public GetFileVaultKeyGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.GetFileVaultKey.GetFileVaultKeyGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.GetFileVaultKey.GetFileVaultKeyGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyResponse.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyResponse.cs index 7716ae01864..3fbef8ba704 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetFileVaultKey/GetFileVaultKeyResponse.cs @@ -20,7 +20,7 @@ public partial class GetFileVaultKeyResponse : global::Microsoft.Graph.Beta.Me.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.GetFileVaultKey.GetFileVaultKeyResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.GetFileVaultKey.GetFileVaultKeyResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsGetResponse.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsGetResponse.cs index 080beee8951..1946e735cd1 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetNonCompliantSettingsGetResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.GetNonCompliantSettings.GetNonCompliantSettingsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.GetNonCompliantSettings.GetNonCompliantSettingsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsResponse.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsResponse.cs index edea7311aee..e6bf29e5680 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/GetNonCompliantSettings/GetNonCompliantSettingsResponse.cs @@ -20,7 +20,7 @@ public partial class GetNonCompliantSettingsResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.GetNonCompliantSettings.GetNonCompliantSettingsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.GetNonCompliantSettings.GetNonCompliantSettingsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationPostRequestBody.cs index 0c163f8dbd7..6bbd745f4fe 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationPostRequestBody.cs @@ -52,7 +52,7 @@ public InitiateOnDemandProactiveRemediationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.InitiateOnDemandProactiveRemediation.InitiateOnDemandProactiveRemediationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.InitiateOnDemandProactiveRemediation.InitiateOnDemandProactiveRemediationPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("scriptPolicyId", ScriptPolicyId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationRequestBuilder.cs index 4877f261ca1..eaa5de8f41f 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/InitiateOnDemandProactiveRemediation/InitiateOnDemandProactiveRemediationRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.InitiateOnDemandProactiveRemediation.InitiateOnDemandProactiveRemediationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.InitiateOnDemandProactiveRemediation.InitiateOnDemandProactiveRemediationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs index 805eb00a5d9..5d5e3675171 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlPostResponse.cs @@ -52,7 +52,7 @@ public CreateDownloadUrlPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl.CreateDownloadUrlPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl.CreateDownloadUrlPostResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs index fcd1a9b811b..813bed1bd2d 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/CreateDownloadUrl/CreateDownloadUrlResponse.cs @@ -20,7 +20,7 @@ public partial class CreateDownloadUrlResponse : global::Microsoft.Graph.Beta.Me /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl.CreateDownloadUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.LogCollectionRequests.Item.CreateDownloadUrl.CreateDownloadUrlResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs index 5ba60935b44..e719cdf00af 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/Item/DeviceLogCollectionResponseItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponse body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponse body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs index ca1401ef26e..78f071b661e 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/LogCollectionRequests/LogCollectionRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public LogCollectionRequestsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponse body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponse body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs index 4b7c97f527d..0e52fdb152c 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceItemRequestBuilder.cs @@ -420,7 +420,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -481,7 +481,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/Item/ManagedDeviceMobileAppConfigurationStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/Item/ManagedDeviceMobileAppConfigurationStateItemRequestBuilder.cs index 96e216936ac..14214ee4c7f 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/Item/ManagedDeviceMobileAppConfigurationStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/Item/ManagedDeviceMobileAppConfigurationStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/ManagedDeviceMobileAppConfigurationStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/ManagedDeviceMobileAppConfigurationStatesRequestBuilder.cs index 39f41e8bd94..8e88c9e11ab 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/ManagedDeviceMobileAppConfigurationStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/ManagedDeviceMobileAppConfigurationStates/ManagedDeviceMobileAppConfigurationStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public ManagedDeviceMobileAppConfigurationStatesRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStatePostRequestBody.cs index 921d6ab5c0d..f06ebfe0c63 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStatePostRequestBody.cs @@ -59,7 +59,7 @@ public OverrideComplianceStatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.OverrideComplianceState.OverrideComplianceStatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.OverrideComplianceState.OverrideComplianceStatePostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("complianceState", ComplianceState); writer.WriteStringValue("remediationUrl", RemediationUrl); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStateRequestBuilder.cs index 9f1b151ac2d..372ead00b8c 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/OverrideComplianceState/OverrideComplianceStateRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.OverrideComplianceState.OverrideComplianceStatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.OverrideComplianceState.OverrideComplianceStatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshPostRequestBody.cs index afca4bfaf24..06b2983cf9a 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshPostRequestBody.cs @@ -42,7 +42,7 @@ public PauseConfigurationRefreshPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.PauseConfigurationRefresh.PauseConfigurationRefreshPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.PauseConfigurationRefresh.PauseConfigurationRefreshPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("pauseTimePeriodInMinutes", PauseTimePeriodInMinutes); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshRequestBuilder.cs index 67223b8d14a..cc3b99d0441 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PauseConfigurationRefresh/PauseConfigurationRefreshRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.PauseConfigurationRefresh.PauseConfigurationRefreshPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.PauseConfigurationRefresh.PauseConfigurationRefreshPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundPostRequestBody.cs index 30a3b01b6d9..f31b90603eb 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundPostRequestBody.cs @@ -52,7 +52,7 @@ public PlayLostModeSoundPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.PlayLostModeSound.PlayLostModeSoundPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.PlayLostModeSound.PlayLostModeSoundPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("durationInMinutes", DurationInMinutes); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundRequestBuilder.cs index 25c2a30c66e..94bfa0dd867 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/PlayLostModeSound/PlayLostModeSoundRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.PlayLostModeSound.PlayLostModeSoundPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.PlayLostModeSound.PlayLostModeSoundPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/Item/SecurityBaselineStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/Item/SecurityBaselineStateItemRequestBuilder.cs index 0a9247dce2f..f60d815ed28 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/Item/SecurityBaselineStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/Item/SecurityBaselineStateItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SecurityBaselineState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SecurityBaselineState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/Item/SecurityBaselineSettingStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/Item/SecurityBaselineSettingStateItemRequestBuilder.cs index 38d9255a98f..2980b533364 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/Item/SecurityBaselineSettingStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/Item/SecurityBaselineSettingStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/SettingStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/SettingStatesRequestBuilder.cs index 697c4e57e95..695aa83f6f4 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/SettingStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/Item/SettingStates/SettingStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public SettingStatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/SecurityBaselineStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/SecurityBaselineStatesRequestBuilder.cs index 2caeac8e2f2..8c2dfe104bf 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/SecurityBaselineStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SecurityBaselineStates/SecurityBaselineStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public SecurityBaselineStatesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SecurityBaselineState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SecurityBaselineState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs index e21a6e2e657..1df545fcd95 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalPostRequestBody.cs @@ -68,7 +68,7 @@ public SendCustomNotificationToCompanyPortalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("notificationBody", NotificationBody); writer.WriteStringValue("notificationTitle", NotificationTitle); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs index e1f459b0b90..1d2f58ce5fe 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SendCustomNotificationToCompanyPortal/SendCustomNotificationToCompanyPortalRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.SendCustomNotificationToCompanyPortal.SendCustomNotificationToCompanyPortalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SetDeviceName/SetDeviceNamePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SetDeviceName/SetDeviceNamePostRequestBody.cs index 3376e48207f..76fc937877c 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SetDeviceName/SetDeviceNamePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SetDeviceName/SetDeviceNamePostRequestBody.cs @@ -52,7 +52,7 @@ public SetDeviceNamePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.SetDeviceName.SetDeviceNamePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.SetDeviceName.SetDeviceNamePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceName", DeviceName); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SetDeviceName/SetDeviceNameRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SetDeviceName/SetDeviceNameRequestBuilder.cs index 048221ee9ef..cac6ff109e7 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SetDeviceName/SetDeviceNameRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/SetDeviceName/SetDeviceNameRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.SetDeviceName.SetDeviceNamePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.SetDeviceName.SetDeviceNamePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionPostRequestBody.cs index 3359ced3922..7d7a271722a 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionPostRequestBody.cs @@ -53,7 +53,7 @@ public TriggerConfigurationManagerActionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.TriggerConfigurationManagerAction.TriggerConfigurationManagerActionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.TriggerConfigurationManagerAction.TriggerConfigurationManagerActionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("configurationManagerAction", ConfigurationManagerAction); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionRequestBuilder.cs index 1686fcf3663..6ca3194623b 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/TriggerConfigurationManagerAction/TriggerConfigurationManagerActionRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.TriggerConfigurationManagerAction.TriggerConfigurationManagerActionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.TriggerConfigurationManagerAction.TriggerConfigurationManagerActionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountPostRequestBody.cs index e6ab3298130..640b1c80798 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountPostRequestBody.cs @@ -53,7 +53,7 @@ public UpdateWindowsDeviceAccountPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.UpdateWindowsDeviceAccount.UpdateWindowsDeviceAccountPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.UpdateWindowsDeviceAccount.UpdateWindowsDeviceAccountPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("updateWindowsDeviceAccountActionParameter", UpdateWindowsDeviceAccountActionParameter); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountRequestBuilder.cs index 94dc63e6455..e8fa8b8438a 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/UpdateWindowsDeviceAccount/UpdateWindowsDeviceAccountRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.UpdateWindowsDeviceAccount.UpdateWindowsDeviceAccountPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.UpdateWindowsDeviceAccount.UpdateWindowsDeviceAccountPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanPostRequestBody.cs index c83b97f6a9e..aed5f119fc1 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanPostRequestBody.cs @@ -42,7 +42,7 @@ public WindowsDefenderScanPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.WindowsDefenderScan.WindowsDefenderScanPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.WindowsDefenderScan.WindowsDefenderScanPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("quickScan", QuickScan); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanRequestBuilder.cs index e0a3fbedfd4..5934b4c6675 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsDefenderScan/WindowsDefenderScanRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.WindowsDefenderScan.WindowsDefenderScanPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.WindowsDefenderScan.WindowsDefenderScanPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs index da10a0ba92f..eadc3e9df92 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/DetectedMalwareStateRequestBuilder.cs @@ -93,7 +93,7 @@ public DetectedMalwareStateRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs index 2de47c17d75..03d77a87767 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/DetectedMalwareState/Item/WindowsDeviceMalwareStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs index 92c5ea2afed..ad32f98ba28 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/WindowsProtectionState/WindowsProtectionStateRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsProtectionState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsProtectionState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Wipe/WipePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Wipe/WipePostRequestBody.cs index 42ba89c7924..009f12cc299 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Wipe/WipePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Wipe/WipePostRequestBody.cs @@ -83,7 +83,7 @@ public WipePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.Wipe.WipePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.Wipe.WipePostRequestBody(); } /// @@ -108,7 +108,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("keepEnrollmentData", KeepEnrollmentData); writer.WriteBoolValue("keepUserData", KeepUserData); writer.WriteStringValue("macOsUnlockCode", MacOsUnlockCode); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Wipe/WipeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Wipe/WipeRequestBuilder.cs index 0aed7c40988..a2491885a0b 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Wipe/WipeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/Item/Wipe/WipeRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.Wipe.WipePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.Item.Wipe.WipePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/ManagedDevicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/ManagedDevicesRequestBuilder.cs index f48ad6d2b09..f262189edae 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/ManagedDevicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/ManagedDevicesRequestBuilder.cs @@ -129,7 +129,7 @@ public ManagedDevicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ManagedDevice body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ManagedDevice body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/MoveDevicesToOU/MoveDevicesToOUPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/MoveDevicesToOU/MoveDevicesToOUPostRequestBody.cs index 0c046854674..23b192a3762 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/MoveDevicesToOU/MoveDevicesToOUPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/MoveDevicesToOU/MoveDevicesToOUPostRequestBody.cs @@ -68,7 +68,7 @@ public MoveDevicesToOUPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.ManagedDevices.MoveDevicesToOU.MoveDevicesToOUPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.MoveDevicesToOU.MoveDevicesToOUPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("deviceIds", DeviceIds); writer.WriteStringValue("organizationalUnitPath", OrganizationalUnitPath); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/MoveDevicesToOU/MoveDevicesToOURequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/MoveDevicesToOU/MoveDevicesToOURequestBuilder.cs index 45dc0a3b8bb..54ab5f51ad1 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/MoveDevicesToOU/MoveDevicesToOURequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/MoveDevicesToOU/MoveDevicesToOURequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.MoveD public async Task PostAsync(global::Microsoft.Graph.Beta.Me.ManagedDevices.MoveDevicesToOU.MoveDevicesToOUPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.ManagedDevices.MoveDevicesToOU.MoveDevicesToOUPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse.cs index 016802829a7..7b57076e4b4 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ManagedDevices.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse.cs b/src/Microsoft.Graph/Generated/Me/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse.cs index 647df55a0ef..8f5bb030fae 100644 --- a/src/Microsoft.Graph/Generated/Me/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ManagedDevices/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName/RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse.cs @@ -20,7 +20,7 @@ public partial class RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ManagedDevices.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ManagedDevices.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalName.RetrievePowerliftAppDiagnosticsDetailsWithUserPrincipalNameResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Manager/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Manager/Ref/RefRequestBuilder.cs index b9f068a83d9..ed7f8424597 100644 --- a/src/Microsoft.Graph/Generated/Me/Manager/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Manager/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate b public async Task PutAsync(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceUpdate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs index 0d3c0d9736b..389ac80815f 100644 --- a/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs @@ -740,8 +740,8 @@ public MeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(re /// Usage: top={top} public global::Microsoft.Graph.Beta.Me.ExportDeviceAndAppManagementDataWithSkipWithTop.ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder ExportDeviceAndAppManagementDataWithSkipWithTop(int? skip, int? top) { - _ = skip ?? throw new ArgumentNullException(nameof(skip)); - _ = top ?? throw new ArgumentNullException(nameof(top)); + if(ReferenceEquals(skip, null)) throw new ArgumentNullException(nameof(skip)); + if(ReferenceEquals(top, null)) throw new ArgumentNullException(nameof(top)); return new global::Microsoft.Graph.Beta.Me.ExportDeviceAndAppManagementDataWithSkipWithTop.ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder(PathParameters, RequestAdapter, skip, top); } /// @@ -755,8 +755,8 @@ public MeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(re return new global::Microsoft.Graph.Beta.Me.FindRoomsWithRoomList.FindRoomsWithRoomListRequestBuilder(PathParameters, RequestAdapter, roomList); } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. - /// Find more info here + /// Retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the user and specify the properties in a $select OData query option. Because the user resource supports extensions, you can also use the GET operation to get custom properties and extension data in a user instance. Customers through Microsoft Entra ID for customers can also use this API operation to retrieve their details. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -806,7 +806,7 @@ public MeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(re public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.User body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -827,7 +827,7 @@ public MeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(re return new global::Microsoft.Graph.Beta.Me.ReminderViewWithStartDateTimeWithEndDateTime.ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. + /// Retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the user and specify the properties in a $select OData query option. Because the user resource supports extensions, you can also use the GET operation to get custom properties and extension data in a user instance. Customers through Microsoft Entra ID for customers can also use this API operation to retrieve their details. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -860,7 +860,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.User body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -877,7 +877,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta return new global::Microsoft.Graph.Beta.Me.MeRequestBuilder(rawUrl, RequestAdapter); } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. + /// Retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the user and specify the properties in a $select OData query option. Because the user resource supports extensions, you can also use the GET operation to get custom properties and extension data in a user instance. Customers through Microsoft Entra ID for customers can also use this API operation to retrieve their details. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MeRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Messages/Delta/DeltaGetResponse.cs index e95a72543d3..c0547d16c22 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Messages.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Messages.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Messages/Delta/DeltaResponse.cs index b0a9fdbed11..6bfa403dff8 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Messages.De /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Messages.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Messages.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs index c658d0f4e3e..cbea560c1fc 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/AttachmentsRequestBuilder.cs @@ -84,8 +84,8 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.AttachmentCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - /// Find more info here + /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a newmessage that is being drafted, or created and sent on the fly. + /// Find more info here /// /// A /// The request body @@ -101,7 +101,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -129,7 +129,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or to a newmessage that is being drafted, or created and sent on the fly. /// /// A /// The request body @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index c502c685c45..d9434ed1e21 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Messages.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Messages.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index bd1d78db528..366538ce84a 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Messages.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Copy/CopyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Copy/CopyPostRequestBody.cs index f81792a07f7..7945557cb19 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Copy/CopyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Copy/CopyPostRequestBody.cs @@ -52,7 +52,7 @@ public CopyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Messages.Item.Copy.CopyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Messages.Item.Copy.CopyPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("DestinationId", DestinationId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Copy/CopyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Copy/CopyRequestBuilder.cs index 6f7e0e44e1a..9a3779649f6 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Copy/CopyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Copy/CopyRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.Copy.CopyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Messages.Item.Copy.CopyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateForward/CreateForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateForward/CreateForwardPostRequestBody.cs index e3d3a081c17..102a49a6279 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateForward/CreateForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateForward/CreateForwardPostRequestBody.cs @@ -85,7 +85,7 @@ public CreateForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Messages.Item.CreateForward.CreateForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Messages.Item.CreateForward.CreateForwardPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateForward/CreateForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateForward/CreateForwardRequestBuilder.cs index d808444e29a..62b362a9df6 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateForward/CreateForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateForward/CreateForwardRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateForwardRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.CreateForward.CreateForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Messages.Item.CreateForward.CreateForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReply/CreateReplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReply/CreateReplyPostRequestBody.cs index 0de9936d6f8..794be8e1fc0 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReply/CreateReplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReply/CreateReplyPostRequestBody.cs @@ -69,7 +69,7 @@ public CreateReplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Messages.Item.CreateReply.CreateReplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Messages.Item.CreateReply.CreateReplyPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReply/CreateReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReply/CreateReplyRequestBuilder.cs index 6c89cbdceee..f2cb1d858ff 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReply/CreateReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReply/CreateReplyRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.CreateReply.CreateReplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Messages.Item.CreateReply.CreateReplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReplyAll/CreateReplyAllPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReplyAll/CreateReplyAllPostRequestBody.cs index ec813148e70..b15dc1cee1a 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReplyAll/CreateReplyAllPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReplyAll/CreateReplyAllPostRequestBody.cs @@ -69,7 +69,7 @@ public CreateReplyAllPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Messages.Item.CreateReplyAll.CreateReplyAllPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Messages.Item.CreateReplyAll.CreateReplyAllPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReplyAll/CreateReplyAllRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReplyAll/CreateReplyAllRequestBuilder.cs index 3e60f513be1..cf7d577040d 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReplyAll/CreateReplyAllRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/CreateReplyAll/CreateReplyAllRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateReplyAllRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.CreateReplyAll.CreateReplyAllPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Messages.Item.CreateReplyAll.CreateReplyAllPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Extensions/ExtensionsRequestBuilder.cs index 1b0d970ec7d..31e564badc0 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Extensions/ExtensionsRequestBuilder.cs @@ -94,7 +94,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index f3a7808ba69..155f2e0ee94 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Forward/ForwardPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Forward/ForwardPostRequestBody.cs index bad4b33b16c..a079a9e2095 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Forward/ForwardPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Forward/ForwardPostRequestBody.cs @@ -85,7 +85,7 @@ public ForwardPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Messages.Item.Forward.ForwardPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Messages.Item.Forward.ForwardPostRequestBody(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteCollectionOfObjectValues("ToRecipients", ToRecipients); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Forward/ForwardRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Forward/ForwardRequestBuilder.cs index 434ac17745a..95e7994bbb7 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Forward/ForwardRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Forward/ForwardRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.Forwar public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Messages.Item.Forward.ForwardPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsJunk/MarkAsJunkPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsJunk/MarkAsJunkPostRequestBody.cs index 2850150ddce..0357f02358f 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsJunk/MarkAsJunkPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsJunk/MarkAsJunkPostRequestBody.cs @@ -42,7 +42,7 @@ public MarkAsJunkPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Messages.Item.MarkAsJunk.MarkAsJunkPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Messages.Item.MarkAsJunk.MarkAsJunkPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("MoveToJunk", MoveToJunk); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsJunk/MarkAsJunkRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsJunk/MarkAsJunkRequestBuilder.cs index b8a5c7bfc2b..24ee2e2343a 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsJunk/MarkAsJunkRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsJunk/MarkAsJunkRequestBuilder.cs @@ -53,7 +53,7 @@ public MarkAsJunkRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.MarkAsJunk.MarkAsJunkPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Messages.Item.MarkAsJunk.MarkAsJunkPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsNotJunk/MarkAsNotJunkPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsNotJunk/MarkAsNotJunkPostRequestBody.cs index 2569fd70a6c..f2995bf8dc8 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsNotJunk/MarkAsNotJunkPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsNotJunk/MarkAsNotJunkPostRequestBody.cs @@ -42,7 +42,7 @@ public MarkAsNotJunkPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Messages.Item.MarkAsNotJunk.MarkAsNotJunkPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Messages.Item.MarkAsNotJunk.MarkAsNotJunkPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("MoveToInbox", MoveToInbox); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsNotJunk/MarkAsNotJunkRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsNotJunk/MarkAsNotJunkRequestBuilder.cs index 576d7011fd8..507636417a4 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsNotJunk/MarkAsNotJunkRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/MarkAsNotJunk/MarkAsNotJunkRequestBuilder.cs @@ -53,7 +53,7 @@ public MarkAsNotJunkRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.MarkAsNotJunk.MarkAsNotJunkPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Messages.Item.MarkAsNotJunk.MarkAsNotJunkPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Mentions/MentionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Mentions/MentionsRequestBuilder.cs index 8d298d77989..0fd816e8fb9 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Mentions/MentionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Mentions/MentionsRequestBuilder.cs @@ -93,7 +93,7 @@ public MentionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Mention body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Mention body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs index 810396abad8..675f17585a5 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs @@ -166,8 +166,8 @@ public async Task DeleteAsync(Action - /// Get the properties and relationships of the eventMessage object. Apply the $expand parameter on the eventnavigation property to get the associated event in an attendee's calendar. - /// Find more info here + /// Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -190,8 +190,8 @@ public async Task DeleteAsync(Action(requestInfo, global::Microsoft.Graph.Beta.Models.Message.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of an eventMessage object. - /// Find more info here + /// Update the properties of a message object. + /// Find more info here /// /// A /// The request body @@ -207,7 +207,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Message body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -235,7 +235,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Get the properties and relationships of the eventMessage object. Apply the $expand parameter on the eventnavigation property to get the associated event in an attendee's calendar. + /// Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -254,7 +254,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of an eventMessage object. + /// Update the properties of a message object. /// /// A /// The request body @@ -268,7 +268,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Message body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -293,7 +293,7 @@ public partial class MessageItemRequestBuilderDeleteRequestConfiguration : Reque { } /// - /// Get the properties and relationships of the eventMessage object. Apply the $expand parameter on the eventnavigation property to get the associated event in an attendee's calendar. + /// Get an open extension (openTypeExtension object) identified by name or fully qualified name. The table in the Permissions section lists the resources that support open extensions. The following table lists the three scenarios where you can get an open extension from a supported resource instance. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MessageItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Move/MovePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Move/MovePostRequestBody.cs index 556ac28320f..6b3634d46db 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Move/MovePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Move/MovePostRequestBody.cs @@ -52,7 +52,7 @@ public MovePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Messages.Item.Move.MovePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Messages.Item.Move.MovePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("DestinationId", DestinationId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Move/MoveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Move/MoveRequestBuilder.cs index 57c14be928c..53a299d26ff 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Move/MoveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Move/MoveRequestBuilder.cs @@ -52,7 +52,7 @@ public MoveRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.Move.MovePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Messages.Item.Move.MovePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Reply/ReplyPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Reply/ReplyPostRequestBody.cs index 3e8657e155d..6bffdd4aa08 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Reply/ReplyPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Reply/ReplyPostRequestBody.cs @@ -69,7 +69,7 @@ public ReplyPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Messages.Item.Reply.ReplyPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Messages.Item.Reply.ReplyPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Reply/ReplyRequestBuilder.cs index 52bf23baf91..635cea499c6 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Reply/ReplyRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.Reply. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Messages.Item.Reply.ReplyPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/ReplyAll/ReplyAllPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/ReplyAll/ReplyAllPostRequestBody.cs index 550dcd66ea3..19abbc9418c 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/ReplyAll/ReplyAllPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/ReplyAll/ReplyAllPostRequestBody.cs @@ -69,7 +69,7 @@ public ReplyAllPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Messages.Item.ReplyAll.ReplyAllPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Messages.Item.ReplyAll.ReplyAllPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("Comment", Comment); writer.WriteObjectValue("Message", Message); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/ReplyAll/ReplyAllRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/ReplyAll/ReplyAllRequestBuilder.cs index f2a2dc46e6a..975a387a3c1 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/ReplyAll/ReplyAllRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/ReplyAll/ReplyAllRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.ReplyA public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.ReplyAll.ReplyAllPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Messages.Item.ReplyAll.ReplyAllPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/ReportMessage/ReportMessagePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/ReportMessage/ReportMessagePostRequestBody.cs index d6c528bdb00..1bf7c39c515 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/ReportMessage/ReportMessagePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/ReportMessage/ReportMessagePostRequestBody.cs @@ -49,7 +49,7 @@ public ReportMessagePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Messages.Item.ReportMessage.ReportMessagePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Messages.Item.ReportMessage.ReportMessagePostRequestBody(); } /// @@ -70,7 +70,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("IsMessageMoveRequested", IsMessageMoveRequested); writer.WriteEnumValue("ReportAction", ReportAction); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/ReportMessage/ReportMessageRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/ReportMessage/ReportMessageRequestBuilder.cs index 11a8229ddaa..037d07cbc73 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/ReportMessage/ReportMessageRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/ReportMessage/ReportMessageRequestBuilder.cs @@ -51,7 +51,7 @@ public ReportMessageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Messages.Item.ReportMessage.ReportMessagePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Messages.Item.ReportMessage.ReportMessagePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/Value/ContentRequestBuilder.cs index d17db9ec5d6..a8400b87992 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/Value/ContentRequestBuilder.cs @@ -81,8 +81,8 @@ public async Task GetAsync(Action(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of an eventMessage object. - /// Find more info here + /// Update the properties of a message object. + /// Find more info here /// /// A /// Binary request body @@ -98,7 +98,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -145,7 +145,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of an eventMessage object. + /// Update the properties of a message object. /// /// A /// Binary request body @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs index 631d96982cd..79c2eec676b 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs @@ -84,8 +84,8 @@ public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.MessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a draft of a new message in either JSON or MIME format. When using JSON format, you can:- Include an attachment.- Use a mention to call out another user in the new message.- Update the draft later to add content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- /* Add any attachments and S/MIME properties to the MIME content. By default, this operation saves the draft in the Drafts folder. Send the draft message in a subsequent operation. Alternatively, send a new message in a single action, or create a draft to forward, to reply or to reply-all to an existing message. - /// Find more info here + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. + /// Find more info here /// /// A /// The request body @@ -101,7 +101,7 @@ public MessagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Message body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -129,7 +129,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a draft of a new message in either JSON or MIME format. When using JSON format, you can:- Include an attachment.- Use a mention to call out another user in the new message.- Update the draft later to add content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- /* Add any attachments and S/MIME properties to the MIME content. By default, this operation saves the draft in the Drafts folder. Send the draft message in a subsequent operation. Alternatively, send a new message in a single action, or create a draft to forward, to reply or to reply-all to an existing message. + /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. /// /// A /// The request body @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Message body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MobileAppIntentAndStates/Item/MobileAppIntentAndStateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MobileAppIntentAndStates/Item/MobileAppIntentAndStateItemRequestBuilder.cs index 7d668237075..29a6085c2a9 100644 --- a/src/Microsoft.Graph/Generated/Me/MobileAppIntentAndStates/Item/MobileAppIntentAndStateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MobileAppIntentAndStates/Item/MobileAppIntentAndStateItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppIntentAndState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppIntentAndState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MobileAppIntentAndStates/MobileAppIntentAndStatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MobileAppIntentAndStates/MobileAppIntentAndStatesRequestBuilder.cs index a059ad55a38..b95a065581c 100644 --- a/src/Microsoft.Graph/Generated/Me/MobileAppIntentAndStates/MobileAppIntentAndStatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MobileAppIntentAndStates/MobileAppIntentAndStatesRequestBuilder.cs @@ -93,7 +93,7 @@ public MobileAppIntentAndStatesRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppIntentAndState body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppIntentAndState body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/AppLogCollectionRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/AppLogCollectionRequestsRequestBuilder.cs index 53fe46da21f..cae3dcd1174 100644 --- a/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/AppLogCollectionRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/AppLogCollectionRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public AppLogCollectionRequestsRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AppLogCollectionRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AppLogCollectionRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Item/AppLogCollectionRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Item/AppLogCollectionRequestItemRequestBuilder.cs index e75160f4888..3643c780bcf 100644 --- a/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Item/AppLogCollectionRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/Item/AppLogCollectionRequests/Item/AppLogCollectionRequestItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AppLogCollectionRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppLogCollectionRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/Item/MobileAppTroubleshootingEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/Item/MobileAppTroubleshootingEventItemRequestBuilder.cs index a72896b7f54..a4b1b3a23b5 100644 --- a/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/Item/MobileAppTroubleshootingEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/Item/MobileAppTroubleshootingEventItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/MobileAppTroubleshootingEventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/MobileAppTroubleshootingEventsRequestBuilder.cs index b304f720633..9565dcf7a3f 100644 --- a/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/MobileAppTroubleshootingEventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MobileAppTroubleshootingEvents/MobileAppTroubleshootingEventsRequestBuilder.cs @@ -93,7 +93,7 @@ public MobileAppTroubleshootingEventsRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Notifications/Item/NotificationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Notifications/Item/NotificationItemRequestBuilder.cs index 0ce69957737..dc26853184f 100644 --- a/src/Microsoft.Graph/Generated/Me/Notifications/Item/NotificationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Notifications/Item/NotificationItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Notification body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Notification body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Notifications/NotificationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Notifications/NotificationsRequestBuilder.cs index ba0df101695..e306c8f4a68 100644 --- a/src/Microsoft.Graph/Generated/Me/Notifications/NotificationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Notifications/NotificationsRequestBuilder.cs @@ -97,7 +97,7 @@ public NotificationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Notification body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Notification body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlPostRequestBody.cs index b0b58eea6c8..aa1750a3c51 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlPostRequestBody.cs @@ -52,7 +52,7 @@ public GetNotebookFromWebUrlPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.GetNotebookFromWebUrl.GetNotebookFromWebUrlPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.GetNotebookFromWebUrl.GetNotebookFromWebUrlPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("webUrl", WebUrl); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlRequestBuilder.cs index 22f6330aba7..e570db55073 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetNotebookFromWebUrl/GetNotebookFromWebUrlRequestBuilder.cs @@ -52,7 +52,7 @@ public GetNotebookFromWebUrlRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.GetNotebookFromWebUrl.GetNotebookFromWebUrlPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.GetNotebookFromWebUrl.GetNotebookFromWebUrlPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksGetResponse.cs index 7f46deec7a7..4a95327d61d 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetRecentNotebooksWithIncludePersonalNotebooksGetResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksResponse.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksResponse.cs index 871f7c15561..9015d4e6ec8 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/GetRecentNotebooksWithIncludePersonalNotebooks/GetRecentNotebooksWithIncludePersonalNotebooksResponse.cs @@ -20,7 +20,7 @@ public partial class GetRecentNotebooksWithIncludePersonalNotebooksResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookPostRequestBody.cs index 43ad82674e1..c0f6b570375 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.CopyNotebook.CopyNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.CopyNotebook.CopyNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("notebookFolder", NotebookFolder); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookRequestBuilder.cs index 34f65a40cf6..5e6dddf8f3d 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/CopyNotebook/CopyNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.CopyNotebook.CopyNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.CopyNotebook.CopyNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/NotebookItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/NotebookItemRequestBuilder.cs index f7769e97a96..d61254c4b2c 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/NotebookItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/NotebookItemRequestBuilder.cs @@ -115,7 +115,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Notebook body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -176,7 +176,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Notebook body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/SectionGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/SectionGroupItemRequestBuilder.cs index 0d58b1598ed..197d8d7b334 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/SectionGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/SectionGroupItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs index ee2119f1ca8..604cf192204 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs index 317db49be7b..17ab8203a23 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs index 96a4e572ed4..55e2bfd5eba 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToSectionGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs index f39ae66438e..7683d6086c0 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionGroupRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs index cfc1e0a34b0..c98041886e6 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs index b761e7575b8..e921175e15b 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index a85b0a2cafb..75b34b0ceb5 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index bdfd203016f..31196609cff 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs index 2b7d620d0f6..a7a5eba685d 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index 7a46465a14f..607625d70de 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index 17019d77666..383684cb83b 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.It public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs index c8cfd74bee4..9eada670763 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/SectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/SectionsRequestBuilder.cs index b2c8504a034..07ea5099926 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/SectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/Item/Sections/SectionsRequestBuilder.cs @@ -93,7 +93,7 @@ public SectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/SectionGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/SectionGroupsRequestBuilder.cs index 0eb44085b71..446481a8e36 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/SectionGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/SectionGroups/SectionGroupsRequestBuilder.cs @@ -95,7 +95,7 @@ public SectionGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs index 1828df9f548..ef4c39ca990 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs index 19c9a052131..ee1f7619ee5 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs index 2ea3c5ff851..7a2656920d6 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToSectionGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs index c5d2ed77831..9550d49c4cb 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionGroupRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs index 15355f964b2..0f5a7066188 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs index 91a696732e9..84a0989351a 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index ce1c55b85e7..a57ac4997b0 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index a772b06aeee..85726421902 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs index aa4faebaa5e..974ade6e03d 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index 6053fbee5d0..ed79f65e116 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index 89b6f82b94f..e47f0ee0aa6 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.It public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/PagesRequestBuilder.cs index 3625460a335..8ceacc322e7 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/Item/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/SectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/SectionsRequestBuilder.cs index fde02f2f5d7..091e7e22a7f 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/SectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/Item/Sections/SectionsRequestBuilder.cs @@ -95,7 +95,7 @@ public SectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/NotebooksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/NotebooksRequestBuilder.cs index 8b9e21b5770..79ac6d205fa 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/NotebooksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Notebooks/NotebooksRequestBuilder.cs @@ -91,7 +91,7 @@ public NotebooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Usage: includePersonalNotebooks={includePersonalNotebooks} public global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder GetRecentNotebooksWithIncludePersonalNotebooks(bool? includePersonalNotebooks) { - _ = includePersonalNotebooks ?? throw new ArgumentNullException(nameof(includePersonalNotebooks)); + if(ReferenceEquals(includePersonalNotebooks, null)) throw new ArgumentNullException(nameof(includePersonalNotebooks)); return new global::Microsoft.Graph.Beta.Me.Onenote.Notebooks.GetRecentNotebooksWithIncludePersonalNotebooks.GetRecentNotebooksWithIncludePersonalNotebooksRequestBuilder(PathParameters, RequestAdapter, includePersonalNotebooks); } /// @@ -112,7 +112,7 @@ public NotebooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Notebook body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -154,7 +154,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Notebook body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/OnenoteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/OnenoteRequestBuilder.cs index 882d5548b0d..36578a753bc 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/OnenoteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/OnenoteRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Onenote body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Onenote body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Operations/Item/OnenoteOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Operations/Item/OnenoteOperationItemRequestBuilder.cs index 276b63d9a2c..14a1fdfc058 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Operations/Item/OnenoteOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Operations/Item/OnenoteOperationItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Operations/OperationsRequestBuilder.cs index 5f41ee02876..01c1172f927 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/Content/ContentRequestBuilder.cs index 40e0d2bb990..36e85d96fd2 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/Content/ContentRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index f24d73b032e..1ecb788907e 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index 723b547626d..edaaaea98b6 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/OnenotePageItemRequestBuilder.cs index 628bdb67fbb..a8f86aec152 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -133,7 +133,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -194,7 +194,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index e91318a1d6b..f038c7dbdf7 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index db8d07ae9a0..898958947df 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Pages.Item.O public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/PagesRequestBuilder.cs index a4478dc3877..9f45cd3dcfb 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Resources/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Resources/Item/Content/ContentRequestBuilder.cs index 6b2d4b2ea9e..9f18d687ba4 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Resources/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Resources/Item/Content/ContentRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Resources/Item/OnenoteResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Resources/Item/OnenoteResourceItemRequestBuilder.cs index b848e3e79de..0dc192368b7 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Resources/Item/OnenoteResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Resources/Item/OnenoteResourceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Resources/ResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Resources/ResourcesRequestBuilder.cs index 8f6d68c3578..ef736553963 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Resources/ResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Resources/ResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public ResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/SectionGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/SectionGroupItemRequestBuilder.cs index 69fa105cc26..38bc689124c 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/SectionGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/SectionGroupItemRequestBuilder.cs @@ -121,7 +121,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -182,7 +182,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs index 0d5f8c22d22..e584871dc73 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs index ef7f4f27150..0ca2c4e81f6 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs index a779585f549..2bcf7692c42 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToSectionGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs index e337ac488e3..61b69df4771 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionGroupRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs index dcacb72c6f4..cc5381424c7 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/OnenoteSectionItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs index 1dbf1746e16..4cc138f36d5 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index ac4772d0056..7abdfcc298a 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index bdb4fa3018a..dde124fe6c7 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs index 7eefe5a3a3a..d1669664f4b 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index c16ca30240e..e0705b83514 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index 63c3f8d22b2..94c6d7abab7 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.SectionGroup public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.SectionGroups.Item.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs index 2c382d50c26..2c3764e550c 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/Item/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/SectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/SectionsRequestBuilder.cs index c8fe3143d7c..16320f9c39b 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/SectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/Item/Sections/SectionsRequestBuilder.cs @@ -95,7 +95,7 @@ public SectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/SectionGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/SectionGroupsRequestBuilder.cs index 008f1f58dab..844a86f5b84 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/SectionGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/SectionGroups/SectionGroupsRequestBuilder.cs @@ -94,7 +94,7 @@ public SectionGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SectionGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs index 4c06a06a62d..46d201779d8 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToNotebookPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs index 09673c9e25e..07acaa7eaed 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToNotebook/CopyToNotebookRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToNotebookRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.CopyToNotebook.CopyToNotebookPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs index da771d0673b..9779d275270 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupPostRequestBody.cs @@ -116,7 +116,7 @@ public CopyToSectionGroupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("renameAs", RenameAs); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs index da70efac52a..177a0c689e2 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/CopyToSectionGroup/CopyToSectionGroupRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionGroupRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.CopyToSectionGroup.CopyToSectionGroupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/OnenoteSectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/OnenoteSectionItemRequestBuilder.cs index 92092ee9fb8..a154404f48e 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/OnenoteSectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/OnenoteSectionItemRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -188,7 +188,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs index 9821c1380aa..cd6f38afb76 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs index ef12c8c668f..95a89cf1e7b 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionPostRequestBody.cs @@ -100,7 +100,7 @@ public CopyToSectionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("id", Id); writer.WriteStringValue("siteCollectionId", SiteCollectionId); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs index 19ac170ae83..c87ed364702 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/CopyToSection/CopyToSectionRequestBuilder.cs @@ -52,7 +52,7 @@ public CopyToSectionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.Pages.Item.CopyToSection.CopyToSectionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs index 88c798e40fe..10975e888bf 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/OnenotePageItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs index 01b62aed305..39266bb4b77 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentPostRequestBody.cs @@ -53,7 +53,7 @@ public OnenotePatchContentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("commands", Commands); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs index dbe62dd0879..fad7d2bc294 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/Item/OnenotePatchContent/OnenotePatchContentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Sections.Ite public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Onenote.Sections.Item.Pages.Item.OnenotePatchContent.OnenotePatchContentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/PagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/PagesRequestBuilder.cs index 10bfffeac95..ad7136e7609 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/PagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/Item/Pages/PagesRequestBuilder.cs @@ -93,7 +93,7 @@ public PagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenotePage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/SectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/SectionsRequestBuilder.cs index b05d79561ec..f2774129248 100644 --- a/src/Microsoft.Graph/Generated/Me/Onenote/Sections/SectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Onenote/Sections/SectionsRequestBuilder.cs @@ -94,7 +94,7 @@ public SectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnenoteSection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/CreateOrGet/CreateOrGetPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/CreateOrGet/CreateOrGetPostRequestBody.cs index d34da6b8b96..f280054bfe0 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/CreateOrGet/CreateOrGetPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/CreateOrGet/CreateOrGetPostRequestBody.cs @@ -113,7 +113,7 @@ public CreateOrGetPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.OnlineMeetings.CreateOrGet.CreateOrGetPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetings.CreateOrGet.CreateOrGetPostRequestBody(); } /// @@ -138,7 +138,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("chatInfo", ChatInfo); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("externalId", ExternalId); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/CreateOrGet/CreateOrGetRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/CreateOrGet/CreateOrGetRequestBuilder.cs index c818089b6fb..1f4416d6c67 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/CreateOrGet/CreateOrGetRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/CreateOrGet/CreateOrGetRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateOrGetRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Me.OnlineMeetings.CreateOrGet.CreateOrGetPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.OnlineMeetings.CreateOrGet.CreateOrGetPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs index 683e07227ea..d387f7e1916 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserI /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.OnlineMeetings.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetings.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs index baf72acb578..89546f1ba78 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserI /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.OnlineMeetings.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetings.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllRecordingsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs index cac88a7491f..076f4058875 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUser /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.OnlineMeetings.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetings.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs index 05fe750688c..efb7afef8f9 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime/GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUser /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.OnlineMeetings.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetings.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTime.GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AiInsights/AiInsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AiInsights/AiInsightsRequestBuilder.cs index 6692d1a708c..d578a0b3e5b 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AiInsights/AiInsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AiInsights/AiInsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public AiInsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CallAiInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CallAiInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AiInsights/Item/CallAiInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AiInsights/Item/CallAiInsightItemRequestBuilder.cs index 48e8fa26443..463d6a185dc 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AiInsights/Item/CallAiInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AiInsights/Item/CallAiInsightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallAiInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallAiInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AlternativeRecording/AlternativeRecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AlternativeRecording/AlternativeRecordingRequestBuilder.cs index 9dc501cd108..4c342bcb942 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AlternativeRecording/AlternativeRecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AlternativeRecording/AlternativeRecordingRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/AttendanceReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/AttendanceReportsRequestBuilder.cs index 81ba3603b61..5e0833f8b8d 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/AttendanceReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/AttendanceReportsRequestBuilder.cs @@ -94,7 +94,7 @@ public AttendanceReportsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/AttendanceRecordsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/AttendanceRecordsRequestBuilder.cs index fadb7d0aa0a..de411beca16 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/AttendanceRecordsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/AttendanceRecordsRequestBuilder.cs @@ -94,7 +94,7 @@ public AttendanceRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs index 9e247fc9f34..22019b55cc1 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/Item/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/Item/MeetingAttendanceReportItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/Item/MeetingAttendanceReportItemRequestBuilder.cs index 4344c374262..dfe5c391cf6 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/Item/MeetingAttendanceReportItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendanceReports/Item/MeetingAttendanceReportItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendeeReport/AttendeeReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendeeReport/AttendeeReportRequestBuilder.cs index 8902349b4c2..0eda9118685 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendeeReport/AttendeeReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/AttendeeReport/AttendeeReportRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/BroadcastRecording/BroadcastRecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/BroadcastRecording/BroadcastRecordingRequestBuilder.cs index df3f438e44b..47fe4849d44 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/BroadcastRecording/BroadcastRecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/BroadcastRecording/BroadcastRecordingRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs index 793c8b5553e..5be285f7e39 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs @@ -52,7 +52,7 @@ public GetVirtualAppointmentJoinWebUrlGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs index acd290c43fd..369f550031f 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs @@ -20,7 +20,7 @@ public partial class GetVirtualAppointmentJoinWebUrlResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/AttendanceRecordsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/AttendanceRecordsRequestBuilder.cs index adb0133e206..c5b0e385f67 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/AttendanceRecordsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/AttendanceRecordsRequestBuilder.cs @@ -93,7 +93,7 @@ public AttendanceRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs index 47c463ba330..f1be441a73f 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/MeetingAttendanceReport/AttendanceRecords/Item/AttendanceRecordItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AttendanceRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/MeetingAttendanceReport/MeetingAttendanceReportRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/MeetingAttendanceReport/MeetingAttendanceReportRequestBuilder.cs index b48ef5d24a4..beb867f292f 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/MeetingAttendanceReport/MeetingAttendanceReportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/MeetingAttendanceReport/MeetingAttendanceReportRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/OnlineMeetingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/OnlineMeetingItemRequestBuilder.cs index 8d02a2b24a6..4fc9802a875 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/OnlineMeetingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/OnlineMeetingItemRequestBuilder.cs @@ -176,7 +176,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -237,7 +237,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recording/RecordingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recording/RecordingRequestBuilder.cs index 4072ddc1191..3808fe181c6 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recording/RecordingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recording/RecordingRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Delta/DeltaGetResponse.cs index eb42bf25f7d..7df8691cbd9 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.Recordings.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.Recordings.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Delta/DeltaResponse.cs index b666af1b843..42461a42eca 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.OnlineMeeti /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.Recordings.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.Recordings.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Item/CallRecordingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Item/CallRecordingItemRequestBuilder.cs index d51b9927f9b..9901c592941 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Item/CallRecordingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Item/CallRecordingItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallRecording body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecording body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Item/Content/ContentRequestBuilder.cs index 5b3f4d9dafa..d01693e039a 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/RecordingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/RecordingsRequestBuilder.cs index 451e38b1a25..8533cc1120c 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/RecordingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Recordings/RecordingsRequestBuilder.cs @@ -100,7 +100,7 @@ public RecordingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CallRecording body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CallRecording body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/CustomQuestions/CustomQuestionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/CustomQuestions/CustomQuestionsRequestBuilder.cs index 97c202a4e47..365f1fecb88 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/CustomQuestions/CustomQuestionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/CustomQuestions/CustomQuestionsRequestBuilder.cs @@ -97,7 +97,7 @@ public CustomQuestionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/CustomQuestions/Item/MeetingRegistrationQuestionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/CustomQuestions/Item/MeetingRegistrationQuestionItemRequestBuilder.cs index cc231342ccd..d22f67e68bd 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/CustomQuestions/Item/MeetingRegistrationQuestionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/CustomQuestions/Item/MeetingRegistrationQuestionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestion body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestion body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/Registrants/Item/MeetingRegistrantBaseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/Registrants/Item/MeetingRegistrantBaseItemRequestBuilder.cs index d0230bdd426..34dc85ef899 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/Registrants/Item/MeetingRegistrantBaseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/Registrants/Item/MeetingRegistrantBaseItemRequestBuilder.cs @@ -100,7 +100,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistrantBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistrantBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/Registrants/RegistrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/Registrants/RegistrantsRequestBuilder.cs index d7b82db644a..ee0231505b7 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/Registrants/RegistrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/Registrants/RegistrantsRequestBuilder.cs @@ -99,7 +99,7 @@ public RegistrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistrantBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistrantBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs index 766330fd888..813d56983d6 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Registration/RegistrationRequestBuilder.cs @@ -49,8 +49,8 @@ public RegistrationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { } /// - /// Disable and delete the externalMeetingRegistration of an onlineMeeting. - /// Find more info here + /// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -73,8 +73,8 @@ public async Task DeleteAsync(Action - /// Get the meetingRegistration details associated with an onlineMeeting on behalf of the organizer. - /// Find more info here + /// Get the externalMeetingRegistration details associated with an onlineMeeting. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -116,7 +116,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MeetingRegistration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -125,7 +125,7 @@ public async Task DeleteAsync(Action(requestInfo, global::Microsoft.Graph.Beta.Models.MeetingRegistration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Disable and delete the externalMeetingRegistration of an onlineMeeting. + /// Disable and delete the meetingRegistration of an onlineMeeting on behalf of the organizer. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -145,7 +145,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Get the meetingRegistration details associated with an onlineMeeting on behalf of the organizer. + /// Get the externalMeetingRegistration details associated with an onlineMeeting. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -180,7 +180,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MeetingRegistration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -206,7 +206,7 @@ public partial class RegistrationRequestBuilderDeleteRequestConfiguration : Requ { } /// - /// Get the meetingRegistration details associated with an onlineMeeting on behalf of the organizer. + /// Get the externalMeetingRegistration details associated with an onlineMeeting. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RegistrationRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs index f340d060672..00920cf9983 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs @@ -59,7 +59,7 @@ public SendVirtualAppointmentReminderSmsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendees", Attendees); writer.WriteEnumValue("remindBeforeTimeInMinutesType", RemindBeforeTimeInMinutesType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs index 300e9406902..a1438daf5e6 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs index 97b675d9c91..3d63d7d3c82 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs @@ -59,7 +59,7 @@ public SendVirtualAppointmentSmsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendees", Attendees); writer.WriteEnumValue("messageType", MessageType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs index c41836111e5..f72c92162b7 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item. public async Task PostAsync(global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Delta/DeltaGetResponse.cs index 834682c7ad7..de3d94a24e6 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.Transcripts.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.Transcripts.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Delta/DeltaResponse.cs index 74544ae585c..0b8a5d850e5 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.OnlineMeeti /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.Transcripts.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetings.Item.Transcripts.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Item/CallTranscriptItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Item/CallTranscriptItemRequestBuilder.cs index 2321a8cf1f9..827c3cf42a8 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Item/CallTranscriptItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Item/CallTranscriptItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CallTranscript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CallTranscript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Item/Content/ContentRequestBuilder.cs index b0d5fe2545a..c1f4cd4fbe9 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Item/MetadataContent/MetadataContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Item/MetadataContent/MetadataContentRequestBuilder.cs index 29d38a83568..7c8c61ab4a6 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Item/MetadataContent/MetadataContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/Item/MetadataContent/MetadataContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/TranscriptsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/TranscriptsRequestBuilder.cs index fe38e38549b..306a8d84580 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/TranscriptsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/Item/Transcripts/TranscriptsRequestBuilder.cs @@ -100,7 +100,7 @@ public TranscriptsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CallTranscript body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CallTranscript body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/OnlineMeetingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/OnlineMeetingsRequestBuilder.cs index 1fd1e9ee67d..0679b86e0a1 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetings/OnlineMeetingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetings/OnlineMeetingsRequestBuilder.cs @@ -113,7 +113,7 @@ public OnlineMeetingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -155,7 +155,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs index 0d9745fd943..4a112f5bc52 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlGetResponse.cs @@ -52,7 +52,7 @@ public GetVirtualAppointmentJoinWebUrlGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.OnlineMeetingsWithJoinWebUrl.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetingsWithJoinWebUrl.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlGetResponse(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs index 5567ee86c5e..d1b1faaec33 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/GetVirtualAppointmentJoinWebUrl/GetVirtualAppointmentJoinWebUrlResponse.cs @@ -20,7 +20,7 @@ public partial class GetVirtualAppointmentJoinWebUrlResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.OnlineMeetingsWithJoinWebUrl.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetingsWithJoinWebUrl.GetVirtualAppointmentJoinWebUrl.GetVirtualAppointmentJoinWebUrlResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/OnlineMeetingsWithJoinWebUrlRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/OnlineMeetingsWithJoinWebUrlRequestBuilder.cs index 9a8a94b7efa..557138fc964 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/OnlineMeetingsWithJoinWebUrlRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/OnlineMeetingsWithJoinWebUrlRequestBuilder.cs @@ -118,7 +118,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -179,7 +179,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnlineMeeting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs index dbc9478d047..14872662fcc 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsPostRequestBody.cs @@ -59,7 +59,7 @@ public SendVirtualAppointmentReminderSmsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendees", Attendees); writer.WriteEnumValue("remindBeforeTimeInMinutesType", RemindBeforeTimeInMinutesType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs index 002d9bd934f..ed5cdabe6b2 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentReminderSms/SendVirtualAppointmentReminderSmsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.OnlineMeetingsWithJo public async Task PostAsync(global::Microsoft.Graph.Beta.Me.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentReminderSms.SendVirtualAppointmentReminderSmsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs index dea50b5a512..b266f88f182 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsPostRequestBody.cs @@ -59,7 +59,7 @@ public SendVirtualAppointmentSmsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendees", Attendees); writer.WriteEnumValue("messageType", MessageType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs index 64c360bb6a8..0376d65d686 100644 --- a/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/OnlineMeetingsWithJoinWebUrl/SendVirtualAppointmentSms/SendVirtualAppointmentSmsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.OnlineMeetingsWithJo public async Task PostAsync(global::Microsoft.Graph.Beta.Me.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.OnlineMeetingsWithJoinWebUrl.SendVirtualAppointmentSms.SendVirtualAppointmentSmsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs index 15af766913f..b628b64a2f7 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/MasterCategories/Item/OutlookCategoryItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OutlookCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OutlookCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/MasterCategories/MasterCategoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/MasterCategories/MasterCategoriesRequestBuilder.cs index dde6be1af4e..3ea8b3d2856 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/MasterCategories/MasterCategoriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/MasterCategories/MasterCategoriesRequestBuilder.cs @@ -95,7 +95,7 @@ public MasterCategoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OutlookCategory body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OutlookCategory body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/SupportedLanguages/SupportedLanguagesGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Outlook/SupportedLanguages/SupportedLanguagesGetResponse.cs index 97142f299e8..c0872b05f3f 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/SupportedLanguages/SupportedLanguagesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/SupportedLanguages/SupportedLanguagesGetResponse.cs @@ -36,7 +36,7 @@ public partial class SupportedLanguagesGetResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Outlook.SupportedLanguages.SupportedLanguagesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.SupportedLanguages.SupportedLanguagesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/SupportedLanguages/SupportedLanguagesResponse.cs b/src/Microsoft.Graph/Generated/Me/Outlook/SupportedLanguages/SupportedLanguagesResponse.cs index 4865f8e2de2..380ecda9de9 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/SupportedLanguages/SupportedLanguagesResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/SupportedLanguages/SupportedLanguagesResponse.cs @@ -20,7 +20,7 @@ public partial class SupportedLanguagesResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Outlook.SupportedLanguages.SupportedLanguagesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.SupportedLanguages.SupportedLanguagesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZones/SupportedTimeZonesGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZones/SupportedTimeZonesGetResponse.cs index c593b5d6660..e0de8af4f86 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZones/SupportedTimeZonesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZones/SupportedTimeZonesGetResponse.cs @@ -36,7 +36,7 @@ public partial class SupportedTimeZonesGetResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Outlook.SupportedTimeZones.SupportedTimeZonesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.SupportedTimeZones.SupportedTimeZonesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZones/SupportedTimeZonesResponse.cs b/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZones/SupportedTimeZonesResponse.cs index b19b61d5e92..703e6fcd911 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZones/SupportedTimeZonesResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZones/SupportedTimeZonesResponse.cs @@ -20,7 +20,7 @@ public partial class SupportedTimeZonesResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Outlook.SupportedTimeZones.SupportedTimeZonesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.SupportedTimeZones.SupportedTimeZonesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZonesWithTimeZoneStandard/SupportedTimeZonesWithTimeZoneStandardGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZonesWithTimeZoneStandard/SupportedTimeZonesWithTimeZoneStandardGetResponse.cs index 7cc7c9b711e..291059bb948 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZonesWithTimeZoneStandard/SupportedTimeZonesWithTimeZoneStandardGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZonesWithTimeZoneStandard/SupportedTimeZonesWithTimeZoneStandardGetResponse.cs @@ -36,7 +36,7 @@ public partial class SupportedTimeZonesWithTimeZoneStandardGetResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Outlook.SupportedTimeZonesWithTimeZoneStandard.SupportedTimeZonesWithTimeZoneStandardGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.SupportedTimeZonesWithTimeZoneStandard.SupportedTimeZonesWithTimeZoneStandardGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZonesWithTimeZoneStandard/SupportedTimeZonesWithTimeZoneStandardResponse.cs b/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZonesWithTimeZoneStandard/SupportedTimeZonesWithTimeZoneStandardResponse.cs index 1d44b050252..ff93846ce78 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZonesWithTimeZoneStandard/SupportedTimeZonesWithTimeZoneStandardResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/SupportedTimeZonesWithTimeZoneStandard/SupportedTimeZonesWithTimeZoneStandardResponse.cs @@ -20,7 +20,7 @@ public partial class SupportedTimeZonesWithTimeZoneStandardResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Outlook.SupportedTimeZonesWithTimeZoneStandard.SupportedTimeZonesWithTimeZoneStandardResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.SupportedTimeZonesWithTimeZoneStandard.SupportedTimeZonesWithTimeZoneStandardResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/OutlookTaskFolderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/OutlookTaskFolderItemRequestBuilder.cs index 26f55307d55..b05ac84758b 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/OutlookTaskFolderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/OutlookTaskFolderItemRequestBuilder.cs @@ -116,7 +116,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OutlookTaskFolder body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -180,7 +180,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OutlookTaskFolder body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs index b16d2086074..1f6c191e9d0 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs @@ -104,7 +104,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index 858d8067187..e2c47b423dc 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Outlook.TaskFolders.Item.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.TaskFolders.Item.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 8650f02a6da..cbea2e7526c 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -53,7 +53,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Outlook.TaskFolders.Item.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Outlook.TaskFolders.Item.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Complete/CompletePostResponse.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Complete/CompletePostResponse.cs index d52ca9de04d..b1b6b4b84d5 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Complete/CompletePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Complete/CompletePostResponse.cs @@ -36,7 +36,7 @@ public partial class CompletePostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Outlook.TaskFolders.Item.Tasks.Item.Complete.CompletePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.TaskFolders.Item.Tasks.Item.Complete.CompletePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Complete/CompleteResponse.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Complete/CompleteResponse.cs index fc551f953e8..c073a44a2a9 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Complete/CompleteResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/Complete/CompleteResponse.cs @@ -20,7 +20,7 @@ public partial class CompleteResponse : global::Microsoft.Graph.Beta.Me.Outlook. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Outlook.TaskFolders.Item.Tasks.Item.Complete.CompleteResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.TaskFolders.Item.Tasks.Item.Complete.CompleteResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/OutlookTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/OutlookTaskItemRequestBuilder.cs index 7f15c095aeb..f5989e6e7b0 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/OutlookTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/Item/OutlookTaskItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OutlookTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -184,7 +184,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OutlookTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/TasksRequestBuilder.cs index 4cc7eb303af..0ca2e8db819 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/Item/Tasks/TasksRequestBuilder.cs @@ -99,7 +99,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OutlookTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OutlookTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/TaskFoldersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/TaskFoldersRequestBuilder.cs index 23aabd90ded..28366856577 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/TaskFoldersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskFolders/TaskFoldersRequestBuilder.cs @@ -99,7 +99,7 @@ public TaskFoldersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OutlookTaskFolder body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OutlookTaskFolder body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/OutlookTaskGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/OutlookTaskGroupItemRequestBuilder.cs index dd357c88826..493a3f95f02 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/OutlookTaskGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/OutlookTaskGroupItemRequestBuilder.cs @@ -109,7 +109,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OutlookTaskGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -173,7 +173,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OutlookTaskGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/OutlookTaskFolderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/OutlookTaskFolderItemRequestBuilder.cs index 9d63c1b5bcf..7b3b1f383b3 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/OutlookTaskFolderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/OutlookTaskFolderItemRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OutlookTaskFolder body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OutlookTaskFolder body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs index 9cce43bbd87..0af1002f29a 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs @@ -104,7 +104,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -148,7 +148,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index 7cd862bb3e5..e177f6927ac 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Outlook.TaskGroups.Item.TaskFolders.Item.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.TaskGroups.Item.TaskFolders.Item.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 98d9487ec05..a39c86e653d 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -53,7 +53,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Outlook.TaskGroups.Item.TaskFolders.Item.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Outlook.TaskGroups.Item.TaskFolders.Item.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Complete/CompletePostResponse.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Complete/CompletePostResponse.cs index bfcf4cf7999..8c53ed79479 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Complete/CompletePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Complete/CompletePostResponse.cs @@ -36,7 +36,7 @@ public partial class CompletePostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Outlook.TaskGroups.Item.TaskFolders.Item.Tasks.Item.Complete.CompletePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.TaskGroups.Item.TaskFolders.Item.Tasks.Item.Complete.CompletePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Complete/CompleteResponse.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Complete/CompleteResponse.cs index f20bcfbd513..957e2592615 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Complete/CompleteResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/Complete/CompleteResponse.cs @@ -20,7 +20,7 @@ public partial class CompleteResponse : global::Microsoft.Graph.Beta.Me.Outlook. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Outlook.TaskGroups.Item.TaskFolders.Item.Tasks.Item.Complete.CompleteResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.TaskGroups.Item.TaskFolders.Item.Tasks.Item.Complete.CompleteResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/OutlookTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/OutlookTaskItemRequestBuilder.cs index f6b0b9f35a9..6f7c4e0f36c 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/OutlookTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/Item/OutlookTaskItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OutlookTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -184,7 +184,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OutlookTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/TasksRequestBuilder.cs index 6448f4fafab..0b23a28d0bd 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/Item/Tasks/TasksRequestBuilder.cs @@ -97,7 +97,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OutlookTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OutlookTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/TaskFoldersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/TaskFoldersRequestBuilder.cs index d719ce1b613..602df51a817 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/TaskFoldersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/Item/TaskFolders/TaskFoldersRequestBuilder.cs @@ -99,7 +99,7 @@ public TaskFoldersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OutlookTaskFolder body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OutlookTaskFolder body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/TaskGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/TaskGroupsRequestBuilder.cs index a95dd46a403..6b89ad22432 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/TaskGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/TaskGroups/TaskGroupsRequestBuilder.cs @@ -99,7 +99,7 @@ public TaskGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OutlookTaskGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OutlookTaskGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs index 2bcbf62eac3..c51daad65f2 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs @@ -105,7 +105,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -149,7 +149,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Attachment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index dc626feccb9..714ee10bddb 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Outlook.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("AttachmentItem", AttachmentItem); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 49fdabdbe16..4ae67fa7c8e 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -53,7 +53,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Outlook.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Outlook.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Complete/CompletePostResponse.cs b/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Complete/CompletePostResponse.cs index b32bb6dfdac..d8f3544e5ae 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Complete/CompletePostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Complete/CompletePostResponse.cs @@ -36,7 +36,7 @@ public partial class CompletePostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Outlook.Tasks.Item.Complete.CompletePostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.Tasks.Item.Complete.CompletePostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Complete/CompleteResponse.cs b/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Complete/CompleteResponse.cs index f638298f496..a150f2b6c9e 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Complete/CompleteResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/Complete/CompleteResponse.cs @@ -20,7 +20,7 @@ public partial class CompleteResponse : global::Microsoft.Graph.Beta.Me.Outlook. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Outlook.Tasks.Item.Complete.CompleteResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Outlook.Tasks.Item.Complete.CompleteResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/OutlookTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/OutlookTaskItemRequestBuilder.cs index 449e8abf770..6d04b1b2629 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/OutlookTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/Item/OutlookTaskItemRequestBuilder.cs @@ -123,7 +123,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OutlookTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OutlookTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/TasksRequestBuilder.cs index aa862dede1a..49fff081ef5 100644 --- a/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Outlook/Tasks/TasksRequestBuilder.cs @@ -99,7 +99,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OutlookTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OutlookTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index c91515a05ed..30db3b04fc7 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 1d5d2a05b18..a4e3c5e6201 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/AccessReviewInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/AccessReviewInstanceItemRequestBuilder.cs index 8c268740275..729792c2eaf 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/AccessReviewInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/AccessReviewInstanceItemRequestBuilder.cs @@ -162,7 +162,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -223,7 +223,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs index d7f1766505e..b25df2e03be 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public BatchRecordDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs index f75622f7cca..a0957606251 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.PendingAccessReviewI public async Task PostAsync(global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/ContactedReviewers/ContactedReviewersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/ContactedReviewers/ContactedReviewersRequestBuilder.cs index 5de48f2986d..7f32c61c199 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/ContactedReviewers/ContactedReviewersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/ContactedReviewers/ContactedReviewersRequestBuilder.cs @@ -93,7 +93,7 @@ public ContactedReviewersRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs index 78b128deb26..89627277fc0 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/DecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/DecisionsRequestBuilder.cs index 20bd3514cbd..aa99b2badf2 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/DecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/DecisionsRequestBuilder.cs @@ -111,7 +111,7 @@ public DecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 96f9940d363..0b1b88aed4a 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 8221089ebbf..d776b09a91e 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs index a9b239e9618..57c4ff2b16a 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs index 2d1c6fbf825..f98066b548d 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public InsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs index f703cacb017..1a8c30e55c1 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs index b0579c4998c..92fcadc0e4d 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public BatchRecordDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs index 7eeb5cf7a4d..e65af4f6797 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.PendingAccessReviewI public async Task PostAsync(global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs index 0a8e5c59c22..ae09343dd81 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs @@ -93,7 +93,7 @@ public ContactedReviewersRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs index d80aa22b48b..3b260cc9572 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs index 56faaf09cba..ed85ada0653 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs @@ -156,7 +156,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -217,7 +217,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 92fe6953391..3e378c8eafe 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 6bca088722e..e31a64b5874 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/AccessReviewStageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/AccessReviewStageItemRequestBuilder.cs index 01885d53925..1c17976e453 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/AccessReviewStageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/AccessReviewStageItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/DecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/DecisionsRequestBuilder.cs index e5e2d9ee608..650c9876a65 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/DecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/DecisionsRequestBuilder.cs @@ -110,7 +110,7 @@ public DecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 3f14c9052e8..b62fdf5b26c 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 1461f5806d2..5651c5d8b1b 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs index 85fbd571ae6..43b9afb36e5 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs index e261ec9e780..a8fc1281286 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public InsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs index fcbf5873645..5ebd76af16b 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs index 17f75b40b9f..5c2d287dfbe 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public RecordAllDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs index ba330aa5baa..5efe83896ac 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.PendingAccessReviewI public async Task PostAsync(global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.Item.Instance.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/StagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/StagesRequestBuilder.cs index ad62e514451..565eac4eb19 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/StagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/Item/Instance/Stages/StagesRequestBuilder.cs @@ -104,7 +104,7 @@ public StagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs index 5cc39b3cc0c..5e7cf31a270 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public RecordAllDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs index 79eb0459c3d..f761bf2adb1 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.PendingAccessReviewI public async Task PostAsync(global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 017e287f2b6..cc481dd3ae7 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 406bed832f2..e1dc5d3a002 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/AccessReviewStageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/AccessReviewStageItemRequestBuilder.cs index b99c8c02a79..180d2caa871 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/AccessReviewStageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/AccessReviewStageItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/DecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/DecisionsRequestBuilder.cs index 38e26d31c6a..bca39f788e1 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/DecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/DecisionsRequestBuilder.cs @@ -110,7 +110,7 @@ public DecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index ac6ae691d9a..af13dd8648b 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 5cdc59af80e..5c84c71e8b2 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs index efd271f72e7..2938b0169a2 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs index 6d17fabc029..731463d3a0d 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Insights/InsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public InsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs index d0fa7b5e626..3e9049c16db 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs index d7f52404b29..a051600f628 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public BatchRecordDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs index 78df1171663..0e8d5e1c348 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/BatchRecordDecisions/BatchRecordDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.PendingAccessReviewI public async Task PostAsync(global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.Item.Instance.BatchRecordDecisions.BatchRecordDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs index 69a7ff2da9d..3162d025cf3 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/ContactedReviewersRequestBuilder.cs @@ -93,7 +93,7 @@ public ContactedReviewersRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs index a8eceaa649a..d5a8aca284b 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/ContactedReviewers/Item/AccessReviewReviewerItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewReviewer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/DecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/DecisionsRequestBuilder.cs index 0f992e178fa..925d1a6684c 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/DecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/DecisionsRequestBuilder.cs @@ -110,7 +110,7 @@ public DecisionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -152,7 +152,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 68a2c59e26f..e5e336c4c03 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.Item.Instance.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.Item.Instance.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index 87c65c43e7b..d392ba6c832 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.Item.Instance.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.Item.Instance.Decisions.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs index 4b4c66b3ef9..d4993673e30 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/AccessReviewInstanceDecisionItemItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/InsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/InsightsRequestBuilder.cs index d8fd037a14d..341742006e3 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/InsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/InsightsRequestBuilder.cs @@ -93,7 +93,7 @@ public InsightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs index 83e97f0d876..d010bb605fe 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/Item/Insights/Item/GovernanceInsightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceInsight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs index 94dfbce1803..405b5e32d64 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public RecordAllDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.Item.Instance.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.Item.Instance.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs index 2ada0512bfe..e2c441b2d8a 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.PendingAccessReviewI public async Task PostAsync(global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.Item.Instance.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.Item.Instance.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs index 824cfcbc39e..febfdeea366 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/Item/Instance/InstanceRequestBuilder.cs @@ -156,7 +156,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -217,7 +217,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs index b25c7a9885e..ea1b9a2d390 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsPostRequestBody.cs @@ -100,7 +100,7 @@ public RecordAllDecisionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("principalId", PrincipalId); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs index 6346581cafe..84123364b55 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/Item/Decisions/RecordAllDecisions/RecordAllDecisionsRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.PendingAccessReviewI public async Task PostAsync(global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.PendingAccessReviewInstances.Item.Stages.Item.Decisions.RecordAllDecisions.RecordAllDecisionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/StagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/StagesRequestBuilder.cs index 1cea4cab455..e071f0ee07c 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/StagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/Item/Stages/StagesRequestBuilder.cs @@ -104,7 +104,7 @@ public StagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewStage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/PendingAccessReviewInstancesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/PendingAccessReviewInstancesRequestBuilder.cs index 9aae7324cba..2e0e7bdbcd7 100644 --- a/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/PendingAccessReviewInstancesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PendingAccessReviewInstances/PendingAccessReviewInstancesRequestBuilder.cs @@ -105,7 +105,7 @@ public PendingAccessReviewInstancesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs index 2ecd4e321c6..c6e964674e6 100644 --- a/src/Microsoft.Graph/Generated/Me/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/PermissionGrants/PermissionGrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/PermissionGrants/PermissionGrantsRequestBuilder.cs index 4a7a67d5f5c..be8b53e27e7 100644 --- a/src/Microsoft.Graph/Generated/Me/PermissionGrants/PermissionGrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/PermissionGrants/PermissionGrantsRequestBuilder.cs @@ -93,7 +93,7 @@ public PermissionGrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Photo/PhotoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Photo/PhotoRequestBuilder.cs index 979df763324..1216892db8f 100644 --- a/src/Microsoft.Graph/Generated/Me/Photo/PhotoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Photo/PhotoRequestBuilder.cs @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ProfilePhoto body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProfilePhoto body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Photo/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Photo/Value/ContentRequestBuilder.cs index e3ad6a61003..cd0c6f34fdf 100644 --- a/src/Microsoft.Graph/Generated/Me/Photo/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Photo/Value/ContentRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Photos/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Photos/Item/Value/ContentRequestBuilder.cs index 2d0fb5946a0..e18e0907943 100644 --- a/src/Microsoft.Graph/Generated/Me/Photos/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Photos/Item/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/All/AllRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/All/AllRequestBuilder.cs index cd9f49f18a4..544e9502679 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/All/AllRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/All/AllRequestBuilder.cs @@ -99,7 +99,7 @@ public AllRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerDelta body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerDelta body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/All/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Planner/All/Delta/DeltaGetResponse.cs index 24c376a02ec..b4278e8299e 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/All/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/All/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Planner.All.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.All.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/All/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Planner/All/Delta/DeltaResponse.cs index 7b35a27b230..71c11368b7f 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/All/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/All/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Planner.All /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Planner.All.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.All.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/All/Item/PlannerDeltaItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/All/Item/PlannerDeltaItemRequestBuilder.cs index b30c764bde6..08c007fa11f 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/All/Item/PlannerDeltaItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/All/Item/PlannerDeltaItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerDelta body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerDelta body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/PlannerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/PlannerRequestBuilder.cs index b9f5f60040c..411bddc68e3 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/PlannerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/PlannerRequestBuilder.cs @@ -140,7 +140,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -201,7 +201,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Delta/DeltaGetResponse.cs index bcdda543794..b57a618b967 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Planner.Plans.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.Plans.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Delta/DeltaResponse.cs index e739bafd441..3d9ee9ca739 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Planner.Pla /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Planner.Plans.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.Plans.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs index 727c814a445..ce893b0b4dc 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs @@ -52,7 +52,7 @@ public ArchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Archive.ArchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Archive.ArchivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("justification", Justification); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs index d44a90bc072..71a1692a3a1 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.A public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs index 956148c12ef..47b4f5f9a93 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs @@ -99,7 +99,7 @@ public BucketsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs index 24fd2a463eb..fbda7b3e5fe 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Buckets.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Buckets.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs index ca487d1d792..67bfbfab60a 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Planner.Pla /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Buckets.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Buckets.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs index bfc8545b694..39349348cfe 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs index df662c03781..e586db8fef7 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs index 2584917093a..170ed894676 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Planner.Pla /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs index 0d585bb78f9..67293a2c9a3 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs index 48816770574..d4851830d3c 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs index 2e95e405673..800c33ecd4f 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs index cca8d3a06bf..f864a7603da 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs index ddc5335d32f..7c270d238f5 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs index 243946e5571..1aef9eac7bc 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs @@ -99,7 +99,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Details/DetailsRequestBuilder.cs index 263ed290ed7..47facab8fad 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerPlanDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlanDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs index 50597ac01ea..7f26d642311 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs @@ -53,7 +53,7 @@ public MoveToContainerPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("container", Container); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs index 30481703245..531eb0d3f69 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs @@ -52,7 +52,7 @@ public MoveToContainerRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs index 944f256e513..d2c2b7c7b6b 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs index 74814e960fc..8e27c22ad3c 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Tasks.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Tasks.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs index f4a771d22b2..aaf37d81bc6 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Planner.Pla /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Tasks.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Tasks.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs index 34bbbe18ac7..f3ceefcf176 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs index 772011f9487..8611dfe1783 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs index 29de8818930..a857082326b 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs index e2c88ec9ecb..5972d0975df 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs index ec595bf75b8..ef2e0da6be6 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs index 7a968a22bb2..77e2e987812 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs @@ -99,7 +99,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs index a7c480b2260..e4b63d6ea8a 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs @@ -52,7 +52,7 @@ public UnarchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("justification", Justification); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs index fc773081239..dbbc6fb55be 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.U public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Plans/PlansRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Plans/PlansRequestBuilder.cs index 1c37390e361..8a672f553cc 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Plans/PlansRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Plans/PlansRequestBuilder.cs @@ -100,7 +100,7 @@ public PlansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Delta/DeltaGetResponse.cs index 5c91230dbb5..9ae1ef4cb8f 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Planner.Tasks.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.Tasks.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Delta/DeltaResponse.cs index b1c38041257..48745819303 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Planner.Tas /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Planner.Tasks.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Planner.Tasks.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs index 8dd023f63df..77616c213f7 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs index a2c0bfe8e76..1359a2ad50b 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/Details/DetailsRequestBuilder.cs index 89f086cb1d2..367b82895b6 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/PlannerTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/PlannerTaskItemRequestBuilder.cs index b908e1b09f6..48bd04b8aee 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/PlannerTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/PlannerTaskItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs index b51d910c342..8c7e631d2e6 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/TasksRequestBuilder.cs index 450f1f8cacd..0fa073d9466 100644 --- a/src/Microsoft.Graph/Generated/Me/Planner/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Planner/Tasks/TasksRequestBuilder.cs @@ -100,7 +100,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Presence/ClearPresence/ClearPresencePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Presence/ClearPresence/ClearPresencePostRequestBody.cs index 99c9f550387..1d1fa5100e3 100644 --- a/src/Microsoft.Graph/Generated/Me/Presence/ClearPresence/ClearPresencePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Presence/ClearPresence/ClearPresencePostRequestBody.cs @@ -52,7 +52,7 @@ public ClearPresencePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Presence.ClearPresence.ClearPresencePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Presence.ClearPresence.ClearPresencePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("sessionId", SessionId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Presence/ClearPresence/ClearPresenceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Presence/ClearPresence/ClearPresenceRequestBuilder.cs index db218754218..1d5a3afacbc 100644 --- a/src/Microsoft.Graph/Generated/Me/Presence/ClearPresence/ClearPresenceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Presence/ClearPresence/ClearPresenceRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Presence.ClearPresen public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Presence.ClearPresence.ClearPresencePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Presence.ClearPresence.ClearPresencePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Presence/PresenceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Presence/PresenceRequestBuilder.cs index 0084d8d361f..6dda439e386 100644 --- a/src/Microsoft.Graph/Generated/Me/Presence/PresenceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Presence/PresenceRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Presence body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -188,7 +188,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Presence body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Presence/SetPresence/SetPresencePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Presence/SetPresence/SetPresencePostRequestBody.cs index c762b95d677..3c0bdb3d5f4 100644 --- a/src/Microsoft.Graph/Generated/Me/Presence/SetPresence/SetPresencePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Presence/SetPresence/SetPresencePostRequestBody.cs @@ -90,7 +90,7 @@ public SetPresencePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Presence.SetPresence.SetPresencePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Presence.SetPresence.SetPresencePostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("activity", Activity); writer.WriteStringValue("availability", Availability); writer.WriteTimeSpanValue("expirationDuration", ExpirationDuration); diff --git a/src/Microsoft.Graph/Generated/Me/Presence/SetPresence/SetPresenceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Presence/SetPresence/SetPresenceRequestBuilder.cs index 1916cc44b48..ce82443d036 100644 --- a/src/Microsoft.Graph/Generated/Me/Presence/SetPresence/SetPresenceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Presence/SetPresence/SetPresenceRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Presence.SetPresence public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Presence.SetPresence.SetPresencePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Presence.SetPresence.SetPresencePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Presence/SetStatusMessage/SetStatusMessagePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Presence/SetStatusMessage/SetStatusMessagePostRequestBody.cs index d4cfc5472fb..12d86730093 100644 --- a/src/Microsoft.Graph/Generated/Me/Presence/SetStatusMessage/SetStatusMessagePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Presence/SetStatusMessage/SetStatusMessagePostRequestBody.cs @@ -53,7 +53,7 @@ public SetStatusMessagePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Presence.SetStatusMessage.SetStatusMessagePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Presence.SetStatusMessage.SetStatusMessagePostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("statusMessage", StatusMessage); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Presence/SetStatusMessage/SetStatusMessageRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Presence/SetStatusMessage/SetStatusMessageRequestBuilder.cs index e2087a1b4fe..5141a3e15dc 100644 --- a/src/Microsoft.Graph/Generated/Me/Presence/SetStatusMessage/SetStatusMessageRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Presence/SetStatusMessage/SetStatusMessageRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Presence.SetStatusMe public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Presence.SetStatusMessage.SetStatusMessagePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Presence.SetStatusMessage.SetStatusMessagePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Presence/SetUserPreferredPresence/SetUserPreferredPresencePostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Presence/SetUserPreferredPresence/SetUserPreferredPresencePostRequestBody.cs index b32f805ae24..3df07a13b2d 100644 --- a/src/Microsoft.Graph/Generated/Me/Presence/SetUserPreferredPresence/SetUserPreferredPresencePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Presence/SetUserPreferredPresence/SetUserPreferredPresencePostRequestBody.cs @@ -74,7 +74,7 @@ public SetUserPreferredPresencePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Presence.SetUserPreferredPresence.SetUserPreferredPresencePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Presence.SetUserPreferredPresence.SetUserPreferredPresencePostRequestBody(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("activity", Activity); writer.WriteStringValue("availability", Availability); writer.WriteTimeSpanValue("expirationDuration", ExpirationDuration); diff --git a/src/Microsoft.Graph/Generated/Me/Presence/SetUserPreferredPresence/SetUserPreferredPresenceRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Presence/SetUserPreferredPresence/SetUserPreferredPresenceRequestBuilder.cs index 4a614aba9ac..6f80bb2b73a 100644 --- a/src/Microsoft.Graph/Generated/Me/Presence/SetUserPreferredPresence/SetUserPreferredPresenceRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Presence/SetUserPreferredPresence/SetUserPreferredPresenceRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Presence.SetUserPref public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Presence.SetUserPreferredPresence.SetUserPreferredPresencePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Presence.SetUserPreferredPresence.SetUserPreferredPresencePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Account/AccountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Account/AccountRequestBuilder.cs index c481cbe55a3..dc10ed99534 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Account/AccountRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Account/AccountRequestBuilder.cs @@ -95,7 +95,7 @@ public AccountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserAccountInformation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserAccountInformation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Account/Item/UserAccountInformationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Account/Item/UserAccountInformationItemRequestBuilder.cs index b0b4d7519ab..ab01b96e5d1 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Account/Item/UserAccountInformationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Account/Item/UserAccountInformationItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserAccountInformation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserAccountInformation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Addresses/AddressesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Addresses/AddressesRequestBuilder.cs index 10e4b32b579..7021c3dc8bb 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Addresses/AddressesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Addresses/AddressesRequestBuilder.cs @@ -95,7 +95,7 @@ public AddressesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemAddress body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemAddress body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Addresses/Item/ItemAddressItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Addresses/Item/ItemAddressItemRequestBuilder.cs index 1abf48b2d19..49ba935deb1 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Addresses/Item/ItemAddressItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Addresses/Item/ItemAddressItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemAddress body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemAddress body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Anniversaries/AnniversariesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Anniversaries/AnniversariesRequestBuilder.cs index ef845c7e929..a64fce6c7cf 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Anniversaries/AnniversariesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Anniversaries/AnniversariesRequestBuilder.cs @@ -95,7 +95,7 @@ public AnniversariesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PersonAnnualEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PersonAnnualEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Anniversaries/Item/PersonAnnualEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Anniversaries/Item/PersonAnnualEventItemRequestBuilder.cs index bad958c2c87..d2034afab57 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Anniversaries/Item/PersonAnnualEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Anniversaries/Item/PersonAnnualEventItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PersonAnnualEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PersonAnnualEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Awards/AwardsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Awards/AwardsRequestBuilder.cs index a8796f487ab..b72f63bc574 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Awards/AwardsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Awards/AwardsRequestBuilder.cs @@ -95,7 +95,7 @@ public AwardsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PersonAward body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PersonAward body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Awards/Item/PersonAwardItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Awards/Item/PersonAwardItemRequestBuilder.cs index e5544f73b39..361c85ce4f1 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Awards/Item/PersonAwardItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Awards/Item/PersonAwardItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PersonAward body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PersonAward body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Certifications/CertificationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Certifications/CertificationsRequestBuilder.cs index 62227196ce6..3a04e6590ca 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Certifications/CertificationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Certifications/CertificationsRequestBuilder.cs @@ -95,7 +95,7 @@ public CertificationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PersonCertification body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PersonCertification body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Certifications/Item/PersonCertificationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Certifications/Item/PersonCertificationItemRequestBuilder.cs index 180206fb028..5e4299b667a 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Certifications/Item/PersonCertificationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Certifications/Item/PersonCertificationItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PersonCertification body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PersonCertification body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/EducationalActivities/EducationalActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/EducationalActivities/EducationalActivitiesRequestBuilder.cs index 34b3fb4401b..48a21c8daed 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/EducationalActivities/EducationalActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/EducationalActivities/EducationalActivitiesRequestBuilder.cs @@ -95,7 +95,7 @@ public EducationalActivitiesRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.EducationalActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.EducationalActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/EducationalActivities/Item/EducationalActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/EducationalActivities/Item/EducationalActivityItemRequestBuilder.cs index b6b16c472e1..4d99dfbc61b 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/EducationalActivities/Item/EducationalActivityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/EducationalActivities/Item/EducationalActivityItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.EducationalActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.EducationalActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Emails/EmailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Emails/EmailsRequestBuilder.cs index 1c803b02795..e85509b8bfa 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Emails/EmailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Emails/EmailsRequestBuilder.cs @@ -95,7 +95,7 @@ public EmailsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemEmail body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemEmail body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Emails/Item/ItemEmailItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Emails/Item/ItemEmailItemRequestBuilder.cs index 829c07b1704..d0c864c1b67 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Emails/Item/ItemEmailItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Emails/Item/ItemEmailItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemEmail body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemEmail body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Interests/InterestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Interests/InterestsRequestBuilder.cs index 3fc42fd1d81..aff8535fb4d 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Interests/InterestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Interests/InterestsRequestBuilder.cs @@ -95,7 +95,7 @@ public InterestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PersonInterest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PersonInterest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Interests/Item/PersonInterestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Interests/Item/PersonInterestItemRequestBuilder.cs index dd5e28a63c9..0930db21924 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Interests/Item/PersonInterestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Interests/Item/PersonInterestItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PersonInterest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PersonInterest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Languages/Item/LanguageProficiencyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Languages/Item/LanguageProficiencyItemRequestBuilder.cs index cc2b65f47f5..3752283a457 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Languages/Item/LanguageProficiencyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Languages/Item/LanguageProficiencyItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.LanguageProficiency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.LanguageProficiency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Languages/LanguagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Languages/LanguagesRequestBuilder.cs index 270838f4e15..0d7b30b06a9 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Languages/LanguagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Languages/LanguagesRequestBuilder.cs @@ -95,7 +95,7 @@ public LanguagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.LanguageProficiency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.LanguageProficiency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Names/Item/PersonNameItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Names/Item/PersonNameItemRequestBuilder.cs index 1534c9259f2..59c89d54a57 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Names/Item/PersonNameItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Names/Item/PersonNameItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PersonName body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PersonName body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Names/NamesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Names/NamesRequestBuilder.cs index 935e050dfa4..7bddb64876d 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Names/NamesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Names/NamesRequestBuilder.cs @@ -95,7 +95,7 @@ public NamesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PersonName body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PersonName body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Notes/Item/PersonAnnotationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Notes/Item/PersonAnnotationItemRequestBuilder.cs index 46ac7c0b5e0..89c2d1339d6 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Notes/Item/PersonAnnotationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Notes/Item/PersonAnnotationItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PersonAnnotation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PersonAnnotation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Notes/NotesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Notes/NotesRequestBuilder.cs index 719b27f688e..6defc3ddc2f 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Notes/NotesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Notes/NotesRequestBuilder.cs @@ -95,7 +95,7 @@ public NotesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PersonAnnotation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PersonAnnotation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Patents/Item/ItemPatentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Patents/Item/ItemPatentItemRequestBuilder.cs index 31ab532823a..ce9fe0cca1a 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Patents/Item/ItemPatentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Patents/Item/ItemPatentItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemPatent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemPatent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Patents/PatentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Patents/PatentsRequestBuilder.cs index abd393d5a4c..9d1c7579a8b 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Patents/PatentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Patents/PatentsRequestBuilder.cs @@ -95,7 +95,7 @@ public PatentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemPatent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemPatent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Phones/Item/ItemPhoneItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Phones/Item/ItemPhoneItemRequestBuilder.cs index bf68e05a6ef..93b6168f5d6 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Phones/Item/ItemPhoneItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Phones/Item/ItemPhoneItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemPhone body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemPhone body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Phones/PhonesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Phones/PhonesRequestBuilder.cs index 73cb55e126a..5f742e25dee 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Phones/PhonesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Phones/PhonesRequestBuilder.cs @@ -95,7 +95,7 @@ public PhonesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemPhone body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemPhone body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Positions/Item/WorkPositionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Positions/Item/WorkPositionItemRequestBuilder.cs index d273cf98e14..0840484a7ac 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Positions/Item/WorkPositionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Positions/Item/WorkPositionItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkPosition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkPosition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Positions/PositionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Positions/PositionsRequestBuilder.cs index fab7dc3868a..b2769168262 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Positions/PositionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Positions/PositionsRequestBuilder.cs @@ -95,7 +95,7 @@ public PositionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WorkPosition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WorkPosition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/ProfileRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/ProfileRequestBuilder.cs index 48bcf523820..081a6b1c689 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/ProfileRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/ProfileRequestBuilder.cs @@ -212,7 +212,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Profile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -273,7 +273,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Profile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Projects/Item/ProjectParticipationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Projects/Item/ProjectParticipationItemRequestBuilder.cs index 77e652b8e7d..c3650ec5916 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Projects/Item/ProjectParticipationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Projects/Item/ProjectParticipationItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ProjectParticipation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProjectParticipation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Projects/ProjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Projects/ProjectsRequestBuilder.cs index 926990c0e93..3c0c547b1dd 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Projects/ProjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Projects/ProjectsRequestBuilder.cs @@ -95,7 +95,7 @@ public ProjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ProjectParticipation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ProjectParticipation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Publications/Item/ItemPublicationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Publications/Item/ItemPublicationItemRequestBuilder.cs index 1aa21281e4e..08827a50228 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Publications/Item/ItemPublicationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Publications/Item/ItemPublicationItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ItemPublication body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ItemPublication body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Publications/PublicationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Publications/PublicationsRequestBuilder.cs index 9f1fec55c76..86fa73accfd 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Publications/PublicationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Publications/PublicationsRequestBuilder.cs @@ -95,7 +95,7 @@ public PublicationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ItemPublication body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ItemPublication body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Skills/Item/SkillProficiencyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Skills/Item/SkillProficiencyItemRequestBuilder.cs index d612122bc04..3de9df7dad6 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Skills/Item/SkillProficiencyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Skills/Item/SkillProficiencyItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SkillProficiency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SkillProficiency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Skills/SkillsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Skills/SkillsRequestBuilder.cs index 8a9d0f84281..ec22e390d33 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Skills/SkillsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Skills/SkillsRequestBuilder.cs @@ -95,7 +95,7 @@ public SkillsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SkillProficiency body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SkillProficiency body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/WebAccounts/Item/WebAccountItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/WebAccounts/Item/WebAccountItemRequestBuilder.cs index 53b1c93188c..78b5547424f 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/WebAccounts/Item/WebAccountItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/WebAccounts/Item/WebAccountItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WebAccount body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WebAccount body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/WebAccounts/WebAccountsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/WebAccounts/WebAccountsRequestBuilder.cs index 44f4c69a917..0b9eb6350c5 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/WebAccounts/WebAccountsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/WebAccounts/WebAccountsRequestBuilder.cs @@ -95,7 +95,7 @@ public WebAccountsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WebAccount body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WebAccount body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Websites/Item/PersonWebsiteItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Websites/Item/PersonWebsiteItemRequestBuilder.cs index 7f90d177e56..9beb22e8051 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Websites/Item/PersonWebsiteItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Websites/Item/PersonWebsiteItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PersonWebsite body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PersonWebsite body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Profile/Websites/WebsitesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Profile/Websites/WebsitesRequestBuilder.cs index abe342ea716..a79c6465747 100644 --- a/src/Microsoft.Graph/Generated/Me/Profile/Websites/WebsitesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Profile/Websites/WebsitesRequestBuilder.cs @@ -95,7 +95,7 @@ public WebsitesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PersonWebsite body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PersonWebsite body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ReminderViewWithStartDateTimeWithEndDateTime/ReminderViewWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/Me/ReminderViewWithStartDateTimeWithEndDateTime/ReminderViewWithStartDateTimeWithEndDateTimeGetResponse.cs index 4bbcb0eef64..7a25c865256 100644 --- a/src/Microsoft.Graph/Generated/Me/ReminderViewWithStartDateTimeWithEndDateTime/ReminderViewWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ReminderViewWithStartDateTimeWithEndDateTime/ReminderViewWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -36,7 +36,7 @@ public partial class ReminderViewWithStartDateTimeWithEndDateTimeGetResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ReminderViewWithStartDateTimeWithEndDateTime.ReminderViewWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ReminderViewWithStartDateTimeWithEndDateTime.ReminderViewWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/ReminderViewWithStartDateTimeWithEndDateTime/ReminderViewWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Me/ReminderViewWithStartDateTimeWithEndDateTime/ReminderViewWithStartDateTimeWithEndDateTimeResponse.cs index be6d6bffdce..8802f064cd2 100644 --- a/src/Microsoft.Graph/Generated/Me/ReminderViewWithStartDateTimeWithEndDateTime/ReminderViewWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/ReminderViewWithStartDateTimeWithEndDateTime/ReminderViewWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class ReminderViewWithStartDateTimeWithEndDateTimeResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.ReminderViewWithStartDateTimeWithEndDateTime.ReminderViewWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.ReminderViewWithStartDateTimeWithEndDateTime.ReminderViewWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/RetrieveManagedDevicesWithAppInstallationIssues/RetrieveManagedDevicesWithAppInstallationIssuesGetResponse.cs b/src/Microsoft.Graph/Generated/Me/RetrieveManagedDevicesWithAppInstallationIssues/RetrieveManagedDevicesWithAppInstallationIssuesGetResponse.cs index 2c1c4b1c695..376a79e3d63 100644 --- a/src/Microsoft.Graph/Generated/Me/RetrieveManagedDevicesWithAppInstallationIssues/RetrieveManagedDevicesWithAppInstallationIssuesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/RetrieveManagedDevicesWithAppInstallationIssues/RetrieveManagedDevicesWithAppInstallationIssuesGetResponse.cs @@ -36,7 +36,7 @@ public partial class RetrieveManagedDevicesWithAppInstallationIssuesGetResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.RetrieveManagedDevicesWithAppInstallationIssues.RetrieveManagedDevicesWithAppInstallationIssuesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.RetrieveManagedDevicesWithAppInstallationIssues.RetrieveManagedDevicesWithAppInstallationIssuesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/RetrieveManagedDevicesWithAppInstallationIssues/RetrieveManagedDevicesWithAppInstallationIssuesResponse.cs b/src/Microsoft.Graph/Generated/Me/RetrieveManagedDevicesWithAppInstallationIssues/RetrieveManagedDevicesWithAppInstallationIssuesResponse.cs index 22cf56232ba..9d7c9e0f911 100644 --- a/src/Microsoft.Graph/Generated/Me/RetrieveManagedDevicesWithAppInstallationIssues/RetrieveManagedDevicesWithAppInstallationIssuesResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/RetrieveManagedDevicesWithAppInstallationIssues/RetrieveManagedDevicesWithAppInstallationIssuesResponse.cs @@ -20,7 +20,7 @@ public partial class RetrieveManagedDevicesWithAppInstallationIssuesResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.RetrieveManagedDevicesWithAppInstallationIssues.RetrieveManagedDevicesWithAppInstallationIssuesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.RetrieveManagedDevicesWithAppInstallationIssues.RetrieveManagedDevicesWithAppInstallationIssuesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/RevokeSignInSessions/RevokeSignInSessionsPostResponse.cs b/src/Microsoft.Graph/Generated/Me/RevokeSignInSessions/RevokeSignInSessionsPostResponse.cs index 7506c063a14..32cdafeca79 100644 --- a/src/Microsoft.Graph/Generated/Me/RevokeSignInSessions/RevokeSignInSessionsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/RevokeSignInSessions/RevokeSignInSessionsPostResponse.cs @@ -42,7 +42,7 @@ public RevokeSignInSessionsPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.RevokeSignInSessions.RevokeSignInSessionsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.RevokeSignInSessions.RevokeSignInSessionsPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/RevokeSignInSessions/RevokeSignInSessionsResponse.cs b/src/Microsoft.Graph/Generated/Me/RevokeSignInSessions/RevokeSignInSessionsResponse.cs index 5a97799ca87..d2d2d4b90b6 100644 --- a/src/Microsoft.Graph/Generated/Me/RevokeSignInSessions/RevokeSignInSessionsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/RevokeSignInSessions/RevokeSignInSessionsResponse.cs @@ -20,7 +20,7 @@ public partial class RevokeSignInSessionsResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.RevokeSignInSessions.RevokeSignInSessionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.RevokeSignInSessions.RevokeSignInSessionsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/ScopedRoleMemberOf/Item/ScopedRoleMembershipItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ScopedRoleMemberOf/Item/ScopedRoleMembershipItemRequestBuilder.cs index 4d1a2f005ca..dbcedae54b3 100644 --- a/src/Microsoft.Graph/Generated/Me/ScopedRoleMemberOf/Item/ScopedRoleMembershipItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ScopedRoleMemberOf/Item/ScopedRoleMembershipItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/ScopedRoleMemberOf/ScopedRoleMemberOfRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/ScopedRoleMemberOf/ScopedRoleMemberOfRequestBuilder.cs index a6f746021c2..3c51d578427 100644 --- a/src/Microsoft.Graph/Generated/Me/ScopedRoleMemberOf/ScopedRoleMemberOfRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/ScopedRoleMemberOf/ScopedRoleMemberOfRequestBuilder.cs @@ -94,7 +94,7 @@ public ScopedRoleMemberOfRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ScopedRoleMembership body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/InformationProtectionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/InformationProtectionRequestBuilder.cs index ffe6ad44a9f..2d7e18d3f8c 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/InformationProtectionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/InformationProtectionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Security.InformationProtection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Security.InformationProtection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/LabelPolicySettings/LabelPolicySettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/LabelPolicySettings/LabelPolicySettingsRequestBuilder.cs index 98cf1b003c0..c7170a29170 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/LabelPolicySettings/LabelPolicySettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/LabelPolicySettings/LabelPolicySettingsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Security.InformationProtectionPolicySetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Security.InformationProtectionPolicySetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/Item/Parent/ParentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/Item/Parent/ParentRequestBuilder.cs index 399728a2786..6a116f1783e 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/Item/Parent/ParentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/Item/Parent/ParentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Security.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Security.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs index 72bb7ff914d..d2f4cfd833c 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/Item/SensitivityLabelItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Security.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Security.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/EvaluateApplicationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/EvaluateApplicationPostRequestBody.cs index f8cea7d8464..886972db46a 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/EvaluateApplicationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/EvaluateApplicationPostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluateApplicationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateApplication.EvaluateApplicationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateApplication.EvaluateApplicationPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteObjectValue("labelingOptions", LabelingOptions); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/EvaluateApplicationPostResponse.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/EvaluateApplicationPostResponse.cs index 15e2afe0a10..90188bc1b45 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/EvaluateApplicationPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/EvaluateApplicationPostResponse.cs @@ -37,7 +37,7 @@ public partial class EvaluateApplicationPostResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateApplication.EvaluateApplicationPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateApplication.EvaluateApplicationPostResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/EvaluateApplicationResponse.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/EvaluateApplicationResponse.cs index 6a7763245e9..bfea39b6df0 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/EvaluateApplicationResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/EvaluateApplicationResponse.cs @@ -20,7 +20,7 @@ public partial class EvaluateApplicationResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateApplication.EvaluateApplicationResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateApplication.EvaluateApplicationResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/MicrosoftGraphSecurityEvaluateApplicationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/MicrosoftGraphSecurityEvaluateApplicationRequestBuilder.cs index 0a139a0e736..d6df1fc4a86 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/MicrosoftGraphSecurityEvaluateApplicationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateApplication/MicrosoftGraphSecurityEvaluateApplicationRequestBuilder.cs @@ -51,7 +51,7 @@ public MicrosoftGraphSecurityEvaluateApplicationRequestBuilder(string rawUrl, IR public async Task PostAsEvaluateApplicationPostResponseAsync(global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateApplication.EvaluateApplicationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public MicrosoftGraphSecurityEvaluateApplicationRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateApplication.EvaluateApplicationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateApplication.EvaluateApplicationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs index da0aa521eb9..74ed14a4a12 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/EvaluateClassificationResultsPostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluateClassificationResultsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("classificationResults", ClassificationResults); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs index c0f11aaf5ff..7c6b60c84e1 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/EvaluateClassificationResultsPostResponse.cs @@ -37,7 +37,7 @@ public partial class EvaluateClassificationResultsPostResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateClassificationResults.EvaluateClassificationResultsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateClassificationResults.EvaluateClassificationResultsPostResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/EvaluateClassificationResultsResponse.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/EvaluateClassificationResultsResponse.cs index 4d555c0e7b6..f361e4c5ca7 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/EvaluateClassificationResultsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/EvaluateClassificationResultsResponse.cs @@ -20,7 +20,7 @@ public partial class EvaluateClassificationResultsResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateClassificationResults.EvaluateClassificationResultsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateClassificationResults.EvaluateClassificationResultsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/MicrosoftGraphSecurityEvaluateClassificationResultsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/MicrosoftGraphSecurityEvaluateClassificationResultsRequestBuilder.cs index 1dce69e66c5..2804f919386 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/MicrosoftGraphSecurityEvaluateClassificationResultsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateClassificationResults/MicrosoftGraphSecurityEvaluateClassificationResultsRequestBuilder.cs @@ -51,7 +51,7 @@ public MicrosoftGraphSecurityEvaluateClassificationResultsRequestBuilder(string public async Task PostAsEvaluateClassificationResultsPostResponseAsync(global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public MicrosoftGraphSecurityEvaluateClassificationResultsRequestBuilder(string public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateClassificationResults.EvaluateClassificationResultsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/EvaluateRemovalPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/EvaluateRemovalPostRequestBody.cs index a55f78f9665..684661ed1cd 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/EvaluateRemovalPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/EvaluateRemovalPostRequestBody.cs @@ -69,7 +69,7 @@ public EvaluateRemovalPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateRemoval.EvaluateRemovalPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateRemoval.EvaluateRemovalPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteObjectValue("downgradeJustification", DowngradeJustification); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/EvaluateRemovalPostResponse.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/EvaluateRemovalPostResponse.cs index 1ff2ced9628..68aec370481 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/EvaluateRemovalPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/EvaluateRemovalPostResponse.cs @@ -37,7 +37,7 @@ public partial class EvaluateRemovalPostResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateRemoval.EvaluateRemovalPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateRemoval.EvaluateRemovalPostResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/EvaluateRemovalResponse.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/EvaluateRemovalResponse.cs index 7afb34400ee..b236be15a96 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/EvaluateRemovalResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/EvaluateRemovalResponse.cs @@ -20,7 +20,7 @@ public partial class EvaluateRemovalResponse : global::Microsoft.Graph.Beta.Me.S /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateRemoval.EvaluateRemovalResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateRemoval.EvaluateRemovalResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/MicrosoftGraphSecurityEvaluateRemovalRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/MicrosoftGraphSecurityEvaluateRemovalRequestBuilder.cs index 24e7f753514..fc665c699fa 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/MicrosoftGraphSecurityEvaluateRemovalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityEvaluateRemoval/MicrosoftGraphSecurityEvaluateRemovalRequestBuilder.cs @@ -51,7 +51,7 @@ public MicrosoftGraphSecurityEvaluateRemovalRequestBuilder(string rawUrl, IReque public async Task PostAsEvaluateRemovalPostResponseAsync(global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateRemoval.EvaluateRemovalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public MicrosoftGraphSecurityEvaluateRemovalRequestBuilder(string rawUrl, IReque public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateRemoval.EvaluateRemovalPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityEvaluateRemoval.EvaluateRemovalPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityExtractContentLabel/ExtractContentLabelPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityExtractContentLabel/ExtractContentLabelPostRequestBody.cs index d8bbf02a336..006fa3a7378 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityExtractContentLabel/ExtractContentLabelPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityExtractContentLabel/ExtractContentLabelPostRequestBody.cs @@ -53,7 +53,7 @@ public ExtractContentLabelPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityExtractContentLabel.ExtractContentLabelPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityExtractContentLabel.ExtractContentLabelPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentInfo", ContentInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityExtractContentLabel/MicrosoftGraphSecurityExtractContentLabelRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityExtractContentLabel/MicrosoftGraphSecurityExtractContentLabelRequestBuilder.cs index a82e1c26e92..84d3662fe32 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityExtractContentLabel/MicrosoftGraphSecurityExtractContentLabelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/MicrosoftGraphSecurityExtractContentLabel/MicrosoftGraphSecurityExtractContentLabelRequestBuilder.cs @@ -52,7 +52,7 @@ public MicrosoftGraphSecurityExtractContentLabelRequestBuilder(string rawUrl, IR public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityExtractContentLabel.ExtractContentLabelPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Security.InformationProtection.SensitivityLabels.MicrosoftGraphSecurityExtractContentLabel.ExtractContentLabelPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs index cfeef338e45..3586057fff8 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/InformationProtection/SensitivityLabels/SensitivityLabelsRequestBuilder.cs @@ -117,7 +117,7 @@ public SensitivityLabelsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Security.SensitivityLabel body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Security.SensitivityLabel body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Security/SecurityRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Security/SecurityRequestBuilder.cs index 949f19d8c61..0765d381bde 100644 --- a/src/Microsoft.Graph/Generated/Me/Security/SecurityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Security/SecurityRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Security.Security body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Security.Security body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/SendMail/SendMailPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/SendMail/SendMailPostRequestBody.cs index e2decae7c19..3a1a865db90 100644 --- a/src/Microsoft.Graph/Generated/Me/SendMail/SendMailPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/SendMail/SendMailPostRequestBody.cs @@ -59,7 +59,7 @@ public SendMailPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.SendMail.SendMailPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.SendMail.SendMailPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("Message", Message); writer.WriteBoolValue("SaveToSentItems", SaveToSentItems); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Me/SendMail/SendMailRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/SendMail/SendMailRequestBuilder.cs index 87b3ef0dc6e..d2c7736e6b0 100644 --- a/src/Microsoft.Graph/Generated/Me/SendMail/SendMailRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/SendMail/SendMailRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.SendMail.SendMailPos public async Task PostAsync(global::Microsoft.Graph.Beta.Me.SendMail.SendMailPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.SendMail.SendMailPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Settings/ContactMergeSuggestions/ContactMergeSuggestionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Settings/ContactMergeSuggestions/ContactMergeSuggestionsRequestBuilder.cs index 7fb8d078805..f3670fd1e56 100644 --- a/src/Microsoft.Graph/Generated/Me/Settings/ContactMergeSuggestions/ContactMergeSuggestionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Settings/ContactMergeSuggestions/ContactMergeSuggestionsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ContactMergeSuggestions body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ContactMergeSuggestions body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Settings/ItemInsights/ItemInsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Settings/ItemInsights/ItemInsightsRequestBuilder.cs index d19960a6199..b324aa795b0 100644 --- a/src/Microsoft.Graph/Generated/Me/Settings/ItemInsights/ItemInsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Settings/ItemInsights/ItemInsightsRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserInsightsSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserInsightsSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Settings/RegionalAndLanguageSettings/RegionalAndLanguageSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Settings/RegionalAndLanguageSettings/RegionalAndLanguageSettingsRequestBuilder.cs index c4c3d65e288..06bfbb715e0 100644 --- a/src/Microsoft.Graph/Generated/Me/Settings/RegionalAndLanguageSettings/RegionalAndLanguageSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Settings/RegionalAndLanguageSettings/RegionalAndLanguageSettingsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RegionalAndLanguageSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RegionalAndLanguageSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Settings/SettingsRequestBuilder.cs index 2e62ef87ab0..ce75eaf22e7 100644 --- a/src/Microsoft.Graph/Generated/Me/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Settings/SettingsRequestBuilder.cs @@ -138,7 +138,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -199,7 +199,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Settings/ShiftPreferences/ShiftPreferencesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Settings/ShiftPreferences/ShiftPreferencesRequestBuilder.cs index 495e832b15d..471f7d731ec 100644 --- a/src/Microsoft.Graph/Generated/Me/Settings/ShiftPreferences/ShiftPreferencesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Settings/ShiftPreferences/ShiftPreferencesRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ShiftPreferences body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ShiftPreferences body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Settings/Storage/Quota/QuotaRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Settings/Storage/Quota/QuotaRequestBuilder.cs index f56d1ea1536..8acf44ceab1 100644 --- a/src/Microsoft.Graph/Generated/Me/Settings/Storage/Quota/QuotaRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Settings/Storage/Quota/QuotaRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedStorageQuota body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedStorageQuota body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Settings/Storage/Quota/Services/Item/ServiceStorageQuotaBreakdownItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Settings/Storage/Quota/Services/Item/ServiceStorageQuotaBreakdownItemRequestBuilder.cs index cf4fde34cf2..54138c5bfe7 100644 --- a/src/Microsoft.Graph/Generated/Me/Settings/Storage/Quota/Services/Item/ServiceStorageQuotaBreakdownItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Settings/Storage/Quota/Services/Item/ServiceStorageQuotaBreakdownItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServiceStorageQuotaBreakdown body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceStorageQuotaBreakdown body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Settings/Storage/Quota/Services/ServicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Settings/Storage/Quota/Services/ServicesRequestBuilder.cs index 59d3eab1eec..f4ef8640bef 100644 --- a/src/Microsoft.Graph/Generated/Me/Settings/Storage/Quota/Services/ServicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Settings/Storage/Quota/Services/ServicesRequestBuilder.cs @@ -94,7 +94,7 @@ public ServicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ServiceStorageQuotaBreakdown body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceStorageQuotaBreakdown body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Settings/Storage/StorageRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Settings/Storage/StorageRequestBuilder.cs index 35f21b38a64..1ae93deb0c7 100644 --- a/src/Microsoft.Graph/Generated/Me/Settings/Storage/StorageRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Settings/Storage/StorageRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserStorage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserStorage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Settings/Windows/Item/Instances/InstancesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Settings/Windows/Item/Instances/InstancesRequestBuilder.cs index f3399eb73a5..69c67626623 100644 --- a/src/Microsoft.Graph/Generated/Me/Settings/Windows/Item/Instances/InstancesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Settings/Windows/Item/Instances/InstancesRequestBuilder.cs @@ -94,7 +94,7 @@ public InstancesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsSettingInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsSettingInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Settings/Windows/Item/Instances/Item/WindowsSettingInstanceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Settings/Windows/Item/Instances/Item/WindowsSettingInstanceItemRequestBuilder.cs index b9af37c12ec..b9ee252ab9a 100644 --- a/src/Microsoft.Graph/Generated/Me/Settings/Windows/Item/Instances/Item/WindowsSettingInstanceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Settings/Windows/Item/Instances/Item/WindowsSettingInstanceItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsSettingInstance body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsSettingInstance body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Settings/Windows/Item/WindowsSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Settings/Windows/Item/WindowsSettingItemRequestBuilder.cs index d15d83b463b..ae7b674f377 100644 --- a/src/Microsoft.Graph/Generated/Me/Settings/Windows/Item/WindowsSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Settings/Windows/Item/WindowsSettingItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WindowsSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Settings/Windows/WindowsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Settings/Windows/WindowsRequestBuilder.cs index e77194f56ed..345ffe15c4e 100644 --- a/src/Microsoft.Graph/Generated/Me/Settings/Windows/WindowsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Settings/Windows/WindowsRequestBuilder.cs @@ -94,7 +94,7 @@ public WindowsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.WindowsSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.WindowsSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Solutions/SolutionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Solutions/SolutionsRequestBuilder.cs index 41e8ede65e1..13d59743ca8 100644 --- a/src/Microsoft.Graph/Generated/Me/Solutions/SolutionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Solutions/SolutionsRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserSolutionRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserSolutionRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Solutions/WorkingTimeSchedule/WorkingTimeScheduleRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Solutions/WorkingTimeSchedule/WorkingTimeScheduleRequestBuilder.cs index 8d2201fc1dc..c98d640ea9b 100644 --- a/src/Microsoft.Graph/Generated/Me/Solutions/WorkingTimeSchedule/WorkingTimeScheduleRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Solutions/WorkingTimeSchedule/WorkingTimeScheduleRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.WorkingTimeSchedule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.WorkingTimeSchedule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/AssociatedTeamsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/AssociatedTeamsRequestBuilder.cs index da1167880f8..e6e72e75d80 100644 --- a/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/AssociatedTeamsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/AssociatedTeamsRequestBuilder.cs @@ -94,7 +94,7 @@ public AssociatedTeamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AssociatedTeamInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AssociatedTeamInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/Item/AssociatedTeamInfoItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/Item/AssociatedTeamInfoItemRequestBuilder.cs index 815f0e03a1c..a982d922668 100644 --- a/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/Item/AssociatedTeamInfoItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Teamwork/AssociatedTeams/Item/AssociatedTeamInfoItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AssociatedTeamInfo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AssociatedTeamInfo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/InstalledAppsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/InstalledAppsRequestBuilder.cs index 494abc66247..ae73ea1b4a2 100644 --- a/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/InstalledAppsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/InstalledAppsRequestBuilder.cs @@ -93,7 +93,7 @@ public InstalledAppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserScopeTeamsAppInstallation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserScopeTeamsAppInstallation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/Item/UserScopeTeamsAppInstallationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/Item/UserScopeTeamsAppInstallationItemRequestBuilder.cs index 5734bcb1d77..4111a06815d 100644 --- a/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/Item/UserScopeTeamsAppInstallationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Teamwork/InstalledApps/Item/UserScopeTeamsAppInstallationItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserScopeTeamsAppInstallation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserScopeTeamsAppInstallation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Teamwork/SendActivityNotification/SendActivityNotificationPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Teamwork/SendActivityNotification/SendActivityNotificationPostRequestBody.cs index d96170c73a4..059de84430e 100644 --- a/src/Microsoft.Graph/Generated/Me/Teamwork/SendActivityNotification/SendActivityNotificationPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Teamwork/SendActivityNotification/SendActivityNotificationPostRequestBody.cs @@ -139,7 +139,7 @@ public SendActivityNotificationPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Teamwork.SendActivityNotification.SendActivityNotificationPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Teamwork.SendActivityNotification.SendActivityNotificationPostRequestBody(); } /// @@ -165,7 +165,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("activityType", ActivityType); writer.WriteLongValue("chainId", ChainId); writer.WriteStringValue("iconId", IconId); diff --git a/src/Microsoft.Graph/Generated/Me/Teamwork/SendActivityNotification/SendActivityNotificationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Teamwork/SendActivityNotification/SendActivityNotificationRequestBuilder.cs index d932b2aa40a..faa309c4b80 100644 --- a/src/Microsoft.Graph/Generated/Me/Teamwork/SendActivityNotification/SendActivityNotificationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Teamwork/SendActivityNotification/SendActivityNotificationRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Teamwork.SendActivit public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Teamwork.SendActivityNotification.SendActivityNotificationPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Teamwork.SendActivityNotification.SendActivityNotificationPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Teamwork/TeamworkRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Teamwork/TeamworkRequestBuilder.cs index 3a68bd92c82..e0418459652 100644 --- a/src/Microsoft.Graph/Generated/Me/Teamwork/TeamworkRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Teamwork/TeamworkRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserTeamwork body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserTeamwork body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Delta/DeltaGetResponse.cs index b62cd4b6f06..e07c7df0bda 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Todo.Lists.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Todo.Lists.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Delta/DeltaResponse.cs index ad6a908069c..6439f87e00f 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Todo.Lists. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Todo.Lists.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Todo.Lists.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Extensions/ExtensionsRequestBuilder.cs index 899c772bc3c..0ce51d11d74 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 7cd14f96045..634c78545ee 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Delta/DeltaGetResponse.cs index 593a9e22273..b0191fb6c2a 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Todo.Lists.Item.Tasks.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Todo.Lists.Item.Tasks.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Delta/DeltaResponse.cs index 15d183dff3e..2118870d905 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Me.Todo.Lists. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.Todo.Lists.Item.Tasks.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Todo.Lists.Item.Tasks.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/AttachmentSessionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/AttachmentSessionItemRequestBuilder.cs index 69a2b29625b..c7058da9b12 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/AttachmentSessionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/AttachmentSessionItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AttachmentSession body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AttachmentSession body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/Content/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/Content/ContentRequestBuilder.cs index 84694dafc7e..2ec85e82c13 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/Content/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/AttachmentSessions/Item/Content/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs index e1bd5ef083b..c4164adda59 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/AttachmentsRequestBuilder.cs @@ -101,7 +101,7 @@ public AttachmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AttachmentBase body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AttachmentBase body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index a0404b58de0..ea72b1a5916 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.Todo.Lists.Item.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.Todo.Lists.Item.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("attachmentInfo", AttachmentInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 0c42eb9cb2d..7cc53d11d2a 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Me.Todo.Lists.Item.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.Todo.Lists.Item.Tasks.Item.Attachments.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/Item/Value/ContentRequestBuilder.cs index 65be3cc08b7..83f1067350c 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Attachments/Item/Value/ContentRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/ChecklistItems/ChecklistItemsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/ChecklistItems/ChecklistItemsRequestBuilder.cs index 373a6f64b0d..a26b23dd55e 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/ChecklistItems/ChecklistItemsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/ChecklistItems/ChecklistItemsRequestBuilder.cs @@ -95,7 +95,7 @@ public ChecklistItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ChecklistItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ChecklistItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/ChecklistItems/Item/ChecklistItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/ChecklistItems/Item/ChecklistItemItemRequestBuilder.cs index 75dcb2b4458..8edb675efae 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/ChecklistItems/Item/ChecklistItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/ChecklistItems/Item/ChecklistItemItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ChecklistItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ChecklistItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Extensions/ExtensionsRequestBuilder.cs index 893a100fd1f..0d89d0f3346 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 68e4d176834..2f4043e4941 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/LinkedResources/Item/LinkedResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/LinkedResources/Item/LinkedResourceItemRequestBuilder.cs index 4050e4f3573..52054e49be5 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/LinkedResources/Item/LinkedResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/LinkedResources/Item/LinkedResourceItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.LinkedResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.LinkedResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/LinkedResources/LinkedResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/LinkedResources/LinkedResourcesRequestBuilder.cs index f0cef422708..2510a0970f8 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/LinkedResources/LinkedResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/LinkedResources/LinkedResourcesRequestBuilder.cs @@ -95,7 +95,7 @@ public LinkedResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.LinkedResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.LinkedResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/TodoTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/TodoTaskItemRequestBuilder.cs index 495b71e64c5..9ad591ee08a 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/TodoTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/Item/TodoTaskItemRequestBuilder.cs @@ -129,7 +129,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TodoTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -190,7 +190,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TodoTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/TasksRequestBuilder.cs index 73dce9c215a..e59048a8d22 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/Tasks/TasksRequestBuilder.cs @@ -101,7 +101,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TodoTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TodoTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/TodoTaskListItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/TodoTaskListItemRequestBuilder.cs index 5389d49ba41..0caea72e26c 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/TodoTaskListItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/Item/TodoTaskListItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TodoTaskList body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TodoTaskList body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/Lists/ListsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/Lists/ListsRequestBuilder.cs index 65859723d17..8df3ae36754 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/Lists/ListsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/Lists/ListsRequestBuilder.cs @@ -101,7 +101,7 @@ public ListsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TodoTaskList body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TodoTaskList body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/Todo/TodoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Todo/TodoRequestBuilder.cs index 9e53c41a27d..e2040e106fe 100644 --- a/src/Microsoft.Graph/Generated/Me/Todo/TodoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Todo/TodoRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Todo body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Todo body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsPostRequestBody.cs index d65a9b615cd..91adbd129f1 100644 --- a/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsPostRequestBody.cs @@ -65,7 +65,7 @@ public TranslateExchangeIdsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.TranslateExchangeIds.TranslateExchangeIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.TranslateExchangeIds.TranslateExchangeIdsPostRequestBody(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("InputIds", InputIds); writer.WriteEnumValue("SourceIdType", SourceIdType); writer.WriteEnumValue("TargetIdType", TargetIdType); diff --git a/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsPostResponse.cs b/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsPostResponse.cs index 492d54d4d96..795f3f1e662 100644 --- a/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsPostResponse.cs @@ -36,7 +36,7 @@ public partial class TranslateExchangeIdsPostResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.TranslateExchangeIds.TranslateExchangeIdsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.TranslateExchangeIds.TranslateExchangeIdsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsRequestBuilder.cs index b14b5cde66e..01f3d55f1b1 100644 --- a/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsRequestBuilder.cs @@ -51,7 +51,7 @@ public TranslateExchangeIdsRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsTranslateExchangeIdsPostResponseAsync(global::Microsoft.Graph.Beta.Me.TranslateExchangeIds.TranslateExchangeIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public TranslateExchangeIdsRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Me.TranslateExchangeIds.TranslateExchangeIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.TranslateExchangeIds.TranslateExchangeIdsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsResponse.cs b/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsResponse.cs index 58471643b4c..79f5202213e 100644 --- a/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/Me/TranslateExchangeIds/TranslateExchangeIdsResponse.cs @@ -20,7 +20,7 @@ public partial class TranslateExchangeIdsResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Me.TranslateExchangeIds.TranslateExchangeIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.TranslateExchangeIds.TranslateExchangeIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Me/UsageRights/Item/UsageRightItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/UsageRights/Item/UsageRightItemRequestBuilder.cs index 6d4b3ab936f..d037b6f2a41 100644 --- a/src/Microsoft.Graph/Generated/Me/UsageRights/Item/UsageRightItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/UsageRights/Item/UsageRightItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UsageRight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UsageRight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/UsageRights/UsageRightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/UsageRights/UsageRightsRequestBuilder.cs index fda9b44579a..83735511a03 100644 --- a/src/Microsoft.Graph/Generated/Me/UsageRights/UsageRightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/UsageRights/UsageRightsRequestBuilder.cs @@ -93,7 +93,7 @@ public UsageRightsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UsageRight body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UsageRight body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/VirtualEvents/VirtualEventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/VirtualEvents/VirtualEventsRequestBuilder.cs index dde26e77bcb..93e3b2582b1 100644 --- a/src/Microsoft.Graph/Generated/Me/VirtualEvents/VirtualEventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/VirtualEvents/VirtualEventsRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserVirtualEventsRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserVirtualEventsRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationByDeviceTag/WipeManagedAppRegistrationByDeviceTagPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationByDeviceTag/WipeManagedAppRegistrationByDeviceTagPostRequestBody.cs index b35ddbac39a..5f3cf8df9a7 100644 --- a/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationByDeviceTag/WipeManagedAppRegistrationByDeviceTagPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationByDeviceTag/WipeManagedAppRegistrationByDeviceTagPostRequestBody.cs @@ -52,7 +52,7 @@ public WipeManagedAppRegistrationByDeviceTagPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.WipeManagedAppRegistrationByDeviceTag.WipeManagedAppRegistrationByDeviceTagPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.WipeManagedAppRegistrationByDeviceTag.WipeManagedAppRegistrationByDeviceTagPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceTag", DeviceTag); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationByDeviceTag/WipeManagedAppRegistrationByDeviceTagRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationByDeviceTag/WipeManagedAppRegistrationByDeviceTagRequestBuilder.cs index 7eb236d9e68..11bbaff9340 100644 --- a/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationByDeviceTag/WipeManagedAppRegistrationByDeviceTagRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationByDeviceTag/WipeManagedAppRegistrationByDeviceTagRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.WipeManagedAppRegist public async Task PostAsync(global::Microsoft.Graph.Beta.Me.WipeManagedAppRegistrationByDeviceTag.WipeManagedAppRegistrationByDeviceTagPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.WipeManagedAppRegistrationByDeviceTag.WipeManagedAppRegistrationByDeviceTagPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByAzureAdDeviceId/WipeManagedAppRegistrationsByAzureAdDeviceIdPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByAzureAdDeviceId/WipeManagedAppRegistrationsByAzureAdDeviceIdPostRequestBody.cs index 6ac50853e9c..c41bdc1bbf7 100644 --- a/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByAzureAdDeviceId/WipeManagedAppRegistrationsByAzureAdDeviceIdPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByAzureAdDeviceId/WipeManagedAppRegistrationsByAzureAdDeviceIdPostRequestBody.cs @@ -52,7 +52,7 @@ public WipeManagedAppRegistrationsByAzureAdDeviceIdPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.WipeManagedAppRegistrationsByAzureAdDeviceId.WipeManagedAppRegistrationsByAzureAdDeviceIdPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.WipeManagedAppRegistrationsByAzureAdDeviceId.WipeManagedAppRegistrationsByAzureAdDeviceIdPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("azureAdDeviceId", AzureAdDeviceId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByAzureAdDeviceId/WipeManagedAppRegistrationsByAzureAdDeviceIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByAzureAdDeviceId/WipeManagedAppRegistrationsByAzureAdDeviceIdRequestBuilder.cs index 5c261e0bfa8..e1262d5138f 100644 --- a/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByAzureAdDeviceId/WipeManagedAppRegistrationsByAzureAdDeviceIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByAzureAdDeviceId/WipeManagedAppRegistrationsByAzureAdDeviceIdRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.WipeManagedAppRegist public async Task PostAsync(global::Microsoft.Graph.Beta.Me.WipeManagedAppRegistrationsByAzureAdDeviceId.WipeManagedAppRegistrationsByAzureAdDeviceIdPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.WipeManagedAppRegistrationsByAzureAdDeviceId.WipeManagedAppRegistrationsByAzureAdDeviceIdPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByDeviceTag/WipeManagedAppRegistrationsByDeviceTagPostRequestBody.cs b/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByDeviceTag/WipeManagedAppRegistrationsByDeviceTagPostRequestBody.cs index 0d7372087c3..b13b47f345f 100644 --- a/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByDeviceTag/WipeManagedAppRegistrationsByDeviceTagPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByDeviceTag/WipeManagedAppRegistrationsByDeviceTagPostRequestBody.cs @@ -52,7 +52,7 @@ public WipeManagedAppRegistrationsByDeviceTagPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Me.WipeManagedAppRegistrationsByDeviceTag.WipeManagedAppRegistrationsByDeviceTagPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Me.WipeManagedAppRegistrationsByDeviceTag.WipeManagedAppRegistrationsByDeviceTagPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceTag", DeviceTag); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByDeviceTag/WipeManagedAppRegistrationsByDeviceTagRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByDeviceTag/WipeManagedAppRegistrationsByDeviceTagRequestBuilder.cs index 81de4257f05..a73703aa096 100644 --- a/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByDeviceTag/WipeManagedAppRegistrationsByDeviceTagRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/WipeManagedAppRegistrationsByDeviceTag/WipeManagedAppRegistrationsByDeviceTagRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Me.WipeManagedAppRegist public async Task PostAsync(global::Microsoft.Graph.Beta.Me.WipeManagedAppRegistrationsByDeviceTag.WipeManagedAppRegistrationsByDeviceTagPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Me.WipeManagedAppRegistrationsByDeviceTag.WipeManagedAppRegistrationsByDeviceTagPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MessageEvents/Item/MessageEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/MessageEvents/Item/MessageEventItemRequestBuilder.cs index ee8be8dd67c..991878e85b4 100644 --- a/src/Microsoft.Graph/Generated/MessageEvents/Item/MessageEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MessageEvents/Item/MessageEventItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MessageEvents/MessageEventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/MessageEvents/MessageEventsRequestBuilder.cs index f597529a6cd..cfa21c4015a 100644 --- a/src/Microsoft.Graph/Generated/MessageEvents/MessageEventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MessageEvents/MessageEventsRequestBuilder.cs @@ -93,7 +93,7 @@ public MessageEventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MessageRecipients/Item/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/MessageRecipients/Item/Events/EventsRequestBuilder.cs index 22719e10577..575c6783bfa 100644 --- a/src/Microsoft.Graph/Generated/MessageRecipients/Item/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MessageRecipients/Item/Events/EventsRequestBuilder.cs @@ -93,7 +93,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MessageRecipients/Item/Events/Item/MessageEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/MessageRecipients/Item/Events/Item/MessageEventItemRequestBuilder.cs index 9c6dbd52d38..55c012e809c 100644 --- a/src/Microsoft.Graph/Generated/MessageRecipients/Item/Events/Item/MessageEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MessageRecipients/Item/Events/Item/MessageEventItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MessageRecipients/Item/MessageRecipientItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/MessageRecipients/Item/MessageRecipientItemRequestBuilder.cs index 07f9a57763d..da9f0347f4a 100644 --- a/src/Microsoft.Graph/Generated/MessageRecipients/Item/MessageRecipientItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MessageRecipients/Item/MessageRecipientItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MessageRecipient body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MessageRecipient body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MessageRecipients/MessageRecipientsRequestBuilder.cs b/src/Microsoft.Graph/Generated/MessageRecipients/MessageRecipientsRequestBuilder.cs index 6a7a493f80f..a8a6c4a6dc7 100644 --- a/src/Microsoft.Graph/Generated/MessageRecipients/MessageRecipientsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MessageRecipients/MessageRecipientsRequestBuilder.cs @@ -93,7 +93,7 @@ public MessageRecipientsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MessageRecipient body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MessageRecipient body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MessageTraces/Item/MessageTraceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/MessageTraces/Item/MessageTraceItemRequestBuilder.cs index 16d2f3876f6..9913e4fb188 100644 --- a/src/Microsoft.Graph/Generated/MessageTraces/Item/MessageTraceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MessageTraces/Item/MessageTraceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MessageTrace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MessageTrace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/Item/Events/EventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/Item/Events/EventsRequestBuilder.cs index 302c00a4d4a..fa1f800e062 100644 --- a/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/Item/Events/EventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/Item/Events/EventsRequestBuilder.cs @@ -93,7 +93,7 @@ public EventsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/Item/Events/Item/MessageEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/Item/Events/Item/MessageEventItemRequestBuilder.cs index 7b5c4d4eb71..38c76b6d52d 100644 --- a/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/Item/Events/Item/MessageEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/Item/Events/Item/MessageEventItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MessageEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/Item/MessageRecipientItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/Item/MessageRecipientItemRequestBuilder.cs index b4cd46f21ea..69017327c17 100644 --- a/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/Item/MessageRecipientItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/Item/MessageRecipientItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MessageRecipient body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MessageRecipient body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/RecipientsRequestBuilder.cs b/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/RecipientsRequestBuilder.cs index adee05f60d1..09cbd351fae 100644 --- a/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/RecipientsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MessageTraces/Item/Recipients/RecipientsRequestBuilder.cs @@ -93,7 +93,7 @@ public RecipientsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MessageRecipient body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MessageRecipient body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MessageTraces/MessageTracesRequestBuilder.cs b/src/Microsoft.Graph/Generated/MessageTraces/MessageTracesRequestBuilder.cs index c449068b0d0..1907c8464f3 100644 --- a/src/Microsoft.Graph/Generated/MessageTraces/MessageTracesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MessageTraces/MessageTracesRequestBuilder.cs @@ -93,7 +93,7 @@ public MessageTracesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MessageTrace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MessageTrace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MobilityManagementPolicies/Item/IncludedGroups/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/MobilityManagementPolicies/Item/IncludedGroups/Ref/RefRequestBuilder.cs index 63db5a10692..803e8c0cd38 100644 --- a/src/Microsoft.Graph/Generated/MobilityManagementPolicies/Item/IncludedGroups/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MobilityManagementPolicies/Item/IncludedGroups/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/mobilityManagementPolicies/{mobilityManagementPolicy%2Did}/includedGroups/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MobilityManagementPolicies/Item/MobilityManagementPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/MobilityManagementPolicies/Item/MobilityManagementPolicyItemRequestBuilder.cs index 4b7b87c361d..549b96cdb26 100644 --- a/src/Microsoft.Graph/Generated/MobilityManagementPolicies/Item/MobilityManagementPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MobilityManagementPolicies/Item/MobilityManagementPolicyItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobilityManagementPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobilityManagementPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/MobilityManagementPolicies/MobilityManagementPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/MobilityManagementPolicies/MobilityManagementPoliciesRequestBuilder.cs index 62e2dc54430..1e323cfce7e 100644 --- a/src/Microsoft.Graph/Generated/MobilityManagementPolicies/MobilityManagementPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/MobilityManagementPolicies/MobilityManagementPoliciesRequestBuilder.cs @@ -93,7 +93,7 @@ public MobilityManagementPoliciesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobilityManagementPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobilityManagementPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Models/AadSource.cs b/src/Microsoft.Graph/Generated/Models/AadSource.cs index e473d84fb8a..e1f7fae2420 100644 --- a/src/Microsoft.Graph/Generated/Models/AadSource.cs +++ b/src/Microsoft.Graph/Generated/Models/AadSource.cs @@ -42,7 +42,7 @@ public AadSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AadSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AadSource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("domain", Domain); } diff --git a/src/Microsoft.Graph/Generated/Models/AadUserConversationMember.cs b/src/Microsoft.Graph/Generated/Models/AadUserConversationMember.cs index 8578ee993f9..0a351918469 100644 --- a/src/Microsoft.Graph/Generated/Models/AadUserConversationMember.cs +++ b/src/Microsoft.Graph/Generated/Models/AadUserConversationMember.cs @@ -90,7 +90,7 @@ public AadUserConversationMember() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AadUserConversationMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AadUserConversationMember(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("email", Email); writer.WriteStringValue("tenantId", TenantId); diff --git a/src/Microsoft.Graph/Generated/Models/AadUserConversationMemberResult.cs b/src/Microsoft.Graph/Generated/Models/AadUserConversationMemberResult.cs index b690281a01b..ec895d636b7 100644 --- a/src/Microsoft.Graph/Generated/Models/AadUserConversationMemberResult.cs +++ b/src/Microsoft.Graph/Generated/Models/AadUserConversationMemberResult.cs @@ -42,7 +42,7 @@ public AadUserConversationMemberResult() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AadUserConversationMemberResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AadUserConversationMemberResult(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userId", UserId); } diff --git a/src/Microsoft.Graph/Generated/Models/AadUserNotificationRecipient.cs b/src/Microsoft.Graph/Generated/Models/AadUserNotificationRecipient.cs index 9a51e7ed76d..2d35be1935c 100644 --- a/src/Microsoft.Graph/Generated/Models/AadUserNotificationRecipient.cs +++ b/src/Microsoft.Graph/Generated/Models/AadUserNotificationRecipient.cs @@ -42,7 +42,7 @@ public AadUserNotificationRecipient() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AadUserNotificationRecipient CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AadUserNotificationRecipient(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userId", UserId); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessAction.cs b/src/Microsoft.Graph/Generated/Models/AccessAction.cs index e00dd3ceb12..80769155417 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessAction.cs @@ -52,7 +52,7 @@ public AccessAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessAction(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackage.cs b/src/Microsoft.Graph/Generated/Models/AccessPackage.cs index fe5ea8ed181..60e23422854 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackage.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackage.cs @@ -235,7 +235,7 @@ public string UniqueName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackage(); } /// @@ -270,7 +270,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("accessPackageAssignmentPolicies", AccessPackageAssignmentPolicies); writer.WriteObjectValue("accessPackageCatalog", AccessPackageCatalog); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAnswer.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAnswer.cs index afd1857b146..a0cce788db6 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAnswer.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAnswer.cs @@ -84,7 +84,7 @@ public AccessPackageAnswer() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessPackageAnswer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -111,7 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("answeredQuestion", AnsweredQuestion); writer.WriteStringValue("displayValue", DisplayValue); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAnswerChoice.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAnswerChoice.cs index 30f65e990a3..1d6fa48f774 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAnswerChoice.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAnswerChoice.cs @@ -84,7 +84,7 @@ public AccessPackageAnswerChoice() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessPackageAnswerChoice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageAnswerChoice(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("actualValue", ActualValue); writer.WriteObjectValue("displayValue", DisplayValue); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAnswerString.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAnswerString.cs index 6c73dfd08a4..e69fc07db8c 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAnswerString.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAnswerString.cs @@ -42,7 +42,7 @@ public AccessPackageAnswerString() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageAnswerString CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageAnswerString(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageApprovalStage.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageApprovalStage.cs index 8fd6c6a4a8f..5de990b3387 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageApprovalStage.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageApprovalStage.cs @@ -140,7 +140,7 @@ public AccessPackageApprovalStage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessPackageApprovalStage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageApprovalStage(); } /// @@ -168,7 +168,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteTimeSpanValue("durationBeforeAutomaticDenial", DurationBeforeAutomaticDenial); writer.WriteTimeSpanValue("durationBeforeEscalation", DurationBeforeEscalation); writer.WriteCollectionOfObjectValues("escalationApprovers", EscalationApprovers); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignment.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignment.cs index 1f0a9b411c1..8c3d8e208c3 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignment.cs @@ -239,7 +239,7 @@ public string TargetId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageAssignment(); } /// @@ -273,7 +273,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("accessPackage", AccessPackage); writer.WriteObjectValue("accessPackageAssignmentPolicy", AccessPackageAssignmentPolicy); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentCollectionResponse.cs index 2de4a56de84..ed9ddd85909 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessPackageAssignmentCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentPolicy.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentPolicy.cs index 13d204a93ec..9d23c7f4764 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentPolicy.cs @@ -289,7 +289,7 @@ public DateTimeOffset? ModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicy(); } /// @@ -328,7 +328,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("accessPackage", AccessPackage); writer.WriteObjectValue("accessPackageCatalog", AccessPackageCatalog); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentPolicyCollectionResponse.cs index 3e09abccb14..016191dc9f9 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessPackageAssignmentPolicyCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequest.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequest.cs index 0d5747f3b98..d1cddf7c871 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequest.cs @@ -251,7 +251,7 @@ public string RequestType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequest(); } /// @@ -287,7 +287,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("accessPackage", AccessPackage); writer.WriteObjectValue("accessPackageAssignment", AccessPackageAssignment); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestCallbackData.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestCallbackData.cs index f6117ccbbeb..515871b9e6e 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestCallbackData.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestCallbackData.cs @@ -80,7 +80,7 @@ public AccessPackageAssignmentRequestCallbackData() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequestCallbackData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -108,7 +108,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("customExtensionStageInstanceDetail", CustomExtensionStageInstanceDetail); writer.WriteStringValue("customExtensionStageInstanceId", CustomExtensionStageInstanceId); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestCollectionResponse.cs index 612262602d4..6afe9088352 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessPackageAssignmentRequestCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestRequirements.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestRequirements.cs index 547da0831be..ce9a05f6ab3 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestRequirements.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestRequirements.cs @@ -188,7 +188,7 @@ public AccessPackageAssignmentRequestRequirements() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequestRequirements CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequestRequirements(); } /// @@ -219,7 +219,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("existingAnswers", ExistingAnswers); writer.WriteBoolValue("isApprovalRequired", IsApprovalRequired); writer.WriteBoolValue("isApprovalRequiredForExtension", IsApprovalRequiredForExtension); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestWorkflowExtension.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestWorkflowExtension.cs index e23a24bd350..8c9940e0f88 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestWorkflowExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentRequestWorkflowExtension.cs @@ -86,7 +86,7 @@ public AccessPackageAssignmentRequestWorkflowExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequestWorkflowExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentRequestWorkflowExtension(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("callbackConfiguration", CallbackConfiguration); writer.WriteStringValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentResourceRole.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentResourceRole.cs index 41b3d8312f4..03d295721be 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentResourceRole.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentResourceRole.cs @@ -131,7 +131,7 @@ public string Status /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentResourceRole CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentResourceRole(); } /// @@ -157,7 +157,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("accessPackageAssignments", AccessPackageAssignments); writer.WriteObjectValue("accessPackageResourceRole", AccessPackageResourceRole); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentResourceRoleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentResourceRoleCollectionResponse.cs index 5634d03eb13..2d34fe9367a 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentResourceRoleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentResourceRoleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessPackageAssignmentResourceRoleCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentResourceRoleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentResourceRoleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentWorkflowExtension.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentWorkflowExtension.cs index fa6fc1931a0..29f4f01ee49 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentWorkflowExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageAssignmentWorkflowExtension.cs @@ -86,7 +86,7 @@ public AccessPackageAssignmentWorkflowExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentWorkflowExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageAssignmentWorkflowExtension(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("callbackConfiguration", CallbackConfiguration); writer.WriteStringValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageCatalog.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageCatalog.cs index 004bf73b7dd..ac8b25101e6 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageCatalog.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageCatalog.cs @@ -245,7 +245,7 @@ public string UniqueName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageCatalog CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageCatalog(); } /// @@ -280,7 +280,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("accessPackageCustomWorkflowExtensions", AccessPackageCustomWorkflowExtensions); writer.WriteCollectionOfObjectValues("accessPackageResourceRoles", AccessPackageResourceRoles); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageCatalogCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageCatalogCollectionResponse.cs index 36e12944017..937a594f70d 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageCatalogCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageCatalogCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessPackageCatalogCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageCatalogCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageCatalogCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageCollectionResponse.cs index 08ebdfede1a..a3f3af7e8bb 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessPackageCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageDynamicApprovalStage.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageDynamicApprovalStage.cs index 5749c7bbc80..75cecebbe63 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageDynamicApprovalStage.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageDynamicApprovalStage.cs @@ -35,7 +35,7 @@ public partial class AccessPackageDynamicApprovalStage : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageDynamicApprovalStage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageDynamicApprovalStage(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("customExtension", CustomExtension); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageLocalizedContent.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageLocalizedContent.cs index 71debce5710..b6f4711f7a5 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageLocalizedContent.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageLocalizedContent.cs @@ -84,7 +84,7 @@ public AccessPackageLocalizedContent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessPackageLocalizedContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageLocalizedContent(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("defaultText", DefaultText); writer.WriteCollectionOfObjectValues("localizedTexts", LocalizedTexts); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageLocalizedText.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageLocalizedText.cs index 61bb17b78eb..f7713f9349a 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageLocalizedText.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageLocalizedText.cs @@ -84,7 +84,7 @@ public AccessPackageLocalizedText() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessPackageLocalizedText CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageLocalizedText(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("languageCode", LanguageCode); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("text", Text); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageMultipleChoiceQuestion.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageMultipleChoiceQuestion.cs index 475e40a7f16..bf553c8664c 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageMultipleChoiceQuestion.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageMultipleChoiceQuestion.cs @@ -48,7 +48,7 @@ public AccessPackageMultipleChoiceQuestion() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageMultipleChoiceQuestion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageMultipleChoiceQuestion(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowsMultipleSelection", AllowsMultipleSelection); writer.WriteCollectionOfObjectValues("choices", Choices); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageNotificationSettings.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageNotificationSettings.cs index ee9807f28f6..6703c63bf67 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageNotificationSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageNotificationSettings.cs @@ -58,7 +58,7 @@ public AccessPackageNotificationSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessPackageNotificationSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageNotificationSettings(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isAssignmentNotificationDisabled", IsAssignmentNotificationDisabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageQuestion.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageQuestion.cs index fed16de808e..b190359bd5a 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageQuestion.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageQuestion.cs @@ -102,7 +102,7 @@ public AccessPackageQuestion() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessPackageQuestion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -133,7 +133,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteBoolValue("isAnswerEditable", IsAnswerEditable); writer.WriteBoolValue("isRequired", IsRequired); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageRequestApprovalStageCallbackConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageRequestApprovalStageCallbackConfiguration.cs index 9707eab2189..70d32a81a03 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageRequestApprovalStageCallbackConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageRequestApprovalStageCallbackConfiguration.cs @@ -26,7 +26,7 @@ public AccessPackageRequestApprovalStageCallbackConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageRequestApprovalStageCallbackConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageRequestApprovalStageCallbackConfiguration(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResource.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResource.cs index 93fda2abf3a..fb2eb4993dc 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResource.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResource.cs @@ -207,7 +207,7 @@ public string Url /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageResource(); } /// @@ -239,7 +239,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("accessPackageResourceEnvironment", AccessPackageResourceEnvironment); writer.WriteCollectionOfObjectValues("accessPackageResourceRoles", AccessPackageResourceRoles); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttribute.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttribute.cs index 657fe23fd56..968c70b87c7 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttribute.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttribute.cs @@ -128,7 +128,7 @@ public AccessPackageResourceAttribute() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessPackageResourceAttribute CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageResourceAttribute(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("attributeDestination", AttributeDestination); writer.WriteStringValue("attributeName", AttributeName); writer.WriteObjectValue("attributeSource", AttributeSource); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttributeDestination.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttributeDestination.cs index 601b6e8cab4..be9e017cd1c 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttributeDestination.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttributeDestination.cs @@ -52,7 +52,7 @@ public AccessPackageResourceAttributeDestination() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessPackageResourceAttributeDestination CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttributeQuestion.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttributeQuestion.cs index a30dfb9bac0..1af23b977f0 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttributeQuestion.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttributeQuestion.cs @@ -42,7 +42,7 @@ public AccessPackageResourceAttributeQuestion() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageResourceAttributeQuestion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageResourceAttributeQuestion(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("question", Question); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttributeSource.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttributeSource.cs index b78dff0bb55..cb911c6643e 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttributeSource.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceAttributeSource.cs @@ -52,7 +52,7 @@ public AccessPackageResourceAttributeSource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessPackageResourceAttributeSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceCollectionResponse.cs index 50311abb123..854ef650202 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessPackageResourceCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageResourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageResourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceEnvironment.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceEnvironment.cs index d11851401c5..3db62b3d079 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceEnvironment.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceEnvironment.cs @@ -165,7 +165,7 @@ public string OriginSystem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageResourceEnvironment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageResourceEnvironment(); } /// @@ -195,7 +195,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("accessPackageResources", AccessPackageResources); writer.WriteObjectValue("connectionInfo", ConnectionInfo); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceEnvironmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceEnvironmentCollectionResponse.cs index e67c0a03bc3..d8edaecfd1a 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceEnvironmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceEnvironmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessPackageResourceEnvironmentCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageResourceEnvironmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageResourceEnvironmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRequest.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRequest.cs index 4b635e0841c..56bab93412a 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRequest.cs @@ -149,7 +149,7 @@ public string RequestType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageResourceRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageResourceRequest(); } /// @@ -178,7 +178,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("accessPackageResource", AccessPackageResource); writer.WriteStringValue("catalogId", CatalogId); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRequestCollectionResponse.cs index 05b386ceb00..ffa51761497 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessPackageResourceRequestCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageResourceRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageResourceRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRole.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRole.cs index 0818dfa775e..0443bc764db 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRole.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRole.cs @@ -99,7 +99,7 @@ public string OriginSystem /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageResourceRole(); } /// @@ -123,7 +123,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("accessPackageResource", AccessPackageResource); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRoleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRoleCollectionResponse.cs index 66bcf7571d7..b6daf08e3a1 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRoleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRoleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessPackageResourceRoleCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRoleScope.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRoleScope.cs index c88c8fec6da..7088aadaca3 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRoleScope.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRoleScope.cs @@ -95,7 +95,7 @@ public DateTimeOffset? ModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScope(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("accessPackageResourceRole", AccessPackageResourceRole); writer.WriteObjectValue("accessPackageResourceScope", AccessPackageResourceScope); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRoleScopeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRoleScopeCollectionResponse.cs index ef7ae2ffce3..59efb6cb016 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRoleScopeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceRoleScopeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessPackageResourceRoleScopeCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScopeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageResourceRoleScopeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceScope.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceScope.cs index ddfca8f76a1..238e717b2a3 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceScope.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceScope.cs @@ -137,7 +137,7 @@ public string Url /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageResourceScope(); } /// @@ -164,7 +164,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("accessPackageResource", AccessPackageResource); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceScopeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceScopeCollectionResponse.cs index 44022ec5512..1f2ec9ebe79 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageResourceScopeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageResourceScopeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessPackageResourceScopeCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageResourceScopeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageResourceScopeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageSubject.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageSubject.cs index 6fc670d1ff4..c4e5c75bd68 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageSubject.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageSubject.cs @@ -175,7 +175,7 @@ public string Type /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageSubject CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageSubject(); } /// @@ -205,7 +205,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("altSecId", AltSecId); writer.WriteDateTimeOffsetValue("cleanupScheduledDateTime", CleanupScheduledDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageSubjectCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageSubjectCollectionResponse.cs index 83773e6b02a..b8773da8167 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageSubjectCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageSubjectCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessPackageSubjectCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageSubjectCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageSubjectCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageTextInputQuestion.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageTextInputQuestion.cs index a7f5285474d..43c4d48db1b 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageTextInputQuestion.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageTextInputQuestion.cs @@ -48,7 +48,7 @@ public AccessPackageTextInputQuestion() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageTextInputQuestion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageTextInputQuestion(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isSingleLineQuestion", IsSingleLineQuestion); writer.WriteStringValue("regexPattern", RegexPattern); diff --git a/src/Microsoft.Graph/Generated/Models/AccessPackageUserDirectoryAttributeStore.cs b/src/Microsoft.Graph/Generated/Models/AccessPackageUserDirectoryAttributeStore.cs index ea0bde4e9dd..656e994babe 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessPackageUserDirectoryAttributeStore.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessPackageUserDirectoryAttributeStore.cs @@ -26,7 +26,7 @@ public AccessPackageUserDirectoryAttributeStore() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessPackageUserDirectoryAttributeStore CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessPackageUserDirectoryAttributeStore(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReview.cs b/src/Microsoft.Graph/Generated/Models/AccessReview.cs index 6422d80e73f..c2837767c0d 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReview.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReview.cs @@ -223,7 +223,7 @@ public string Status /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReview(); } /// @@ -256,7 +256,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("businessFlowTemplateId", BusinessFlowTemplateId); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewApplyAction.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewApplyAction.cs index 30eee16cea5..b8e6240314a 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewApplyAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewApplyAction.cs @@ -52,7 +52,7 @@ public AccessReviewApplyAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessReviewApplyAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewCollectionResponse.cs index 5220c6a3353..cf60a489304 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessReviewCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewDecision.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewDecision.cs index c3fcbf9ba09..89d1b07c3bf 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewDecision.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewDecision.cs @@ -143,7 +143,7 @@ public string ReviewResult /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewDecision CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewDecision(); } /// @@ -171,7 +171,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("accessRecommendation", AccessRecommendation); writer.WriteStringValue("accessReviewId", AccessReviewId); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewDecisionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewDecisionCollectionResponse.cs index 91c50eddd58..4ece232bc39 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewDecisionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewDecisionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessReviewDecisionCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewDecisionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewDecisionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewError.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewError.cs index b349ca116c8..a87455ae3cd 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewError.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewError.cs @@ -26,7 +26,7 @@ public AccessReviewError() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewError(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryDefinition.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryDefinition.cs index c786a5e6130..4ebf6920cf8 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryDefinition.cs @@ -161,7 +161,7 @@ public DateTimeOffset? ReviewHistoryPeriodStartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewHistoryDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewHistoryDefinition(); } /// @@ -192,7 +192,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryDefinitionCollectionResponse.cs index 1d76da4b2c6..2461fcf72ac 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessReviewHistoryDefinitionCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewHistoryDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewHistoryDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryInstance.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryInstance.cs index 902f988a9e7..042f01ce513 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryInstance.cs @@ -71,7 +71,7 @@ public DateTimeOffset? RunDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewHistoryInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewHistoryInstance(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("downloadUri", DownloadUri); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryInstanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryInstanceCollectionResponse.cs index b0ffcd58187..aeec8a9f99f 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryInstanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryInstanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessReviewHistoryInstanceCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewHistoryInstanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewHistoryInstanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryScheduleSettings.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryScheduleSettings.cs index 1f77a549731..2e277c5e16f 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryScheduleSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewHistoryScheduleSettings.cs @@ -84,7 +84,7 @@ public AccessReviewHistoryScheduleSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessReviewHistoryScheduleSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewHistoryScheduleSettings(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("recurrence", Recurrence); writer.WriteStringValue("reportRange", ReportRange); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewInactiveUsersQueryScope.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewInactiveUsersQueryScope.cs index fcc62b4c040..cd7e69faf31 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewInactiveUsersQueryScope.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewInactiveUsersQueryScope.cs @@ -32,7 +32,7 @@ public AccessReviewInactiveUsersQueryScope() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewInactiveUsersQueryScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewInactiveUsersQueryScope(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeSpanValue("inactiveDuration", InactiveDuration); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewInstance.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewInstance.cs index c7402fcd672..b449b34685f 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewInstance.cs @@ -175,7 +175,7 @@ public string Status /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewInstance(); } /// @@ -205,7 +205,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("contactedReviewers", ContactedReviewers); writer.WriteCollectionOfObjectValues("decisions", Decisions); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceCollectionResponse.cs index a702f523431..801eb8f7ce8 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessReviewInstanceCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItem.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItem.cs index 0da86d74182..4644cca6662 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItem.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItem.cs @@ -271,7 +271,7 @@ public DateTimeOffset? ReviewedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItem(); } /// @@ -307,7 +307,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("accessReviewId", AccessReviewId); writer.WriteObjectValue("appliedBy", AppliedBy); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource.cs index f82384bf19e..c6a9859af6f 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource.cs @@ -58,7 +58,7 @@ public AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource() : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("accessPackageDisplayName", AccessPackageDisplayName); writer.WriteStringValue("accessPackageId", AccessPackageId); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemAzureRoleResource.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemAzureRoleResource.cs index f5155348f87..c0f2dd18298 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemAzureRoleResource.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemAzureRoleResource.cs @@ -42,7 +42,7 @@ public AccessReviewInstanceDecisionItemAzureRoleResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItemAzureRoleResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItemAzureRoleResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("scope", Scope); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemCollectionResponse.cs index 5f23aeccd39..ec321903047 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessReviewInstanceDecisionItemCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemResource.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemResource.cs index 0f9d1e29f68..70fe60bbac1 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemResource.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemResource.cs @@ -100,7 +100,7 @@ public AccessReviewInstanceDecisionItemResource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItemResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemServicePrincipalResource.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemServicePrincipalResource.cs index b3facfbf229..dff12aa6f21 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemServicePrincipalResource.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemServicePrincipalResource.cs @@ -42,7 +42,7 @@ public AccessReviewInstanceDecisionItemServicePrincipalResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItemServicePrincipalResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItemServicePrincipalResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemServicePrincipalTarget.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemServicePrincipalTarget.cs index 5cc8738c546..a4c08421d72 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemServicePrincipalTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemServicePrincipalTarget.cs @@ -74,7 +74,7 @@ public AccessReviewInstanceDecisionItemServicePrincipalTarget() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItemServicePrincipalTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItemServicePrincipalTarget(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("servicePrincipalDisplayName", ServicePrincipalDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemTarget.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemTarget.cs index 64742aefa57..44e23176eda 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemTarget.cs @@ -52,7 +52,7 @@ public AccessReviewInstanceDecisionItemTarget() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItemTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemUserTarget.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemUserTarget.cs index 0a2a00da12d..138bc359446 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemUserTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewInstanceDecisionItemUserTarget.cs @@ -74,7 +74,7 @@ public AccessReviewInstanceDecisionItemUserTarget() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItemUserTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewInstanceDecisionItemUserTarget(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userDisplayName", UserDisplayName); writer.WriteStringValue("userId", UserId); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewNotificationRecipientItem.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewNotificationRecipientItem.cs index f7ab8cb1747..589b01260ad 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewNotificationRecipientItem.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewNotificationRecipientItem.cs @@ -84,7 +84,7 @@ public AccessReviewNotificationRecipientItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessReviewNotificationRecipientItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewNotificationRecipientItem(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("notificationRecipientScope", NotificationRecipientScope); writer.WriteStringValue("notificationTemplateType", NotificationTemplateType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewNotificationRecipientQueryScope.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewNotificationRecipientQueryScope.cs index 98f06bd7e4a..645b9ab8373 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewNotificationRecipientQueryScope.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewNotificationRecipientQueryScope.cs @@ -74,7 +74,7 @@ public AccessReviewNotificationRecipientQueryScope() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewNotificationRecipientQueryScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewNotificationRecipientQueryScope(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("query", Query); writer.WriteStringValue("queryRoot", QueryRoot); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewNotificationRecipientScope.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewNotificationRecipientScope.cs index a28f865cf5f..b8113e8d8be 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewNotificationRecipientScope.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewNotificationRecipientScope.cs @@ -52,7 +52,7 @@ public AccessReviewNotificationRecipientScope() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessReviewNotificationRecipientScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewPolicy.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewPolicy.cs index 8a57877e15d..051fe719974 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewPolicy.cs @@ -57,7 +57,7 @@ public bool? IsGroupOwnerManagementEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewPolicy(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewQueryScope.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewQueryScope.cs index 0c0a0eb9fdd..83b1d9e119e 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewQueryScope.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewQueryScope.cs @@ -74,7 +74,7 @@ public AccessReviewQueryScope() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewQueryScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("query", Query); writer.WriteStringValue("queryRoot", QueryRoot); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewRecommendationInsightSetting.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewRecommendationInsightSetting.cs index d158b42ef40..5a182a0ad45 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewRecommendationInsightSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewRecommendationInsightSetting.cs @@ -52,7 +52,7 @@ public AccessReviewRecommendationInsightSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessReviewRecommendationInsightSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewRecurrenceSettings.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewRecurrenceSettings.cs index 53e710962ba..7ff1fe5ef5a 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewRecurrenceSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewRecurrenceSettings.cs @@ -96,7 +96,7 @@ public AccessReviewRecurrenceSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessReviewRecurrenceSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewRecurrenceSettings(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("durationInDays", DurationInDays); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("recurrenceCount", RecurrenceCount); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewReviewer.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewReviewer.cs index 0e36b690143..9875673c903 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewReviewer.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewReviewer.cs @@ -57,7 +57,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewReviewer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewReviewer(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewReviewerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewReviewerCollectionResponse.cs index fa0e509fb1e..2dff5255b78 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewReviewerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewReviewerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessReviewReviewerCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewReviewerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewReviewerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewReviewerScope.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewReviewerScope.cs index 5fcaeffbc1e..e71b2d093ba 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewReviewerScope.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewReviewerScope.cs @@ -74,7 +74,7 @@ public AccessReviewReviewerScope() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewReviewerScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewReviewerScope(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("query", Query); writer.WriteStringValue("queryRoot", QueryRoot); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleDefinition.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleDefinition.cs index 2c4c6aac94c..fa91484c913 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleDefinition.cs @@ -255,7 +255,7 @@ public string Status /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewScheduleDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewScheduleDefinition(); } /// @@ -290,7 +290,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("additionalNotificationRecipients", AdditionalNotificationRecipients); writer.WriteCollectionOfObjectValues("backupReviewers", BackupReviewers); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleDefinitionCollectionResponse.cs index 8bdba2d742b..45a9c581961 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessReviewScheduleDefinitionCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewScheduleDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewScheduleDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleSettings.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleSettings.cs index 76b53bcfc18..e5f68d0558d 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewScheduleSettings.cs @@ -176,7 +176,7 @@ public AccessReviewScheduleSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessReviewScheduleSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewScheduleSettings(); } /// @@ -210,7 +210,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("applyActions", ApplyActions); writer.WriteBoolValue("autoApplyDecisionsEnabled", AutoApplyDecisionsEnabled); writer.WriteBoolValue("decisionHistoriesForReviewersEnabled", DecisionHistoriesForReviewersEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewScope.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewScope.cs index 4a5fb7ea23c..a6a4ce02443 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewScope.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewScope.cs @@ -52,7 +52,7 @@ public AccessReviewScope() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessReviewScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewSet.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewSet.cs index 4c99dfa64ec..2cd893df2e9 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewSet.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewSet.cs @@ -83,7 +83,7 @@ public partial class AccessReviewSet : global::Microsoft.Graph.Beta.Models.Entit /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewSet(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("decisions", Decisions); writer.WriteCollectionOfObjectValues("definitions", Definitions); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewSettings.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewSettings.cs index d227867193b..0933e6694dc 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewSettings.cs @@ -126,7 +126,7 @@ public AccessReviewSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessReviewSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -160,7 +160,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("accessRecommendationsEnabled", AccessRecommendationsEnabled); writer.WriteIntValue("activityDurationInDays", ActivityDurationInDays); writer.WriteBoolValue("autoApplyReviewResultsEnabled", AutoApplyReviewResultsEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewStage.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewStage.cs index ef7cf9dd1f9..421b92b6075 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewStage.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewStage.cs @@ -95,7 +95,7 @@ public string Status /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewStage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewStage(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("decisions", Decisions); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewStageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewStageCollectionResponse.cs index c7db23967de..e9496c85bc5 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewStageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewStageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccessReviewStageCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccessReviewStageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewStageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccessReviewStageSettings.cs b/src/Microsoft.Graph/Generated/Models/AccessReviewStageSettings.cs index 4a32b5e95e2..89f679bc58d 100644 --- a/src/Microsoft.Graph/Generated/Models/AccessReviewStageSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AccessReviewStageSettings.cs @@ -166,7 +166,7 @@ public AccessReviewStageSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccessReviewStageSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccessReviewStageSettings(); } /// @@ -195,7 +195,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("decisionsThatWillMoveToNextStage", DecisionsThatWillMoveToNextStage); writer.WriteCollectionOfPrimitiveValues("dependsOn", DependsOn); writer.WriteIntValue("durationInDays", DurationInDays); diff --git a/src/Microsoft.Graph/Generated/Models/Account.cs b/src/Microsoft.Graph/Generated/Models/Account.cs index 3227ab22bba..bbd6e977b00 100644 --- a/src/Microsoft.Graph/Generated/Models/Account.cs +++ b/src/Microsoft.Graph/Generated/Models/Account.cs @@ -134,7 +134,7 @@ public Account() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Account CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Account(); } /// @@ -161,7 +161,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("blocked", Blocked); writer.WriteStringValue("category", Category); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AccountCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AccountCollectionResponse.cs index 028cca47986..ce9534fc25e 100644 --- a/src/Microsoft.Graph/Generated/Models/AccountCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AccountCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AccountCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AccountCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AccountCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AccountTargetContent.cs b/src/Microsoft.Graph/Generated/Models/AccountTargetContent.cs index 5cb4ac6df13..176b224c002 100644 --- a/src/Microsoft.Graph/Generated/Models/AccountTargetContent.cs +++ b/src/Microsoft.Graph/Generated/Models/AccountTargetContent.cs @@ -58,7 +58,7 @@ public AccountTargetContent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccountTargetContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -85,7 +85,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("type", Type); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AccountsWithAccess.cs b/src/Microsoft.Graph/Generated/Models/AccountsWithAccess.cs index 325b0e0e276..2f793121659 100644 --- a/src/Microsoft.Graph/Generated/Models/AccountsWithAccess.cs +++ b/src/Microsoft.Graph/Generated/Models/AccountsWithAccess.cs @@ -52,7 +52,7 @@ public AccountsWithAccess() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AccountsWithAccess CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Acl.cs b/src/Microsoft.Graph/Generated/Models/Acl.cs index d9c7face0c6..5d4908733fd 100644 --- a/src/Microsoft.Graph/Generated/Models/Acl.cs +++ b/src/Microsoft.Graph/Generated/Models/Acl.cs @@ -86,7 +86,7 @@ public Acl() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Acl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Acl(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("accessType", AccessType); writer.WriteEnumValue("identitySource", IdentitySource); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ActionItem.cs b/src/Microsoft.Graph/Generated/Models/ActionItem.cs index 833a1450f5a..6729d0d1d53 100644 --- a/src/Microsoft.Graph/Generated/Models/ActionItem.cs +++ b/src/Microsoft.Graph/Generated/Models/ActionItem.cs @@ -100,7 +100,7 @@ public ActionItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ActionItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActionItem(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("ownerDisplayName", OwnerDisplayName); writer.WriteStringValue("text", Text); diff --git a/src/Microsoft.Graph/Generated/Models/ActionResultPart.cs b/src/Microsoft.Graph/Generated/Models/ActionResultPart.cs index c141aa58987..bc5f73c61fd 100644 --- a/src/Microsoft.Graph/Generated/Models/ActionResultPart.cs +++ b/src/Microsoft.Graph/Generated/Models/ActionResultPart.cs @@ -68,7 +68,7 @@ public ActionResultPart() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ActionResultPart CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -95,7 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("error", Error); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ActionStep.cs b/src/Microsoft.Graph/Generated/Models/ActionStep.cs index 3af3da5287b..63bafbfab03 100644 --- a/src/Microsoft.Graph/Generated/Models/ActionStep.cs +++ b/src/Microsoft.Graph/Generated/Models/ActionStep.cs @@ -90,7 +90,7 @@ public ActionStep() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ActionStep CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActionStep(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("actionUrl", ActionUrl); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("stepNumber", StepNumber); diff --git a/src/Microsoft.Graph/Generated/Models/ActionSummary.cs b/src/Microsoft.Graph/Generated/Models/ActionSummary.cs index f54a4bf6575..ac2d3d4e736 100644 --- a/src/Microsoft.Graph/Generated/Models/ActionSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ActionSummary.cs @@ -70,7 +70,7 @@ public ActionSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ActionSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActionSummary(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("assigned", Assigned); writer.WriteIntValue("available", Available); writer.WriteIntValue("exercised", Exercised); diff --git a/src/Microsoft.Graph/Generated/Models/ActionUrl.cs b/src/Microsoft.Graph/Generated/Models/ActionUrl.cs index 180bac32c90..3595f54b8a9 100644 --- a/src/Microsoft.Graph/Generated/Models/ActionUrl.cs +++ b/src/Microsoft.Graph/Generated/Models/ActionUrl.cs @@ -84,7 +84,7 @@ public ActionUrl() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ActionUrl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActionUrl(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("url", Url); diff --git a/src/Microsoft.Graph/Generated/Models/ActivateDeviceEsimActionResult.cs b/src/Microsoft.Graph/Generated/Models/ActivateDeviceEsimActionResult.cs index 46c3e8a0b9c..c59f626eeb3 100644 --- a/src/Microsoft.Graph/Generated/Models/ActivateDeviceEsimActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ActivateDeviceEsimActionResult.cs @@ -36,7 +36,7 @@ public string CarrierUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ActivateDeviceEsimActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActivateDeviceEsimActionResult(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("carrierUrl", CarrierUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/ActiveDirectoryWindowsAutopilotDeploymentProfile.cs b/src/Microsoft.Graph/Generated/Models/ActiveDirectoryWindowsAutopilotDeploymentProfile.cs index 77c71f3ad01..7176ecab411 100644 --- a/src/Microsoft.Graph/Generated/Models/ActiveDirectoryWindowsAutopilotDeploymentProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/ActiveDirectoryWindowsAutopilotDeploymentProfile.cs @@ -49,7 +49,7 @@ public ActiveDirectoryWindowsAutopilotDeploymentProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ActiveDirectoryWindowsAutopilotDeploymentProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActiveDirectoryWindowsAutopilotDeploymentProfile(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("domainJoinConfiguration", DomainJoinConfiguration); writer.WriteBoolValue("hybridAzureADJoinSkipConnectivityCheck", HybridAzureADJoinSkipConnectivityCheck); diff --git a/src/Microsoft.Graph/Generated/Models/ActiveUsersMetric.cs b/src/Microsoft.Graph/Generated/Models/ActiveUsersMetric.cs index 197e86c9178..3fb5798b0b1 100644 --- a/src/Microsoft.Graph/Generated/Models/ActiveUsersMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/ActiveUsersMetric.cs @@ -112,7 +112,7 @@ public string Os /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ActiveUsersMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActiveUsersMetric(); } /// @@ -138,7 +138,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("appName", AppName); diff --git a/src/Microsoft.Graph/Generated/Models/ActiveUsersMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ActiveUsersMetricCollectionResponse.cs index 5d28f21143c..58084fce35e 100644 --- a/src/Microsoft.Graph/Generated/Models/ActiveUsersMetricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ActiveUsersMetricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ActiveUsersMetricCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ActiveUsersMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActiveUsersMetricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ActivitiesContainer.cs b/src/Microsoft.Graph/Generated/Models/ActivitiesContainer.cs index aad2235b857..f8473a226aa 100644 --- a/src/Microsoft.Graph/Generated/Models/ActivitiesContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/ActivitiesContainer.cs @@ -35,7 +35,7 @@ public partial class ActivitiesContainer : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ActivitiesContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActivitiesContainer(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("contentActivities", ContentActivities); } diff --git a/src/Microsoft.Graph/Generated/Models/ActivityBasedTimeoutPolicy.cs b/src/Microsoft.Graph/Generated/Models/ActivityBasedTimeoutPolicy.cs index 118792d385b..20fed630fa9 100644 --- a/src/Microsoft.Graph/Generated/Models/ActivityBasedTimeoutPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/ActivityBasedTimeoutPolicy.cs @@ -26,7 +26,7 @@ public ActivityBasedTimeoutPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ActivityBasedTimeoutPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActivityBasedTimeoutPolicy(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ActivityBasedTimeoutPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ActivityBasedTimeoutPolicyCollectionResponse.cs index 874cd498795..50dd73f9927 100644 --- a/src/Microsoft.Graph/Generated/Models/ActivityBasedTimeoutPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ActivityBasedTimeoutPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ActivityBasedTimeoutPolicyCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ActivityBasedTimeoutPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActivityBasedTimeoutPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ActivityHistoryItem.cs b/src/Microsoft.Graph/Generated/Models/ActivityHistoryItem.cs index d460914acfc..271ce633c62 100644 --- a/src/Microsoft.Graph/Generated/Models/ActivityHistoryItem.cs +++ b/src/Microsoft.Graph/Generated/Models/ActivityHistoryItem.cs @@ -93,7 +93,7 @@ public string UserTimezone /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ActivityHistoryItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActivityHistoryItem(); } /// @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activeDurationSeconds", ActiveDurationSeconds); writer.WriteObjectValue("activity", Activity); diff --git a/src/Microsoft.Graph/Generated/Models/ActivityHistoryItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ActivityHistoryItemCollectionResponse.cs index 2ebbe7ccd7e..050ec6749c4 100644 --- a/src/Microsoft.Graph/Generated/Models/ActivityHistoryItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ActivityHistoryItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ActivityHistoryItemCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ActivityHistoryItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActivityHistoryItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ActivityMetadata.cs b/src/Microsoft.Graph/Generated/Models/ActivityMetadata.cs index d2ffc7f1db1..47251fbf304 100644 --- a/src/Microsoft.Graph/Generated/Models/ActivityMetadata.cs +++ b/src/Microsoft.Graph/Generated/Models/ActivityMetadata.cs @@ -58,7 +58,7 @@ public ActivityMetadata() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ActivityMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActivityMetadata(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("activity", Activity); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ActivityStatistics.cs b/src/Microsoft.Graph/Generated/Models/ActivityStatistics.cs index 85aa1a2c57d..68ffd129a15 100644 --- a/src/Microsoft.Graph/Generated/Models/ActivityStatistics.cs +++ b/src/Microsoft.Graph/Generated/Models/ActivityStatistics.cs @@ -60,7 +60,7 @@ public string TimeZoneUsed /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ActivityStatistics CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("activity", Activity); writer.WriteTimeSpanValue("duration", Duration); diff --git a/src/Microsoft.Graph/Generated/Models/ActivityStatisticsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ActivityStatisticsCollectionResponse.cs index 218b7f363e2..b59fd31269e 100644 --- a/src/Microsoft.Graph/Generated/Models/ActivityStatisticsCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ActivityStatisticsCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ActivityStatisticsCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ActivityStatisticsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ActivityStatisticsCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ActivityStatus.cs b/src/Microsoft.Graph/Generated/Models/ActivityStatus.cs new file mode 100644 index 00000000000..4b2b5593e56 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ActivityStatus.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Beta.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ActivityStatus + #pragma warning restore CS1591 + { + [EnumMember(Value = "notStarted")] + #pragma warning disable CS1591 + NotStarted, + #pragma warning restore CS1591 + [EnumMember(Value = "running")] + #pragma warning disable CS1591 + Running, + #pragma warning restore CS1591 + [EnumMember(Value = "failed")] + #pragma warning disable CS1591 + Failed, + #pragma warning restore CS1591 + [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 + UnknownFutureValue, + #pragma warning restore CS1591 + } +} diff --git a/src/Microsoft.Graph/Generated/Models/ActivityTransport.cs b/src/Microsoft.Graph/Generated/Models/ActivityTransport.cs new file mode 100644 index 00000000000..73b620ebaa5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ActivityTransport.cs @@ -0,0 +1,107 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Microsoft.Graph.Beta.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class ActivityTransport : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The connectionType property + public global::Microsoft.Graph.Beta.Models.ConnectionType? ConnectionType + { + get { return BackingStore?.Get("connectionType"); } + set { BackingStore?.Set("connectionType", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType + { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType + { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url + { + get { return BackingStore?.Get("url"); } + set { BackingStore?.Set("url", value); } + } +#nullable restore +#else + public string Url + { + get { return BackingStore?.Get("url"); } + set { BackingStore?.Set("url", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ActivityTransport() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Microsoft.Graph.Beta.Models.ActivityTransport CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Microsoft.Graph.Beta.Models.ActivityTransport(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "connectionType", n => { ConnectionType = n.GetEnumValue(); } }, + { "@odata.type", n => { OdataType = n.GetStringValue(); } }, + { "url", n => { Url = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("connectionType", ConnectionType); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Microsoft.Graph/Generated/Models/AddContentFooterAction.cs b/src/Microsoft.Graph/Generated/Models/AddContentFooterAction.cs index dcb99846b4c..3e232440fb4 100644 --- a/src/Microsoft.Graph/Generated/Models/AddContentFooterAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AddContentFooterAction.cs @@ -108,7 +108,7 @@ public AddContentFooterAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AddContentFooterAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AddContentFooterAction(); } /// @@ -134,7 +134,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("alignment", Alignment); writer.WriteStringValue("fontColor", FontColor); diff --git a/src/Microsoft.Graph/Generated/Models/AddContentHeaderAction.cs b/src/Microsoft.Graph/Generated/Models/AddContentHeaderAction.cs index 737cba058b4..d860edea6b6 100644 --- a/src/Microsoft.Graph/Generated/Models/AddContentHeaderAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AddContentHeaderAction.cs @@ -108,7 +108,7 @@ public AddContentHeaderAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AddContentHeaderAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AddContentHeaderAction(); } /// @@ -134,7 +134,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("alignment", Alignment); writer.WriteStringValue("fontColor", FontColor); diff --git a/src/Microsoft.Graph/Generated/Models/AddFooter.cs b/src/Microsoft.Graph/Generated/Models/AddFooter.cs index d9acca22186..8a40278b6b9 100644 --- a/src/Microsoft.Graph/Generated/Models/AddFooter.cs +++ b/src/Microsoft.Graph/Generated/Models/AddFooter.cs @@ -38,7 +38,7 @@ public AddFooter() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AddFooter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AddFooter(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("alignment", Alignment); writer.WriteIntValue("margin", Margin); diff --git a/src/Microsoft.Graph/Generated/Models/AddHeader.cs b/src/Microsoft.Graph/Generated/Models/AddHeader.cs index b1468fb9ce0..2a09e90c4f5 100644 --- a/src/Microsoft.Graph/Generated/Models/AddHeader.cs +++ b/src/Microsoft.Graph/Generated/Models/AddHeader.cs @@ -38,7 +38,7 @@ public AddHeader() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AddHeader CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AddHeader(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("alignment", Alignment); writer.WriteIntValue("margin", Margin); diff --git a/src/Microsoft.Graph/Generated/Models/AddIn.cs b/src/Microsoft.Graph/Generated/Models/AddIn.cs index fd20f32d7bb..19b9c4af1c1 100644 --- a/src/Microsoft.Graph/Generated/Models/AddIn.cs +++ b/src/Microsoft.Graph/Generated/Models/AddIn.cs @@ -90,7 +90,7 @@ public AddIn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AddIn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AddIn(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteGuidValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("properties", Properties); diff --git a/src/Microsoft.Graph/Generated/Models/AddLargeGalleryViewOperation.cs b/src/Microsoft.Graph/Generated/Models/AddLargeGalleryViewOperation.cs index adf77c812ff..f7b1c9d90c9 100644 --- a/src/Microsoft.Graph/Generated/Models/AddLargeGalleryViewOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/AddLargeGalleryViewOperation.cs @@ -19,7 +19,7 @@ public partial class AddLargeGalleryViewOperation : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AddLargeGalleryViewOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AddLargeGalleryViewOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AddWatermark.cs b/src/Microsoft.Graph/Generated/Models/AddWatermark.cs index 93cd6ec349d..29775bae998 100644 --- a/src/Microsoft.Graph/Generated/Models/AddWatermark.cs +++ b/src/Microsoft.Graph/Generated/Models/AddWatermark.cs @@ -32,7 +32,7 @@ public AddWatermark() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AddWatermark CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AddWatermark(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("orientation", Orientation); } diff --git a/src/Microsoft.Graph/Generated/Models/AddWatermarkAction.cs b/src/Microsoft.Graph/Generated/Models/AddWatermarkAction.cs index 5edcadd6fcd..c63de900e9d 100644 --- a/src/Microsoft.Graph/Generated/Models/AddWatermarkAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AddWatermarkAction.cs @@ -102,7 +102,7 @@ public AddWatermarkAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AddWatermarkAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AddWatermarkAction(); } /// @@ -127,7 +127,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fontColor", FontColor); writer.WriteStringValue("fontName", FontName); diff --git a/src/Microsoft.Graph/Generated/Models/AddressBookAccountTargetContent.cs b/src/Microsoft.Graph/Generated/Models/AddressBookAccountTargetContent.cs index ea25963967a..a1f45765cf3 100644 --- a/src/Microsoft.Graph/Generated/Models/AddressBookAccountTargetContent.cs +++ b/src/Microsoft.Graph/Generated/Models/AddressBookAccountTargetContent.cs @@ -42,7 +42,7 @@ public AddressBookAccountTargetContent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AddressBookAccountTargetContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AddressBookAccountTargetContent(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("accountTargetEmails", AccountTargetEmails); } diff --git a/src/Microsoft.Graph/Generated/Models/Admin.cs b/src/Microsoft.Graph/Generated/Models/Admin.cs index f7d59d894f4..2348b3c770d 100644 --- a/src/Microsoft.Graph/Generated/Models/Admin.cs +++ b/src/Microsoft.Graph/Generated/Models/Admin.cs @@ -293,7 +293,7 @@ public Admin() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Admin CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Admin(); } /// @@ -328,7 +328,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("appsAndServices", AppsAndServices); writer.WriteObjectValue("configurationManagement", ConfigurationManagement); writer.WriteObjectValue("dynamics", Dynamics); diff --git a/src/Microsoft.Graph/Generated/Models/AdminAppsAndServices.cs b/src/Microsoft.Graph/Generated/Models/AdminAppsAndServices.cs index 15a210d2691..d21addf55b2 100644 --- a/src/Microsoft.Graph/Generated/Models/AdminAppsAndServices.cs +++ b/src/Microsoft.Graph/Generated/Models/AdminAppsAndServices.cs @@ -35,7 +35,7 @@ public partial class AdminAppsAndServices : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AdminAppsAndServices CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdminAppsAndServices(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("settings", Settings); } diff --git a/src/Microsoft.Graph/Generated/Models/AdminConsent.cs b/src/Microsoft.Graph/Generated/Models/AdminConsent.cs index 6c6800f34be..22bb6903f0f 100644 --- a/src/Microsoft.Graph/Generated/Models/AdminConsent.cs +++ b/src/Microsoft.Graph/Generated/Models/AdminConsent.cs @@ -65,7 +65,7 @@ public AdminConsent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AdminConsent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdminConsent(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("shareAPNSData", ShareAPNSData); writer.WriteEnumValue("shareUserExperienceAnalyticsData", ShareUserExperienceAnalyticsData); diff --git a/src/Microsoft.Graph/Generated/Models/AdminConsentRequestPolicy.cs b/src/Microsoft.Graph/Generated/Models/AdminConsentRequestPolicy.cs index ee4b1d3bbf5..eb4145971a5 100644 --- a/src/Microsoft.Graph/Generated/Models/AdminConsentRequestPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AdminConsentRequestPolicy.cs @@ -65,7 +65,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AdminConsentRequestPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdminConsentRequestPolicy(); } /// @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isEnabled", IsEnabled); writer.WriteBoolValue("notifyReviewers", NotifyReviewers); diff --git a/src/Microsoft.Graph/Generated/Models/AdminDynamics.cs b/src/Microsoft.Graph/Generated/Models/AdminDynamics.cs index 956e526a7d7..3173c68387a 100644 --- a/src/Microsoft.Graph/Generated/Models/AdminDynamics.cs +++ b/src/Microsoft.Graph/Generated/Models/AdminDynamics.cs @@ -35,7 +35,7 @@ public partial class AdminDynamics : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AdminDynamics CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdminDynamics(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("customerVoice", CustomerVoice); } diff --git a/src/Microsoft.Graph/Generated/Models/AdminForms.cs b/src/Microsoft.Graph/Generated/Models/AdminForms.cs index 6b790cece3b..32a15935bc7 100644 --- a/src/Microsoft.Graph/Generated/Models/AdminForms.cs +++ b/src/Microsoft.Graph/Generated/Models/AdminForms.cs @@ -35,7 +35,7 @@ public partial class AdminForms : global::Microsoft.Graph.Beta.Models.Entity, IP /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AdminForms CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdminForms(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("settings", Settings); } diff --git a/src/Microsoft.Graph/Generated/Models/AdminMicrosoft365Apps.cs b/src/Microsoft.Graph/Generated/Models/AdminMicrosoft365Apps.cs index b13bf58674d..7c1dffc96bd 100644 --- a/src/Microsoft.Graph/Generated/Models/AdminMicrosoft365Apps.cs +++ b/src/Microsoft.Graph/Generated/Models/AdminMicrosoft365Apps.cs @@ -35,7 +35,7 @@ public partial class AdminMicrosoft365Apps : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AdminMicrosoft365Apps CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdminMicrosoft365Apps(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("installationOptions", InstallationOptions); } diff --git a/src/Microsoft.Graph/Generated/Models/AdminReportSettings.cs b/src/Microsoft.Graph/Generated/Models/AdminReportSettings.cs index 8e54fc081f6..c81881f8689 100644 --- a/src/Microsoft.Graph/Generated/Models/AdminReportSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AdminReportSettings.cs @@ -25,7 +25,7 @@ public bool? DisplayConcealedNames /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AdminReportSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdminReportSettings(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("displayConcealedNames", DisplayConcealedNames); } diff --git a/src/Microsoft.Graph/Generated/Models/AdminTodo.cs b/src/Microsoft.Graph/Generated/Models/AdminTodo.cs index e8021fa7cb9..32ff90035ec 100644 --- a/src/Microsoft.Graph/Generated/Models/AdminTodo.cs +++ b/src/Microsoft.Graph/Generated/Models/AdminTodo.cs @@ -35,7 +35,7 @@ public partial class AdminTodo : global::Microsoft.Graph.Beta.Models.Entity, IPa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AdminTodo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdminTodo(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("settings", Settings); } diff --git a/src/Microsoft.Graph/Generated/Models/AdminWindows.cs b/src/Microsoft.Graph/Generated/Models/AdminWindows.cs index 72db038cf43..6df64a3bd3a 100644 --- a/src/Microsoft.Graph/Generated/Models/AdminWindows.cs +++ b/src/Microsoft.Graph/Generated/Models/AdminWindows.cs @@ -35,7 +35,7 @@ public partial class AdminWindows : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AdminWindows CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdminWindows(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("updates", Updates); } diff --git a/src/Microsoft.Graph/Generated/Models/AdminWindowsUpdates.cs b/src/Microsoft.Graph/Generated/Models/AdminWindowsUpdates.cs index 0e2a02e1113..9f7ac8c98a3 100644 --- a/src/Microsoft.Graph/Generated/Models/AdminWindowsUpdates.cs +++ b/src/Microsoft.Graph/Generated/Models/AdminWindowsUpdates.cs @@ -132,7 +132,7 @@ public partial class AdminWindowsUpdates : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AdminWindowsUpdates CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdminWindowsUpdates(); } /// @@ -158,7 +158,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("catalog", Catalog); writer.WriteCollectionOfObjectValues("deploymentAudiences", DeploymentAudiences); diff --git a/src/Microsoft.Graph/Generated/Models/AdministrativeUnit.cs b/src/Microsoft.Graph/Generated/Models/AdministrativeUnit.cs index 5e602fa6434..6c8df2ee155 100644 --- a/src/Microsoft.Graph/Generated/Models/AdministrativeUnit.cs +++ b/src/Microsoft.Graph/Generated/Models/AdministrativeUnit.cs @@ -192,7 +192,7 @@ public AdministrativeUnit() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AdministrativeUnit CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdministrativeUnit(); } /// @@ -222,7 +222,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("deletedMembers", DeletedMembers); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/AdministrativeUnitCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AdministrativeUnitCollectionResponse.cs index 6123a74aad3..4ab5ddf5a6f 100644 --- a/src/Microsoft.Graph/Generated/Models/AdministrativeUnitCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AdministrativeUnitCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AdministrativeUnitCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AdministrativeUnitCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdministrativeUnitCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AdvancedThreatProtectionOnboardingDeviceSettingState.cs b/src/Microsoft.Graph/Generated/Models/AdvancedThreatProtectionOnboardingDeviceSettingState.cs index f74763b8850..31a5958b729 100644 --- a/src/Microsoft.Graph/Generated/Models/AdvancedThreatProtectionOnboardingDeviceSettingState.cs +++ b/src/Microsoft.Graph/Generated/Models/AdvancedThreatProtectionOnboardingDeviceSettingState.cs @@ -182,7 +182,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AdvancedThreatProtectionOnboardingDeviceSettingState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdvancedThreatProtectionOnboardingDeviceSettingState(); } /// @@ -213,7 +213,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("complianceGracePeriodExpirationDateTime", ComplianceGracePeriodExpirationDateTime); writer.WriteStringValue("deviceId", DeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse.cs index a933ce61c7a..faa9a1b223f 100644 --- a/src/Microsoft.Graph/Generated/Models/AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AdvancedThreatProtectionOnboardingDeviceSettingStateCollect /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AdvancedThreatProtectionOnboardingStateSummary.cs b/src/Microsoft.Graph/Generated/Models/AdvancedThreatProtectionOnboardingStateSummary.cs index a5fa8b0ab0f..683df6601cf 100644 --- a/src/Microsoft.Graph/Generated/Models/AdvancedThreatProtectionOnboardingStateSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/AdvancedThreatProtectionOnboardingStateSummary.cs @@ -84,7 +84,7 @@ public int? UnknownDeviceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AdvancedThreatProtectionOnboardingStateSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AdvancedThreatProtectionOnboardingStateSummary(); } /// @@ -112,7 +112,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("advancedThreatProtectionOnboardingDeviceSettingStates", AdvancedThreatProtectionOnboardingDeviceSettingStates); writer.WriteIntValue("compliantDeviceCount", CompliantDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/AgedAccountsPayable.cs b/src/Microsoft.Graph/Generated/Models/AgedAccountsPayable.cs index 4b79400c060..47186ad9d61 100644 --- a/src/Microsoft.Graph/Generated/Models/AgedAccountsPayable.cs +++ b/src/Microsoft.Graph/Generated/Models/AgedAccountsPayable.cs @@ -175,7 +175,7 @@ public AgedAccountsPayable() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AgedAccountsPayable CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AgedAccountsPayable(); } /// @@ -207,7 +207,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateValue("agedAsOfDate", AgedAsOfDate); writer.WriteDecimalValue("balanceDue", BalanceDue); writer.WriteStringValue("currencyCode", CurrencyCode); diff --git a/src/Microsoft.Graph/Generated/Models/AgedAccountsPayableCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AgedAccountsPayableCollectionResponse.cs index 4cda6536713..5e447044c0e 100644 --- a/src/Microsoft.Graph/Generated/Models/AgedAccountsPayableCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AgedAccountsPayableCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AgedAccountsPayableCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AgedAccountsPayableCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AgedAccountsPayableCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AgedAccountsReceivable.cs b/src/Microsoft.Graph/Generated/Models/AgedAccountsReceivable.cs index c89d507df44..3e97d341a04 100644 --- a/src/Microsoft.Graph/Generated/Models/AgedAccountsReceivable.cs +++ b/src/Microsoft.Graph/Generated/Models/AgedAccountsReceivable.cs @@ -175,7 +175,7 @@ public AgedAccountsReceivable() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AgedAccountsReceivable CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AgedAccountsReceivable(); } /// @@ -207,7 +207,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateValue("agedAsOfDate", AgedAsOfDate); writer.WriteDecimalValue("balanceDue", BalanceDue); writer.WriteStringValue("currencyCode", CurrencyCode); diff --git a/src/Microsoft.Graph/Generated/Models/AgedAccountsReceivableCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AgedAccountsReceivableCollectionResponse.cs index 18749d61490..b26c118349b 100644 --- a/src/Microsoft.Graph/Generated/Models/AgedAccountsReceivableCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AgedAccountsReceivableCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AgedAccountsReceivableCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AgedAccountsReceivableCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AgedAccountsReceivableCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Agentic/AgentSignIn.cs b/src/Microsoft.Graph/Generated/Models/Agentic/AgentSignIn.cs index bb1355d40c9..d28a5d30d73 100644 --- a/src/Microsoft.Graph/Generated/Models/Agentic/AgentSignIn.cs +++ b/src/Microsoft.Graph/Generated/Models/Agentic/AgentSignIn.cs @@ -74,7 +74,7 @@ public AgentSignIn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Agentic.AgentSignIn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Agentic.AgentSignIn(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("agentType", AgentType); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("parentAppId", ParentAppId); diff --git a/src/Microsoft.Graph/Generated/Models/AggregationOption.cs b/src/Microsoft.Graph/Generated/Models/AggregationOption.cs index 1a08b32a358..fac23dc43cd 100644 --- a/src/Microsoft.Graph/Generated/Models/AggregationOption.cs +++ b/src/Microsoft.Graph/Generated/Models/AggregationOption.cs @@ -90,7 +90,7 @@ public AggregationOption() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AggregationOption CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AggregationOption(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("bucketDefinition", BucketDefinition); writer.WriteStringValue("field", Field); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Agreement.cs b/src/Microsoft.Graph/Generated/Models/Agreement.cs index 68cd9a367f6..a911e0f0b94 100644 --- a/src/Microsoft.Graph/Generated/Models/Agreement.cs +++ b/src/Microsoft.Graph/Generated/Models/Agreement.cs @@ -117,7 +117,7 @@ public TimeSpan? UserReacceptRequiredFrequency /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Agreement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Agreement(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("acceptances", Acceptances); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AgreementAcceptance.cs b/src/Microsoft.Graph/Generated/Models/AgreementAcceptance.cs index 592313f5f92..5a6feff5821 100644 --- a/src/Microsoft.Graph/Generated/Models/AgreementAcceptance.cs +++ b/src/Microsoft.Graph/Generated/Models/AgreementAcceptance.cs @@ -197,7 +197,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AgreementAcceptance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AgreementAcceptance(); } /// @@ -229,7 +229,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("agreementFileId", AgreementFileId); writer.WriteStringValue("agreementId", AgreementId); diff --git a/src/Microsoft.Graph/Generated/Models/AgreementAcceptanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AgreementAcceptanceCollectionResponse.cs index 39b46120ad8..c166fbb8c88 100644 --- a/src/Microsoft.Graph/Generated/Models/AgreementAcceptanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AgreementAcceptanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AgreementAcceptanceCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AgreementAcceptanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AgreementAcceptanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AgreementCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AgreementCollectionResponse.cs index e810580fc77..09d8599c63f 100644 --- a/src/Microsoft.Graph/Generated/Models/AgreementCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AgreementCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AgreementCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AgreementCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AgreementCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AgreementFile.cs b/src/Microsoft.Graph/Generated/Models/AgreementFile.cs index e6cb47be07b..58cf9d53298 100644 --- a/src/Microsoft.Graph/Generated/Models/AgreementFile.cs +++ b/src/Microsoft.Graph/Generated/Models/AgreementFile.cs @@ -35,7 +35,7 @@ public partial class AgreementFile : global::Microsoft.Graph.Beta.Models.Agreeme /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AgreementFile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AgreementFile(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("localizations", Localizations); } diff --git a/src/Microsoft.Graph/Generated/Models/AgreementFileData.cs b/src/Microsoft.Graph/Generated/Models/AgreementFileData.cs index 0153d1f61f4..921951b5ec6 100644 --- a/src/Microsoft.Graph/Generated/Models/AgreementFileData.cs +++ b/src/Microsoft.Graph/Generated/Models/AgreementFileData.cs @@ -68,7 +68,7 @@ public AgreementFileData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AgreementFileData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AgreementFileData(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("data", Data); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AgreementFileLocalization.cs b/src/Microsoft.Graph/Generated/Models/AgreementFileLocalization.cs index 4a95c88651e..d1f51fdba47 100644 --- a/src/Microsoft.Graph/Generated/Models/AgreementFileLocalization.cs +++ b/src/Microsoft.Graph/Generated/Models/AgreementFileLocalization.cs @@ -35,7 +35,7 @@ public partial class AgreementFileLocalization : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AgreementFileLocalization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AgreementFileLocalization(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("versions", Versions); } diff --git a/src/Microsoft.Graph/Generated/Models/AgreementFileLocalizationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AgreementFileLocalizationCollectionResponse.cs index 0e1b2d52415..62b1a2786c1 100644 --- a/src/Microsoft.Graph/Generated/Models/AgreementFileLocalizationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AgreementFileLocalizationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AgreementFileLocalizationCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AgreementFileLocalizationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AgreementFileLocalizationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AgreementFileProperties.cs b/src/Microsoft.Graph/Generated/Models/AgreementFileProperties.cs index ba959546b3e..ecb7018da51 100644 --- a/src/Microsoft.Graph/Generated/Models/AgreementFileProperties.cs +++ b/src/Microsoft.Graph/Generated/Models/AgreementFileProperties.cs @@ -101,7 +101,7 @@ public string Language /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AgreementFileProperties CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -134,7 +134,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AgreementFileVersion.cs b/src/Microsoft.Graph/Generated/Models/AgreementFileVersion.cs index bdda1ebf050..1d06aed2693 100644 --- a/src/Microsoft.Graph/Generated/Models/AgreementFileVersion.cs +++ b/src/Microsoft.Graph/Generated/Models/AgreementFileVersion.cs @@ -19,7 +19,7 @@ public partial class AgreementFileVersion : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AgreementFileVersion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AgreementFileVersion(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AgreementFileVersionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AgreementFileVersionCollectionResponse.cs index bf698b55cf4..f2239ce0574 100644 --- a/src/Microsoft.Graph/Generated/Models/AgreementFileVersionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AgreementFileVersionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AgreementFileVersionCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AgreementFileVersionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AgreementFileVersionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AiInteraction.cs b/src/Microsoft.Graph/Generated/Models/AiInteraction.cs index 2b2f88abe3b..79c0d5cbf12 100644 --- a/src/Microsoft.Graph/Generated/Models/AiInteraction.cs +++ b/src/Microsoft.Graph/Generated/Models/AiInteraction.cs @@ -223,7 +223,7 @@ public string SessionId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AiInteraction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AiInteraction(); } /// @@ -256,7 +256,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appClass", AppClass); writer.WriteCollectionOfObjectValues("attachments", Attachments); diff --git a/src/Microsoft.Graph/Generated/Models/AiInteractionAttachment.cs b/src/Microsoft.Graph/Generated/Models/AiInteractionAttachment.cs index 94a6905fe54..317546cf206 100644 --- a/src/Microsoft.Graph/Generated/Models/AiInteractionAttachment.cs +++ b/src/Microsoft.Graph/Generated/Models/AiInteractionAttachment.cs @@ -132,7 +132,7 @@ public AiInteractionAttachment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AiInteractionAttachment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AiInteractionAttachment(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("attachmentId", AttachmentId); writer.WriteStringValue("content", Content); writer.WriteStringValue("contentType", ContentType); diff --git a/src/Microsoft.Graph/Generated/Models/AiInteractionContext.cs b/src/Microsoft.Graph/Generated/Models/AiInteractionContext.cs index ce8669a27e2..759a7b8ec31 100644 --- a/src/Microsoft.Graph/Generated/Models/AiInteractionContext.cs +++ b/src/Microsoft.Graph/Generated/Models/AiInteractionContext.cs @@ -100,7 +100,7 @@ public AiInteractionContext() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AiInteractionContext CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AiInteractionContext(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("contextReference", ContextReference); writer.WriteStringValue("contextType", ContextType); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AiInteractionHistory.cs b/src/Microsoft.Graph/Generated/Models/AiInteractionHistory.cs index a193fe3dcad..56065569d0b 100644 --- a/src/Microsoft.Graph/Generated/Models/AiInteractionHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/AiInteractionHistory.cs @@ -19,7 +19,7 @@ public partial class AiInteractionHistory : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AiInteractionHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AiInteractionHistory(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AiInteractionLink.cs b/src/Microsoft.Graph/Generated/Models/AiInteractionLink.cs index 17d519fdca1..a011f05a69f 100644 --- a/src/Microsoft.Graph/Generated/Models/AiInteractionLink.cs +++ b/src/Microsoft.Graph/Generated/Models/AiInteractionLink.cs @@ -100,7 +100,7 @@ public AiInteractionLink() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AiInteractionLink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AiInteractionLink(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("linkType", LinkType); writer.WriteStringValue("linkUrl", LinkUrl); diff --git a/src/Microsoft.Graph/Generated/Models/AiInteractionMention.cs b/src/Microsoft.Graph/Generated/Models/AiInteractionMention.cs index 77e784175df..25631b2a24e 100644 --- a/src/Microsoft.Graph/Generated/Models/AiInteractionMention.cs +++ b/src/Microsoft.Graph/Generated/Models/AiInteractionMention.cs @@ -90,7 +90,7 @@ public AiInteractionMention() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AiInteractionMention CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AiInteractionMention(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("mentioned", Mentioned); writer.WriteIntValue("mentionId", MentionId); writer.WriteStringValue("mentionText", MentionText); diff --git a/src/Microsoft.Graph/Generated/Models/AiInteractionMentionedIdentitySet.cs b/src/Microsoft.Graph/Generated/Models/AiInteractionMentionedIdentitySet.cs index 471b489206f..0c9ad3b33ca 100644 --- a/src/Microsoft.Graph/Generated/Models/AiInteractionMentionedIdentitySet.cs +++ b/src/Microsoft.Graph/Generated/Models/AiInteractionMentionedIdentitySet.cs @@ -58,7 +58,7 @@ public AiInteractionMentionedIdentitySet() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AiInteractionMentionedIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AiInteractionMentionedIdentitySet(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("conversation", Conversation); writer.WriteObjectValue("tag", Tag); diff --git a/src/Microsoft.Graph/Generated/Models/AiInteractionPlugin.cs b/src/Microsoft.Graph/Generated/Models/AiInteractionPlugin.cs index 70798fde9fb..b79a91d6255 100644 --- a/src/Microsoft.Graph/Generated/Models/AiInteractionPlugin.cs +++ b/src/Microsoft.Graph/Generated/Models/AiInteractionPlugin.cs @@ -100,7 +100,7 @@ public AiInteractionPlugin() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AiInteractionPlugin CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AiInteractionPlugin(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("identifier", Identifier); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AiOnlineMeeting.cs b/src/Microsoft.Graph/Generated/Models/AiOnlineMeeting.cs index 75424f2ada0..7fe98a9ebf4 100644 --- a/src/Microsoft.Graph/Generated/Models/AiOnlineMeeting.cs +++ b/src/Microsoft.Graph/Generated/Models/AiOnlineMeeting.cs @@ -35,7 +35,7 @@ public partial class AiOnlineMeeting : global::Microsoft.Graph.Beta.Models.Entit /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AiOnlineMeeting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AiOnlineMeeting(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("aiInsights", AiInsights); } diff --git a/src/Microsoft.Graph/Generated/Models/AiUser.cs b/src/Microsoft.Graph/Generated/Models/AiUser.cs index f7d21d4521b..dea8c191179 100644 --- a/src/Microsoft.Graph/Generated/Models/AiUser.cs +++ b/src/Microsoft.Graph/Generated/Models/AiUser.cs @@ -51,7 +51,7 @@ public partial class AiUser : global::Microsoft.Graph.Beta.Models.Entity, IParsa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AiUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AiUser(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("interactionHistory", InteractionHistory); writer.WriteCollectionOfObjectValues("onlineMeetings", OnlineMeetings); diff --git a/src/Microsoft.Graph/Generated/Models/AirPrintDestination.cs b/src/Microsoft.Graph/Generated/Models/AirPrintDestination.cs index b59bdcdde5e..66436fde3e7 100644 --- a/src/Microsoft.Graph/Generated/Models/AirPrintDestination.cs +++ b/src/Microsoft.Graph/Generated/Models/AirPrintDestination.cs @@ -97,7 +97,7 @@ public AirPrintDestination() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AirPrintDestination CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AirPrintDestination(); } /// @@ -121,7 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("forceTls", ForceTls); writer.WriteStringValue("ipAddress", IpAddress); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AirPrintSettings.cs b/src/Microsoft.Graph/Generated/Models/AirPrintSettings.cs index 7b2eabbcf3a..42350dfa074 100644 --- a/src/Microsoft.Graph/Generated/Models/AirPrintSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AirPrintSettings.cs @@ -58,7 +58,7 @@ public AirPrintSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AirPrintSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AirPrintSettings(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("incompatiblePrinters", IncompatiblePrinters); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Album.cs b/src/Microsoft.Graph/Generated/Models/Album.cs index 54b505e8be7..7c7cb07b18f 100644 --- a/src/Microsoft.Graph/Generated/Models/Album.cs +++ b/src/Microsoft.Graph/Generated/Models/Album.cs @@ -68,7 +68,7 @@ public Album() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Album CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Album(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("coverImageItemId", CoverImageItemId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Alert.cs b/src/Microsoft.Graph/Generated/Models/Alert.cs index a3d540e2611..87bdc9e3bea 100644 --- a/src/Microsoft.Graph/Generated/Models/Alert.cs +++ b/src/Microsoft.Graph/Generated/Models/Alert.cs @@ -553,7 +553,7 @@ public string Title /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Alert CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Alert(); } /// @@ -611,7 +611,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("activityGroupName", ActivityGroupName); writer.WriteCollectionOfObjectValues("alertDetections", AlertDetections); diff --git a/src/Microsoft.Graph/Generated/Models/AlertCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AlertCollectionResponse.cs index d5df3b9a728..79a9d2d3fda 100644 --- a/src/Microsoft.Graph/Generated/Models/AlertCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AlertCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AlertCollectionResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AlertCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AlertCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AlertDetection.cs b/src/Microsoft.Graph/Generated/Models/AlertDetection.cs index 329daafe7c9..eec545e13af 100644 --- a/src/Microsoft.Graph/Generated/Models/AlertDetection.cs +++ b/src/Microsoft.Graph/Generated/Models/AlertDetection.cs @@ -100,7 +100,7 @@ public AlertDetection() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AlertDetection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AlertDetection(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("detectionType", DetectionType); writer.WriteStringValue("method", Method); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/AlertHistoryState.cs b/src/Microsoft.Graph/Generated/Models/AlertHistoryState.cs index 0c468598314..58e8ae4a2d1 100644 --- a/src/Microsoft.Graph/Generated/Models/AlertHistoryState.cs +++ b/src/Microsoft.Graph/Generated/Models/AlertHistoryState.cs @@ -134,7 +134,7 @@ public AlertHistoryState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AlertHistoryState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AlertHistoryState(); } /// @@ -161,7 +161,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("assignedTo", AssignedTo); writer.WriteCollectionOfPrimitiveValues("comments", Comments); diff --git a/src/Microsoft.Graph/Generated/Models/AlertTrigger.cs b/src/Microsoft.Graph/Generated/Models/AlertTrigger.cs index 0c4e39e94f6..161aa3b71e4 100644 --- a/src/Microsoft.Graph/Generated/Models/AlertTrigger.cs +++ b/src/Microsoft.Graph/Generated/Models/AlertTrigger.cs @@ -100,7 +100,7 @@ public AlertTrigger() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AlertTrigger CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AlertTrigger(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/Models/AllAccountsWithAccess.cs b/src/Microsoft.Graph/Generated/Models/AllAccountsWithAccess.cs index d52caf33849..47250349ce5 100644 --- a/src/Microsoft.Graph/Generated/Models/AllAccountsWithAccess.cs +++ b/src/Microsoft.Graph/Generated/Models/AllAccountsWithAccess.cs @@ -26,7 +26,7 @@ public AllAccountsWithAccess() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AllAccountsWithAccess CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AllAccountsWithAccess(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AllDeviceRegistrationMembership.cs b/src/Microsoft.Graph/Generated/Models/AllDeviceRegistrationMembership.cs index 4bd244d6346..d7a794f38d5 100644 --- a/src/Microsoft.Graph/Generated/Models/AllDeviceRegistrationMembership.cs +++ b/src/Microsoft.Graph/Generated/Models/AllDeviceRegistrationMembership.cs @@ -26,7 +26,7 @@ public AllDeviceRegistrationMembership() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AllDeviceRegistrationMembership CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AllDeviceRegistrationMembership(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AllDevicesAssignmentTarget.cs b/src/Microsoft.Graph/Generated/Models/AllDevicesAssignmentTarget.cs index cb588a95b6c..75cc0fab4ff 100644 --- a/src/Microsoft.Graph/Generated/Models/AllDevicesAssignmentTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/AllDevicesAssignmentTarget.cs @@ -27,7 +27,7 @@ public AllDevicesAssignmentTarget() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AllDevicesAssignmentTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AllDevicesAssignmentTarget(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AllDomains.cs b/src/Microsoft.Graph/Generated/Models/AllDomains.cs index cedfd7f7bf4..76222ee9e5a 100644 --- a/src/Microsoft.Graph/Generated/Models/AllDomains.cs +++ b/src/Microsoft.Graph/Generated/Models/AllDomains.cs @@ -26,7 +26,7 @@ public AllDomains() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AllDomains CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AllDomains(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AllInboundPorts.cs b/src/Microsoft.Graph/Generated/Models/AllInboundPorts.cs index 8738a759085..00a696539f2 100644 --- a/src/Microsoft.Graph/Generated/Models/AllInboundPorts.cs +++ b/src/Microsoft.Graph/Generated/Models/AllInboundPorts.cs @@ -26,7 +26,7 @@ public AllInboundPorts() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AllInboundPorts CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AllInboundPorts(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AllLicensedUsersAssignmentTarget.cs b/src/Microsoft.Graph/Generated/Models/AllLicensedUsersAssignmentTarget.cs index 1445115e642..703aff8effc 100644 --- a/src/Microsoft.Graph/Generated/Models/AllLicensedUsersAssignmentTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/AllLicensedUsersAssignmentTarget.cs @@ -27,7 +27,7 @@ public AllLicensedUsersAssignmentTarget() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AllLicensedUsersAssignmentTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AllLicensedUsersAssignmentTarget(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AllPreApprovedPermissions.cs b/src/Microsoft.Graph/Generated/Models/AllPreApprovedPermissions.cs index cdaeece7ded..ccf6c07ba49 100644 --- a/src/Microsoft.Graph/Generated/Models/AllPreApprovedPermissions.cs +++ b/src/Microsoft.Graph/Generated/Models/AllPreApprovedPermissions.cs @@ -26,7 +26,7 @@ public AllPreApprovedPermissions() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AllPreApprovedPermissions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AllPreApprovedPermissions(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AllPreApprovedPermissionsOnResourceApp.cs b/src/Microsoft.Graph/Generated/Models/AllPreApprovedPermissionsOnResourceApp.cs index 61364db435e..edf33445037 100644 --- a/src/Microsoft.Graph/Generated/Models/AllPreApprovedPermissionsOnResourceApp.cs +++ b/src/Microsoft.Graph/Generated/Models/AllPreApprovedPermissionsOnResourceApp.cs @@ -42,7 +42,7 @@ public AllPreApprovedPermissionsOnResourceApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AllPreApprovedPermissionsOnResourceApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AllPreApprovedPermissionsOnResourceApp(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("resourceApplicationId", ResourceApplicationId); } diff --git a/src/Microsoft.Graph/Generated/Models/AllScopeSensitivityLabels.cs b/src/Microsoft.Graph/Generated/Models/AllScopeSensitivityLabels.cs index acf7ea39938..84c1462b0db 100644 --- a/src/Microsoft.Graph/Generated/Models/AllScopeSensitivityLabels.cs +++ b/src/Microsoft.Graph/Generated/Models/AllScopeSensitivityLabels.cs @@ -26,7 +26,7 @@ public AllScopeSensitivityLabels() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AllScopeSensitivityLabels CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AllScopeSensitivityLabels(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AllowedDataLocation.cs b/src/Microsoft.Graph/Generated/Models/AllowedDataLocation.cs index b6301960e1b..e9a349300da 100644 --- a/src/Microsoft.Graph/Generated/Models/AllowedDataLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/AllowedDataLocation.cs @@ -73,7 +73,7 @@ public string Location /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AllowedDataLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AllowedDataLocation(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("domain", Domain); diff --git a/src/Microsoft.Graph/Generated/Models/AllowedDataLocationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AllowedDataLocationCollectionResponse.cs index 1e0c8a4fcf8..19d1f3567fa 100644 --- a/src/Microsoft.Graph/Generated/Models/AllowedDataLocationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AllowedDataLocationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AllowedDataLocationCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AllowedDataLocationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AllowedDataLocationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AllowedValue.cs b/src/Microsoft.Graph/Generated/Models/AllowedValue.cs index de94c070cea..632eb0931f0 100644 --- a/src/Microsoft.Graph/Generated/Models/AllowedValue.cs +++ b/src/Microsoft.Graph/Generated/Models/AllowedValue.cs @@ -25,7 +25,7 @@ public bool? IsActive /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AllowedValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AllowedValue(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isActive", IsActive); } diff --git a/src/Microsoft.Graph/Generated/Models/AllowedValueCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AllowedValueCollectionResponse.cs index b2de2ef7e75..4dcce7f5c4c 100644 --- a/src/Microsoft.Graph/Generated/Models/AllowedValueCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AllowedValueCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AllowedValueCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AllowedValueCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AllowedValueCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AlterationResponse.cs b/src/Microsoft.Graph/Generated/Models/AlterationResponse.cs index 9d83deb9ff2..1167f598f69 100644 --- a/src/Microsoft.Graph/Generated/Models/AlterationResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AlterationResponse.cs @@ -90,7 +90,7 @@ public AlterationResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AlterationResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AlterationResponse(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("originalQueryString", OriginalQueryString); writer.WriteObjectValue("queryAlteration", QueryAlteration); diff --git a/src/Microsoft.Graph/Generated/Models/AlteredQueryToken.cs b/src/Microsoft.Graph/Generated/Models/AlteredQueryToken.cs index 542c41ca9fb..e573706b059 100644 --- a/src/Microsoft.Graph/Generated/Models/AlteredQueryToken.cs +++ b/src/Microsoft.Graph/Generated/Models/AlteredQueryToken.cs @@ -80,7 +80,7 @@ public AlteredQueryToken() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AlteredQueryToken CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AlteredQueryToken(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("length", Length); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("offset", Offset); diff --git a/src/Microsoft.Graph/Generated/Models/AlternativeSecurityId.cs b/src/Microsoft.Graph/Generated/Models/AlternativeSecurityId.cs index 11530f18744..f93c2d695c4 100644 --- a/src/Microsoft.Graph/Generated/Models/AlternativeSecurityId.cs +++ b/src/Microsoft.Graph/Generated/Models/AlternativeSecurityId.cs @@ -90,7 +90,7 @@ public AlternativeSecurityId() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AlternativeSecurityId CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AlternativeSecurityId(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("identityProvider", IdentityProvider); writer.WriteByteArrayValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidCertificateProfileBase.cs b/src/Microsoft.Graph/Generated/Models/AndroidCertificateProfileBase.cs index f06e1b96143..3c417538ee3 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidCertificateProfileBase.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidCertificateProfileBase.cs @@ -89,7 +89,7 @@ public AndroidCertificateProfileBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidCertificateProfileBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -123,7 +123,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateValidityPeriodScale", CertificateValidityPeriodScale); writer.WriteIntValue("certificateValidityPeriodValue", CertificateValidityPeriodValue); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/AndroidCompliancePolicy.cs index 48ddacec6f4..8c2af1b77b7 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidCompliancePolicy.cs @@ -239,7 +239,7 @@ public AndroidCompliancePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidCompliancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidCompliancePolicy(); } /// @@ -285,7 +285,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("advancedThreatProtectionRequiredSecurityLevel", AdvancedThreatProtectionRequiredSecurityLevel); writer.WriteStringValue("conditionStatementId", ConditionStatementId); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidCustomConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidCustomConfiguration.cs index 40fa3cfcc12..3e3db67f963 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidCustomConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidCustomConfiguration.cs @@ -43,7 +43,7 @@ public AndroidCustomConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidCustomConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidCustomConfiguration(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("omaSettings", OmaSettings); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceComplianceLocalActionBase.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceComplianceLocalActionBase.cs index e1e56fd91d6..5c194fa9ddc 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceComplianceLocalActionBase.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceComplianceLocalActionBase.cs @@ -26,7 +26,7 @@ public int? GracePeriodInMinutes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceComplianceLocalActionBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("gracePeriodInMinutes", GracePeriodInMinutes); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceComplianceLocalActionLockDevice.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceComplianceLocalActionLockDevice.cs index 85c315b4b82..d5301e9b58a 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceComplianceLocalActionLockDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceComplianceLocalActionLockDevice.cs @@ -27,7 +27,7 @@ public AndroidDeviceComplianceLocalActionLockDevice() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceComplianceLocalActionLockDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceComplianceLocalActionLockDevice(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceComplianceLocalActionLockDeviceWithPasscode.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceComplianceLocalActionLockDeviceWithPasscode.cs index 338c8c3c377..0cee0bac00e 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceComplianceLocalActionLockDeviceWithPasscode.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceComplianceLocalActionLockDeviceWithPasscode.cs @@ -49,7 +49,7 @@ public AndroidDeviceComplianceLocalActionLockDeviceWithPasscode() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceComplianceLocalActionLockDeviceWithPasscode CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceComplianceLocalActionLockDeviceWithPasscode(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("passcodeSignInFailureCountBeforeWipe", PasscodeSignInFailureCountBeforeWipe); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerCertificateProfileBase.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerCertificateProfileBase.cs index e61a5920f71..e1c0ee8db31 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerCertificateProfileBase.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerCertificateProfileBase.cs @@ -89,7 +89,7 @@ public AndroidDeviceOwnerCertificateProfileBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerCertificateProfileBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -122,7 +122,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateValidityPeriodScale", CertificateValidityPeriodScale); writer.WriteIntValue("certificateValidityPeriodValue", CertificateValidityPeriodValue); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerCompliancePolicy.cs index 555321010af..1b06cfc7047 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerCompliancePolicy.cs @@ -207,7 +207,7 @@ public AndroidDeviceOwnerCompliancePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerCompliancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerCompliancePolicy(); } /// @@ -251,7 +251,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("advancedThreatProtectionRequiredSecurityLevel", AdvancedThreatProtectionRequiredSecurityLevel); writer.WriteBoolValue("deviceThreatProtectionEnabled", DeviceThreatProtectionEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerDelegatedScopeAppSetting.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerDelegatedScopeAppSetting.cs index 3da72f6a18d..5668e25983a 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerDelegatedScopeAppSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerDelegatedScopeAppSetting.cs @@ -85,7 +85,7 @@ public AndroidDeviceOwnerDelegatedScopeAppSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerDelegatedScopeAppSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerDelegatedScopeAppSetting(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("appDetail", AppDetail); writer.WriteCollectionOfEnumValues("appScopes", AppScopes); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration.cs index 58a63f196ea..894df0e0083 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration.cs @@ -65,7 +65,7 @@ public AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateAccessType", CertificateAccessType); writer.WriteObjectValue("derivedCredentialSettings", DerivedCredentialSettings); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerEnrollmentProfile.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerEnrollmentProfile.cs index 568fa17d9a7..2f044de5258 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerEnrollmentProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerEnrollmentProfile.cs @@ -252,7 +252,7 @@ public string WifiSsid /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerEnrollmentProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerEnrollmentProfile(); } /// @@ -293,7 +293,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("accountId", AccountId); writer.WriteBoolValue("configureWifi", ConfigureWifi); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerEnrollmentProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerEnrollmentProfileCollectionResponse.cs index 27ebcdc819e..e70d7bb7fc2 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerEnrollmentProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerEnrollmentProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AndroidDeviceOwnerEnrollmentProfileCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerEnrollmentProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerEnrollmentProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerEnterpriseWiFiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerEnterpriseWiFiConfiguration.cs index 199085a66e3..92f814eb987 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerEnterpriseWiFiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerEnterpriseWiFiConfiguration.cs @@ -147,7 +147,7 @@ public AndroidDeviceOwnerEnterpriseWiFiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerEnterpriseWiFiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerEnterpriseWiFiConfiguration(); } /// @@ -176,7 +176,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteObjectValue("derivedCredentialSettings", DerivedCredentialSettings); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGeneralDeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGeneralDeviceConfiguration.cs index 20b6366423b..01c9cd8d226 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGeneralDeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGeneralDeviceConfiguration.cs @@ -1081,7 +1081,7 @@ public AndroidDeviceOwnerGeneralDeviceConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerGeneralDeviceConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerGeneralDeviceConfiguration(); } /// @@ -1239,7 +1239,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("accountsBlockModification", AccountsBlockModification); writer.WriteCollectionOfObjectValues("androidDeviceOwnerDelegatedScopeAppSettings", AndroidDeviceOwnerDelegatedScopeAppSettings); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGlobalProxy.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGlobalProxy.cs index 8e7025aaafc..3350f4f87cd 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGlobalProxy.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGlobalProxy.cs @@ -53,7 +53,7 @@ public AndroidDeviceOwnerGlobalProxy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerGlobalProxy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGlobalProxyAutoConfig.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGlobalProxyAutoConfig.cs index e7903fde463..de96c485d2c 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGlobalProxyAutoConfig.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGlobalProxyAutoConfig.cs @@ -43,7 +43,7 @@ public AndroidDeviceOwnerGlobalProxyAutoConfig() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerGlobalProxyAutoConfig CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerGlobalProxyAutoConfig(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("proxyAutoConfigURL", ProxyAutoConfigURL); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGlobalProxyDirect.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGlobalProxyDirect.cs index c638e1f1b40..cb28af87fe9 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGlobalProxyDirect.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerGlobalProxyDirect.cs @@ -65,7 +65,7 @@ public AndroidDeviceOwnerGlobalProxyDirect() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerGlobalProxyDirect CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerGlobalProxyDirect(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("excludedHosts", ExcludedHosts); writer.WriteStringValue("host", Host); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerImportedPFXCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerImportedPFXCertificateProfile.cs index 361d334e0b7..9ed337c46e5 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerImportedPFXCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerImportedPFXCertificateProfile.cs @@ -71,7 +71,7 @@ public AndroidDeviceOwnerImportedPFXCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerImportedPFXCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerImportedPFXCertificateProfile(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateAccessType", CertificateAccessType); writer.WriteEnumValue("intendedPurpose", IntendedPurpose); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeApp.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeApp.cs index 55c197f46b6..227460de929 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeApp.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeApp.cs @@ -59,7 +59,7 @@ public AndroidDeviceOwnerKioskModeApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerKioskModeApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerKioskModeApp(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("className", ClassName); writer.WriteStringValue("package", Package); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeAppPositionItem.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeAppPositionItem.cs index 482b57e5f63..d22f48b5849 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeAppPositionItem.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeAppPositionItem.cs @@ -75,7 +75,7 @@ public AndroidDeviceOwnerKioskModeAppPositionItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerKioskModeAppPositionItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerKioskModeAppPositionItem(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("item", Item); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("position", Position); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeFolderItem.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeFolderItem.cs index 2bd0db1c132..28cb1a5c091 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeFolderItem.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeFolderItem.cs @@ -27,7 +27,7 @@ public AndroidDeviceOwnerKioskModeFolderItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerKioskModeFolderItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeHomeScreenItem.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeHomeScreenItem.cs index bc98aebd49f..3e860e1ab05 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeHomeScreenItem.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeHomeScreenItem.cs @@ -53,7 +53,7 @@ public AndroidDeviceOwnerKioskModeHomeScreenItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerKioskModeHomeScreenItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -81,7 +81,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeManagedFolder.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeManagedFolder.cs index e243b884998..9d5fe2fdeb1 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeManagedFolder.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeManagedFolder.cs @@ -101,7 +101,7 @@ public AndroidDeviceOwnerKioskModeManagedFolder() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerKioskModeManagedFolder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerKioskModeManagedFolder(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("folderIdentifier", FolderIdentifier); writer.WriteStringValue("folderName", FolderName); writer.WriteCollectionOfObjectValues("items", Items); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeManagedFolderReference.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeManagedFolderReference.cs index f03999a848f..9665422ea13 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeManagedFolderReference.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeManagedFolderReference.cs @@ -59,7 +59,7 @@ public AndroidDeviceOwnerKioskModeManagedFolderReference() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerKioskModeManagedFolderReference CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerKioskModeManagedFolderReference(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("folderIdentifier", FolderIdentifier); writer.WriteStringValue("folderName", FolderName); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeWeblink.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeWeblink.cs index 9017c7f60a9..48208b573ee 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeWeblink.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerKioskModeWeblink.cs @@ -59,7 +59,7 @@ public AndroidDeviceOwnerKioskModeWeblink() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerKioskModeWeblink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerKioskModeWeblink(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("label", Label); writer.WriteStringValue("link", Link); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerPkcsCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerPkcsCertificateProfile.cs index ffc97fd5db4..fa2cfaebaaa 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerPkcsCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerPkcsCertificateProfile.cs @@ -173,7 +173,7 @@ public AndroidDeviceOwnerPkcsCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerPkcsCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerPkcsCertificateProfile(); } /// @@ -203,7 +203,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateAccessType", CertificateAccessType); writer.WriteEnumValue("certificateStore", CertificateStore); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerScepCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerScepCertificateProfile.cs index b5ceed8843b..fad172bf958 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerScepCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerScepCertificateProfile.cs @@ -153,7 +153,7 @@ public AndroidDeviceOwnerScepCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerScepCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerScepCertificateProfile(); } /// @@ -183,7 +183,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateAccessType", CertificateAccessType); writer.WriteEnumValue("certificateStore", CertificateStore); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerSilentCertificateAccess.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerSilentCertificateAccess.cs index f016396881f..369f29cdf54 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerSilentCertificateAccess.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerSilentCertificateAccess.cs @@ -69,7 +69,7 @@ public AndroidDeviceOwnerSilentCertificateAccess() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerSilentCertificateAccess CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerSilentCertificateAccess(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("packageId", PackageId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerSystemUpdateFreezePeriod.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerSystemUpdateFreezePeriod.cs index f8622bc5f12..cac74ca1f76 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerSystemUpdateFreezePeriod.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerSystemUpdateFreezePeriod.cs @@ -77,7 +77,7 @@ public AndroidDeviceOwnerSystemUpdateFreezePeriod() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerSystemUpdateFreezePeriod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerSystemUpdateFreezePeriod(); } /// @@ -101,7 +101,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("endDay", EndDay); writer.WriteIntValue("endMonth", EndMonth); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerTrustedRootCertificate.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerTrustedRootCertificate.cs index ecbdaa8e8ae..f3d28e7b588 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerTrustedRootCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerTrustedRootCertificate.cs @@ -59,7 +59,7 @@ public AndroidDeviceOwnerTrustedRootCertificate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerTrustedRootCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerTrustedRootCertificate(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certFileName", CertFileName); writer.WriteByteArrayValue("trustedRootCertificate", TrustedRootCertificate); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerUserFacingMessage.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerUserFacingMessage.cs index 06de8f7cba7..b7899b34847 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerUserFacingMessage.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerUserFacingMessage.cs @@ -85,7 +85,7 @@ public AndroidDeviceOwnerUserFacingMessage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerUserFacingMessage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerUserFacingMessage(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("defaultMessage", DefaultMessage); writer.WriteCollectionOfObjectValues("localizedMessages", LocalizedMessages); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerVpnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerVpnConfiguration.cs index 39fd4a0979d..a10763fb4a7 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerVpnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerVpnConfiguration.cs @@ -189,7 +189,7 @@ public AndroidDeviceOwnerVpnConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerVpnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerVpnConfiguration(); } /// @@ -220,7 +220,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("alwaysOn", AlwaysOn); writer.WriteBoolValue("alwaysOnLockdown", AlwaysOnLockdown); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerWiFiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerWiFiConfiguration.cs index 2ea7bbb19a7..e7fbfb5578f 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerWiFiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidDeviceOwnerWiFiConfiguration.cs @@ -165,7 +165,7 @@ public AndroidDeviceOwnerWiFiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidDeviceOwnerWiFiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -202,7 +202,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("connectAutomatically", ConnectAutomatically); writer.WriteBoolValue("connectWhenNetworkNameIsHidden", ConnectWhenNetworkNameIsHidden); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidEasEmailProfileConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidEasEmailProfileConfiguration.cs index 8f9deb2136f..fbe44b710bb 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidEasEmailProfileConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidEasEmailProfileConfiguration.cs @@ -179,7 +179,7 @@ public AndroidEasEmailProfileConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidEasEmailProfileConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidEasEmailProfileConfiguration(); } /// @@ -215,7 +215,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("accountName", AccountName); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidEnrollmentCompanyCode.cs b/src/Microsoft.Graph/Generated/Models/AndroidEnrollmentCompanyCode.cs index 56cf5461170..9078831dbcb 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidEnrollmentCompanyCode.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidEnrollmentCompanyCode.cs @@ -101,7 +101,7 @@ public AndroidEnrollmentCompanyCode() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidEnrollmentCompanyCode CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidEnrollmentCompanyCode(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("enrollmentToken", EnrollmentToken); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("qrCodeContent", QrCodeContent); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidEnterpriseWiFiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidEnterpriseWiFiConfiguration.cs index b8b86b4d1ba..294c8d1ea26 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidEnterpriseWiFiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidEnterpriseWiFiConfiguration.cs @@ -163,7 +163,7 @@ public AndroidEnterpriseWiFiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidEnterpriseWiFiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidEnterpriseWiFiConfiguration(); } /// @@ -193,7 +193,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteEnumValue("eapType", EapType); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkApp.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkApp.cs index 7d2a8aa537f..8abeef08a93 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkApp.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkApp.cs @@ -87,7 +87,7 @@ public AndroidForWorkApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkApp(); } /// @@ -111,7 +111,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appStoreUrl", AppStoreUrl); writer.WriteIntValue("totalLicenseCount", TotalLicenseCount); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppCollectionResponse.cs index 74156246e66..7896b2d25b3 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AndroidForWorkAppCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppConfigurationSchema.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppConfigurationSchema.cs index 8dc8fec6068..ab44ab54e5c 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppConfigurationSchema.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppConfigurationSchema.cs @@ -52,7 +52,7 @@ public byte[] ExampleJson /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkAppConfigurationSchema CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkAppConfigurationSchema(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("exampleJson", ExampleJson); writer.WriteCollectionOfObjectValues("schemaItems", SchemaItems); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppConfigurationSchemaCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppConfigurationSchemaCollectionResponse.cs index 76a9d459359..6760d9cf2ea 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppConfigurationSchemaCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppConfigurationSchemaCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AndroidForWorkAppConfigurationSchemaCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkAppConfigurationSchemaCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkAppConfigurationSchemaCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppConfigurationSchemaItem.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppConfigurationSchemaItem.cs index 9747e88ffa2..67bbc653ae1 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppConfigurationSchemaItem.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkAppConfigurationSchemaItem.cs @@ -167,7 +167,7 @@ public AndroidForWorkAppConfigurationSchemaItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidForWorkAppConfigurationSchemaItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkAppConfigurationSchemaItem(); } /// @@ -196,7 +196,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("dataType", DataType); writer.WriteBoolValue("defaultBoolValue", DefaultBoolValue); writer.WriteIntValue("defaultIntValue", DefaultIntValue); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkCertificateProfileBase.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkCertificateProfileBase.cs index 8dedc15628b..99d6f23c57d 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkCertificateProfileBase.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkCertificateProfileBase.cs @@ -89,7 +89,7 @@ public AndroidForWorkCertificateProfileBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkCertificateProfileBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateValidityPeriodScale", CertificateValidityPeriodScale); writer.WriteIntValue("certificateValidityPeriodValue", CertificateValidityPeriodValue); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkCompliancePolicy.cs index 62f021ad651..4e376bab793 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkCompliancePolicy.cs @@ -243,7 +243,7 @@ public AndroidForWorkCompliancePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkCompliancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkCompliancePolicy(); } /// @@ -293,7 +293,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("deviceThreatProtectionEnabled", DeviceThreatProtectionEnabled); writer.WriteEnumValue("deviceThreatProtectionRequiredSecurityLevel", DeviceThreatProtectionRequiredSecurityLevel); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkCustomConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkCustomConfiguration.cs index 8f3aa4b3cc2..dae19a64e06 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkCustomConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkCustomConfiguration.cs @@ -43,7 +43,7 @@ public AndroidForWorkCustomConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkCustomConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkCustomConfiguration(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("omaSettings", OmaSettings); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkEasEmailProfileBase.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkEasEmailProfileBase.cs index b96c9867fd6..f849334e525 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkEasEmailProfileBase.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkEasEmailProfileBase.cs @@ -89,7 +89,7 @@ public AndroidForWorkEasEmailProfileBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkEasEmailProfileBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteEnumValue("durationOfEmailToSync", DurationOfEmailToSync); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkEnrollmentProfile.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkEnrollmentProfile.cs index 6897e8a3de0..361c5c30c1d 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkEnrollmentProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkEnrollmentProfile.cs @@ -140,7 +140,7 @@ public string TokenValue /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkEnrollmentProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkEnrollmentProfile(); } /// @@ -169,7 +169,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("accountId", AccountId); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkEnrollmentProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkEnrollmentProfileCollectionResponse.cs index 270809ba5ef..800a3623fe0 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkEnrollmentProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkEnrollmentProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AndroidForWorkEnrollmentProfileCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkEnrollmentProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkEnrollmentProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkEnterpriseWiFiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkEnterpriseWiFiConfiguration.cs index 6f9cbb96b83..5ce3fb9199f 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkEnterpriseWiFiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkEnterpriseWiFiConfiguration.cs @@ -115,7 +115,7 @@ public AndroidForWorkEnterpriseWiFiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkEnterpriseWiFiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkEnterpriseWiFiConfiguration(); } /// @@ -142,7 +142,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteEnumValue("eapType", EapType); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkGeneralDeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkGeneralDeviceConfiguration.cs index eec36ed80c4..39e50be5326 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkGeneralDeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkGeneralDeviceConfiguration.cs @@ -329,7 +329,7 @@ public AndroidForWorkGeneralDeviceConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkGeneralDeviceConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkGeneralDeviceConfiguration(); } /// @@ -395,7 +395,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("allowedGoogleAccountDomains", AllowedGoogleAccountDomains); writer.WriteBoolValue("blockUnifiedPasswordForWorkProfile", BlockUnifiedPasswordForWorkProfile); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkGmailEasConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkGmailEasConfiguration.cs index 66e08ca162d..c53922c3593 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkGmailEasConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkGmailEasConfiguration.cs @@ -27,7 +27,7 @@ public AndroidForWorkGmailEasConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkGmailEasConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkGmailEasConfiguration(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkImportedPFXCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkImportedPFXCertificateProfile.cs index 5740fd97461..3613097fe75 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkImportedPFXCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkImportedPFXCertificateProfile.cs @@ -49,7 +49,7 @@ public AndroidForWorkImportedPFXCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkImportedPFXCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkImportedPFXCertificateProfile(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("intendedPurpose", IntendedPurpose); writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", ManagedDeviceCertificateStates); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkMobileAppConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkMobileAppConfiguration.cs index 4bafd5492d3..9aa4043fd01 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkMobileAppConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkMobileAppConfiguration.cs @@ -87,7 +87,7 @@ public AndroidForWorkMobileAppConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkMobileAppConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkMobileAppConfiguration(); } /// @@ -111,7 +111,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("connectedAppsEnabled", ConnectedAppsEnabled); writer.WriteStringValue("packageId", PackageId); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkNineWorkEasConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkNineWorkEasConfiguration.cs index 9d4dbbac891..d81f924d5cc 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkNineWorkEasConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkNineWorkEasConfiguration.cs @@ -45,7 +45,7 @@ public AndroidForWorkNineWorkEasConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkNineWorkEasConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkNineWorkEasConfiguration(); } /// @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("syncCalendar", SyncCalendar); writer.WriteBoolValue("syncContacts", SyncContacts); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkPkcsCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkPkcsCertificateProfile.cs index f9254d498ef..29a59e89b87 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkPkcsCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkPkcsCertificateProfile.cs @@ -107,7 +107,7 @@ public AndroidForWorkPkcsCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkPkcsCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkPkcsCertificateProfile(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certificateTemplateName", CertificateTemplateName); writer.WriteStringValue("certificationAuthority", CertificationAuthority); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkScepCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkScepCertificateProfile.cs index a8e97ea66bb..2f3097cd879 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkScepCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkScepCertificateProfile.cs @@ -131,7 +131,7 @@ public AndroidForWorkScepCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkScepCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkScepCertificateProfile(); } /// @@ -159,7 +159,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateStore", CertificateStore); writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", CustomSubjectAlternativeNames); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkSettings.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkSettings.cs index 2248d49bfc7..1131740f08f 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkSettings.cs @@ -104,7 +104,7 @@ public List TargetGroupIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkSettings(); } /// @@ -132,7 +132,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("bindStatus", BindStatus); writer.WriteBoolValue("deviceOwnerManagementEnabled", DeviceOwnerManagementEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkTrustedRootCertificate.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkTrustedRootCertificate.cs index bcc321489a3..621885694a3 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkTrustedRootCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkTrustedRootCertificate.cs @@ -59,7 +59,7 @@ public AndroidForWorkTrustedRootCertificate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkTrustedRootCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkTrustedRootCertificate(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certFileName", CertFileName); writer.WriteByteArrayValue("trustedRootCertificate", TrustedRootCertificate); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkVpnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkVpnConfiguration.cs index c2d50898747..d2188568c20 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkVpnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkVpnConfiguration.cs @@ -167,7 +167,7 @@ public AndroidForWorkVpnConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkVpnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidForWorkVpnConfiguration(); } /// @@ -196,7 +196,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteStringValue("connectionName", ConnectionName); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidForWorkWiFiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidForWorkWiFiConfiguration.cs index c477cb31c4a..18c27eebf9c 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidForWorkWiFiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidForWorkWiFiConfiguration.cs @@ -77,7 +77,7 @@ public AndroidForWorkWiFiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidForWorkWiFiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("connectAutomatically", ConnectAutomatically); writer.WriteBoolValue("connectWhenNetworkNameIsHidden", ConnectWhenNetworkNameIsHidden); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidFotaDeploymentAssignment.cs b/src/Microsoft.Graph/Generated/Models/AndroidFotaDeploymentAssignment.cs index d556bfa066f..d0f3ca5d9c3 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidFotaDeploymentAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidFotaDeploymentAssignment.cs @@ -117,7 +117,7 @@ public AndroidFotaDeploymentAssignment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidFotaDeploymentAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidFotaDeploymentAssignment(); } /// @@ -141,7 +141,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("assignmentTarget", AssignmentTarget); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidFotaDeploymentAssignmentTarget.cs b/src/Microsoft.Graph/Generated/Models/AndroidFotaDeploymentAssignmentTarget.cs index 3ddc6deee33..9f4e8350831 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidFotaDeploymentAssignmentTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidFotaDeploymentAssignmentTarget.cs @@ -43,7 +43,7 @@ public AndroidFotaDeploymentAssignmentTarget() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidFotaDeploymentAssignmentTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidFotaDeploymentAssignmentTarget(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("groupId", GroupId); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidGeneralDeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidGeneralDeviceConfiguration.cs index fc4d9ed17f2..801eda5b1e9 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidGeneralDeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidGeneralDeviceConfiguration.cs @@ -377,7 +377,7 @@ public AndroidGeneralDeviceConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidGeneralDeviceConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidGeneralDeviceConfiguration(); } /// @@ -446,7 +446,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("appsBlockClipboardSharing", AppsBlockClipboardSharing); writer.WriteBoolValue("appsBlockCopyPaste", AppsBlockCopyPaste); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidImportedPFXCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/AndroidImportedPFXCertificateProfile.cs index 120230cb307..601d5e92ffe 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidImportedPFXCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidImportedPFXCertificateProfile.cs @@ -49,7 +49,7 @@ public AndroidImportedPFXCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidImportedPFXCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidImportedPFXCertificateProfile(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("intendedPurpose", IntendedPurpose); writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", ManagedDeviceCertificateStates); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidLobApp.cs b/src/Microsoft.Graph/Generated/Models/AndroidLobApp.cs index 3c366a14aab..95a2d3dfd99 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidLobApp.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidLobApp.cs @@ -97,7 +97,7 @@ public AndroidLobApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidLobApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidLobApp(); } /// @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("minimumSupportedOperatingSystem", MinimumSupportedOperatingSystem); writer.WriteStringValue("packageId", PackageId); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidLobAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AndroidLobAppCollectionResponse.cs index 73d0d7cd076..9cf7afc3eb7 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidLobAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidLobAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AndroidLobAppCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidLobAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidLobAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidManagedAppProtection.cs b/src/Microsoft.Graph/Generated/Models/AndroidManagedAppProtection.cs index 59183747d04..4c821ee615f 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidManagedAppProtection.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidManagedAppProtection.cs @@ -155,7 +155,7 @@ public bool? ConnectToVpnOnLaunch get { return BackingStore?.Get("connectToVpnOnLaunch"); } set { BackingStore?.Set("connectToVpnOnLaunch", value); } } - /// Friendly name of the preferred custom browser to open weblink on Android. + /// Friendly name of the preferred custom browser to open weblink on Android. When this property is configured, ManagedBrowserToOpenLinksRequired should be true. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? CustomBrowserDisplayName @@ -171,7 +171,7 @@ public string CustomBrowserDisplayName set { BackingStore?.Set("customBrowserDisplayName", value); } } #endif - /// Unique identifier of a custom browser to open weblink on Android. + /// Unique identifier of the preferred custom browser to open weblink on Android. When this property is configured, ManagedBrowserToOpenLinksRequired should be true. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? CustomBrowserPackageId @@ -477,7 +477,7 @@ public AndroidManagedAppProtection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidManagedAppProtection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidManagedAppProtection(); } /// @@ -541,7 +541,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("allowedAndroidDeviceManufacturers", AllowedAndroidDeviceManufacturers); writer.WriteCollectionOfPrimitiveValues("allowedAndroidDeviceModels", AllowedAndroidDeviceModels); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidManagedAppProtectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AndroidManagedAppProtectionCollectionResponse.cs index f550e57848b..23bfe43c25c 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidManagedAppProtectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidManagedAppProtectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AndroidManagedAppProtectionCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidManagedAppProtectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidManagedAppProtectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidManagedAppRegistration.cs b/src/Microsoft.Graph/Generated/Models/AndroidManagedAppRegistration.cs index f26c4f7c1d8..673f0319285 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidManagedAppRegistration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidManagedAppRegistration.cs @@ -43,7 +43,7 @@ public AndroidManagedAppRegistration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidManagedAppRegistration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidManagedAppRegistration(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("patchVersion", PatchVersion); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAccountEnterpriseSettings.cs b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAccountEnterpriseSettings.cs index b3a3cf0dedf..26fe8484fad 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAccountEnterpriseSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAccountEnterpriseSettings.cs @@ -142,7 +142,7 @@ public List TargetGroupIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAccountEnterpriseSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAccountEnterpriseSettings(); } /// @@ -173,7 +173,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("androidDeviceOwnerFullyManagedEnrollmentEnabled", AndroidDeviceOwnerFullyManagedEnrollmentEnabled); writer.WriteEnumValue("bindStatus", BindStatus); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreApp.cs b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreApp.cs index 33e6c08010f..6f5216a9619 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreApp.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreApp.cs @@ -121,7 +121,7 @@ public AndroidManagedStoreApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appIdentifier", AppIdentifier); writer.WriteBoolValue("isSystemApp", IsSystemApp); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppAssignmentSettings.cs index 8c332e17097..636ff74bf3d 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppAssignmentSettings.cs @@ -49,7 +49,7 @@ public AndroidManagedStoreAppAssignmentSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppAssignmentSettings(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("androidManagedStoreAppTrackIds", AndroidManagedStoreAppTrackIds); writer.WriteEnumValue("autoUpdateMode", AutoUpdateMode); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppCollectionResponse.cs index 07de27eae0a..641e1785099 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AndroidManagedStoreAppCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfiguration.cs index 50b46accc7e..2fe84cd3e1b 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfiguration.cs @@ -93,7 +93,7 @@ public AndroidManagedStoreAppConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppConfiguration(); } /// @@ -118,7 +118,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("connectedAppsEnabled", ConnectedAppsEnabled); writer.WriteStringValue("packageId", PackageId); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfigurationSchema.cs b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfigurationSchema.cs index e75e3905649..a6867befb51 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfigurationSchema.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfigurationSchema.cs @@ -68,7 +68,7 @@ public byte[] ExampleJson /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppConfigurationSchema CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppConfigurationSchema(); } /// @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("exampleJson", ExampleJson); writer.WriteCollectionOfObjectValues("nestedSchemaItems", NestedSchemaItems); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfigurationSchemaCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfigurationSchemaCollectionResponse.cs index f3700222a6f..e1c86ebca6c 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfigurationSchemaCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfigurationSchemaCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AndroidManagedStoreAppConfigurationSchemaCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppConfigurationSchemaCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppConfigurationSchemaCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfigurationSchemaItem.cs b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfigurationSchemaItem.cs index 6c09ec32f51..dae7613c60a 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfigurationSchemaItem.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppConfigurationSchemaItem.cs @@ -179,7 +179,7 @@ public AndroidManagedStoreAppConfigurationSchemaItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppConfigurationSchemaItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppConfigurationSchemaItem(); } /// @@ -210,7 +210,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("dataType", DataType); writer.WriteBoolValue("defaultBoolValue", DefaultBoolValue); writer.WriteIntValue("defaultIntValue", DefaultIntValue); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppTrack.cs b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppTrack.cs index 9934ef68100..ceafc83639e 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppTrack.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreAppTrack.cs @@ -85,7 +85,7 @@ public AndroidManagedStoreAppTrack() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppTrack CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreAppTrack(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreWebApp.cs b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreWebApp.cs index d8a6c0dac4c..f7574dac06c 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreWebApp.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidManagedStoreWebApp.cs @@ -27,7 +27,7 @@ public AndroidManagedStoreWebApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreWebApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidManagedStoreWebApp(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidMinimumOperatingSystem.cs b/src/Microsoft.Graph/Generated/Models/AndroidMinimumOperatingSystem.cs index be55017f672..ed315ad09a9 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidMinimumOperatingSystem.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidMinimumOperatingSystem.cs @@ -173,7 +173,7 @@ public AndroidMinimumOperatingSystem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidMinimumOperatingSystem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidMinimumOperatingSystem(); } /// @@ -213,7 +213,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("v10_0", V100); writer.WriteBoolValue("v11_0", V110); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidMobileAppIdentifier.cs b/src/Microsoft.Graph/Generated/Models/AndroidMobileAppIdentifier.cs index 8881fedbbda..213bee2bb0e 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidMobileAppIdentifier.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidMobileAppIdentifier.cs @@ -43,7 +43,7 @@ public AndroidMobileAppIdentifier() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidMobileAppIdentifier CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidMobileAppIdentifier(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("packageId", PackageId); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidOmaCpConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidOmaCpConfiguration.cs index bc4e2bb28db..4ea8ea25299 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidOmaCpConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidOmaCpConfiguration.cs @@ -43,7 +43,7 @@ public AndroidOmaCpConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidOmaCpConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidOmaCpConfiguration(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("configurationXml", ConfigurationXml); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidPermissionAction.cs b/src/Microsoft.Graph/Generated/Models/AndroidPermissionAction.cs index 77f69ccfbeb..416b4aa1175 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidPermissionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidPermissionAction.cs @@ -75,7 +75,7 @@ public AndroidPermissionAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AndroidPermissionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidPermissionAction(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("permission", Permission); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidPkcsCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/AndroidPkcsCertificateProfile.cs index 87fc4ebb961..b2ade9cb1b6 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidPkcsCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidPkcsCertificateProfile.cs @@ -107,7 +107,7 @@ public AndroidPkcsCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidPkcsCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidPkcsCertificateProfile(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certificateTemplateName", CertificateTemplateName); writer.WriteStringValue("certificationAuthority", CertificationAuthority); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidScepCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/AndroidScepCertificateProfile.cs index 1191583e47e..4bca33f86ce 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidScepCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidScepCertificateProfile.cs @@ -109,7 +109,7 @@ public AndroidScepCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidScepCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidScepCertificateProfile(); } /// @@ -135,7 +135,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("hashAlgorithm", HashAlgorithm); writer.WriteEnumValue("keySize", KeySize); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidStoreApp.cs b/src/Microsoft.Graph/Generated/Models/AndroidStoreApp.cs index e21edbd173c..0cd535b4617 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidStoreApp.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidStoreApp.cs @@ -75,7 +75,7 @@ public AndroidStoreApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidStoreApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidStoreApp(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appStoreUrl", AppStoreUrl); writer.WriteObjectValue("minimumSupportedOperatingSystem", MinimumSupportedOperatingSystem); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidStoreAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AndroidStoreAppCollectionResponse.cs index 17e7d73381a..b8419f175f4 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidStoreAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidStoreAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AndroidStoreAppCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidStoreAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidStoreAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidTrustedRootCertificate.cs b/src/Microsoft.Graph/Generated/Models/AndroidTrustedRootCertificate.cs index a77865597ff..fd0c0ede5e3 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidTrustedRootCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidTrustedRootCertificate.cs @@ -59,7 +59,7 @@ public AndroidTrustedRootCertificate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidTrustedRootCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidTrustedRootCertificate(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certFileName", CertFileName); writer.WriteByteArrayValue("trustedRootCertificate", TrustedRootCertificate); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidVpnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidVpnConfiguration.cs index 9f4f65d41ac..87345b81ae0 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidVpnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidVpnConfiguration.cs @@ -167,7 +167,7 @@ public AndroidVpnConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidVpnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidVpnConfiguration(); } /// @@ -196,7 +196,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteStringValue("connectionName", ConnectionName); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWiFiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidWiFiConfiguration.cs index d460264e93e..ec067a479ba 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWiFiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWiFiConfiguration.cs @@ -77,7 +77,7 @@ public AndroidWiFiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidWiFiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("connectAutomatically", ConnectAutomatically); writer.WriteBoolValue("connectWhenNetworkNameIsHidden", ConnectWhenNetworkNameIsHidden); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileCertificateProfileBase.cs b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileCertificateProfileBase.cs index cf12efbe21d..d41332a6f6d 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileCertificateProfileBase.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileCertificateProfileBase.cs @@ -89,7 +89,7 @@ public AndroidWorkProfileCertificateProfileBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileCertificateProfileBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateValidityPeriodScale", CertificateValidityPeriodScale); writer.WriteIntValue("certificateValidityPeriodValue", CertificateValidityPeriodValue); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileCompliancePolicy.cs index c1897a47328..ac99dbb0803 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileCompliancePolicy.cs @@ -249,7 +249,7 @@ public AndroidWorkProfileCompliancePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileCompliancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileCompliancePolicy(); } /// @@ -300,7 +300,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("advancedThreatProtectionRequiredSecurityLevel", AdvancedThreatProtectionRequiredSecurityLevel); writer.WriteBoolValue("deviceThreatProtectionEnabled", DeviceThreatProtectionEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileCustomConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileCustomConfiguration.cs index b00589e38f3..c4b364d1b6a 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileCustomConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileCustomConfiguration.cs @@ -43,7 +43,7 @@ public AndroidWorkProfileCustomConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileCustomConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileCustomConfiguration(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("omaSettings", OmaSettings); } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileEasEmailProfileBase.cs b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileEasEmailProfileBase.cs index b4bbfbd26c7..f5b5465c404 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileEasEmailProfileBase.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileEasEmailProfileBase.cs @@ -89,7 +89,7 @@ public AndroidWorkProfileEasEmailProfileBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileEasEmailProfileBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteEnumValue("durationOfEmailToSync", DurationOfEmailToSync); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileEnterpriseWiFiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileEnterpriseWiFiConfiguration.cs index 05297c66645..2dc882030e8 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileEnterpriseWiFiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileEnterpriseWiFiConfiguration.cs @@ -115,7 +115,7 @@ public AndroidWorkProfileEnterpriseWiFiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileEnterpriseWiFiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileEnterpriseWiFiConfiguration(); } /// @@ -142,7 +142,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteEnumValue("eapType", EapType); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileGeneralDeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileGeneralDeviceConfiguration.cs index e00053447d6..bfe908e6522 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileGeneralDeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileGeneralDeviceConfiguration.cs @@ -335,7 +335,7 @@ public AndroidWorkProfileGeneralDeviceConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileGeneralDeviceConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileGeneralDeviceConfiguration(); } /// @@ -402,7 +402,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("allowedGoogleAccountDomains", AllowedGoogleAccountDomains); writer.WriteBoolValue("blockUnifiedPasswordForWorkProfile", BlockUnifiedPasswordForWorkProfile); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileGmailEasConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileGmailEasConfiguration.cs index 4d785e2ecdb..29f17580338 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileGmailEasConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileGmailEasConfiguration.cs @@ -27,7 +27,7 @@ public AndroidWorkProfileGmailEasConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileGmailEasConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileGmailEasConfiguration(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileNineWorkEasConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileNineWorkEasConfiguration.cs index e0ee3dc57ca..ba87672ebd3 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileNineWorkEasConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileNineWorkEasConfiguration.cs @@ -45,7 +45,7 @@ public AndroidWorkProfileNineWorkEasConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileNineWorkEasConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileNineWorkEasConfiguration(); } /// @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("syncCalendar", SyncCalendar); writer.WriteBoolValue("syncContacts", SyncContacts); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfilePkcsCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfilePkcsCertificateProfile.cs index fd87e428b23..7ca0719a4cc 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfilePkcsCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfilePkcsCertificateProfile.cs @@ -145,7 +145,7 @@ public AndroidWorkProfilePkcsCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidWorkProfilePkcsCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidWorkProfilePkcsCertificateProfile(); } /// @@ -172,7 +172,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateStore", CertificateStore); writer.WriteStringValue("certificateTemplateName", CertificateTemplateName); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileScepCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileScepCertificateProfile.cs index 25dab6b10df..1fc40b76afd 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileScepCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileScepCertificateProfile.cs @@ -131,7 +131,7 @@ public AndroidWorkProfileScepCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileScepCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileScepCertificateProfile(); } /// @@ -159,7 +159,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateStore", CertificateStore); writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", CustomSubjectAlternativeNames); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileTrustedRootCertificate.cs b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileTrustedRootCertificate.cs index 79c359864f5..630f1e016e7 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileTrustedRootCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileTrustedRootCertificate.cs @@ -59,7 +59,7 @@ public AndroidWorkProfileTrustedRootCertificate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileTrustedRootCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileTrustedRootCertificate(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certFileName", CertFileName); writer.WriteByteArrayValue("trustedRootCertificate", TrustedRootCertificate); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileVpnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileVpnConfiguration.cs index 5771e01ed87..10134fc5ed8 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileVpnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileVpnConfiguration.cs @@ -259,7 +259,7 @@ public AndroidWorkProfileVpnConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileVpnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileVpnConfiguration(); } /// @@ -295,7 +295,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("alwaysOn", AlwaysOn); writer.WriteBoolValue("alwaysOnLockdown", AlwaysOnLockdown); diff --git a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileWiFiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileWiFiConfiguration.cs index 73b4c011832..f60aec27b8e 100644 --- a/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileWiFiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AndroidWorkProfileWiFiConfiguration.cs @@ -121,7 +121,7 @@ public AndroidWorkProfileWiFiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AndroidWorkProfileWiFiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("connectAutomatically", ConnectAutomatically); writer.WriteBoolValue("connectWhenNetworkNameIsHidden", ConnectWhenNetworkNameIsHidden); diff --git a/src/Microsoft.Graph/Generated/Models/AnonymousGuestConversationMember.cs b/src/Microsoft.Graph/Generated/Models/AnonymousGuestConversationMember.cs index 9f3745970da..c9f22381838 100644 --- a/src/Microsoft.Graph/Generated/Models/AnonymousGuestConversationMember.cs +++ b/src/Microsoft.Graph/Generated/Models/AnonymousGuestConversationMember.cs @@ -42,7 +42,7 @@ public AnonymousGuestConversationMember() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AnonymousGuestConversationMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AnonymousGuestConversationMember(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("anonymousGuestId", AnonymousGuestId); } diff --git a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerCertificateProfileBase.cs b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerCertificateProfileBase.cs index a81439dee8b..d3e8a79529e 100644 --- a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerCertificateProfileBase.cs +++ b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerCertificateProfileBase.cs @@ -89,7 +89,7 @@ public AospDeviceOwnerCertificateProfileBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AospDeviceOwnerCertificateProfileBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateValidityPeriodScale", CertificateValidityPeriodScale); writer.WriteIntValue("certificateValidityPeriodValue", CertificateValidityPeriodValue); diff --git a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerCompliancePolicy.cs index 1970e67813f..45f1cdc50d5 100644 --- a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerCompliancePolicy.cs @@ -111,7 +111,7 @@ public AospDeviceOwnerCompliancePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AospDeviceOwnerCompliancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AospDeviceOwnerCompliancePolicy(); } /// @@ -139,7 +139,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("minAndroidSecurityPatchLevel", MinAndroidSecurityPatchLevel); writer.WriteStringValue("osMaximumVersion", OsMaximumVersion); diff --git a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerDeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerDeviceConfiguration.cs index 05ec602b837..bf89247422f 100644 --- a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerDeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerDeviceConfiguration.cs @@ -111,7 +111,7 @@ public AospDeviceOwnerDeviceConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AospDeviceOwnerDeviceConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AospDeviceOwnerDeviceConfiguration(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("appsBlockInstallFromUnknownSources", AppsBlockInstallFromUnknownSources); writer.WriteBoolValue("bluetoothBlockConfiguration", BluetoothBlockConfiguration); diff --git a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerEnterpriseWiFiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerEnterpriseWiFiConfiguration.cs index ddaf0f772cb..98460b25503 100644 --- a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerEnterpriseWiFiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerEnterpriseWiFiConfiguration.cs @@ -115,7 +115,7 @@ public AospDeviceOwnerEnterpriseWiFiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AospDeviceOwnerEnterpriseWiFiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AospDeviceOwnerEnterpriseWiFiConfiguration(); } /// @@ -142,7 +142,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteEnumValue("eapType", EapType); diff --git a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerPkcsCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerPkcsCertificateProfile.cs index fc0fa10f9cd..c1ada36ea2d 100644 --- a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerPkcsCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerPkcsCertificateProfile.cs @@ -151,7 +151,7 @@ public AospDeviceOwnerPkcsCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AospDeviceOwnerPkcsCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AospDeviceOwnerPkcsCertificateProfile(); } /// @@ -179,7 +179,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateStore", CertificateStore); writer.WriteStringValue("certificateTemplateName", CertificateTemplateName); diff --git a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerScepCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerScepCertificateProfile.cs index 034792f6384..af4c70d65bc 100644 --- a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerScepCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerScepCertificateProfile.cs @@ -131,7 +131,7 @@ public AospDeviceOwnerScepCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AospDeviceOwnerScepCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AospDeviceOwnerScepCertificateProfile(); } /// @@ -159,7 +159,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateStore", CertificateStore); writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", CustomSubjectAlternativeNames); diff --git a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerTrustedRootCertificate.cs b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerTrustedRootCertificate.cs index 52ff38cc509..e5336f11661 100644 --- a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerTrustedRootCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerTrustedRootCertificate.cs @@ -59,7 +59,7 @@ public AospDeviceOwnerTrustedRootCertificate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AospDeviceOwnerTrustedRootCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AospDeviceOwnerTrustedRootCertificate(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certFileName", CertFileName); writer.WriteByteArrayValue("trustedRootCertificate", TrustedRootCertificate); diff --git a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerWiFiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerWiFiConfiguration.cs index 5dc135bb525..6f225ec3501 100644 --- a/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerWiFiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AospDeviceOwnerWiFiConfiguration.cs @@ -159,7 +159,7 @@ public AospDeviceOwnerWiFiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AospDeviceOwnerWiFiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -195,7 +195,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("connectAutomatically", ConnectAutomatically); writer.WriteBoolValue("connectWhenNetworkNameIsHidden", ConnectWhenNetworkNameIsHidden); diff --git a/src/Microsoft.Graph/Generated/Models/ApiApplication.cs b/src/Microsoft.Graph/Generated/Models/ApiApplication.cs index 854f1076688..b6e1a01f244 100644 --- a/src/Microsoft.Graph/Generated/Models/ApiApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/ApiApplication.cs @@ -112,7 +112,7 @@ public ApiApplication() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ApiApplication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApiApplication(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("acceptMappedClaims", AcceptMappedClaims); writer.WriteCollectionOfPrimitiveValues("knownClientApplications", KnownClientApplications); writer.WriteCollectionOfObjectValues("oauth2PermissionScopes", Oauth2PermissionScopes); diff --git a/src/Microsoft.Graph/Generated/Models/ApiAuthenticationConfigurationBase.cs b/src/Microsoft.Graph/Generated/Models/ApiAuthenticationConfigurationBase.cs index 93bd06cb1db..0ec06b03234 100644 --- a/src/Microsoft.Graph/Generated/Models/ApiAuthenticationConfigurationBase.cs +++ b/src/Microsoft.Graph/Generated/Models/ApiAuthenticationConfigurationBase.cs @@ -52,7 +52,7 @@ public ApiAuthenticationConfigurationBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ApiAuthenticationConfigurationBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AppCatalogs.cs b/src/Microsoft.Graph/Generated/Models/AppCatalogs.cs index eb3dd99a110..633410825af 100644 --- a/src/Microsoft.Graph/Generated/Models/AppCatalogs.cs +++ b/src/Microsoft.Graph/Generated/Models/AppCatalogs.cs @@ -68,7 +68,7 @@ public AppCatalogs() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppCatalogs CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppCatalogs(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("teamsApps", TeamsApps); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AppConfigurationSettingItem.cs b/src/Microsoft.Graph/Generated/Models/AppConfigurationSettingItem.cs index 1da7b6ef69a..f666c54ab7b 100644 --- a/src/Microsoft.Graph/Generated/Models/AppConfigurationSettingItem.cs +++ b/src/Microsoft.Graph/Generated/Models/AppConfigurationSettingItem.cs @@ -91,7 +91,7 @@ public AppConfigurationSettingItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppConfigurationSettingItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppConfigurationSettingItem(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appConfigKey", AppConfigKey); writer.WriteEnumValue("appConfigKeyType", AppConfigKeyType); writer.WriteStringValue("appConfigKeyValue", AppConfigKeyValue); diff --git a/src/Microsoft.Graph/Generated/Models/AppConsentApprovalRoute.cs b/src/Microsoft.Graph/Generated/Models/AppConsentApprovalRoute.cs index 34924d53444..6927f666cb1 100644 --- a/src/Microsoft.Graph/Generated/Models/AppConsentApprovalRoute.cs +++ b/src/Microsoft.Graph/Generated/Models/AppConsentApprovalRoute.cs @@ -35,7 +35,7 @@ public partial class AppConsentApprovalRoute : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppConsentApprovalRoute CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppConsentApprovalRoute(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("appConsentRequests", AppConsentRequests); } diff --git a/src/Microsoft.Graph/Generated/Models/AppConsentRequest.cs b/src/Microsoft.Graph/Generated/Models/AppConsentRequest.cs index 0df3ec4fec9..3b6f22af321 100644 --- a/src/Microsoft.Graph/Generated/Models/AppConsentRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/AppConsentRequest.cs @@ -99,7 +99,7 @@ public string ConsentType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppConsentRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppConsentRequest(); } /// @@ -123,7 +123,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appDisplayName", AppDisplayName); writer.WriteStringValue("appId", AppId); diff --git a/src/Microsoft.Graph/Generated/Models/AppConsentRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AppConsentRequestCollectionResponse.cs index 4f245d2123a..4a127b7aa7a 100644 --- a/src/Microsoft.Graph/Generated/Models/AppConsentRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AppConsentRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AppConsentRequestCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppConsentRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppConsentRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AppConsentRequestScope.cs b/src/Microsoft.Graph/Generated/Models/AppConsentRequestScope.cs index bd59920aaf7..6ef7cc6d2c1 100644 --- a/src/Microsoft.Graph/Generated/Models/AppConsentRequestScope.cs +++ b/src/Microsoft.Graph/Generated/Models/AppConsentRequestScope.cs @@ -68,7 +68,7 @@ public AppConsentRequestScope() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppConsentRequestScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppConsentRequestScope(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AppCredentialSignInActivity.cs b/src/Microsoft.Graph/Generated/Models/AppCredentialSignInActivity.cs index 6afb3b946b4..788a385f444 100644 --- a/src/Microsoft.Graph/Generated/Models/AppCredentialSignInActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/AppCredentialSignInActivity.cs @@ -145,7 +145,7 @@ public string ServicePrincipalObjectId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppCredentialSignInActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppCredentialSignInActivity(); } /// @@ -175,7 +175,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("appObjectId", AppObjectId); diff --git a/src/Microsoft.Graph/Generated/Models/AppCredentialSignInActivityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AppCredentialSignInActivityCollectionResponse.cs index 3767b595dc8..bca2447240e 100644 --- a/src/Microsoft.Graph/Generated/Models/AppCredentialSignInActivityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AppCredentialSignInActivityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AppCredentialSignInActivityCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppCredentialSignInActivityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppCredentialSignInActivityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AppHostedMediaConfig.cs b/src/Microsoft.Graph/Generated/Models/AppHostedMediaConfig.cs index b6fd32bd728..8375d9800c2 100644 --- a/src/Microsoft.Graph/Generated/Models/AppHostedMediaConfig.cs +++ b/src/Microsoft.Graph/Generated/Models/AppHostedMediaConfig.cs @@ -42,7 +42,7 @@ public AppHostedMediaConfig() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppHostedMediaConfig CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppHostedMediaConfig(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("blob", Blob); } diff --git a/src/Microsoft.Graph/Generated/Models/AppIdentity.cs b/src/Microsoft.Graph/Generated/Models/AppIdentity.cs index 0eb8c5777f7..c75e2c1eac2 100644 --- a/src/Microsoft.Graph/Generated/Models/AppIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/AppIdentity.cs @@ -116,7 +116,7 @@ public AppIdentity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppIdentity(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AppListItem.cs b/src/Microsoft.Graph/Generated/Models/AppListItem.cs index 18d518e1068..e793ed9aa1c 100644 --- a/src/Microsoft.Graph/Generated/Models/AppListItem.cs +++ b/src/Microsoft.Graph/Generated/Models/AppListItem.cs @@ -117,7 +117,7 @@ public AppListItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppListItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -146,7 +146,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("appStoreUrl", AppStoreUrl); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/AppLogCollectionDownloadDetails.cs b/src/Microsoft.Graph/Generated/Models/AppLogCollectionDownloadDetails.cs index 15ef2097198..4848dbaab43 100644 --- a/src/Microsoft.Graph/Generated/Models/AppLogCollectionDownloadDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/AppLogCollectionDownloadDetails.cs @@ -90,7 +90,7 @@ public AppLogCollectionDownloadDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppLogCollectionDownloadDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppLogCollectionDownloadDetails(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("appLogDecryptionAlgorithm", AppLogDecryptionAlgorithm); writer.WriteStringValue("decryptionKey", DecryptionKey); writer.WriteStringValue("downloadUrl", DownloadUrl); diff --git a/src/Microsoft.Graph/Generated/Models/AppLogCollectionRequest.cs b/src/Microsoft.Graph/Generated/Models/AppLogCollectionRequest.cs index 11a22354b28..853ebaa7a1c 100644 --- a/src/Microsoft.Graph/Generated/Models/AppLogCollectionRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/AppLogCollectionRequest.cs @@ -64,7 +64,7 @@ public string ErrorMessage /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppLogCollectionRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppLogCollectionRequest(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); writer.WriteCollectionOfPrimitiveValues("customLogFolders", CustomLogFolders); diff --git a/src/Microsoft.Graph/Generated/Models/AppLogCollectionRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AppLogCollectionRequestCollectionResponse.cs index 5fe6be19c6e..04b67e6dfc4 100644 --- a/src/Microsoft.Graph/Generated/Models/AppLogCollectionRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AppLogCollectionRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AppLogCollectionRequestCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppLogCollectionRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppLogCollectionRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AppManagementApplicationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AppManagementApplicationConfiguration.cs index 5b6c8f2e419..c6d6dc8ffa8 100644 --- a/src/Microsoft.Graph/Generated/Models/AppManagementApplicationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AppManagementApplicationConfiguration.cs @@ -58,7 +58,7 @@ public AppManagementApplicationConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppManagementApplicationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppManagementApplicationConfiguration(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("audiences", Audiences); writer.WriteObjectValue("identifierUris", IdentifierUris); diff --git a/src/Microsoft.Graph/Generated/Models/AppManagementConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AppManagementConfiguration.cs index eead871eacd..29d5c4f8048 100644 --- a/src/Microsoft.Graph/Generated/Models/AppManagementConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AppManagementConfiguration.cs @@ -84,7 +84,7 @@ public AppManagementConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppManagementConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("keyCredentials", KeyCredentials); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("passwordCredentials", PasswordCredentials); diff --git a/src/Microsoft.Graph/Generated/Models/AppManagementPolicy.cs b/src/Microsoft.Graph/Generated/Models/AppManagementPolicy.cs index 1f790b9dd50..831c08fdc47 100644 --- a/src/Microsoft.Graph/Generated/Models/AppManagementPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AppManagementPolicy.cs @@ -64,7 +64,7 @@ public AppManagementPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppManagementPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppManagementPolicy(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("appliesTo", AppliesTo); writer.WriteBoolValue("isEnabled", IsEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/AppManagementPolicyActorExemptions.cs b/src/Microsoft.Graph/Generated/Models/AppManagementPolicyActorExemptions.cs index 86e86dd3459..36b21ee65eb 100644 --- a/src/Microsoft.Graph/Generated/Models/AppManagementPolicyActorExemptions.cs +++ b/src/Microsoft.Graph/Generated/Models/AppManagementPolicyActorExemptions.cs @@ -68,7 +68,7 @@ public AppManagementPolicyActorExemptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppManagementPolicyActorExemptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppManagementPolicyActorExemptions(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("customSecurityAttributes", CustomSecurityAttributes); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AppManagementPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AppManagementPolicyCollectionResponse.cs index 46b545e3513..1353c5b56a9 100644 --- a/src/Microsoft.Graph/Generated/Models/AppManagementPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AppManagementPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AppManagementPolicyCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppManagementPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppManagementPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AppManagementServicePrincipalConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AppManagementServicePrincipalConfiguration.cs index 54612b0daca..59efe6478a9 100644 --- a/src/Microsoft.Graph/Generated/Models/AppManagementServicePrincipalConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AppManagementServicePrincipalConfiguration.cs @@ -26,7 +26,7 @@ public AppManagementServicePrincipalConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppManagementServicePrincipalConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppManagementServicePrincipalConfiguration(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AppRole.cs b/src/Microsoft.Graph/Generated/Models/AppRole.cs index e04667f0dd3..962114b33dc 100644 --- a/src/Microsoft.Graph/Generated/Models/AppRole.cs +++ b/src/Microsoft.Graph/Generated/Models/AppRole.cs @@ -144,7 +144,7 @@ public AppRole() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppRole CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppRole(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("allowedMemberTypes", AllowedMemberTypes); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AppRoleAssignment.cs b/src/Microsoft.Graph/Generated/Models/AppRoleAssignment.cs index 5e594b9adee..a4e806223c0 100644 --- a/src/Microsoft.Graph/Generated/Models/AppRoleAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/AppRoleAssignment.cs @@ -98,7 +98,7 @@ public AppRoleAssignment() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppRoleAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppRoleAssignment(); } /// @@ -124,7 +124,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteGuidValue("appRoleId", AppRoleId); writer.WriteDateTimeOffsetValue("creationTimestamp", CreationTimestamp); diff --git a/src/Microsoft.Graph/Generated/Models/AppRoleAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AppRoleAssignmentCollectionResponse.cs index f18fdf413ad..37cace12fbb 100644 --- a/src/Microsoft.Graph/Generated/Models/AppRoleAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AppRoleAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AppRoleAssignmentCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppRoleAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppRoleAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AppScope.cs b/src/Microsoft.Graph/Generated/Models/AppScope.cs index cbcefac8ef1..8c56b163c26 100644 --- a/src/Microsoft.Graph/Generated/Models/AppScope.cs +++ b/src/Microsoft.Graph/Generated/Models/AppScope.cs @@ -51,7 +51,7 @@ public string Type /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/Models/AppScopeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AppScopeCollectionResponse.cs index de811a68382..cf45426dded 100644 --- a/src/Microsoft.Graph/Generated/Models/AppScopeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AppScopeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AppScopeCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppScopeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppScopeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AppVulnerabilityManagedDevice.cs b/src/Microsoft.Graph/Generated/Models/AppVulnerabilityManagedDevice.cs index 14b8dcda1a2..2e5160f73a9 100644 --- a/src/Microsoft.Graph/Generated/Models/AppVulnerabilityManagedDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/AppVulnerabilityManagedDevice.cs @@ -58,7 +58,7 @@ public string ManagedDeviceId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppVulnerabilityManagedDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppVulnerabilityManagedDevice(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("lastSyncDateTime", LastSyncDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/AppVulnerabilityMobileApp.cs b/src/Microsoft.Graph/Generated/Models/AppVulnerabilityMobileApp.cs index 8f127cf78b3..dc3e839084c 100644 --- a/src/Microsoft.Graph/Generated/Models/AppVulnerabilityMobileApp.cs +++ b/src/Microsoft.Graph/Generated/Models/AppVulnerabilityMobileApp.cs @@ -96,7 +96,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppVulnerabilityMobileApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppVulnerabilityMobileApp(); } /// @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AppVulnerabilityTask.cs b/src/Microsoft.Graph/Generated/Models/AppVulnerabilityTask.cs index 281141a7fbe..1fa24b418e1 100644 --- a/src/Microsoft.Graph/Generated/Models/AppVulnerabilityTask.cs +++ b/src/Microsoft.Graph/Generated/Models/AppVulnerabilityTask.cs @@ -157,7 +157,7 @@ public AppVulnerabilityTask() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppVulnerabilityTask CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppVulnerabilityTask(); } /// @@ -186,7 +186,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appName", AppName); writer.WriteStringValue("appPublisher", AppPublisher); diff --git a/src/Microsoft.Graph/Generated/Models/AppleAppListItem.cs b/src/Microsoft.Graph/Generated/Models/AppleAppListItem.cs index 5135cffa244..1eea0374425 100644 --- a/src/Microsoft.Graph/Generated/Models/AppleAppListItem.cs +++ b/src/Microsoft.Graph/Generated/Models/AppleAppListItem.cs @@ -27,7 +27,7 @@ public AppleAppListItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppleAppListItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppleAppListItem(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AppleDeviceFeaturesConfigurationBase.cs b/src/Microsoft.Graph/Generated/Models/AppleDeviceFeaturesConfigurationBase.cs index c018aca9740..77d608209a1 100644 --- a/src/Microsoft.Graph/Generated/Models/AppleDeviceFeaturesConfigurationBase.cs +++ b/src/Microsoft.Graph/Generated/Models/AppleDeviceFeaturesConfigurationBase.cs @@ -43,7 +43,7 @@ public AppleDeviceFeaturesConfigurationBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppleDeviceFeaturesConfigurationBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("airPrintDestinations", AirPrintDestinations); } diff --git a/src/Microsoft.Graph/Generated/Models/AppleEnrollmentProfileAssignment.cs b/src/Microsoft.Graph/Generated/Models/AppleEnrollmentProfileAssignment.cs index 3540b444ca9..63548939d2a 100644 --- a/src/Microsoft.Graph/Generated/Models/AppleEnrollmentProfileAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/AppleEnrollmentProfileAssignment.cs @@ -36,7 +36,7 @@ public partial class AppleEnrollmentProfileAssignment : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppleEnrollmentProfileAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppleEnrollmentProfileAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/AppleEnrollmentProfileAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AppleEnrollmentProfileAssignmentCollectionResponse.cs index a96fa32a1be..3891604c47c 100644 --- a/src/Microsoft.Graph/Generated/Models/AppleEnrollmentProfileAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AppleEnrollmentProfileAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AppleEnrollmentProfileAssignmentCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppleEnrollmentProfileAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppleEnrollmentProfileAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AppleExpeditedCheckinConfigurationBase.cs b/src/Microsoft.Graph/Generated/Models/AppleExpeditedCheckinConfigurationBase.cs index ac36b33fa2d..37539444693 100644 --- a/src/Microsoft.Graph/Generated/Models/AppleExpeditedCheckinConfigurationBase.cs +++ b/src/Microsoft.Graph/Generated/Models/AppleExpeditedCheckinConfigurationBase.cs @@ -33,7 +33,7 @@ public AppleExpeditedCheckinConfigurationBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppleExpeditedCheckinConfigurationBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -58,7 +58,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("enableExpeditedCheckin", EnableExpeditedCheckin); } diff --git a/src/Microsoft.Graph/Generated/Models/AppleManagedIdentityProvider.cs b/src/Microsoft.Graph/Generated/Models/AppleManagedIdentityProvider.cs index c19f9cfeef2..4ad73a91431 100644 --- a/src/Microsoft.Graph/Generated/Models/AppleManagedIdentityProvider.cs +++ b/src/Microsoft.Graph/Generated/Models/AppleManagedIdentityProvider.cs @@ -90,7 +90,7 @@ public AppleManagedIdentityProvider() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppleManagedIdentityProvider CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppleManagedIdentityProvider(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certificateData", CertificateData); writer.WriteStringValue("developerId", DeveloperId); diff --git a/src/Microsoft.Graph/Generated/Models/AppleOwnerTypeEnrollmentType.cs b/src/Microsoft.Graph/Generated/Models/AppleOwnerTypeEnrollmentType.cs index 681be9acfad..6fcbc912f7e 100644 --- a/src/Microsoft.Graph/Generated/Models/AppleOwnerTypeEnrollmentType.cs +++ b/src/Microsoft.Graph/Generated/Models/AppleOwnerTypeEnrollmentType.cs @@ -64,7 +64,7 @@ public AppleOwnerTypeEnrollmentType() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppleOwnerTypeEnrollmentType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppleOwnerTypeEnrollmentType(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("enrollmentType", EnrollmentType); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("ownerType", OwnerType); diff --git a/src/Microsoft.Graph/Generated/Models/ApplePushNotificationCertificate.cs b/src/Microsoft.Graph/Generated/Models/ApplePushNotificationCertificate.cs index 48def38bdd5..cbbf59c9996 100644 --- a/src/Microsoft.Graph/Generated/Models/ApplePushNotificationCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/ApplePushNotificationCertificate.cs @@ -128,7 +128,7 @@ public string TopicIdentifier /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApplePushNotificationCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApplePushNotificationCertificate(); } /// @@ -155,7 +155,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appleIdentifier", AppleIdentifier); writer.WriteStringValue("certificate", Certificate); diff --git a/src/Microsoft.Graph/Generated/Models/AppleUserInitiatedEnrollmentProfile.cs b/src/Microsoft.Graph/Generated/Models/AppleUserInitiatedEnrollmentProfile.cs index b5557d3e0c5..29c6c311d53 100644 --- a/src/Microsoft.Graph/Generated/Models/AppleUserInitiatedEnrollmentProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AppleUserInitiatedEnrollmentProfile.cs @@ -114,7 +114,7 @@ public int? Priority /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppleUserInitiatedEnrollmentProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppleUserInitiatedEnrollmentProfile(); } /// @@ -142,7 +142,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteCollectionOfObjectValues("availableEnrollmentTypeOptions", AvailableEnrollmentTypeOptions); diff --git a/src/Microsoft.Graph/Generated/Models/AppleUserInitiatedEnrollmentProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AppleUserInitiatedEnrollmentProfileCollectionResponse.cs index 3948550d815..bff5ddd0e5b 100644 --- a/src/Microsoft.Graph/Generated/Models/AppleUserInitiatedEnrollmentProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AppleUserInitiatedEnrollmentProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AppleUserInitiatedEnrollmentProfileCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppleUserInitiatedEnrollmentProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppleUserInitiatedEnrollmentProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AppleVpnAlwaysOnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AppleVpnAlwaysOnConfiguration.cs index 9bffb1aff45..bad51ca83f3 100644 --- a/src/Microsoft.Graph/Generated/Models/AppleVpnAlwaysOnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AppleVpnAlwaysOnConfiguration.cs @@ -123,7 +123,7 @@ public AppleVpnAlwaysOnConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppleVpnAlwaysOnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppleVpnAlwaysOnConfiguration(); } /// @@ -153,7 +153,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("airPrintExceptionAction", AirPrintExceptionAction); writer.WriteBoolValue("allowAllCaptiveNetworkPlugins", AllowAllCaptiveNetworkPlugins); writer.WriteBoolValue("allowCaptiveWebSheet", AllowCaptiveWebSheet); diff --git a/src/Microsoft.Graph/Generated/Models/AppleVpnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AppleVpnConfiguration.cs index 555e97ea630..4dc3149872a 100644 --- a/src/Microsoft.Graph/Generated/Models/AppleVpnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AppleVpnConfiguration.cs @@ -289,7 +289,7 @@ public AppleVpnConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppleVpnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -337,7 +337,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("associatedDomains", AssociatedDomains); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); diff --git a/src/Microsoft.Graph/Generated/Models/AppleVppTokenTroubleshootingEvent.cs b/src/Microsoft.Graph/Generated/Models/AppleVppTokenTroubleshootingEvent.cs index 8e581ddfcae..d1ecd4f8413 100644 --- a/src/Microsoft.Graph/Generated/Models/AppleVppTokenTroubleshootingEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/AppleVppTokenTroubleshootingEvent.cs @@ -36,7 +36,7 @@ public string TokenId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AppleVppTokenTroubleshootingEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppleVppTokenTroubleshootingEvent(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("tokenId", TokenId); } diff --git a/src/Microsoft.Graph/Generated/Models/Application.cs b/src/Microsoft.Graph/Generated/Models/Application.cs index 415d90cab8a..ccda6a08d6f 100644 --- a/src/Microsoft.Graph/Generated/Models/Application.cs +++ b/src/Microsoft.Graph/Generated/Models/Application.cs @@ -744,7 +744,7 @@ public Application() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Application CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Application(); } /// @@ -811,7 +811,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("api", Api); writer.WriteStringValue("appId", AppId); diff --git a/src/Microsoft.Graph/Generated/Models/ApplicationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ApplicationCollectionResponse.cs index af9160e81f9..27ba4cacea3 100644 --- a/src/Microsoft.Graph/Generated/Models/ApplicationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ApplicationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ApplicationCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApplicationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApplicationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ApplicationEnforcedRestrictionsSessionControl.cs b/src/Microsoft.Graph/Generated/Models/ApplicationEnforcedRestrictionsSessionControl.cs index 2cf68951e9d..b55b76c19ed 100644 --- a/src/Microsoft.Graph/Generated/Models/ApplicationEnforcedRestrictionsSessionControl.cs +++ b/src/Microsoft.Graph/Generated/Models/ApplicationEnforcedRestrictionsSessionControl.cs @@ -26,7 +26,7 @@ public ApplicationEnforcedRestrictionsSessionControl() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApplicationEnforcedRestrictionsSessionControl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApplicationEnforcedRestrictionsSessionControl(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ApplicationSegment.cs b/src/Microsoft.Graph/Generated/Models/ApplicationSegment.cs index f804a12ad4a..497bc35848b 100644 --- a/src/Microsoft.Graph/Generated/Models/ApplicationSegment.cs +++ b/src/Microsoft.Graph/Generated/Models/ApplicationSegment.cs @@ -19,7 +19,7 @@ public partial class ApplicationSegment : global::Microsoft.Graph.Beta.Models.En /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApplicationSegment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -44,7 +44,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ApplicationServicePrincipal.cs b/src/Microsoft.Graph/Generated/Models/ApplicationServicePrincipal.cs index 33f1d5f8a63..05c6287d2f9 100644 --- a/src/Microsoft.Graph/Generated/Models/ApplicationServicePrincipal.cs +++ b/src/Microsoft.Graph/Generated/Models/ApplicationServicePrincipal.cs @@ -84,7 +84,7 @@ public ApplicationServicePrincipal() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ApplicationServicePrincipal CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApplicationServicePrincipal(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("application", Application); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("servicePrincipal", ServicePrincipal); diff --git a/src/Microsoft.Graph/Generated/Models/ApplicationSignInDetailedSummary.cs b/src/Microsoft.Graph/Generated/Models/ApplicationSignInDetailedSummary.cs index e11201c3181..57c504ef46c 100644 --- a/src/Microsoft.Graph/Generated/Models/ApplicationSignInDetailedSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ApplicationSignInDetailedSummary.cs @@ -79,7 +79,7 @@ public long? SignInCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApplicationSignInDetailedSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApplicationSignInDetailedSummary(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("aggregatedEventDateTime", AggregatedEventDateTime); writer.WriteStringValue("appDisplayName", AppDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ApplicationSignInDetailedSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ApplicationSignInDetailedSummaryCollectionResponse.cs index c1ec8e288f0..41a325bd094 100644 --- a/src/Microsoft.Graph/Generated/Models/ApplicationSignInDetailedSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ApplicationSignInDetailedSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ApplicationSignInDetailedSummaryCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApplicationSignInDetailedSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApplicationSignInDetailedSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ApplicationSignInSummary.cs b/src/Microsoft.Graph/Generated/Models/ApplicationSignInSummary.cs index 4417980801f..58357b7ebba 100644 --- a/src/Microsoft.Graph/Generated/Models/ApplicationSignInSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ApplicationSignInSummary.cs @@ -53,7 +53,7 @@ public double? SuccessPercentage /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApplicationSignInSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApplicationSignInSummary(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appDisplayName", AppDisplayName); writer.WriteLongValue("failedSignInCount", FailedSignInCount); diff --git a/src/Microsoft.Graph/Generated/Models/ApplicationTemplate.cs b/src/Microsoft.Graph/Generated/Models/ApplicationTemplate.cs index d576cf778c7..3f8196720d5 100644 --- a/src/Microsoft.Graph/Generated/Models/ApplicationTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/ApplicationTemplate.cs @@ -195,7 +195,7 @@ public List SupportedSingleSignOnModes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApplicationTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApplicationTemplate(); } /// @@ -225,7 +225,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("categories", Categories); writer.WriteCollectionOfObjectValues("configurationUris", ConfigurationUris); diff --git a/src/Microsoft.Graph/Generated/Models/ApplicationTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ApplicationTemplateCollectionResponse.cs index 3da5e778ee3..2c5db0b2b07 100644 --- a/src/Microsoft.Graph/Generated/Models/ApplicationTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ApplicationTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ApplicationTemplateCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApplicationTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApplicationTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AppliedAuthenticationEventListener.cs b/src/Microsoft.Graph/Generated/Models/AppliedAuthenticationEventListener.cs index 684bc5c3ab7..1fc420a356b 100644 --- a/src/Microsoft.Graph/Generated/Models/AppliedAuthenticationEventListener.cs +++ b/src/Microsoft.Graph/Generated/Models/AppliedAuthenticationEventListener.cs @@ -90,7 +90,7 @@ public AppliedAuthenticationEventListener() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppliedAuthenticationEventListener CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppliedAuthenticationEventListener(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("eventType", EventType); writer.WriteStringValue("executedListenerId", ExecutedListenerId); writer.WriteObjectValue("handlerResult", HandlerResult); diff --git a/src/Microsoft.Graph/Generated/Models/AppliedConditionalAccessPolicy.cs b/src/Microsoft.Graph/Generated/Models/AppliedConditionalAccessPolicy.cs index 55f9740ba0f..db3e4adbddb 100644 --- a/src/Microsoft.Graph/Generated/Models/AppliedConditionalAccessPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AppliedConditionalAccessPolicy.cs @@ -198,7 +198,7 @@ public AppliedConditionalAccessPolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppliedConditionalAccessPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppliedConditionalAccessPolicy(); } /// @@ -229,7 +229,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("authenticationStrength", AuthenticationStrength); writer.WriteEnumValue("conditionsNotSatisfied", ConditionsNotSatisfied); writer.WriteEnumValue("conditionsSatisfied", ConditionsSatisfied); diff --git a/src/Microsoft.Graph/Generated/Models/ApplyLabelAction.cs b/src/Microsoft.Graph/Generated/Models/ApplyLabelAction.cs index b9fc7407d68..c1840f4a0f9 100644 --- a/src/Microsoft.Graph/Generated/Models/ApplyLabelAction.cs +++ b/src/Microsoft.Graph/Generated/Models/ApplyLabelAction.cs @@ -80,7 +80,7 @@ public ApplyLabelAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApplyLabelAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApplyLabelAction(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("actions", Actions); writer.WriteEnumValue("actionSource", ActionSource); diff --git a/src/Microsoft.Graph/Generated/Models/Approval.cs b/src/Microsoft.Graph/Generated/Models/Approval.cs index a18a7d5e5be..be1387e8e64 100644 --- a/src/Microsoft.Graph/Generated/Models/Approval.cs +++ b/src/Microsoft.Graph/Generated/Models/Approval.cs @@ -35,7 +35,7 @@ public partial class Approval : global::Microsoft.Graph.Beta.Models.Entity, IPar /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Approval CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Approval(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("steps", Steps); } diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ApprovalCollectionResponse.cs index 6884d603a14..0200f293274 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ApprovalCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalIdentitySet.cs b/src/Microsoft.Graph/Generated/Models/ApprovalIdentitySet.cs index fb1beb13b3c..95228c0ebe0 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalIdentitySet.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalIdentitySet.cs @@ -42,7 +42,7 @@ public ApprovalIdentitySet() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalIdentitySet(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("group", Group); } diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalItem.cs b/src/Microsoft.Graph/Generated/Models/ApprovalItem.cs index b4956d93b99..80722084c18 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalItem.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalItem.cs @@ -199,7 +199,7 @@ public string Result /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalItem(); } /// @@ -233,7 +233,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowEmailNotification", AllowEmailNotification); writer.WriteEnumValue("approvalType", ApprovalType); diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ApprovalItemCollectionResponse.cs index 6de70a62cf8..dcc1ae085a9 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ApprovalItemCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalItemRequest.cs b/src/Microsoft.Graph/Generated/Models/ApprovalItemRequest.cs index d6187975dc8..65779ea7017 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalItemRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalItemRequest.cs @@ -63,7 +63,7 @@ public bool? IsReassigned /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalItemRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalItemRequest(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalItemRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ApprovalItemRequestCollectionResponse.cs index d693a2fb1a1..67d9a087f32 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalItemRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalItemRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ApprovalItemRequestCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalItemRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalItemRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalItemResponse.cs b/src/Microsoft.Graph/Generated/Models/ApprovalItemResponse.cs index 9c680319eab..7e50a0c1489 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalItemResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalItemResponse.cs @@ -89,7 +89,7 @@ public string Response /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalItemResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalItemResponse(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("comments", Comments); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalItemResponseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ApprovalItemResponseCollectionResponse.cs index 8e86cdd350d..118599f961d 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalItemResponseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalItemResponseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ApprovalItemResponseCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalItemResponseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalItemResponseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalItemViewPoint.cs b/src/Microsoft.Graph/Generated/Models/ApprovalItemViewPoint.cs index 1976cb9d77d..afcb6dde0b3 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalItemViewPoint.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalItemViewPoint.cs @@ -68,7 +68,7 @@ public ApprovalItemViewPoint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ApprovalItemViewPoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalItemViewPoint(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfEnumValues("roles", Roles); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalOperation.cs b/src/Microsoft.Graph/Generated/Models/ApprovalOperation.cs index 4d77665393d..4741853bdcc 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalOperation.cs @@ -69,7 +69,7 @@ public string ResourceLocation /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalOperation(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteObjectValue("error", Error); diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ApprovalOperationCollectionResponse.cs index 50d88e83331..d7c212fbad6 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ApprovalOperationCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalSettings.cs b/src/Microsoft.Graph/Generated/Models/ApprovalSettings.cs index bd94f67d88e..51abea2da95 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalSettings.cs @@ -102,7 +102,7 @@ public ApprovalSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ApprovalSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalSettings(); } /// @@ -127,7 +127,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("approvalMode", ApprovalMode); writer.WriteCollectionOfObjectValues("approvalStages", ApprovalStages); writer.WriteBoolValue("isApprovalRequired", IsApprovalRequired); diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalSolution.cs b/src/Microsoft.Graph/Generated/Models/ApprovalSolution.cs index 901641a7df0..00d1cea9f50 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalSolution.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalSolution.cs @@ -57,7 +57,7 @@ public partial class ApprovalSolution : global::Microsoft.Graph.Beta.Models.Enti /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalSolution CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalSolution(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("approvalItems", ApprovalItems); writer.WriteCollectionOfObjectValues("operations", Operations); diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalStage.cs b/src/Microsoft.Graph/Generated/Models/ApprovalStage.cs index 447b24f9a23..3688fa44dad 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalStage.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalStage.cs @@ -108,7 +108,7 @@ public ApprovalStage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ApprovalStage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -139,7 +139,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("approvalStageTimeOutInDays", ApprovalStageTimeOutInDays); writer.WriteCollectionOfObjectValues("escalationApprovers", EscalationApprovers); writer.WriteIntValue("escalationTimeInMinutes", EscalationTimeInMinutes); diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalStep.cs b/src/Microsoft.Graph/Generated/Models/ApprovalStep.cs index c5f2e9473d3..5b23f8ccd50 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalStep.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalStep.cs @@ -111,7 +111,7 @@ public string Status /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalStep CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalStep(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("assignedToMe", AssignedToMe); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalStepCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ApprovalStepCollectionResponse.cs index 104c90df5d8..8470d21aa39 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalStepCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalStepCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ApprovalStepCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalStepCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalStepCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalWorkflowProvider.cs b/src/Microsoft.Graph/Generated/Models/ApprovalWorkflowProvider.cs index 0ca725ef24f..ff96e35e0e2 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalWorkflowProvider.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalWorkflowProvider.cs @@ -83,7 +83,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalWorkflowProvider CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalWorkflowProvider(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("businessFlows", BusinessFlows); writer.WriteCollectionOfObjectValues("businessFlowsWithRequestsAwaitingMyDecision", BusinessFlowsWithRequestsAwaitingMyDecision); diff --git a/src/Microsoft.Graph/Generated/Models/ApprovalWorkflowProviderCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ApprovalWorkflowProviderCollectionResponse.cs index e8a6cefec0c..88fcd25180b 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovalWorkflowProviderCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovalWorkflowProviderCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ApprovalWorkflowProviderCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovalWorkflowProviderCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovalWorkflowProviderCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ApprovedClientApp.cs b/src/Microsoft.Graph/Generated/Models/ApprovedClientApp.cs index 22824660d20..194ac864435 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovedClientApp.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovedClientApp.cs @@ -35,7 +35,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovedClientApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovedClientApp(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); } diff --git a/src/Microsoft.Graph/Generated/Models/ApprovedClientAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ApprovedClientAppCollectionResponse.cs index 7977a6a1963..da7e714a9b2 100644 --- a/src/Microsoft.Graph/Generated/Models/ApprovedClientAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ApprovedClientAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ApprovedClientAppCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ApprovedClientAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ApprovedClientAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AppsAndServicesSettings.cs b/src/Microsoft.Graph/Generated/Models/AppsAndServicesSettings.cs index a835bb106cb..deea3e73f4c 100644 --- a/src/Microsoft.Graph/Generated/Models/AppsAndServicesSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AppsAndServicesSettings.cs @@ -64,7 +64,7 @@ public AppsAndServicesSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppsAndServicesSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppsAndServicesSettings(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isAppAndServicesTrialEnabled", IsAppAndServicesTrialEnabled); writer.WriteBoolValue("isOfficeStoreEnabled", IsOfficeStoreEnabled); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AppsInstallationOptionsForMac.cs b/src/Microsoft.Graph/Generated/Models/AppsInstallationOptionsForMac.cs index 11c237b7550..fc1cb199b91 100644 --- a/src/Microsoft.Graph/Generated/Models/AppsInstallationOptionsForMac.cs +++ b/src/Microsoft.Graph/Generated/Models/AppsInstallationOptionsForMac.cs @@ -64,7 +64,7 @@ public AppsInstallationOptionsForMac() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppsInstallationOptionsForMac CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppsInstallationOptionsForMac(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isMicrosoft365AppsEnabled", IsMicrosoft365AppsEnabled); writer.WriteBoolValue("isSkypeForBusinessEnabled", IsSkypeForBusinessEnabled); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AppsInstallationOptionsForWindows.cs b/src/Microsoft.Graph/Generated/Models/AppsInstallationOptionsForWindows.cs index 3170bad0b54..6cf38d73f5a 100644 --- a/src/Microsoft.Graph/Generated/Models/AppsInstallationOptionsForWindows.cs +++ b/src/Microsoft.Graph/Generated/Models/AppsInstallationOptionsForWindows.cs @@ -76,7 +76,7 @@ public AppsInstallationOptionsForWindows() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AppsInstallationOptionsForWindows CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AppsInstallationOptionsForWindows(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isMicrosoft365AppsEnabled", IsMicrosoft365AppsEnabled); writer.WriteBoolValue("isProjectEnabled", IsProjectEnabled); writer.WriteBoolValue("isSkypeForBusinessEnabled", IsSkypeForBusinessEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/ArchivedPrintJob.cs b/src/Microsoft.Graph/Generated/Models/ArchivedPrintJob.cs index bd0c259c42a..9c302465855 100644 --- a/src/Microsoft.Graph/Generated/Models/ArchivedPrintJob.cs +++ b/src/Microsoft.Graph/Generated/Models/ArchivedPrintJob.cs @@ -182,7 +182,7 @@ public ArchivedPrintJob() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ArchivedPrintJob CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ArchivedPrintJob(); } /// @@ -217,7 +217,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("acquiredByPrinter", AcquiredByPrinter); writer.WriteDateTimeOffsetValue("acquiredDateTime", AcquiredDateTime); writer.WriteIntValue("blackAndWhitePageCount", BlackAndWhitePageCount); diff --git a/src/Microsoft.Graph/Generated/Models/ArtifactQuery.cs b/src/Microsoft.Graph/Generated/Models/ArtifactQuery.cs index 209013b23d6..6875ea8c757 100644 --- a/src/Microsoft.Graph/Generated/Models/ArtifactQuery.cs +++ b/src/Microsoft.Graph/Generated/Models/ArtifactQuery.cs @@ -74,7 +74,7 @@ public ArtifactQuery() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ArtifactQuery CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ArtifactQuery(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("artifactType", ArtifactType); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("queryExpression", QueryExpression); diff --git a/src/Microsoft.Graph/Generated/Models/AssignedComputeInstanceDetails.cs b/src/Microsoft.Graph/Generated/Models/AssignedComputeInstanceDetails.cs index 7e2a7254282..2c3a19b731e 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignedComputeInstanceDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignedComputeInstanceDetails.cs @@ -51,7 +51,7 @@ public partial class AssignedComputeInstanceDetails : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AssignedComputeInstanceDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignedComputeInstanceDetails(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("accessedStorageBuckets", AccessedStorageBuckets); writer.WriteObjectValue("assignedComputeInstance", AssignedComputeInstance); diff --git a/src/Microsoft.Graph/Generated/Models/AssignedLabel.cs b/src/Microsoft.Graph/Generated/Models/AssignedLabel.cs index c1588a220d3..ede1f8738ba 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignedLabel.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignedLabel.cs @@ -84,7 +84,7 @@ public AssignedLabel() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AssignedLabel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignedLabel(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("labelId", LabelId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AssignedLicense.cs b/src/Microsoft.Graph/Generated/Models/AssignedLicense.cs index 85cb3b9f0c2..3492da72cf7 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignedLicense.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignedLicense.cs @@ -74,7 +74,7 @@ public AssignedLicense() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AssignedLicense CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignedLicense(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("disabledPlans", DisabledPlans); writer.WriteStringValue("@odata.type", OdataType); writer.WriteGuidValue("skuId", SkuId); diff --git a/src/Microsoft.Graph/Generated/Models/AssignedPlaceMode.cs b/src/Microsoft.Graph/Generated/Models/AssignedPlaceMode.cs index 7e28a3b36f4..a2f8e6e029a 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignedPlaceMode.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignedPlaceMode.cs @@ -58,7 +58,7 @@ public AssignedPlaceMode() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AssignedPlaceMode CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignedPlaceMode(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assignedUserEmailAddress", AssignedUserEmailAddress); writer.WriteStringValue("assignedUserId", AssignedUserId); diff --git a/src/Microsoft.Graph/Generated/Models/AssignedPlan.cs b/src/Microsoft.Graph/Generated/Models/AssignedPlan.cs index 07ac771a16c..c81129e5c3f 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignedPlan.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignedPlan.cs @@ -96,7 +96,7 @@ public AssignedPlan() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AssignedPlan CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignedPlan(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("assignedDateTime", AssignedDateTime); writer.WriteStringValue("capabilityStatus", CapabilityStatus); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AssignedTrainingInfo.cs b/src/Microsoft.Graph/Generated/Models/AssignedTrainingInfo.cs index b5fc5ceee87..395632c4a7f 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignedTrainingInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignedTrainingInfo.cs @@ -80,7 +80,7 @@ public AssignedTrainingInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AssignedTrainingInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignedTrainingInfo(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("assignedUserCount", AssignedUserCount); writer.WriteIntValue("completedUserCount", CompletedUserCount); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluateRequest.cs b/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluateRequest.cs index 1d87c323c67..9848d930227 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluateRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluateRequest.cs @@ -119,7 +119,7 @@ public AssignmentFilterEvaluateRequest() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluateRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluateRequest(); } /// @@ -145,7 +145,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("orderBy", OrderBy); writer.WriteEnumValue("platform", Platform); diff --git a/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluationStatusDetails.cs b/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluationStatusDetails.cs index 479ca012cd7..776e192720b 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluationStatusDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluationStatusDetails.cs @@ -36,7 +36,7 @@ public string PayloadId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetails(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("payloadId", PayloadId); } diff --git a/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluationStatusDetailsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluationStatusDetailsCollectionResponse.cs index a8d7d6a61ea..cae1669d6ce 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluationStatusDetailsCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluationStatusDetailsCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AssignmentFilterEvaluationStatusDetailsCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetailsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationStatusDetailsCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluationSummary.cs b/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluationSummary.cs index a341781960c..7e36b2787ef 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluationSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignmentFilterEvaluationSummary.cs @@ -131,7 +131,7 @@ public AssignmentFilterEvaluationSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignmentFilterEvaluationSummary(); } /// @@ -159,7 +159,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("assignmentFilterDisplayName", AssignmentFilterDisplayName); writer.WriteStringValue("assignmentFilterId", AssignmentFilterId); writer.WriteDateTimeOffsetValue("assignmentFilterLastModifiedDateTime", AssignmentFilterLastModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/AssignmentFilterState.cs b/src/Microsoft.Graph/Generated/Models/AssignmentFilterState.cs index e14b5fc6c45..e951ff5659f 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignmentFilterState.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignmentFilterState.cs @@ -59,7 +59,7 @@ public AssignmentFilterState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AssignmentFilterState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignmentFilterState(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("enabled", Enabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AssignmentFilterStatusDetails.cs b/src/Microsoft.Graph/Generated/Models/AssignmentFilterStatusDetails.cs index 81a1ff720e8..33bb6fcdaaf 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignmentFilterStatusDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignmentFilterStatusDetails.cs @@ -133,7 +133,7 @@ public AssignmentFilterStatusDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AssignmentFilterStatusDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignmentFilterStatusDetails(); } /// @@ -158,7 +158,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("deviceProperties", DeviceProperties); writer.WriteCollectionOfObjectValues("evalutionSummaries", EvalutionSummaries); writer.WriteStringValue("managedDeviceId", ManagedDeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/AssignmentFilterSupportedProperty.cs b/src/Microsoft.Graph/Generated/Models/AssignmentFilterSupportedProperty.cs index c0e7a602bed..58432b6c78d 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignmentFilterSupportedProperty.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignmentFilterSupportedProperty.cs @@ -139,7 +139,7 @@ public AssignmentFilterSupportedProperty() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AssignmentFilterSupportedProperty CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignmentFilterSupportedProperty(); } /// @@ -165,7 +165,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("dataType", DataType); writer.WriteBoolValue("isCollection", IsCollection); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/AssignmentFilterTypeAndEvaluationResult.cs b/src/Microsoft.Graph/Generated/Models/AssignmentFilterTypeAndEvaluationResult.cs index 1300482c60a..7992a687cb9 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignmentFilterTypeAndEvaluationResult.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignmentFilterTypeAndEvaluationResult.cs @@ -65,7 +65,7 @@ public AssignmentFilterTypeAndEvaluationResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AssignmentFilterTypeAndEvaluationResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignmentFilterTypeAndEvaluationResult(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("assignmentFilterType", AssignmentFilterType); writer.WriteEnumValue("evaluationResult", EvaluationResult); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AssignmentFilterValidationResult.cs b/src/Microsoft.Graph/Generated/Models/AssignmentFilterValidationResult.cs index 37fc3432c9f..8dc2d8ffb68 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignmentFilterValidationResult.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignmentFilterValidationResult.cs @@ -59,7 +59,7 @@ public AssignmentFilterValidationResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AssignmentFilterValidationResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignmentFilterValidationResult(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isValidRule", IsValidRule); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AssignmentOrder.cs b/src/Microsoft.Graph/Generated/Models/AssignmentOrder.cs index d15a64b4c62..7b14c266cce 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignmentOrder.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignmentOrder.cs @@ -68,7 +68,7 @@ public AssignmentOrder() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AssignmentOrder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignmentOrder(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("order", Order); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AssignmentRequestApprovalStageCallbackData.cs b/src/Microsoft.Graph/Generated/Models/AssignmentRequestApprovalStageCallbackData.cs index 7a55deb6e49..d8734e17fb4 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignmentRequestApprovalStageCallbackData.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignmentRequestApprovalStageCallbackData.cs @@ -42,7 +42,7 @@ public AssignmentRequestApprovalStageCallbackData() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AssignmentRequestApprovalStageCallbackData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignmentRequestApprovalStageCallbackData(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("approvalStage", ApprovalStage); } diff --git a/src/Microsoft.Graph/Generated/Models/AssignmentReviewSettings.cs b/src/Microsoft.Graph/Generated/Models/AssignmentReviewSettings.cs index 09644a93f45..c32db07ed47 100644 --- a/src/Microsoft.Graph/Generated/Models/AssignmentReviewSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AssignmentReviewSettings.cs @@ -136,7 +136,7 @@ public AssignmentReviewSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AssignmentReviewSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssignmentReviewSettings(); } /// @@ -165,7 +165,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("accessReviewTimeoutBehavior", AccessReviewTimeoutBehavior); writer.WriteIntValue("durationInDays", DurationInDays); writer.WriteBoolValue("isAccessRecommendationEnabled", IsAccessRecommendationEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/AssociatedTeamInfo.cs b/src/Microsoft.Graph/Generated/Models/AssociatedTeamInfo.cs index 8913a6e0542..124a233cbfd 100644 --- a/src/Microsoft.Graph/Generated/Models/AssociatedTeamInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/AssociatedTeamInfo.cs @@ -19,7 +19,7 @@ public partial class AssociatedTeamInfo : global::Microsoft.Graph.Beta.Models.Te /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AssociatedTeamInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssociatedTeamInfo(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AssociatedTeamInfoCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AssociatedTeamInfoCollectionResponse.cs index a28c65f791a..c57f6615dc7 100644 --- a/src/Microsoft.Graph/Generated/Models/AssociatedTeamInfoCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AssociatedTeamInfoCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AssociatedTeamInfoCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AssociatedTeamInfoCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AssociatedTeamInfoCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Attachment.cs b/src/Microsoft.Graph/Generated/Models/Attachment.cs index ca5a0757ea0..913967afbd9 100644 --- a/src/Microsoft.Graph/Generated/Models/Attachment.cs +++ b/src/Microsoft.Graph/Generated/Models/Attachment.cs @@ -69,7 +69,7 @@ public int? Size /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Attachment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -100,7 +100,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contentType", ContentType); writer.WriteBoolValue("isInline", IsInline); diff --git a/src/Microsoft.Graph/Generated/Models/AttachmentBase.cs b/src/Microsoft.Graph/Generated/Models/AttachmentBase.cs index 0d0c7cfd1c4..787b5d3715f 100644 --- a/src/Microsoft.Graph/Generated/Models/AttachmentBase.cs +++ b/src/Microsoft.Graph/Generated/Models/AttachmentBase.cs @@ -63,7 +63,7 @@ public int? Size /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttachmentBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -91,7 +91,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contentType", ContentType); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/AttachmentBaseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AttachmentBaseCollectionResponse.cs index 11da9676a79..62e2a50ea74 100644 --- a/src/Microsoft.Graph/Generated/Models/AttachmentBaseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AttachmentBaseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AttachmentBaseCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttachmentBaseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttachmentBaseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AttachmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AttachmentCollectionResponse.cs index 63eb5bac150..933f357b8e1 100644 --- a/src/Microsoft.Graph/Generated/Models/AttachmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AttachmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AttachmentCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttachmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttachmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AttachmentInfo.cs b/src/Microsoft.Graph/Generated/Models/AttachmentInfo.cs index 789b9d50e43..c25f74df95b 100644 --- a/src/Microsoft.Graph/Generated/Models/AttachmentInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/AttachmentInfo.cs @@ -96,7 +96,7 @@ public AttachmentInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AttachmentInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttachmentInfo(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("attachmentType", AttachmentType); writer.WriteStringValue("contentType", ContentType); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/AttachmentItem.cs b/src/Microsoft.Graph/Generated/Models/AttachmentItem.cs index fb38cd7e6bc..482efa3d265 100644 --- a/src/Microsoft.Graph/Generated/Models/AttachmentItem.cs +++ b/src/Microsoft.Graph/Generated/Models/AttachmentItem.cs @@ -118,7 +118,7 @@ public AttachmentItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AttachmentItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttachmentItem(); } /// @@ -144,7 +144,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("attachmentType", AttachmentType); writer.WriteStringValue("contentId", ContentId); writer.WriteStringValue("contentType", ContentType); diff --git a/src/Microsoft.Graph/Generated/Models/AttachmentSession.cs b/src/Microsoft.Graph/Generated/Models/AttachmentSession.cs index 81c2fd98412..75bcad0abd5 100644 --- a/src/Microsoft.Graph/Generated/Models/AttachmentSession.cs +++ b/src/Microsoft.Graph/Generated/Models/AttachmentSession.cs @@ -57,7 +57,7 @@ public List NextExpectedRanges /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttachmentSession CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttachmentSession(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/AttachmentSessionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AttachmentSessionCollectionResponse.cs index 595a00c6dfb..9a05cc0e455 100644 --- a/src/Microsoft.Graph/Generated/Models/AttachmentSessionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AttachmentSessionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AttachmentSessionCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttachmentSessionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttachmentSessionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AttackSimulationOperation.cs b/src/Microsoft.Graph/Generated/Models/AttackSimulationOperation.cs index df913462511..076b21b948f 100644 --- a/src/Microsoft.Graph/Generated/Models/AttackSimulationOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/AttackSimulationOperation.cs @@ -48,7 +48,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttackSimulationOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttackSimulationOperation(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("percentageCompleted", PercentageCompleted); writer.WriteStringValue("tenantId", TenantId); diff --git a/src/Microsoft.Graph/Generated/Models/AttackSimulationOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AttackSimulationOperationCollectionResponse.cs index 9a0086f8c24..7737236374f 100644 --- a/src/Microsoft.Graph/Generated/Models/AttackSimulationOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AttackSimulationOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AttackSimulationOperationCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttackSimulationOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttackSimulationOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AttackSimulationRepeatOffender.cs b/src/Microsoft.Graph/Generated/Models/AttackSimulationRepeatOffender.cs index 827a7615b8a..a568ae60543 100644 --- a/src/Microsoft.Graph/Generated/Models/AttackSimulationRepeatOffender.cs +++ b/src/Microsoft.Graph/Generated/Models/AttackSimulationRepeatOffender.cs @@ -74,7 +74,7 @@ public AttackSimulationRepeatOffender() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AttackSimulationRepeatOffender CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttackSimulationRepeatOffender(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("attackSimulationUser", AttackSimulationUser); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("repeatOffenceCount", RepeatOffenceCount); diff --git a/src/Microsoft.Graph/Generated/Models/AttackSimulationRoot.cs b/src/Microsoft.Graph/Generated/Models/AttackSimulationRoot.cs index 036bc40d902..0ca40a64966 100644 --- a/src/Microsoft.Graph/Generated/Models/AttackSimulationRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/AttackSimulationRoot.cs @@ -163,7 +163,7 @@ public partial class AttackSimulationRoot : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttackSimulationRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttackSimulationRoot(); } /// @@ -191,7 +191,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("endUserNotifications", EndUserNotifications); writer.WriteCollectionOfObjectValues("landingPages", LandingPages); diff --git a/src/Microsoft.Graph/Generated/Models/AttackSimulationSimulationUserCoverage.cs b/src/Microsoft.Graph/Generated/Models/AttackSimulationSimulationUserCoverage.cs index b6297448ff9..87039f1c442 100644 --- a/src/Microsoft.Graph/Generated/Models/AttackSimulationSimulationUserCoverage.cs +++ b/src/Microsoft.Graph/Generated/Models/AttackSimulationSimulationUserCoverage.cs @@ -92,7 +92,7 @@ public AttackSimulationSimulationUserCoverage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AttackSimulationSimulationUserCoverage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttackSimulationSimulationUserCoverage(); } /// @@ -117,7 +117,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("attackSimulationUser", AttackSimulationUser); writer.WriteIntValue("clickCount", ClickCount); writer.WriteIntValue("compromisedCount", CompromisedCount); diff --git a/src/Microsoft.Graph/Generated/Models/AttackSimulationTrainingUserCoverage.cs b/src/Microsoft.Graph/Generated/Models/AttackSimulationTrainingUserCoverage.cs index 23173362d04..c28127ef327 100644 --- a/src/Microsoft.Graph/Generated/Models/AttackSimulationTrainingUserCoverage.cs +++ b/src/Microsoft.Graph/Generated/Models/AttackSimulationTrainingUserCoverage.cs @@ -84,7 +84,7 @@ public AttackSimulationTrainingUserCoverage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AttackSimulationTrainingUserCoverage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttackSimulationTrainingUserCoverage(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("attackSimulationUser", AttackSimulationUser); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("userTrainings", UserTrainings); diff --git a/src/Microsoft.Graph/Generated/Models/AttackSimulationUser.cs b/src/Microsoft.Graph/Generated/Models/AttackSimulationUser.cs index d36c31db619..abb25991407 100644 --- a/src/Microsoft.Graph/Generated/Models/AttackSimulationUser.cs +++ b/src/Microsoft.Graph/Generated/Models/AttackSimulationUser.cs @@ -106,7 +106,7 @@ public AttackSimulationUser() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AttackSimulationUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttackSimulationUser(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("email", Email); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AttendanceInterval.cs b/src/Microsoft.Graph/Generated/Models/AttendanceInterval.cs index 8f0fc2429ff..8334d9a3d81 100644 --- a/src/Microsoft.Graph/Generated/Models/AttendanceInterval.cs +++ b/src/Microsoft.Graph/Generated/Models/AttendanceInterval.cs @@ -70,7 +70,7 @@ public AttendanceInterval() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AttendanceInterval CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttendanceInterval(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("durationInSeconds", DurationInSeconds); writer.WriteDateTimeOffsetValue("joinDateTime", JoinDateTime); writer.WriteDateTimeOffsetValue("leaveDateTime", LeaveDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/AttendanceRecord.cs b/src/Microsoft.Graph/Generated/Models/AttendanceRecord.cs index 0bc96604bdc..0d4743c8b35 100644 --- a/src/Microsoft.Graph/Generated/Models/AttendanceRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/AttendanceRecord.cs @@ -137,7 +137,7 @@ public int? TotalAttendanceInSeconds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttendanceRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttendanceRecord(); } /// @@ -164,7 +164,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("attendanceIntervals", AttendanceIntervals); writer.WriteStringValue("emailAddress", EmailAddress); diff --git a/src/Microsoft.Graph/Generated/Models/AttendanceRecordCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AttendanceRecordCollectionResponse.cs index bf410a75fd0..eaf6b80097e 100644 --- a/src/Microsoft.Graph/Generated/Models/AttendanceRecordCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AttendanceRecordCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AttendanceRecordCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttendanceRecordCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttendanceRecordCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Attendee.cs b/src/Microsoft.Graph/Generated/Models/Attendee.cs index 536506966e9..f1b84d5600b 100644 --- a/src/Microsoft.Graph/Generated/Models/Attendee.cs +++ b/src/Microsoft.Graph/Generated/Models/Attendee.cs @@ -58,7 +58,7 @@ public Attendee() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Attendee CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Attendee(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("proposedNewTime", ProposedNewTime); writer.WriteObjectValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/AttendeeAvailability.cs b/src/Microsoft.Graph/Generated/Models/AttendeeAvailability.cs index 21e01fa90d7..7ef26d953c5 100644 --- a/src/Microsoft.Graph/Generated/Models/AttendeeAvailability.cs +++ b/src/Microsoft.Graph/Generated/Models/AttendeeAvailability.cs @@ -74,7 +74,7 @@ public AttendeeAvailability() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AttendeeAvailability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttendeeAvailability(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("attendee", Attendee); writer.WriteEnumValue("availability", Availability); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AttendeeBase.cs b/src/Microsoft.Graph/Generated/Models/AttendeeBase.cs index f11b18bdeb0..352471a3741 100644 --- a/src/Microsoft.Graph/Generated/Models/AttendeeBase.cs +++ b/src/Microsoft.Graph/Generated/Models/AttendeeBase.cs @@ -32,7 +32,7 @@ public AttendeeBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttendeeBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("type", Type); } diff --git a/src/Microsoft.Graph/Generated/Models/AttendeeNotificationInfo.cs b/src/Microsoft.Graph/Generated/Models/AttendeeNotificationInfo.cs index cb2d63f7f0f..c1fb493af47 100644 --- a/src/Microsoft.Graph/Generated/Models/AttendeeNotificationInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/AttendeeNotificationInfo.cs @@ -84,7 +84,7 @@ public AttendeeNotificationInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AttendeeNotificationInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttendeeNotificationInfo(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("phoneNumber", PhoneNumber); writer.WriteStringValue("timeZone", TimeZone); diff --git a/src/Microsoft.Graph/Generated/Models/AttributeDefinition.cs b/src/Microsoft.Graph/Generated/Models/AttributeDefinition.cs index f3fca3788fb..bd3ad1da613 100644 --- a/src/Microsoft.Graph/Generated/Models/AttributeDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/AttributeDefinition.cs @@ -174,7 +174,7 @@ public AttributeDefinition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AttributeDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttributeDefinition(); } /// @@ -206,7 +206,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("anchor", Anchor); writer.WriteCollectionOfObjectValues("apiExpressions", ApiExpressions); writer.WriteBoolValue("caseExact", CaseExact); diff --git a/src/Microsoft.Graph/Generated/Models/AttributeDefinitionMetadataEntry.cs b/src/Microsoft.Graph/Generated/Models/AttributeDefinitionMetadataEntry.cs index 7ee41f13386..c0bca181e3f 100644 --- a/src/Microsoft.Graph/Generated/Models/AttributeDefinitionMetadataEntry.cs +++ b/src/Microsoft.Graph/Generated/Models/AttributeDefinitionMetadataEntry.cs @@ -74,7 +74,7 @@ public AttributeDefinitionMetadataEntry() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AttributeDefinitionMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttributeDefinitionMetadataEntry(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/AttributeMapping.cs b/src/Microsoft.Graph/Generated/Models/AttributeMapping.cs index 93a1cd72df5..70606c86f70 100644 --- a/src/Microsoft.Graph/Generated/Models/AttributeMapping.cs +++ b/src/Microsoft.Graph/Generated/Models/AttributeMapping.cs @@ -124,7 +124,7 @@ public AttributeMapping() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AttributeMapping CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttributeMapping(); } /// @@ -151,7 +151,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("defaultValue", DefaultValue); writer.WriteBoolValue("exportMissingReferences", ExportMissingReferences); writer.WriteEnumValue("flowBehavior", FlowBehavior); diff --git a/src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchema.cs b/src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchema.cs index cd02b3fef52..b85049e2e77 100644 --- a/src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchema.cs +++ b/src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchema.cs @@ -35,7 +35,7 @@ public partial class AttributeMappingFunctionSchema : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttributeMappingFunctionSchema CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttributeMappingFunctionSchema(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("parameters", Parameters); } diff --git a/src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchemaCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchemaCollectionResponse.cs index 1dd26825255..c55ac9ae74e 100644 --- a/src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchemaCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchemaCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AttributeMappingFunctionSchemaCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttributeMappingFunctionSchemaCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttributeMappingFunctionSchemaCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AttributeMappingParameterSchema.cs b/src/Microsoft.Graph/Generated/Models/AttributeMappingParameterSchema.cs index 17f8044766d..ed642643142 100644 --- a/src/Microsoft.Graph/Generated/Models/AttributeMappingParameterSchema.cs +++ b/src/Microsoft.Graph/Generated/Models/AttributeMappingParameterSchema.cs @@ -86,7 +86,7 @@ public AttributeMappingParameterSchema() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AttributeMappingParameterSchema CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttributeMappingParameterSchema(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowMultipleOccurrences", AllowMultipleOccurrences); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AttributeMappingSource.cs b/src/Microsoft.Graph/Generated/Models/AttributeMappingSource.cs index e20ccd9fcd3..0b96308708d 100644 --- a/src/Microsoft.Graph/Generated/Models/AttributeMappingSource.cs +++ b/src/Microsoft.Graph/Generated/Models/AttributeMappingSource.cs @@ -106,7 +106,7 @@ public AttributeMappingSource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AttributeMappingSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttributeMappingSource(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("expression", Expression); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AttributeSet.cs b/src/Microsoft.Graph/Generated/Models/AttributeSet.cs index 84cc043d332..141a199f280 100644 --- a/src/Microsoft.Graph/Generated/Models/AttributeSet.cs +++ b/src/Microsoft.Graph/Generated/Models/AttributeSet.cs @@ -41,7 +41,7 @@ public int? MaxAttributesPerSet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttributeSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttributeSet(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteIntValue("maxAttributesPerSet", MaxAttributesPerSet); diff --git a/src/Microsoft.Graph/Generated/Models/AttributeSetCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AttributeSetCollectionResponse.cs index 82c30bab222..bd918679e6d 100644 --- a/src/Microsoft.Graph/Generated/Models/AttributeSetCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AttributeSetCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AttributeSetCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AttributeSetCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AttributeSetCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AudienceRestriction.cs b/src/Microsoft.Graph/Generated/Models/AudienceRestriction.cs index 6d29ce1ffce..bbdea26d2d8 100644 --- a/src/Microsoft.Graph/Generated/Models/AudienceRestriction.cs +++ b/src/Microsoft.Graph/Generated/Models/AudienceRestriction.cs @@ -86,7 +86,7 @@ public AudienceRestriction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AudienceRestriction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AudienceRestriction(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("excludeActors", ExcludeActors); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("restrictForAppsCreatedAfterDateTime", RestrictForAppsCreatedAfterDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/AudiencesConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AudiencesConfiguration.cs index dbf2afc640a..6045cc88d44 100644 --- a/src/Microsoft.Graph/Generated/Models/AudiencesConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AudiencesConfiguration.cs @@ -84,7 +84,7 @@ public AudiencesConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AudiencesConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AudiencesConfiguration(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("azureAdMultipleOrgs", AzureAdMultipleOrgs); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("personalMicrosoftAccount", PersonalMicrosoftAccount); diff --git a/src/Microsoft.Graph/Generated/Models/Audio.cs b/src/Microsoft.Graph/Generated/Models/Audio.cs index 85e04429ed0..8694e065b1d 100644 --- a/src/Microsoft.Graph/Generated/Models/Audio.cs +++ b/src/Microsoft.Graph/Generated/Models/Audio.cs @@ -218,7 +218,7 @@ public Audio() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Audio CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Audio(); } /// @@ -254,7 +254,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("album", Album); writer.WriteStringValue("albumArtist", AlbumArtist); writer.WriteStringValue("artist", Artist); diff --git a/src/Microsoft.Graph/Generated/Models/AudioConferencing.cs b/src/Microsoft.Graph/Generated/Models/AudioConferencing.cs index 93451f7e629..365be207fd9 100644 --- a/src/Microsoft.Graph/Generated/Models/AudioConferencing.cs +++ b/src/Microsoft.Graph/Generated/Models/AudioConferencing.cs @@ -148,7 +148,7 @@ public AudioConferencing() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AudioConferencing CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AudioConferencing(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("conferenceId", ConferenceId); writer.WriteStringValue("dialinUrl", DialinUrl); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AudioRoutingGroup.cs b/src/Microsoft.Graph/Generated/Models/AudioRoutingGroup.cs index b9c74a24a33..59adab29316 100644 --- a/src/Microsoft.Graph/Generated/Models/AudioRoutingGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/AudioRoutingGroup.cs @@ -57,7 +57,7 @@ public List Sources /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AudioRoutingGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AudioRoutingGroup(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("receivers", Receivers); writer.WriteEnumValue("routingMode", RoutingMode); diff --git a/src/Microsoft.Graph/Generated/Models/AudioRoutingGroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AudioRoutingGroupCollectionResponse.cs index 0953654a9f1..fc2e1157fed 100644 --- a/src/Microsoft.Graph/Generated/Models/AudioRoutingGroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AudioRoutingGroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AudioRoutingGroupCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AudioRoutingGroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AudioRoutingGroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuditActivityInitiator.cs b/src/Microsoft.Graph/Generated/Models/AuditActivityInitiator.cs index d35feee21a9..94a5b46f1fe 100644 --- a/src/Microsoft.Graph/Generated/Models/AuditActivityInitiator.cs +++ b/src/Microsoft.Graph/Generated/Models/AuditActivityInitiator.cs @@ -100,7 +100,7 @@ public AuditActivityInitiator() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuditActivityInitiator CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuditActivityInitiator(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("app", App); writer.WriteObjectValue("linkableIdentifiers", LinkableIdentifiers); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AuditActor.cs b/src/Microsoft.Graph/Generated/Models/AuditActor.cs index deaba31ef55..35b65aa865d 100644 --- a/src/Microsoft.Graph/Generated/Models/AuditActor.cs +++ b/src/Microsoft.Graph/Generated/Models/AuditActor.cs @@ -245,7 +245,7 @@ public AuditActor() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuditActor CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuditActor(); } /// @@ -277,7 +277,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applicationDisplayName", ApplicationDisplayName); writer.WriteStringValue("applicationId", ApplicationId); writer.WriteStringValue("auditActorType", AuditActorType); diff --git a/src/Microsoft.Graph/Generated/Models/AuditEvent.cs b/src/Microsoft.Graph/Generated/Models/AuditEvent.cs index 5d638249a3f..640be928bf8 100644 --- a/src/Microsoft.Graph/Generated/Models/AuditEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/AuditEvent.cs @@ -176,7 +176,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuditEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuditEvent(); } /// @@ -206,7 +206,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("activity", Activity); writer.WriteDateTimeOffsetValue("activityDateTime", ActivityDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/AuditEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuditEventCollectionResponse.cs index 129b9056945..8ce4405dcf6 100644 --- a/src/Microsoft.Graph/Generated/Models/AuditEventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuditEventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuditEventCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuditEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuditEventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuditLogRoot.cs b/src/Microsoft.Graph/Generated/Models/AuditLogRoot.cs index ef9ef216d93..5c3cac1413b 100644 --- a/src/Microsoft.Graph/Generated/Models/AuditLogRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/AuditLogRoot.cs @@ -148,7 +148,7 @@ public AuditLogRoot() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuditLogRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuditLogRoot(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("customSecurityAttributeAudits", CustomSecurityAttributeAudits); writer.WriteCollectionOfObjectValues("directoryAudits", DirectoryAudits); writer.WriteCollectionOfObjectValues("directoryProvisioning", DirectoryProvisioning); diff --git a/src/Microsoft.Graph/Generated/Models/AuditProperty.cs b/src/Microsoft.Graph/Generated/Models/AuditProperty.cs index afdf70e9859..e88f705bb67 100644 --- a/src/Microsoft.Graph/Generated/Models/AuditProperty.cs +++ b/src/Microsoft.Graph/Generated/Models/AuditProperty.cs @@ -101,7 +101,7 @@ public AuditProperty() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuditProperty CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuditProperty(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("newValue", NewValue); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AuditResource.cs b/src/Microsoft.Graph/Generated/Models/AuditResource.cs index d9a4b385cea..d12fc2132e8 100644 --- a/src/Microsoft.Graph/Generated/Models/AuditResource.cs +++ b/src/Microsoft.Graph/Generated/Models/AuditResource.cs @@ -133,7 +133,7 @@ public AuditResource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuditResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuditResource(); } /// @@ -158,7 +158,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("auditResourceType", AuditResourceType); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfObjectValues("modifiedProperties", ModifiedProperties); diff --git a/src/Microsoft.Graph/Generated/Models/AuditUserIdentity.cs b/src/Microsoft.Graph/Generated/Models/AuditUserIdentity.cs index 65e10fdebb3..1418948f6f9 100644 --- a/src/Microsoft.Graph/Generated/Models/AuditUserIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/AuditUserIdentity.cs @@ -58,7 +58,7 @@ public AuditUserIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuditUserIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuditUserIdentity(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("homeTenantId", HomeTenantId); writer.WriteStringValue("homeTenantName", HomeTenantName); diff --git a/src/Microsoft.Graph/Generated/Models/Authentication.cs b/src/Microsoft.Graph/Generated/Models/Authentication.cs index 887cff13254..37b04491380 100644 --- a/src/Microsoft.Graph/Generated/Models/Authentication.cs +++ b/src/Microsoft.Graph/Generated/Models/Authentication.cs @@ -291,7 +291,7 @@ public partial class Authentication : global::Microsoft.Graph.Beta.Models.Entity /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Authentication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Authentication(); } /// @@ -327,7 +327,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("emailMethods", EmailMethods); writer.WriteCollectionOfObjectValues("externalAuthenticationMethods", ExternalAuthenticationMethods); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationAppDeviceDetails.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationAppDeviceDetails.cs index 6abe4938602..471e36bade0 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationAppDeviceDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationAppDeviceDetails.cs @@ -116,7 +116,7 @@ public AuthenticationAppDeviceDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationAppDeviceDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationAppDeviceDetails(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appVersion", AppVersion); writer.WriteStringValue("clientApp", ClientApp); writer.WriteStringValue("deviceId", DeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationAppPolicyDetails.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationAppPolicyDetails.cs index 7f21791bce4..0daed5ffcbc 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationAppPolicyDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationAppPolicyDetails.cs @@ -86,7 +86,7 @@ public AuthenticationAppPolicyDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationAppPolicyDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationAppPolicyDetails(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("adminConfiguration", AdminConfiguration); writer.WriteEnumValue("authenticationEvaluation", AuthenticationEvaluation); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionInputConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionInputConfiguration.cs index 86d7114b6eb..a315c7b7063 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionInputConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionInputConfiguration.cs @@ -162,7 +162,7 @@ public AuthenticationAttributeCollectionInputConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationAttributeCollectionInputConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationAttributeCollectionInputConfiguration(); } /// @@ -192,7 +192,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("attribute", Attribute); writer.WriteStringValue("defaultValue", DefaultValue); writer.WriteBoolValue("editable", Editable); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionOptionConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionOptionConfiguration.cs index d26605a0d5d..7bff1e3d1d8 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionOptionConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionOptionConfiguration.cs @@ -84,7 +84,7 @@ public AuthenticationAttributeCollectionOptionConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationAttributeCollectionOptionConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationAttributeCollectionOptionConfiguration(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("label", Label); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionPage.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionPage.cs index 7e082a171f2..a0a73348811 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionPage.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionPage.cs @@ -84,7 +84,7 @@ public AuthenticationAttributeCollectionPage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationAttributeCollectionPage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationAttributeCollectionPage(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("customStringsFileId", CustomStringsFileId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("views", Views); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionPageViewConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionPageViewConfiguration.cs index ea662e41318..5607bb167c8 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionPageViewConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationAttributeCollectionPageViewConfiguration.cs @@ -100,7 +100,7 @@ public AuthenticationAttributeCollectionPageViewConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationAttributeCollectionPageViewConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationAttributeCollectionPageViewConfiguration(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteCollectionOfObjectValues("inputs", Inputs); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationBehaviors.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationBehaviors.cs index d6494fbec49..a17714b9ec4 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationBehaviors.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationBehaviors.cs @@ -70,7 +70,7 @@ public AuthenticationBehaviors() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationBehaviors CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationBehaviors(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("blockAzureADGraphAccess", BlockAzureADGraphAccess); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("removeUnverifiedEmailClaim", RemoveUnverifiedEmailClaim); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationCombinationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationCombinationConfiguration.cs index 26ccd8f1057..68087b95b69 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationCombinationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationCombinationConfiguration.cs @@ -35,7 +35,7 @@ public partial class AuthenticationCombinationConfiguration : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -61,7 +61,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfEnumValues("appliesToCombinations", AppliesToCombinations); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationCombinationConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationCombinationConfigurationCollectionResponse.cs index cd19d93be77..8537df14072 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationCombinationConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationCombinationConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthenticationCombinationConfigurationCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationConditionApplication.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationConditionApplication.cs index 3d5a8f0ed6f..88fb02533a0 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationConditionApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationConditionApplication.cs @@ -68,7 +68,7 @@ public AuthenticationConditionApplication() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationConditionApplication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationConditionApplication(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationConditionApplicationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationConditionApplicationCollectionResponse.cs index 42fdeb52cb3..e9d657cdc59 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationConditionApplicationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationConditionApplicationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthenticationConditionApplicationCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationConditionApplicationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationConditionApplicationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationConditions.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationConditions.cs index f07be014b2d..39c39f69dce 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationConditions.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationConditions.cs @@ -68,7 +68,7 @@ public AuthenticationConditions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationConditions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationConditions(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("applications", Applications); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationConditionsApplications.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationConditionsApplications.cs index 1f281c660a3..0c0eb0b70a4 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationConditionsApplications.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationConditionsApplications.cs @@ -74,7 +74,7 @@ public AuthenticationConditionsApplications() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationConditionsApplications CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationConditionsApplications(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("includeAllApplications", IncludeAllApplications); writer.WriteCollectionOfObjectValues("includeApplications", IncludeApplications); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationConfigurationValidation.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationConfigurationValidation.cs index 88e0e9a07c1..b03b2f17e7f 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationConfigurationValidation.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationConfigurationValidation.cs @@ -84,7 +84,7 @@ public AuthenticationConfigurationValidation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationConfigurationValidation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationConfigurationValidation(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("errors", Errors); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("warnings", Warnings); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationContext.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationContext.cs index 4eeb8bb8004..1b0b3e51a7f 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationContext.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationContext.cs @@ -74,7 +74,7 @@ public AuthenticationContext() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationContext CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationContext(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("detail", Detail); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationContextClassReference.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationContextClassReference.cs index 289903ec335..c6e12f50843 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationContextClassReference.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationContextClassReference.cs @@ -57,7 +57,7 @@ public bool? IsAvailable /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationContextClassReference CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationContextClassReference(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationContextClassReferenceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationContextClassReferenceCollectionResponse.cs index e0df369dc39..39509949af9 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationContextClassReferenceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationContextClassReferenceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthenticationContextClassReferenceCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationContextClassReferenceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationContextClassReferenceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationDetail.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationDetail.cs index ed87df76632..3c5fc20b339 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationDetail.cs @@ -128,7 +128,7 @@ public AuthenticationDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationDetail(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("authenticationMethod", AuthenticationMethod); writer.WriteStringValue("authenticationMethodDetail", AuthenticationMethodDetail); writer.WriteDateTimeOffsetValue("authenticationStepDateTime", AuthenticationStepDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationEventHandlerResult.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationEventHandlerResult.cs index d830e937a4e..6433c5c8968 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationEventHandlerResult.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationEventHandlerResult.cs @@ -52,7 +52,7 @@ public AuthenticationEventHandlerResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationEventHandlerResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationEventListener.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationEventListener.cs index ea8997c4720..18a801ca417 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationEventListener.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationEventListener.cs @@ -57,7 +57,7 @@ public int? Priority /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationEventListener CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -92,7 +92,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("authenticationEventsFlowId", AuthenticationEventsFlowId); writer.WriteObjectValue("conditions", Conditions); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationEventListenerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationEventListenerCollectionResponse.cs index b181e0ec072..ad4f9414498 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationEventListenerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationEventListenerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthenticationEventListenerCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationEventListenerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationEventListenerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationEventsFlow.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationEventsFlow.cs index 3fb4e663205..5fde0abe3ff 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationEventsFlow.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationEventsFlow.cs @@ -73,7 +73,7 @@ public int? Priority /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationEventsFlow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("conditions", Conditions); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationEventsFlowCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationEventsFlowCollectionResponse.cs index 5d61f720f2c..9673f7ec384 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationEventsFlowCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationEventsFlowCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthenticationEventsFlowCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationEventsFlowCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationEventsFlowCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationEventsPolicy.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationEventsPolicy.cs index 5a299480ce0..fd2d47d8340 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationEventsPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationEventsPolicy.cs @@ -35,7 +35,7 @@ public partial class AuthenticationEventsPolicy : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationEventsPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationEventsPolicy(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("onSignupStart", OnSignupStart); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationFailure.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationFailure.cs index 43ae72e0171..391778c936e 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationFailure.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationFailure.cs @@ -47,7 +47,7 @@ public string Reason /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationFailure CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationFailure(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("count", Count); writer.WriteStringValue("reason", Reason); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationFlowsPolicy.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationFlowsPolicy.cs index f33928d402e..5db3273ad34 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationFlowsPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationFlowsPolicy.cs @@ -67,7 +67,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationFlowsPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationFlowsPolicy(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationListener.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationListener.cs index 2c2aa6d0f52..f9f29777212 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationListener.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationListener.cs @@ -41,7 +41,7 @@ public int? Priority /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationListener CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("priority", Priority); writer.WriteObjectValue("sourceFilter", SourceFilter); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethod.cs index a43b27a9a01..5a9700845f1 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethod.cs @@ -25,7 +25,7 @@ public DateTimeOffset? CreatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodCollectionResponse.cs index b846e4c3ab3..80a26b78c32 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthenticationMethodCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodConfiguration.cs index df48d63ffbc..f519e44babb 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodConfiguration.cs @@ -41,7 +41,7 @@ public partial class AuthenticationMethodConfiguration : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("excludeTargets", ExcludeTargets); writer.WriteEnumValue("state", State); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodConfigurationCollectionResponse.cs index 6d256c4c04c..00b1541ee66 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthenticationMethodConfigurationCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodDevice.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodDevice.cs index c129c71c31e..c1c50276e28 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodDevice.cs @@ -51,7 +51,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationMethodDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfObjectValues("hardwareOathDevices", HardwareOathDevices); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodDeviceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodDeviceCollectionResponse.cs index 73aa753456a..1d011592d6a 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodDeviceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodDeviceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthenticationMethodDeviceCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationMethodDeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationMethodDeviceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodFeatureConfiguration.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodFeatureConfiguration.cs index 1f169f46703..8f437b3004d 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodFeatureConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodFeatureConfiguration.cs @@ -90,7 +90,7 @@ public AuthenticationMethodFeatureConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationMethodFeatureConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationMethodFeatureConfiguration(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("excludeTarget", ExcludeTarget); writer.WriteObjectValue("includeTarget", IncludeTarget); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodModeDetail.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodModeDetail.cs index 868d9668d9e..7a7e8ea859c 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodModeDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodModeDetail.cs @@ -41,7 +41,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationMethodModeDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationMethodModeDetail(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodModeDetailCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodModeDetailCollectionResponse.cs index 967dd1795b2..9fdbbbf6780 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodModeDetailCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodModeDetailCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthenticationMethodModeDetailCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationMethodModeDetailCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationMethodModeDetailCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodTarget.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodTarget.cs index 024fc7d81ba..d5eb101497a 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodTarget.cs @@ -31,7 +31,7 @@ public bool? IsRegistrationRequired /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationMethodTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isRegistrationRequired", IsRegistrationRequired); writer.WriteEnumValue("targetType", TargetType); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsPolicy.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsPolicy.cs index cd7dfe7d12a..de7c49d3ff3 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsPolicy.cs @@ -165,7 +165,7 @@ public int? ReconfirmationInDays /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationMethodsPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationMethodsPolicy(); } /// @@ -195,7 +195,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("authenticationMethodConfigurations", AuthenticationMethodConfigurations); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRegistrationCampaign.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRegistrationCampaign.cs index b095ab9b5b6..e93294da628 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRegistrationCampaign.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRegistrationCampaign.cs @@ -102,7 +102,7 @@ public AuthenticationMethodsRegistrationCampaign() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationMethodsRegistrationCampaign CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationMethodsRegistrationCampaign(); } /// @@ -127,7 +127,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("enforceRegistrationAfterAllowedSnoozes", EnforceRegistrationAfterAllowedSnoozes); writer.WriteCollectionOfObjectValues("excludeTargets", ExcludeTargets); writer.WriteCollectionOfObjectValues("includeTargets", IncludeTargets); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRegistrationCampaignIncludeTarget.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRegistrationCampaignIncludeTarget.cs index b09bdf18cc1..1beeee70554 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRegistrationCampaignIncludeTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRegistrationCampaignIncludeTarget.cs @@ -90,7 +90,7 @@ public AuthenticationMethodsRegistrationCampaignIncludeTarget() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationMethodsRegistrationCampaignIncludeTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationMethodsRegistrationCampaignIncludeTarget(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("targetedAuthenticationMethod", TargetedAuthenticationMethod); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRoot.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRoot.cs index b1c29af309d..d90ee675cd4 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationMethodsRoot.cs @@ -83,7 +83,7 @@ public partial class AuthenticationMethodsRoot : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationMethodsRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationMethodsRoot(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("userEventsSummary", UserEventsSummary); writer.WriteCollectionOfObjectValues("userMfaSignInSummary", UserMfaSignInSummary); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationRequirementPolicy.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationRequirementPolicy.cs index 73e7397c1a4..d57cd596ed2 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationRequirementPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationRequirementPolicy.cs @@ -74,7 +74,7 @@ public AuthenticationRequirementPolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationRequirementPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationRequirementPolicy(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("detail", Detail); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("requirementProvider", RequirementProvider); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationSourceFilter.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationSourceFilter.cs index 8c06daed580..c50bb42a45f 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationSourceFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationSourceFilter.cs @@ -68,7 +68,7 @@ public AuthenticationSourceFilter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationSourceFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationSourceFilter(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("includeApplications", IncludeApplications); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationStrength.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationStrength.cs index a160d63fb27..8548a14c9bc 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationStrength.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationStrength.cs @@ -90,7 +90,7 @@ public AuthenticationStrength() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationStrength CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationStrength(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("authenticationStrengthId", AuthenticationStrengthId); writer.WriteEnumValue("authenticationStrengthResult", AuthenticationStrengthResult); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthPolicy.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthPolicy.cs index 000e522b15d..d841125623b 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthPolicy.cs @@ -107,7 +107,7 @@ public DateTimeOffset? ModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicy(); } /// @@ -134,7 +134,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfEnumValues("allowedCombinations", AllowedCombinations); writer.WriteCollectionOfObjectValues("combinationConfigurations", CombinationConfigurations); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthPolicyCollectionResponse.cs index 45e94891a47..d74807dd05a 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthenticationStrengthPolicyCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthRoot.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthRoot.cs index 2dc9e55e1cc..ecc053e32de 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthRoot.cs @@ -83,7 +83,7 @@ public partial class AuthenticationStrengthRoot : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationStrengthRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationStrengthRoot(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfEnumValues("authenticationCombinations", AuthenticationCombinations); writer.WriteCollectionOfObjectValues("authenticationMethodModes", AuthenticationMethodModes); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthUsage.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthUsage.cs index 4097a42b65e..141c42db301 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthUsage.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationStrengthUsage.cs @@ -52,7 +52,7 @@ public AuthenticationStrengthUsage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthenticationStrengthUsage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationStrengthUsage(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationsMetric.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationsMetric.cs index 41931b73ff7..5be697866b6 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationsMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationsMetric.cs @@ -166,7 +166,7 @@ public long? SuccessCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationsMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationsMetric(); } /// @@ -196,7 +196,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appid", Appid); writer.WriteLongValue("attemptsCount", AttemptsCount); diff --git a/src/Microsoft.Graph/Generated/Models/AuthenticationsMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuthenticationsMetricCollectionResponse.cs index 2a1a0560973..13ba4d2d124 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthenticationsMetricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthenticationsMetricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthenticationsMetricCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthenticationsMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthenticationsMetricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthoredNote.cs b/src/Microsoft.Graph/Generated/Models/AuthoredNote.cs index 48153405744..e89cf4f0a87 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthoredNote.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthoredNote.cs @@ -57,7 +57,7 @@ public DateTimeOffset? CreatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthoredNote CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthoredNote(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("author", Author); writer.WriteObjectValue("content", Content); diff --git a/src/Microsoft.Graph/Generated/Models/AuthoredNoteCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuthoredNoteCollectionResponse.cs index 90efb0f4a30..160fca52621 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthoredNoteCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthoredNoteCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthoredNoteCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthoredNoteCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthoredNoteCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthorizationInfo.cs b/src/Microsoft.Graph/Generated/Models/AuthorizationInfo.cs index dc920ba8522..69846ec712c 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthorizationInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthorizationInfo.cs @@ -68,7 +68,7 @@ public AuthorizationInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthorizationInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthorizationInfo(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("certificateUserIds", CertificateUserIds); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AuthorizationPolicy.cs b/src/Microsoft.Graph/Generated/Models/AuthorizationPolicy.cs index 1d70499fa88..f5d936d0158 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthorizationPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthorizationPolicy.cs @@ -132,7 +132,7 @@ public AuthorizationPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthorizationPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthorizationPolicy(); } /// @@ -162,7 +162,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowedToSignUpEmailBasedSubscriptions", AllowedToSignUpEmailBasedSubscriptions); writer.WriteBoolValue("allowedToUseSSPR", AllowedToUseSSPR); diff --git a/src/Microsoft.Graph/Generated/Models/AuthorizationPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuthorizationPolicyCollectionResponse.cs index 3d4d915cbed..e1b1fd84618 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthorizationPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthorizationPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthorizationPolicyCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthorizationPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthorizationPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthorizationSystem.cs b/src/Microsoft.Graph/Generated/Models/AuthorizationSystem.cs index 9180466daa7..02cc2022d15 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthorizationSystem.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthorizationSystem.cs @@ -83,7 +83,7 @@ public string AuthorizationSystemType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthorizationSystem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("authorizationSystemId", AuthorizationSystemId); writer.WriteStringValue("authorizationSystemName", AuthorizationSystemName); diff --git a/src/Microsoft.Graph/Generated/Models/AuthorizationSystemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AuthorizationSystemCollectionResponse.cs index a24a71a1cc4..eff882a2919 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthorizationSystemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthorizationSystemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthorizationSystemCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthorizationSystemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthorizationSystemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/AuthorizationSystemIdentity.cs b/src/Microsoft.Graph/Generated/Models/AuthorizationSystemIdentity.cs index 6985edfb8a5..6e5fd14d15a 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthorizationSystemIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthorizationSystemIdentity.cs @@ -83,7 +83,7 @@ public string ExternalId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthorizationSystemIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -128,7 +128,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("authorizationSystem", AuthorizationSystem); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AuthorizationSystemIdentitySource.cs b/src/Microsoft.Graph/Generated/Models/AuthorizationSystemIdentitySource.cs index 5db2ddcbd9a..a0d3170f8ec 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthorizationSystemIdentitySource.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthorizationSystemIdentitySource.cs @@ -68,7 +68,7 @@ public AuthorizationSystemIdentitySource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthorizationSystemIdentitySource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -98,7 +98,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("identityProviderType", IdentityProviderType); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AuthorizationSystemInfo.cs b/src/Microsoft.Graph/Generated/Models/AuthorizationSystemInfo.cs index 1074573bc14..5345090ce1d 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthorizationSystemInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthorizationSystemInfo.cs @@ -90,7 +90,7 @@ public AuthorizationSystemInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AuthorizationSystemInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthorizationSystemInfo(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("authorizationSystemType", AuthorizationSystemType); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/AuthorizationSystemResource.cs b/src/Microsoft.Graph/Generated/Models/AuthorizationSystemResource.cs index fd0acd274bc..821be2c0061 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthorizationSystemResource.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthorizationSystemResource.cs @@ -83,7 +83,7 @@ public string ResourceType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthorizationSystemResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("authorizationSystem", AuthorizationSystem); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AuthorizationSystemTypeAction.cs b/src/Microsoft.Graph/Generated/Models/AuthorizationSystemTypeAction.cs index b4d7f98c27d..b81d9a23879 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthorizationSystemTypeAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthorizationSystemTypeAction.cs @@ -63,7 +63,7 @@ public List ResourceTypes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthorizationSystemTypeAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("actionType", ActionType); writer.WriteStringValue("externalId", ExternalId); diff --git a/src/Microsoft.Graph/Generated/Models/AuthorizationSystemTypeService.cs b/src/Microsoft.Graph/Generated/Models/AuthorizationSystemTypeService.cs index 16c641f429d..e4e4ab5b688 100644 --- a/src/Microsoft.Graph/Generated/Models/AuthorizationSystemTypeService.cs +++ b/src/Microsoft.Graph/Generated/Models/AuthorizationSystemTypeService.cs @@ -35,7 +35,7 @@ public partial class AuthorizationSystemTypeService : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AuthorizationSystemTypeService CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AuthorizationSystemTypeService(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("actions", Actions); } diff --git a/src/Microsoft.Graph/Generated/Models/AutoReviewSettings.cs b/src/Microsoft.Graph/Generated/Models/AutoReviewSettings.cs index 05b15c9c9a1..1337d020b6e 100644 --- a/src/Microsoft.Graph/Generated/Models/AutoReviewSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/AutoReviewSettings.cs @@ -68,7 +68,7 @@ public AutoReviewSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AutoReviewSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AutoReviewSettings(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("notReviewedResult", NotReviewedResult); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/AutomaticRepliesMailTips.cs b/src/Microsoft.Graph/Generated/Models/AutomaticRepliesMailTips.cs index 93286fceedb..1efe0b43e3d 100644 --- a/src/Microsoft.Graph/Generated/Models/AutomaticRepliesMailTips.cs +++ b/src/Microsoft.Graph/Generated/Models/AutomaticRepliesMailTips.cs @@ -116,7 +116,7 @@ public AutomaticRepliesMailTips() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AutomaticRepliesMailTips CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AutomaticRepliesMailTips(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("message", Message); writer.WriteObjectValue("messageLanguage", MessageLanguage); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AutomaticRepliesSetting.cs b/src/Microsoft.Graph/Generated/Models/AutomaticRepliesSetting.cs index fe7c140eca8..dda2824b3a2 100644 --- a/src/Microsoft.Graph/Generated/Models/AutomaticRepliesSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/AutomaticRepliesSetting.cs @@ -128,7 +128,7 @@ public AutomaticRepliesSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AutomaticRepliesSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AutomaticRepliesSetting(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("externalAudience", ExternalAudience); writer.WriteStringValue("externalReplyMessage", ExternalReplyMessage); writer.WriteStringValue("internalReplyMessage", InternalReplyMessage); diff --git a/src/Microsoft.Graph/Generated/Models/AvailabilityItem.cs b/src/Microsoft.Graph/Generated/Models/AvailabilityItem.cs index 577e742afe7..48ccbc7909d 100644 --- a/src/Microsoft.Graph/Generated/Models/AvailabilityItem.cs +++ b/src/Microsoft.Graph/Generated/Models/AvailabilityItem.cs @@ -106,7 +106,7 @@ public AvailabilityItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AvailabilityItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AvailabilityItem(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("endDateTime", EndDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("serviceId", ServiceId); diff --git a/src/Microsoft.Graph/Generated/Models/AverageComparativeScore.cs b/src/Microsoft.Graph/Generated/Models/AverageComparativeScore.cs index 5e6b6c9abcd..57e2973ff32 100644 --- a/src/Microsoft.Graph/Generated/Models/AverageComparativeScore.cs +++ b/src/Microsoft.Graph/Generated/Models/AverageComparativeScore.cs @@ -74,7 +74,7 @@ public AverageComparativeScore() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AverageComparativeScore CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AverageComparativeScore(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDoubleValue("averageScore", AverageScore); writer.WriteStringValue("basis", Basis); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AwsAccessKey.cs b/src/Microsoft.Graph/Generated/Models/AwsAccessKey.cs index e9ea9486020..f849e967520 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsAccessKey.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsAccessKey.cs @@ -42,7 +42,7 @@ public AwsAccessKey() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsAccessKey CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsAccessKey(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("owner", Owner); } diff --git a/src/Microsoft.Graph/Generated/Models/AwsAccessKeyDetails.cs b/src/Microsoft.Graph/Generated/Models/AwsAccessKeyDetails.cs index 284b0e01944..fd37459b17d 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsAccessKeyDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsAccessKeyDetails.cs @@ -64,7 +64,7 @@ public AwsAccessKeyDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AwsAccessKeyDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsAccessKeyDetails(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("lastUsedDateTime", LastUsedDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AwsActionsPermissionsDefinitionAction.cs b/src/Microsoft.Graph/Generated/Models/AwsActionsPermissionsDefinitionAction.cs index b206ea1e82c..0334a06bfeb 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsActionsPermissionsDefinitionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsActionsPermissionsDefinitionAction.cs @@ -58,7 +58,7 @@ public AwsActionsPermissionsDefinitionAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsActionsPermissionsDefinitionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsActionsPermissionsDefinitionAction(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assignToRoleId", AssignToRoleId); writer.WriteCollectionOfObjectValues("statements", Statements); diff --git a/src/Microsoft.Graph/Generated/Models/AwsAssociatedIdentities.cs b/src/Microsoft.Graph/Generated/Models/AwsAssociatedIdentities.cs index e5686a383ff..9890d4766f2 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsAssociatedIdentities.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsAssociatedIdentities.cs @@ -100,7 +100,7 @@ public AwsAssociatedIdentities() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AwsAssociatedIdentities CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsAssociatedIdentities(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("all", All); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("roles", Roles); diff --git a/src/Microsoft.Graph/Generated/Models/AwsAuthorizationSystem.cs b/src/Microsoft.Graph/Generated/Models/AwsAuthorizationSystem.cs index cc013b22b92..16442a87b97 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsAuthorizationSystem.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsAuthorizationSystem.cs @@ -106,7 +106,7 @@ public AwsAuthorizationSystem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsAuthorizationSystem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsAuthorizationSystem(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("actions", Actions); writer.WriteObjectValue("associatedIdentities", AssociatedIdentities); diff --git a/src/Microsoft.Graph/Generated/Models/AwsAuthorizationSystemResource.cs b/src/Microsoft.Graph/Generated/Models/AwsAuthorizationSystemResource.cs index 698e3bb5bb0..d48cbc2a76a 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsAuthorizationSystemResource.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsAuthorizationSystemResource.cs @@ -42,7 +42,7 @@ public AwsAuthorizationSystemResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsAuthorizationSystemResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsAuthorizationSystemResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("service", Service); } diff --git a/src/Microsoft.Graph/Generated/Models/AwsAuthorizationSystemTypeAction.cs b/src/Microsoft.Graph/Generated/Models/AwsAuthorizationSystemTypeAction.cs index 4f741ea4609..ddc7cd834d1 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsAuthorizationSystemTypeAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsAuthorizationSystemTypeAction.cs @@ -35,7 +35,7 @@ public partial class AwsAuthorizationSystemTypeAction : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsAuthorizationSystemTypeAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsAuthorizationSystemTypeAction(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("service", Service); } diff --git a/src/Microsoft.Graph/Generated/Models/AwsCondition.cs b/src/Microsoft.Graph/Generated/Models/AwsCondition.cs index e81d3f389e9..9c88ccbbcf9 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsCondition.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsCondition.cs @@ -52,7 +52,7 @@ public AwsCondition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AwsCondition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsCondition(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/AwsEc2Instance.cs b/src/Microsoft.Graph/Generated/Models/AwsEc2Instance.cs index 56bf1de17a8..6a22316980b 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsEc2Instance.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsEc2Instance.cs @@ -42,7 +42,7 @@ public AwsEc2Instance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsEc2Instance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsEc2Instance(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("resource", Resource); } diff --git a/src/Microsoft.Graph/Generated/Models/AwsExternalSystemAccessFinding.cs b/src/Microsoft.Graph/Generated/Models/AwsExternalSystemAccessFinding.cs index a17f7f4dad0..679b5972913 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsExternalSystemAccessFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsExternalSystemAccessFinding.cs @@ -69,7 +69,7 @@ public bool? TrustsAllIdentities /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsExternalSystemAccessFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsExternalSystemAccessFinding(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessMethods", AccessMethods); writer.WriteObjectValue("affectedSystem", AffectedSystem); diff --git a/src/Microsoft.Graph/Generated/Models/AwsExternalSystemAccessRoleFinding.cs b/src/Microsoft.Graph/Generated/Models/AwsExternalSystemAccessRoleFinding.cs index 237ee1269d0..c4273d3fb34 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsExternalSystemAccessRoleFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsExternalSystemAccessRoleFinding.cs @@ -67,7 +67,7 @@ public List AccessibleSystemIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsExternalSystemAccessRoleFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsExternalSystemAccessRoleFinding(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("accessibleSystemIds", AccessibleSystemIds); writer.WriteObjectValue("permissionsCreepIndex", PermissionsCreepIndex); diff --git a/src/Microsoft.Graph/Generated/Models/AwsGroup.cs b/src/Microsoft.Graph/Generated/Models/AwsGroup.cs index 2591c918861..4913aebd492 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsGroup.cs @@ -26,7 +26,7 @@ public AwsGroup() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsGroup(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AwsIdentity.cs b/src/Microsoft.Graph/Generated/Models/AwsIdentity.cs index 8e7150c1f05..d3179386cc2 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsIdentity.cs @@ -26,7 +26,7 @@ public AwsIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AwsIdentityAccessManagementKeyAgeFinding.cs b/src/Microsoft.Graph/Generated/Models/AwsIdentityAccessManagementKeyAgeFinding.cs index 3d470e653d6..ce6f3ee160a 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsIdentityAccessManagementKeyAgeFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsIdentityAccessManagementKeyAgeFinding.cs @@ -89,7 +89,7 @@ public partial class AwsIdentityAccessManagementKeyAgeFinding : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsIdentityAccessManagementKeyAgeFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsIdentityAccessManagementKeyAgeFinding(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("accessKey", AccessKey); writer.WriteObjectValue("actionSummary", ActionSummary); diff --git a/src/Microsoft.Graph/Generated/Models/AwsIdentityAccessManagementKeyUsageFinding.cs b/src/Microsoft.Graph/Generated/Models/AwsIdentityAccessManagementKeyUsageFinding.cs index 084bd7e45ff..6c1f255eac5 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsIdentityAccessManagementKeyUsageFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsIdentityAccessManagementKeyUsageFinding.cs @@ -89,7 +89,7 @@ public partial class AwsIdentityAccessManagementKeyUsageFinding : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsIdentityAccessManagementKeyUsageFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsIdentityAccessManagementKeyUsageFinding(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("accessKey", AccessKey); writer.WriteObjectValue("actionSummary", ActionSummary); diff --git a/src/Microsoft.Graph/Generated/Models/AwsIdentitySource.cs b/src/Microsoft.Graph/Generated/Models/AwsIdentitySource.cs index 7fa637d8ca1..44ec5b38bc5 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsIdentitySource.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsIdentitySource.cs @@ -42,7 +42,7 @@ public AwsIdentitySource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsIdentitySource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsIdentitySource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("authorizationSystemInfo", AuthorizationSystemInfo); } diff --git a/src/Microsoft.Graph/Generated/Models/AwsLambda.cs b/src/Microsoft.Graph/Generated/Models/AwsLambda.cs index a14a8edac45..bb9bbe5239e 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsLambda.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsLambda.cs @@ -42,7 +42,7 @@ public AwsLambda() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsLambda CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsLambda(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("resource", Resource); } diff --git a/src/Microsoft.Graph/Generated/Models/AwsPermissionsDefinition.cs b/src/Microsoft.Graph/Generated/Models/AwsPermissionsDefinition.cs index 3eea1432016..8a9aff559a6 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsPermissionsDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsPermissionsDefinition.cs @@ -42,7 +42,7 @@ public AwsPermissionsDefinition() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsPermissionsDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsPermissionsDefinition(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("actionInfo", ActionInfo); } diff --git a/src/Microsoft.Graph/Generated/Models/AwsPermissionsDefinitionAction.cs b/src/Microsoft.Graph/Generated/Models/AwsPermissionsDefinitionAction.cs index 22b6359c30f..8426bcf5c73 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsPermissionsDefinitionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsPermissionsDefinitionAction.cs @@ -26,7 +26,7 @@ public AwsPermissionsDefinitionAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsPermissionsDefinitionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -51,7 +51,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AwsPolicy.cs b/src/Microsoft.Graph/Generated/Models/AwsPolicy.cs index 33752ebc49e..69148c14fe2 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsPolicy.cs @@ -57,7 +57,7 @@ public string ExternalId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsPolicy(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("awsPolicyType", AwsPolicyType); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/AwsPolicyPermissionsDefinitionAction.cs b/src/Microsoft.Graph/Generated/Models/AwsPolicyPermissionsDefinitionAction.cs index a134ebe2382..e812bd1a5cc 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsPolicyPermissionsDefinitionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsPolicyPermissionsDefinitionAction.cs @@ -58,7 +58,7 @@ public AwsPolicyPermissionsDefinitionAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsPolicyPermissionsDefinitionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsPolicyPermissionsDefinitionAction(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assignToRoleId", AssignToRoleId); writer.WriteCollectionOfObjectValues("policies", Policies); diff --git a/src/Microsoft.Graph/Generated/Models/AwsRole.cs b/src/Microsoft.Graph/Generated/Models/AwsRole.cs index 20ed791aa10..3a38bdde4ad 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsRole.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsRole.cs @@ -38,7 +38,7 @@ public AwsRole() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsRole CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsRole(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("roleType", RoleType); writer.WriteEnumValue("trustEntityType", TrustEntityType); diff --git a/src/Microsoft.Graph/Generated/Models/AwsSecretInformationAccessFinding.cs b/src/Microsoft.Graph/Generated/Models/AwsSecretInformationAccessFinding.cs index 6b6d81c2031..35e03a1bad4 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsSecretInformationAccessFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsSecretInformationAccessFinding.cs @@ -73,7 +73,7 @@ public partial class AwsSecretInformationAccessFinding : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsSecretInformationAccessFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -104,7 +104,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("identity", Identity); writer.WriteObjectValue("identityDetails", IdentityDetails); diff --git a/src/Microsoft.Graph/Generated/Models/AwsSecurityToolAdministrationFinding.cs b/src/Microsoft.Graph/Generated/Models/AwsSecurityToolAdministrationFinding.cs index da4618938e7..f9e3b031305 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsSecurityToolAdministrationFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsSecurityToolAdministrationFinding.cs @@ -73,7 +73,7 @@ public partial class AwsSecurityToolAdministrationFinding : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsSecurityToolAdministrationFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -104,7 +104,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("identity", Identity); writer.WriteObjectValue("identityDetails", IdentityDetails); diff --git a/src/Microsoft.Graph/Generated/Models/AwsSource.cs b/src/Microsoft.Graph/Generated/Models/AwsSource.cs index 979079d5af4..dd7ac4e150c 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsSource.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsSource.cs @@ -42,7 +42,7 @@ public AwsSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsSource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("accountId", AccountId); } diff --git a/src/Microsoft.Graph/Generated/Models/AwsStatement.cs b/src/Microsoft.Graph/Generated/Models/AwsStatement.cs index aa2e9100d78..696bbad0bf9 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsStatement.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsStatement.cs @@ -154,7 +154,7 @@ public AwsStatement() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AwsStatement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsStatement(); } /// @@ -181,7 +181,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("actions", Actions); writer.WriteObjectValue("condition", Condition); writer.WriteEnumValue("effect", Effect); diff --git a/src/Microsoft.Graph/Generated/Models/AwsUser.cs b/src/Microsoft.Graph/Generated/Models/AwsUser.cs index fbe03e17c9c..b80b830bc2c 100644 --- a/src/Microsoft.Graph/Generated/Models/AwsUser.cs +++ b/src/Microsoft.Graph/Generated/Models/AwsUser.cs @@ -42,7 +42,7 @@ public AwsUser() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AwsUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AwsUser(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assumableRoles", AssumableRoles); } diff --git a/src/Microsoft.Graph/Generated/Models/AzureADAuthentication.cs b/src/Microsoft.Graph/Generated/Models/AzureADAuthentication.cs index 47dc4245f5a..bf4ef135b92 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureADAuthentication.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureADAuthentication.cs @@ -35,7 +35,7 @@ public partial class AzureADAuthentication : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureADAuthentication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureADAuthentication(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("attainments", Attainments); } diff --git a/src/Microsoft.Graph/Generated/Models/AzureADJoinPolicy.cs b/src/Microsoft.Graph/Generated/Models/AzureADJoinPolicy.cs index 2d625039da7..f5bff1aef13 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureADJoinPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureADJoinPolicy.cs @@ -90,7 +90,7 @@ public AzureADJoinPolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AzureADJoinPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureADJoinPolicy(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("allowedToJoin", AllowedToJoin); writer.WriteBoolValue("isAdminConfigurable", IsAdminConfigurable); writer.WriteObjectValue("localAdmins", LocalAdmins); diff --git a/src/Microsoft.Graph/Generated/Models/AzureADRegistrationPolicy.cs b/src/Microsoft.Graph/Generated/Models/AzureADRegistrationPolicy.cs index d745a5235c9..6ae5c9b1236 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureADRegistrationPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureADRegistrationPolicy.cs @@ -74,7 +74,7 @@ public AzureADRegistrationPolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AzureADRegistrationPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureADRegistrationPolicy(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("allowedToRegister", AllowedToRegister); writer.WriteBoolValue("isAdminConfigurable", IsAdminConfigurable); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AzureADWindowsAutopilotDeploymentProfile.cs b/src/Microsoft.Graph/Generated/Models/AzureADWindowsAutopilotDeploymentProfile.cs index f2c356d878a..ee0f35cd43b 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureADWindowsAutopilotDeploymentProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureADWindowsAutopilotDeploymentProfile.cs @@ -27,7 +27,7 @@ public AzureADWindowsAutopilotDeploymentProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureADWindowsAutopilotDeploymentProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureADWindowsAutopilotDeploymentProfile(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AzureActionPermissionsDefinitionAction.cs b/src/Microsoft.Graph/Generated/Models/AzureActionPermissionsDefinitionAction.cs index fde332cfe00..c7fae1bd7c4 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureActionPermissionsDefinitionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureActionPermissionsDefinitionAction.cs @@ -42,7 +42,7 @@ public AzureActionPermissionsDefinitionAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureActionPermissionsDefinitionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureActionPermissionsDefinitionAction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("actions", Actions); } diff --git a/src/Microsoft.Graph/Generated/Models/AzureActiveDirectoryTenant.cs b/src/Microsoft.Graph/Generated/Models/AzureActiveDirectoryTenant.cs index 036735bb588..d06ae854756 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureActiveDirectoryTenant.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureActiveDirectoryTenant.cs @@ -58,7 +58,7 @@ public AzureActiveDirectoryTenant() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureActiveDirectoryTenant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureActiveDirectoryTenant(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("tenantId", TenantId); diff --git a/src/Microsoft.Graph/Generated/Models/AzureAdPopTokenAuthentication.cs b/src/Microsoft.Graph/Generated/Models/AzureAdPopTokenAuthentication.cs index b7e33bf89a1..b32486a5274 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureAdPopTokenAuthentication.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureAdPopTokenAuthentication.cs @@ -26,7 +26,7 @@ public AzureAdPopTokenAuthentication() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureAdPopTokenAuthentication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureAdPopTokenAuthentication(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AzureAdTokenAuthentication.cs b/src/Microsoft.Graph/Generated/Models/AzureAdTokenAuthentication.cs index 24bad7121e9..ff91674dc65 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureAdTokenAuthentication.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureAdTokenAuthentication.cs @@ -42,7 +42,7 @@ public AzureAdTokenAuthentication() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureAdTokenAuthentication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureAdTokenAuthentication(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("resourceId", ResourceId); } diff --git a/src/Microsoft.Graph/Generated/Models/AzureAssociatedIdentities.cs b/src/Microsoft.Graph/Generated/Models/AzureAssociatedIdentities.cs index ac2459fbca9..79a32abef35 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureAssociatedIdentities.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureAssociatedIdentities.cs @@ -116,7 +116,7 @@ public AzureAssociatedIdentities() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.AzureAssociatedIdentities CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureAssociatedIdentities(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("all", All); writer.WriteCollectionOfObjectValues("managedIdentities", ManagedIdentities); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/AzureAuthorizationSystem.cs b/src/Microsoft.Graph/Generated/Models/AzureAuthorizationSystem.cs index 7a6b10a7e0f..d09ca4a85de 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureAuthorizationSystem.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureAuthorizationSystem.cs @@ -106,7 +106,7 @@ public AzureAuthorizationSystem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureAuthorizationSystem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureAuthorizationSystem(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("actions", Actions); writer.WriteObjectValue("associatedIdentities", AssociatedIdentities); diff --git a/src/Microsoft.Graph/Generated/Models/AzureAuthorizationSystemResource.cs b/src/Microsoft.Graph/Generated/Models/AzureAuthorizationSystemResource.cs index 330a4415653..07c3a584f08 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureAuthorizationSystemResource.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureAuthorizationSystemResource.cs @@ -42,7 +42,7 @@ public AzureAuthorizationSystemResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureAuthorizationSystemResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureAuthorizationSystemResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("service", Service); } diff --git a/src/Microsoft.Graph/Generated/Models/AzureAuthorizationSystemTypeAction.cs b/src/Microsoft.Graph/Generated/Models/AzureAuthorizationSystemTypeAction.cs index 3a6f44e093d..c07b2b913a0 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureAuthorizationSystemTypeAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureAuthorizationSystemTypeAction.cs @@ -35,7 +35,7 @@ public partial class AzureAuthorizationSystemTypeAction : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureAuthorizationSystemTypeAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureAuthorizationSystemTypeAction(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("service", Service); } diff --git a/src/Microsoft.Graph/Generated/Models/AzureCommunicationServicesUserConversationMember.cs b/src/Microsoft.Graph/Generated/Models/AzureCommunicationServicesUserConversationMember.cs index 71e306fefa1..fce98a915c6 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureCommunicationServicesUserConversationMember.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureCommunicationServicesUserConversationMember.cs @@ -42,7 +42,7 @@ public AzureCommunicationServicesUserConversationMember() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureCommunicationServicesUserConversationMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureCommunicationServicesUserConversationMember(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("azureCommunicationServicesId", AzureCommunicationServicesId); } diff --git a/src/Microsoft.Graph/Generated/Models/AzureCommunicationServicesUserIdentity.cs b/src/Microsoft.Graph/Generated/Models/AzureCommunicationServicesUserIdentity.cs index 83cf3b2eedc..4765e60a9fc 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureCommunicationServicesUserIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureCommunicationServicesUserIdentity.cs @@ -42,7 +42,7 @@ public AzureCommunicationServicesUserIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureCommunicationServicesUserIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureCommunicationServicesUserIdentity(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("azureCommunicationServicesResourceId", AzureCommunicationServicesResourceId); } diff --git a/src/Microsoft.Graph/Generated/Models/AzureGroup.cs b/src/Microsoft.Graph/Generated/Models/AzureGroup.cs index 387d2905230..2340d3487b5 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureGroup.cs @@ -26,7 +26,7 @@ public AzureGroup() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureGroup(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AzureIdentity.cs b/src/Microsoft.Graph/Generated/Models/AzureIdentity.cs index 71e4db6ffec..79a188145b3 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureIdentity.cs @@ -26,7 +26,7 @@ public AzureIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -54,7 +54,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AzureManagedIdentity.cs b/src/Microsoft.Graph/Generated/Models/AzureManagedIdentity.cs index 835da350efb..d6f1b2ff6d4 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureManagedIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureManagedIdentity.cs @@ -26,7 +26,7 @@ public AzureManagedIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureManagedIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureManagedIdentity(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AzurePermissionsDefinitionAction.cs b/src/Microsoft.Graph/Generated/Models/AzurePermissionsDefinitionAction.cs index 1a029221ea8..68a07959bce 100644 --- a/src/Microsoft.Graph/Generated/Models/AzurePermissionsDefinitionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AzurePermissionsDefinitionAction.cs @@ -26,7 +26,7 @@ public AzurePermissionsDefinitionAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzurePermissionsDefinitionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -51,7 +51,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AzureRoleDefinition.cs b/src/Microsoft.Graph/Generated/Models/AzureRoleDefinition.cs index b354164a3b6..b910b04fe61 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureRoleDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureRoleDefinition.cs @@ -73,7 +73,7 @@ public string ExternalId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureRoleDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureRoleDefinition(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("assignableScopes", AssignableScopes); writer.WriteEnumValue("azureRoleDefinitionType", AzureRoleDefinitionType); diff --git a/src/Microsoft.Graph/Generated/Models/AzureRolePermissionsDefinitionAction.cs b/src/Microsoft.Graph/Generated/Models/AzureRolePermissionsDefinitionAction.cs index e6c66ddd1d9..eca38ee6c68 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureRolePermissionsDefinitionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureRolePermissionsDefinitionAction.cs @@ -42,7 +42,7 @@ public AzureRolePermissionsDefinitionAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureRolePermissionsDefinitionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureRolePermissionsDefinitionAction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("roles", Roles); } diff --git a/src/Microsoft.Graph/Generated/Models/AzureServerlessFunction.cs b/src/Microsoft.Graph/Generated/Models/AzureServerlessFunction.cs index 93389e26682..d668047da03 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureServerlessFunction.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureServerlessFunction.cs @@ -42,7 +42,7 @@ public AzureServerlessFunction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureServerlessFunction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureServerlessFunction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("resource", Resource); } diff --git a/src/Microsoft.Graph/Generated/Models/AzureServicePrincipal.cs b/src/Microsoft.Graph/Generated/Models/AzureServicePrincipal.cs index bdd4991f29a..20cb60bea2b 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureServicePrincipal.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureServicePrincipal.cs @@ -26,7 +26,7 @@ public AzureServicePrincipal() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureServicePrincipal CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureServicePrincipal(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/AzureSource.cs b/src/Microsoft.Graph/Generated/Models/AzureSource.cs index 9de4c502a47..fb86320806d 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureSource.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureSource.cs @@ -42,7 +42,7 @@ public AzureSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureSource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("subscriptionId", SubscriptionId); } diff --git a/src/Microsoft.Graph/Generated/Models/AzureUser.cs b/src/Microsoft.Graph/Generated/Models/AzureUser.cs index 6fb5d08e940..cc6328a0967 100644 --- a/src/Microsoft.Graph/Generated/Models/AzureUser.cs +++ b/src/Microsoft.Graph/Generated/Models/AzureUser.cs @@ -26,7 +26,7 @@ public AzureUser() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.AzureUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.AzureUser(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/B2cAuthenticationMethodsPolicy.cs b/src/Microsoft.Graph/Generated/Models/B2cAuthenticationMethodsPolicy.cs index 922813f3f76..e4fef59ffda 100644 --- a/src/Microsoft.Graph/Generated/Models/B2cAuthenticationMethodsPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/B2cAuthenticationMethodsPolicy.cs @@ -37,7 +37,7 @@ public bool? IsUserNameAuthenticationEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.B2cAuthenticationMethodsPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.B2cAuthenticationMethodsPolicy(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isEmailPasswordAuthenticationEnabled", IsEmailPasswordAuthenticationEnabled); writer.WriteBoolValue("isPhoneOneTimePasswordAuthenticationEnabled", IsPhoneOneTimePasswordAuthenticationEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/B2cIdentityUserFlow.cs b/src/Microsoft.Graph/Generated/Models/B2cIdentityUserFlow.cs index d50b5975f1e..b1ac0fc00b0 100644 --- a/src/Microsoft.Graph/Generated/Models/B2cIdentityUserFlow.cs +++ b/src/Microsoft.Graph/Generated/Models/B2cIdentityUserFlow.cs @@ -121,7 +121,7 @@ public bool? IsLanguageCustomizationEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.B2cIdentityUserFlow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.B2cIdentityUserFlow(); } /// @@ -147,7 +147,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("apiConnectorConfiguration", ApiConnectorConfiguration); writer.WriteStringValue("defaultLanguageTag", DefaultLanguageTag); diff --git a/src/Microsoft.Graph/Generated/Models/B2cIdentityUserFlowCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/B2cIdentityUserFlowCollectionResponse.cs index da49d8b78dd..5d1f22212db 100644 --- a/src/Microsoft.Graph/Generated/Models/B2cIdentityUserFlowCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/B2cIdentityUserFlowCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class B2cIdentityUserFlowCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.B2cIdentityUserFlowCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.B2cIdentityUserFlowCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/B2xIdentityUserFlow.cs b/src/Microsoft.Graph/Generated/Models/B2xIdentityUserFlow.cs index d907ab4ac06..8175b644ec5 100644 --- a/src/Microsoft.Graph/Generated/Models/B2xIdentityUserFlow.cs +++ b/src/Microsoft.Graph/Generated/Models/B2xIdentityUserFlow.cs @@ -99,7 +99,7 @@ public partial class B2xIdentityUserFlow : global::Microsoft.Graph.Beta.Models.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.B2xIdentityUserFlow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.B2xIdentityUserFlow(); } /// @@ -123,7 +123,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("apiConnectorConfiguration", ApiConnectorConfiguration); writer.WriteCollectionOfObjectValues("identityProviders", IdentityProviders); diff --git a/src/Microsoft.Graph/Generated/Models/B2xIdentityUserFlowCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/B2xIdentityUserFlowCollectionResponse.cs index 61fe50fd493..aa6aa0c592d 100644 --- a/src/Microsoft.Graph/Generated/Models/B2xIdentityUserFlowCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/B2xIdentityUserFlowCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class B2xIdentityUserFlowCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.B2xIdentityUserFlowCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.B2xIdentityUserFlowCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BackupRestoreRoot.cs b/src/Microsoft.Graph/Generated/Models/BackupRestoreRoot.cs index 05608fbbcd1..9e0605f00e7 100644 --- a/src/Microsoft.Graph/Generated/Models/BackupRestoreRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/BackupRestoreRoot.cs @@ -371,7 +371,7 @@ public partial class BackupRestoreRoot : global::Microsoft.Graph.Beta.Models.Ent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BackupRestoreRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BackupRestoreRoot(); } /// @@ -412,7 +412,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("driveInclusionRules", DriveInclusionRules); writer.WriteCollectionOfObjectValues("driveProtectionUnits", DriveProtectionUnits); diff --git a/src/Microsoft.Graph/Generated/Models/BaseActivity.cs b/src/Microsoft.Graph/Generated/Models/BaseActivity.cs new file mode 100644 index 00000000000..6b37095ee5a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/BaseActivity.cs @@ -0,0 +1,130 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Microsoft.Graph.Beta.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class BaseActivity : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType + { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType + { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The resultInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Microsoft.Graph.Beta.Models.ResultInfo? ResultInfo + { + get { return BackingStore?.Get("resultInfo"); } + set { BackingStore?.Set("resultInfo", value); } + } +#nullable restore +#else + public global::Microsoft.Graph.Beta.Models.ResultInfo ResultInfo + { + get { return BackingStore?.Get("resultInfo"); } + set { BackingStore?.Set("resultInfo", value); } + } +#endif + /// The status property + public global::Microsoft.Graph.Beta.Models.ActivityStatus? Status + { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", value); } + } + /// The transport property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Microsoft.Graph.Beta.Models.ActivityTransport? Transport + { + get { return BackingStore?.Get("transport"); } + set { BackingStore?.Set("transport", value); } + } +#nullable restore +#else + public global::Microsoft.Graph.Beta.Models.ActivityTransport Transport + { + get { return BackingStore?.Get("transport"); } + set { BackingStore?.Set("transport", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public BaseActivity() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Microsoft.Graph.Beta.Models.BaseActivity CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); + return mappingValue switch + { + "#microsoft.graph.transcriptActivity" => new global::Microsoft.Graph.Beta.Models.TranscriptActivity(), + _ => new global::Microsoft.Graph.Beta.Models.BaseActivity(), + }; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.type", n => { OdataType = n.GetStringValue(); } }, + { "resultInfo", n => { ResultInfo = n.GetObjectValue(global::Microsoft.Graph.Beta.Models.ResultInfo.CreateFromDiscriminatorValue); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + { "transport", n => { Transport = n.GetObjectValue(global::Microsoft.Graph.Beta.Models.ActivityTransport.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteObjectValue("resultInfo", ResultInfo); + writer.WriteEnumValue("status", Status); + writer.WriteObjectValue("transport", Transport); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Microsoft.Graph/Generated/Models/BaseCollectionPaginationCountResponse.cs b/src/Microsoft.Graph/Generated/Models/BaseCollectionPaginationCountResponse.cs index 17282e6762c..edbd23b2c60 100644 --- a/src/Microsoft.Graph/Generated/Models/BaseCollectionPaginationCountResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BaseCollectionPaginationCountResponse.cs @@ -58,7 +58,7 @@ public BaseCollectionPaginationCountResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BaseCollectionPaginationCountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BaseCollectionPaginationCountResponse(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("@odata.count", OdataCount); writer.WriteStringValue("@odata.nextLink", OdataNextLink); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/BaseDeltaFunctionResponse.cs b/src/Microsoft.Graph/Generated/Models/BaseDeltaFunctionResponse.cs index b80aaf499b4..2b43cfa22c2 100644 --- a/src/Microsoft.Graph/Generated/Models/BaseDeltaFunctionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BaseDeltaFunctionResponse.cs @@ -68,7 +68,7 @@ public BaseDeltaFunctionResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BaseDeltaFunctionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BaseDeltaFunctionResponse(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.deltaLink", OdataDeltaLink); writer.WriteStringValue("@odata.nextLink", OdataNextLink); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/BaseEndUserNotification.cs b/src/Microsoft.Graph/Generated/Models/BaseEndUserNotification.cs index f1de140a3cb..f99d2d95512 100644 --- a/src/Microsoft.Graph/Generated/Models/BaseEndUserNotification.cs +++ b/src/Microsoft.Graph/Generated/Models/BaseEndUserNotification.cs @@ -84,7 +84,7 @@ public BaseEndUserNotification() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BaseEndUserNotification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("defaultLanguage", DefaultLanguage); writer.WriteObjectValue("endUserNotification", EndUserNotification); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/BaseItem.cs b/src/Microsoft.Graph/Generated/Models/BaseItem.cs index 7257da1c131..3e3d81449be 100644 --- a/src/Microsoft.Graph/Generated/Models/BaseItem.cs +++ b/src/Microsoft.Graph/Generated/Models/BaseItem.cs @@ -175,7 +175,7 @@ public string WebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BaseItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -222,7 +222,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteObjectValue("createdByUser", CreatedByUser); diff --git a/src/Microsoft.Graph/Generated/Models/BaseItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BaseItemCollectionResponse.cs index 767f1fe7503..2d3175c5d74 100644 --- a/src/Microsoft.Graph/Generated/Models/BaseItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BaseItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BaseItemCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BaseItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BaseItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BaseItemVersion.cs b/src/Microsoft.Graph/Generated/Models/BaseItemVersion.cs index df7c5c2e936..726e5b4591c 100644 --- a/src/Microsoft.Graph/Generated/Models/BaseItemVersion.cs +++ b/src/Microsoft.Graph/Generated/Models/BaseItemVersion.cs @@ -57,7 +57,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BaseItemVersion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/BaseSitePage.cs b/src/Microsoft.Graph/Generated/Models/BaseSitePage.cs index 0a9b25b34e7..2639ca50c67 100644 --- a/src/Microsoft.Graph/Generated/Models/BaseSitePage.cs +++ b/src/Microsoft.Graph/Generated/Models/BaseSitePage.cs @@ -64,7 +64,7 @@ public BaseSitePage() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BaseSitePage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("pageLayout", PageLayout); writer.WriteObjectValue("publishingState", PublishingState); diff --git a/src/Microsoft.Graph/Generated/Models/BaseSitePageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BaseSitePageCollectionResponse.cs index 893c71628d6..1c4210cff16 100644 --- a/src/Microsoft.Graph/Generated/Models/BaseSitePageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BaseSitePageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BaseSitePageCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BaseSitePageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BaseSitePageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BaselineParameter.cs b/src/Microsoft.Graph/Generated/Models/BaselineParameter.cs index f13e588f77f..0896f212fd0 100644 --- a/src/Microsoft.Graph/Generated/Models/BaselineParameter.cs +++ b/src/Microsoft.Graph/Generated/Models/BaselineParameter.cs @@ -90,7 +90,7 @@ public BaselineParameter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BaselineParameter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BaselineParameter(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/BaselineResource.cs b/src/Microsoft.Graph/Generated/Models/BaselineResource.cs index a9a0d8af8c8..7eae50f0b46 100644 --- a/src/Microsoft.Graph/Generated/Models/BaselineResource.cs +++ b/src/Microsoft.Graph/Generated/Models/BaselineResource.cs @@ -100,7 +100,7 @@ public BaselineResource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BaselineResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BaselineResource(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("properties", Properties); diff --git a/src/Microsoft.Graph/Generated/Models/BasicAuthentication.cs b/src/Microsoft.Graph/Generated/Models/BasicAuthentication.cs index 09380265c62..0d03e36085b 100644 --- a/src/Microsoft.Graph/Generated/Models/BasicAuthentication.cs +++ b/src/Microsoft.Graph/Generated/Models/BasicAuthentication.cs @@ -58,7 +58,7 @@ public BasicAuthentication() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BasicAuthentication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BasicAuthentication(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("password", Password); writer.WriteStringValue("username", Username); diff --git a/src/Microsoft.Graph/Generated/Models/BinaryContent.cs b/src/Microsoft.Graph/Generated/Models/BinaryContent.cs index f79402c84f8..1efdb6acc9e 100644 --- a/src/Microsoft.Graph/Generated/Models/BinaryContent.cs +++ b/src/Microsoft.Graph/Generated/Models/BinaryContent.cs @@ -42,7 +42,7 @@ public BinaryContent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BinaryContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BinaryContent(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("data", Data); } diff --git a/src/Microsoft.Graph/Generated/Models/BitLockerFixedDrivePolicy.cs b/src/Microsoft.Graph/Generated/Models/BitLockerFixedDrivePolicy.cs index 8698d573564..fd43bb75e00 100644 --- a/src/Microsoft.Graph/Generated/Models/BitLockerFixedDrivePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/BitLockerFixedDrivePolicy.cs @@ -81,7 +81,7 @@ public BitLockerFixedDrivePolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BitLockerFixedDrivePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BitLockerFixedDrivePolicy(); } /// @@ -104,7 +104,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("encryptionMethod", EncryptionMethod); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("recoveryOptions", RecoveryOptions); diff --git a/src/Microsoft.Graph/Generated/Models/BitLockerRecoveryOptions.cs b/src/Microsoft.Graph/Generated/Models/BitLockerRecoveryOptions.cs index 87f174dc98a..520b6a9a218 100644 --- a/src/Microsoft.Graph/Generated/Models/BitLockerRecoveryOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/BitLockerRecoveryOptions.cs @@ -95,7 +95,7 @@ public BitLockerRecoveryOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BitLockerRecoveryOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BitLockerRecoveryOptions(); } /// @@ -122,7 +122,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("blockDataRecoveryAgent", BlockDataRecoveryAgent); writer.WriteBoolValue("enableBitLockerAfterRecoveryInformationToStore", EnableBitLockerAfterRecoveryInformationToStore); writer.WriteBoolValue("enableRecoveryInformationSaveToStore", EnableRecoveryInformationSaveToStore); diff --git a/src/Microsoft.Graph/Generated/Models/BitLockerRemovableDrivePolicy.cs b/src/Microsoft.Graph/Generated/Models/BitLockerRemovableDrivePolicy.cs index 00df914b331..ac1ebed99bd 100644 --- a/src/Microsoft.Graph/Generated/Models/BitLockerRemovableDrivePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/BitLockerRemovableDrivePolicy.cs @@ -71,7 +71,7 @@ public BitLockerRemovableDrivePolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BitLockerRemovableDrivePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BitLockerRemovableDrivePolicy(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("blockCrossOrganizationWriteAccess", BlockCrossOrganizationWriteAccess); writer.WriteEnumValue("encryptionMethod", EncryptionMethod); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/BitLockerSystemDrivePolicy.cs b/src/Microsoft.Graph/Generated/Models/BitLockerSystemDrivePolicy.cs index 8ce48c866dc..335602b6c91 100644 --- a/src/Microsoft.Graph/Generated/Models/BitLockerSystemDrivePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/BitLockerSystemDrivePolicy.cs @@ -155,7 +155,7 @@ public BitLockerSystemDrivePolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BitLockerSystemDrivePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BitLockerSystemDrivePolicy(); } /// @@ -187,7 +187,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("encryptionMethod", EncryptionMethod); writer.WriteIntValue("minimumPinLength", MinimumPinLength); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Bitlocker.cs b/src/Microsoft.Graph/Generated/Models/Bitlocker.cs index 966ac86cf7e..6c14a9e8b74 100644 --- a/src/Microsoft.Graph/Generated/Models/Bitlocker.cs +++ b/src/Microsoft.Graph/Generated/Models/Bitlocker.cs @@ -35,7 +35,7 @@ public partial class Bitlocker : global::Microsoft.Graph.Beta.Models.Entity, IPa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Bitlocker CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Bitlocker(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("recoveryKeys", RecoveryKeys); } diff --git a/src/Microsoft.Graph/Generated/Models/BitlockerRecoveryKey.cs b/src/Microsoft.Graph/Generated/Models/BitlockerRecoveryKey.cs index 7c40742e68c..158cd5f237a 100644 --- a/src/Microsoft.Graph/Generated/Models/BitlockerRecoveryKey.cs +++ b/src/Microsoft.Graph/Generated/Models/BitlockerRecoveryKey.cs @@ -63,7 +63,7 @@ public string Key /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BitlockerRecoveryKey CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BitlockerRecoveryKey(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("deviceId", DeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/BitlockerRecoveryKeyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BitlockerRecoveryKeyCollectionResponse.cs index b18d661b041..e825102eb35 100644 --- a/src/Microsoft.Graph/Generated/Models/BitlockerRecoveryKeyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BitlockerRecoveryKeyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BitlockerRecoveryKeyCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BitlockerRecoveryKeyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BitlockerRecoveryKeyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BlockAccessAction.cs b/src/Microsoft.Graph/Generated/Models/BlockAccessAction.cs index 21e19d7897a..2c27afbb7e1 100644 --- a/src/Microsoft.Graph/Generated/Models/BlockAccessAction.cs +++ b/src/Microsoft.Graph/Generated/Models/BlockAccessAction.cs @@ -19,7 +19,7 @@ public partial class BlockAccessAction : global::Microsoft.Graph.Beta.Models.Dlp /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BlockAccessAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BlockAccessAction(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/BookingAppointment.cs b/src/Microsoft.Graph/Generated/Models/BookingAppointment.cs index 7a538ac40e7..39e08781f42 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingAppointment.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingAppointment.cs @@ -510,7 +510,7 @@ public List StaffMemberIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingAppointment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingAppointment(); } /// @@ -569,7 +569,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("additionalInformation", AdditionalInformation); writer.WriteStringValue("anonymousJoinWebUrl", AnonymousJoinWebUrl); diff --git a/src/Microsoft.Graph/Generated/Models/BookingAppointmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BookingAppointmentCollectionResponse.cs index 9afc00ccc99..0f5368f39c5 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingAppointmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingAppointmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BookingAppointmentCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingAppointmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingAppointmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BookingBusiness.cs b/src/Microsoft.Graph/Generated/Models/BookingBusiness.cs index 2264ef2078b..d4738f4f5a6 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingBusiness.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingBusiness.cs @@ -317,7 +317,7 @@ public BookingBusiness() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingBusiness CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingBusiness(); } /// @@ -356,7 +356,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("address", Address); writer.WriteCollectionOfObjectValues("appointments", Appointments); diff --git a/src/Microsoft.Graph/Generated/Models/BookingBusinessCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BookingBusinessCollectionResponse.cs index 2f7bdd0cd1f..fe60dc4bc8b 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingBusinessCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingBusinessCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BookingBusinessCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingBusinessCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingBusinessCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BookingCurrency.cs b/src/Microsoft.Graph/Generated/Models/BookingCurrency.cs index f7d1e2cbd6b..d8cbf9bd27f 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingCurrency.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingCurrency.cs @@ -35,7 +35,7 @@ public string Symbol /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingCurrency CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingCurrency(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("symbol", Symbol); } diff --git a/src/Microsoft.Graph/Generated/Models/BookingCurrencyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BookingCurrencyCollectionResponse.cs index 309f3985ae5..9b72dc5d361 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingCurrencyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingCurrencyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BookingCurrencyCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingCurrencyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingCurrencyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BookingCustomQuestion.cs b/src/Microsoft.Graph/Generated/Models/BookingCustomQuestion.cs index 7edd18c4b84..0decf84465a 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingCustomQuestion.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingCustomQuestion.cs @@ -70,7 +70,7 @@ public DateTimeOffset? LastUpdatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingCustomQuestion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingCustomQuestion(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("answerInputType", AnswerInputType); writer.WriteCollectionOfPrimitiveValues("answerOptions", AnswerOptions); diff --git a/src/Microsoft.Graph/Generated/Models/BookingCustomQuestionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BookingCustomQuestionCollectionResponse.cs index 183e2fe8c05..22aa74e4166 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingCustomQuestionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingCustomQuestionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BookingCustomQuestionCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingCustomQuestionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingCustomQuestionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BookingCustomer.cs b/src/Microsoft.Graph/Generated/Models/BookingCustomer.cs index 9fd15aed2a9..59d5fa8cf28 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingCustomer.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingCustomer.cs @@ -64,7 +64,7 @@ public DateTimeOffset? LastUpdatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingCustomer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingCustomer(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("addresses", Addresses); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/BookingCustomerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BookingCustomerCollectionResponse.cs index 66cb9701757..0fcd1ed95c1 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingCustomerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingCustomerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BookingCustomerCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingCustomerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingCustomerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BookingCustomerInformation.cs b/src/Microsoft.Graph/Generated/Models/BookingCustomerInformation.cs index b6e4351267e..895d8897e2b 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingCustomerInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingCustomerInformation.cs @@ -160,7 +160,7 @@ public BookingCustomerInformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingCustomerInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingCustomerInformation(); } /// @@ -188,7 +188,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("customerId", CustomerId); writer.WriteCollectionOfObjectValues("customQuestionAnswers", CustomQuestionAnswers); diff --git a/src/Microsoft.Graph/Generated/Models/BookingCustomerInformationBase.cs b/src/Microsoft.Graph/Generated/Models/BookingCustomerInformationBase.cs index 169f90d26ab..482129e3e71 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingCustomerInformationBase.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingCustomerInformationBase.cs @@ -52,7 +52,7 @@ public BookingCustomerInformationBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BookingCustomerInformationBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/BookingNamedEntity.cs b/src/Microsoft.Graph/Generated/Models/BookingNamedEntity.cs index 6c660b7d1e1..1b3bc239685 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingNamedEntity.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingNamedEntity.cs @@ -36,7 +36,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingNamedEntity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -65,7 +65,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); } diff --git a/src/Microsoft.Graph/Generated/Models/BookingPageSettings.cs b/src/Microsoft.Graph/Generated/Models/BookingPageSettings.cs index 29a83ccc615..dac4973e414 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingPageSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingPageSettings.cs @@ -168,7 +168,7 @@ public BookingPageSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BookingPageSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingPageSettings(); } /// @@ -199,7 +199,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("accessControl", AccessControl); writer.WriteStringValue("bookingPageColorCode", BookingPageColorCode); writer.WriteStringValue("businessTimeZone", BusinessTimeZone); diff --git a/src/Microsoft.Graph/Generated/Models/BookingPerson.cs b/src/Microsoft.Graph/Generated/Models/BookingPerson.cs index 653160e9819..37788ec3fe2 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingPerson.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingPerson.cs @@ -43,7 +43,7 @@ public BookingPerson() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingPerson CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("emailAddress", EmailAddress); } diff --git a/src/Microsoft.Graph/Generated/Models/BookingQuestionAnswer.cs b/src/Microsoft.Graph/Generated/Models/BookingQuestionAnswer.cs index 7b9db3d1ef5..5ecdefbd918 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingQuestionAnswer.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingQuestionAnswer.cs @@ -144,7 +144,7 @@ public BookingQuestionAnswer() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BookingQuestionAnswer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingQuestionAnswer(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("answer", Answer); writer.WriteEnumValue("answerInputType", AnswerInputType); writer.WriteCollectionOfPrimitiveValues("answerOptions", AnswerOptions); diff --git a/src/Microsoft.Graph/Generated/Models/BookingQuestionAssignment.cs b/src/Microsoft.Graph/Generated/Models/BookingQuestionAssignment.cs index c477b242187..b5cc9eca314 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingQuestionAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingQuestionAssignment.cs @@ -74,7 +74,7 @@ public BookingQuestionAssignment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BookingQuestionAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingQuestionAssignment(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isRequired", IsRequired); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("questionId", QuestionId); diff --git a/src/Microsoft.Graph/Generated/Models/BookingReminder.cs b/src/Microsoft.Graph/Generated/Models/BookingReminder.cs index 333adebd827..fa4a3bed018 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingReminder.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingReminder.cs @@ -81,7 +81,7 @@ public BookingReminder() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BookingReminder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingReminder(); } /// @@ -104,7 +104,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("message", Message); writer.WriteStringValue("@odata.type", OdataType); writer.WriteTimeSpanValue("offset", Offset); diff --git a/src/Microsoft.Graph/Generated/Models/BookingSchedulingPolicy.cs b/src/Microsoft.Graph/Generated/Models/BookingSchedulingPolicy.cs index 70c36884a2c..f879d0d31fe 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingSchedulingPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingSchedulingPolicy.cs @@ -121,7 +121,7 @@ public BookingSchedulingPolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BookingSchedulingPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingSchedulingPolicy(); } /// @@ -149,7 +149,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowStaffSelection", AllowStaffSelection); writer.WriteCollectionOfObjectValues("customAvailabilities", CustomAvailabilities); writer.WriteObjectValue("generalAvailability", GeneralAvailability); diff --git a/src/Microsoft.Graph/Generated/Models/BookingService.cs b/src/Microsoft.Graph/Generated/Models/BookingService.cs index abf56ae1aba..b327fc7715d 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingService.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingService.cs @@ -265,7 +265,7 @@ public BookingService() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingService CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingService(); } /// @@ -307,7 +307,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("additionalInformation", AdditionalInformation); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/BookingServiceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BookingServiceCollectionResponse.cs index b2cc7b014ce..c41f95207c8 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingServiceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingServiceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BookingServiceCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingServiceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingServiceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BookingStaffMember.cs b/src/Microsoft.Graph/Generated/Models/BookingStaffMember.cs index 5ea2e1f5625..0a590c237c1 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingStaffMember.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingStaffMember.cs @@ -100,7 +100,7 @@ public bool? UseBusinessHours /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingStaffMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingStaffMember(); } /// @@ -129,7 +129,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("availabilityIsAffectedByPersonalCalendar", AvailabilityIsAffectedByPersonalCalendar); writer.WriteIntValue("colorIndex", ColorIndex); diff --git a/src/Microsoft.Graph/Generated/Models/BookingStaffMemberCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BookingStaffMemberCollectionResponse.cs index a44ef0aa3c2..fad339af8f7 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingStaffMemberCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingStaffMemberCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BookingStaffMemberCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingStaffMemberCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingStaffMemberCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BookingWorkHours.cs b/src/Microsoft.Graph/Generated/Models/BookingWorkHours.cs index 067feb1903c..b0125cdeb84 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingWorkHours.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingWorkHours.cs @@ -75,7 +75,7 @@ public BookingWorkHours() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BookingWorkHours CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingWorkHours(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("day", Day); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("timeSlots", TimeSlots); diff --git a/src/Microsoft.Graph/Generated/Models/BookingWorkTimeSlot.cs b/src/Microsoft.Graph/Generated/Models/BookingWorkTimeSlot.cs index 62ff99a984a..7a7f4cfc610 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingWorkTimeSlot.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingWorkTimeSlot.cs @@ -65,7 +65,7 @@ public BookingWorkTimeSlot() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BookingWorkTimeSlot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingWorkTimeSlot(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteTimeValue("end", End); writer.WriteStringValue("@odata.type", OdataType); writer.WriteTimeValue("start", Start); diff --git a/src/Microsoft.Graph/Generated/Models/BookingsAvailability.cs b/src/Microsoft.Graph/Generated/Models/BookingsAvailability.cs index 94049ad0fe2..9963a69ad70 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingsAvailability.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingsAvailability.cs @@ -74,7 +74,7 @@ public BookingsAvailability() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BookingsAvailability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -101,7 +101,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("availabilityType", AvailabilityType); writer.WriteCollectionOfObjectValues("businessHours", BusinessHours); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/BookingsAvailabilityWindow.cs b/src/Microsoft.Graph/Generated/Models/BookingsAvailabilityWindow.cs index 8dd68833a78..420ae11cf94 100644 --- a/src/Microsoft.Graph/Generated/Models/BookingsAvailabilityWindow.cs +++ b/src/Microsoft.Graph/Generated/Models/BookingsAvailabilityWindow.cs @@ -39,7 +39,7 @@ public BookingsAvailabilityWindow() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BookingsAvailabilityWindow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BookingsAvailabilityWindow(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateValue("endDate", EndDate); writer.WriteDateValue("startDate", StartDate); diff --git a/src/Microsoft.Graph/Generated/Models/BooleanColumn.cs b/src/Microsoft.Graph/Generated/Models/BooleanColumn.cs index 848497e2fd9..85d1f2f9a22 100644 --- a/src/Microsoft.Graph/Generated/Models/BooleanColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/BooleanColumn.cs @@ -52,7 +52,7 @@ public BooleanColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BooleanColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BooleanColumn(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/BroadcastMeetingCaptionSettings.cs b/src/Microsoft.Graph/Generated/Models/BroadcastMeetingCaptionSettings.cs index 8147cc34ccf..29f6d00fac0 100644 --- a/src/Microsoft.Graph/Generated/Models/BroadcastMeetingCaptionSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/BroadcastMeetingCaptionSettings.cs @@ -90,7 +90,7 @@ public BroadcastMeetingCaptionSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BroadcastMeetingCaptionSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BroadcastMeetingCaptionSettings(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isCaptionEnabled", IsCaptionEnabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("spokenLanguage", SpokenLanguage); diff --git a/src/Microsoft.Graph/Generated/Models/BroadcastMeetingSettings.cs b/src/Microsoft.Graph/Generated/Models/BroadcastMeetingSettings.cs index 1ba4dd96eed..a5aa44caa25 100644 --- a/src/Microsoft.Graph/Generated/Models/BroadcastMeetingSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/BroadcastMeetingSettings.cs @@ -98,7 +98,7 @@ public BroadcastMeetingSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BroadcastMeetingSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BroadcastMeetingSettings(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("allowedAudience", AllowedAudience); writer.WriteObjectValue("captions", Captions); writer.WriteBoolValue("isAttendeeReportEnabled", IsAttendeeReportEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/BrowserSharedCookie.cs b/src/Microsoft.Graph/Generated/Models/BrowserSharedCookie.cs index d44d44040a8..bc729dc7bc0 100644 --- a/src/Microsoft.Graph/Generated/Models/BrowserSharedCookie.cs +++ b/src/Microsoft.Graph/Generated/Models/BrowserSharedCookie.cs @@ -151,7 +151,7 @@ public string Path /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BrowserSharedCookie CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BrowserSharedCookie(); } /// @@ -182,7 +182,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("comment", Comment); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/BrowserSharedCookieCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BrowserSharedCookieCollectionResponse.cs index 2a22d44d8d8..e2618557f88 100644 --- a/src/Microsoft.Graph/Generated/Models/BrowserSharedCookieCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BrowserSharedCookieCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BrowserSharedCookieCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BrowserSharedCookieCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BrowserSharedCookieCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BrowserSharedCookieHistory.cs b/src/Microsoft.Graph/Generated/Models/BrowserSharedCookieHistory.cs index 4b60aa7297d..a9bd57baab0 100644 --- a/src/Microsoft.Graph/Generated/Models/BrowserSharedCookieHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/BrowserSharedCookieHistory.cs @@ -150,7 +150,7 @@ public BrowserSharedCookieHistory() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BrowserSharedCookieHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BrowserSharedCookieHistory(); } /// @@ -178,7 +178,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("comment", Comment); writer.WriteStringValue("displayName", DisplayName); writer.WriteBoolValue("hostOnly", HostOnly); diff --git a/src/Microsoft.Graph/Generated/Models/BrowserSite.cs b/src/Microsoft.Graph/Generated/Models/BrowserSite.cs index a6bb229e40a..50e42c18a7c 100644 --- a/src/Microsoft.Graph/Generated/Models/BrowserSite.cs +++ b/src/Microsoft.Graph/Generated/Models/BrowserSite.cs @@ -132,7 +132,7 @@ public string WebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BrowserSite CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BrowserSite(); } /// @@ -163,7 +163,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowRedirect", AllowRedirect); writer.WriteStringValue("comment", Comment); diff --git a/src/Microsoft.Graph/Generated/Models/BrowserSiteCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BrowserSiteCollectionResponse.cs index 1faa623eae4..ec62bd65166 100644 --- a/src/Microsoft.Graph/Generated/Models/BrowserSiteCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BrowserSiteCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BrowserSiteCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BrowserSiteCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BrowserSiteCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BrowserSiteHistory.cs b/src/Microsoft.Graph/Generated/Models/BrowserSiteHistory.cs index c85a4ec8083..eb26109b44b 100644 --- a/src/Microsoft.Graph/Generated/Models/BrowserSiteHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/BrowserSiteHistory.cs @@ -115,7 +115,7 @@ public BrowserSiteHistory() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BrowserSiteHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BrowserSiteHistory(); } /// @@ -142,7 +142,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowRedirect", AllowRedirect); writer.WriteStringValue("comment", Comment); writer.WriteEnumValue("compatibilityMode", CompatibilityMode); diff --git a/src/Microsoft.Graph/Generated/Models/BrowserSiteList.cs b/src/Microsoft.Graph/Generated/Models/BrowserSiteList.cs index 9778cef6ec7..2a6e66c32f5 100644 --- a/src/Microsoft.Graph/Generated/Models/BrowserSiteList.cs +++ b/src/Microsoft.Graph/Generated/Models/BrowserSiteList.cs @@ -150,7 +150,7 @@ public string Revision /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BrowserSiteList CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BrowserSiteList(); } /// @@ -179,7 +179,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/BrowserSiteListCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BrowserSiteListCollectionResponse.cs index 1db756dfe6c..009451f9d91 100644 --- a/src/Microsoft.Graph/Generated/Models/BrowserSiteListCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BrowserSiteListCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BrowserSiteListCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BrowserSiteListCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BrowserSiteListCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BucketAggregationDefinition.cs b/src/Microsoft.Graph/Generated/Models/BucketAggregationDefinition.cs index b76bfa40b86..6c33c54966e 100644 --- a/src/Microsoft.Graph/Generated/Models/BucketAggregationDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/BucketAggregationDefinition.cs @@ -102,7 +102,7 @@ public BucketAggregationDefinition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BucketAggregationDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BucketAggregationDefinition(); } /// @@ -127,7 +127,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isDescending", IsDescending); writer.WriteIntValue("minimumCount", MinimumCount); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/BucketAggregationRange.cs b/src/Microsoft.Graph/Generated/Models/BucketAggregationRange.cs index c226f9c4059..ca71afc963c 100644 --- a/src/Microsoft.Graph/Generated/Models/BucketAggregationRange.cs +++ b/src/Microsoft.Graph/Generated/Models/BucketAggregationRange.cs @@ -84,7 +84,7 @@ public BucketAggregationRange() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BucketAggregationRange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BucketAggregationRange(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("from", From); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("to", To); diff --git a/src/Microsoft.Graph/Generated/Models/BufferDecryptionResult.cs b/src/Microsoft.Graph/Generated/Models/BufferDecryptionResult.cs index d3a0ed2cfd7..6da8afaf91b 100644 --- a/src/Microsoft.Graph/Generated/Models/BufferDecryptionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/BufferDecryptionResult.cs @@ -68,7 +68,7 @@ public BufferDecryptionResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BufferDecryptionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BufferDecryptionResult(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("decryptedBuffer", DecryptedBuffer); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/BufferEncryptionResult.cs b/src/Microsoft.Graph/Generated/Models/BufferEncryptionResult.cs index a2232e316eb..295654fffab 100644 --- a/src/Microsoft.Graph/Generated/Models/BufferEncryptionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/BufferEncryptionResult.cs @@ -84,7 +84,7 @@ public BufferEncryptionResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BufferEncryptionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BufferEncryptionResult(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("encryptedBuffer", EncryptedBuffer); writer.WriteStringValue("@odata.type", OdataType); writer.WriteByteArrayValue("publishingLicense", PublishingLicense); diff --git a/src/Microsoft.Graph/Generated/Models/Building.cs b/src/Microsoft.Graph/Generated/Models/Building.cs index 55f9aef1638..b3a963daeeb 100644 --- a/src/Microsoft.Graph/Generated/Models/Building.cs +++ b/src/Microsoft.Graph/Generated/Models/Building.cs @@ -48,7 +48,7 @@ public Building() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Building CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Building(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("hasWiFi", HasWiFi); writer.WriteCollectionOfObjectValues("resourceLinks", ResourceLinks); diff --git a/src/Microsoft.Graph/Generated/Models/BuiltInIdentityProvider.cs b/src/Microsoft.Graph/Generated/Models/BuiltInIdentityProvider.cs index 7c79fe0ccab..bfa82448857 100644 --- a/src/Microsoft.Graph/Generated/Models/BuiltInIdentityProvider.cs +++ b/src/Microsoft.Graph/Generated/Models/BuiltInIdentityProvider.cs @@ -48,7 +48,7 @@ public BuiltInIdentityProvider() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BuiltInIdentityProvider CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BuiltInIdentityProvider(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("identityProviderType", IdentityProviderType); writer.WriteEnumValue("state", State); diff --git a/src/Microsoft.Graph/Generated/Models/BulkCatalogItemActionResult.cs b/src/Microsoft.Graph/Generated/Models/BulkCatalogItemActionResult.cs index e45d8092b3e..59f51c9aeba 100644 --- a/src/Microsoft.Graph/Generated/Models/BulkCatalogItemActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/BulkCatalogItemActionResult.cs @@ -85,7 +85,7 @@ public BulkCatalogItemActionResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BulkCatalogItemActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BulkCatalogItemActionResult(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("failedIds", FailedIds); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("successfulIds", SuccessfulIds); diff --git a/src/Microsoft.Graph/Generated/Models/BulkDriverActionResult.cs b/src/Microsoft.Graph/Generated/Models/BulkDriverActionResult.cs index 7a27eaf3a8d..67ee7621ee8 100644 --- a/src/Microsoft.Graph/Generated/Models/BulkDriverActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/BulkDriverActionResult.cs @@ -101,7 +101,7 @@ public BulkDriverActionResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BulkDriverActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BulkDriverActionResult(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("failedDriverIds", FailedDriverIds); writer.WriteCollectionOfPrimitiveValues("notFoundDriverIds", NotFoundDriverIds); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/BulkManagedDeviceActionResult.cs b/src/Microsoft.Graph/Generated/Models/BulkManagedDeviceActionResult.cs index 14ecaeffe3b..ba4ffeb1a72 100644 --- a/src/Microsoft.Graph/Generated/Models/BulkManagedDeviceActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/BulkManagedDeviceActionResult.cs @@ -116,7 +116,7 @@ public BulkManagedDeviceActionResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BulkManagedDeviceActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BulkManagedDeviceActionResult(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("failedDeviceIds", FailedDeviceIds); writer.WriteCollectionOfPrimitiveValues("notFoundDeviceIds", NotFoundDeviceIds); writer.WriteCollectionOfPrimitiveValues("notSupportedDeviceIds", NotSupportedDeviceIds); diff --git a/src/Microsoft.Graph/Generated/Models/BulkUpload.cs b/src/Microsoft.Graph/Generated/Models/BulkUpload.cs index 76e7a59c8cf..40d2b992174 100644 --- a/src/Microsoft.Graph/Generated/Models/BulkUpload.cs +++ b/src/Microsoft.Graph/Generated/Models/BulkUpload.cs @@ -19,7 +19,7 @@ public partial class BulkUpload : global::Microsoft.Graph.Beta.Models.Entity, IP /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BulkUpload CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BulkUpload(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Bundle.cs b/src/Microsoft.Graph/Generated/Models/Bundle.cs index fedcf7117cc..266f4e99664 100644 --- a/src/Microsoft.Graph/Generated/Models/Bundle.cs +++ b/src/Microsoft.Graph/Generated/Models/Bundle.cs @@ -74,7 +74,7 @@ public Bundle() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Bundle CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Bundle(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("album", Album); writer.WriteIntValue("childCount", ChildCount); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/BusinessFlow.cs b/src/Microsoft.Graph/Generated/Models/BusinessFlow.cs index ca02092f572..2ce17bc5fc2 100644 --- a/src/Microsoft.Graph/Generated/Models/BusinessFlow.cs +++ b/src/Microsoft.Graph/Generated/Models/BusinessFlow.cs @@ -163,7 +163,7 @@ public string SchemaId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BusinessFlow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BusinessFlow(); } /// @@ -191,7 +191,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("customData", CustomData); writer.WriteStringValue("deDuplicationId", DeDuplicationId); diff --git a/src/Microsoft.Graph/Generated/Models/BusinessFlowCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BusinessFlowCollectionResponse.cs index 29579e1bdca..37b8d579504 100644 --- a/src/Microsoft.Graph/Generated/Models/BusinessFlowCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BusinessFlowCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BusinessFlowCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BusinessFlowCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BusinessFlowCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BusinessFlowSettings.cs b/src/Microsoft.Graph/Generated/Models/BusinessFlowSettings.cs index 89d8f57cfbd..bcfe63b8a4f 100644 --- a/src/Microsoft.Graph/Generated/Models/BusinessFlowSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/BusinessFlowSettings.cs @@ -32,7 +32,7 @@ public BusinessFlowSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BusinessFlowSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BusinessFlowSettings(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("durationInDays", DurationInDays); } diff --git a/src/Microsoft.Graph/Generated/Models/BusinessFlowTemplate.cs b/src/Microsoft.Graph/Generated/Models/BusinessFlowTemplate.cs index 5b94d65602b..11f5007144e 100644 --- a/src/Microsoft.Graph/Generated/Models/BusinessFlowTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/BusinessFlowTemplate.cs @@ -35,7 +35,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BusinessFlowTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BusinessFlowTemplate(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); } diff --git a/src/Microsoft.Graph/Generated/Models/BusinessFlowTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BusinessFlowTemplateCollectionResponse.cs index 5d66cd64578..3cf13e3271f 100644 --- a/src/Microsoft.Graph/Generated/Models/BusinessFlowTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BusinessFlowTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BusinessFlowTemplateCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BusinessFlowTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BusinessFlowTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BusinessScenario.cs b/src/Microsoft.Graph/Generated/Models/BusinessScenario.cs index 2a4bc327fd3..84d8bc22fa9 100644 --- a/src/Microsoft.Graph/Generated/Models/BusinessScenario.cs +++ b/src/Microsoft.Graph/Generated/Models/BusinessScenario.cs @@ -127,7 +127,7 @@ public string UniqueName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BusinessScenario CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BusinessScenario(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/BusinessScenarioCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BusinessScenarioCollectionResponse.cs index 97c051a4e6d..413eb5710d6 100644 --- a/src/Microsoft.Graph/Generated/Models/BusinessScenarioCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BusinessScenarioCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BusinessScenarioCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BusinessScenarioCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BusinessScenarioCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BusinessScenarioGroupTarget.cs b/src/Microsoft.Graph/Generated/Models/BusinessScenarioGroupTarget.cs index 482c4124b8d..ba63db93d6d 100644 --- a/src/Microsoft.Graph/Generated/Models/BusinessScenarioGroupTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/BusinessScenarioGroupTarget.cs @@ -42,7 +42,7 @@ public BusinessScenarioGroupTarget() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BusinessScenarioGroupTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BusinessScenarioGroupTarget(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("groupId", GroupId); } diff --git a/src/Microsoft.Graph/Generated/Models/BusinessScenarioPlanReference.cs b/src/Microsoft.Graph/Generated/Models/BusinessScenarioPlanReference.cs index 8ecf089118e..6958b6169af 100644 --- a/src/Microsoft.Graph/Generated/Models/BusinessScenarioPlanReference.cs +++ b/src/Microsoft.Graph/Generated/Models/BusinessScenarioPlanReference.cs @@ -35,7 +35,7 @@ public string Title /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BusinessScenarioPlanReference CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BusinessScenarioPlanReference(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("title", Title); } diff --git a/src/Microsoft.Graph/Generated/Models/BusinessScenarioPlanner.cs b/src/Microsoft.Graph/Generated/Models/BusinessScenarioPlanner.cs index cbc47c8690a..6f66215e31e 100644 --- a/src/Microsoft.Graph/Generated/Models/BusinessScenarioPlanner.cs +++ b/src/Microsoft.Graph/Generated/Models/BusinessScenarioPlanner.cs @@ -67,7 +67,7 @@ public partial class BusinessScenarioPlanner : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BusinessScenarioPlanner CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BusinessScenarioPlanner(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("planConfiguration", PlanConfiguration); writer.WriteObjectValue("taskConfiguration", TaskConfiguration); diff --git a/src/Microsoft.Graph/Generated/Models/BusinessScenarioProperties.cs b/src/Microsoft.Graph/Generated/Models/BusinessScenarioProperties.cs index 4435193c2cf..7ea420601fa 100644 --- a/src/Microsoft.Graph/Generated/Models/BusinessScenarioProperties.cs +++ b/src/Microsoft.Graph/Generated/Models/BusinessScenarioProperties.cs @@ -132,7 +132,7 @@ public BusinessScenarioProperties() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BusinessScenarioProperties CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BusinessScenarioProperties(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("externalBucketId", ExternalBucketId); writer.WriteStringValue("externalContextId", ExternalContextId); writer.WriteStringValue("externalObjectId", ExternalObjectId); diff --git a/src/Microsoft.Graph/Generated/Models/BusinessScenarioTask.cs b/src/Microsoft.Graph/Generated/Models/BusinessScenarioTask.cs index 24f1c4fd1af..661e6956467 100644 --- a/src/Microsoft.Graph/Generated/Models/BusinessScenarioTask.cs +++ b/src/Microsoft.Graph/Generated/Models/BusinessScenarioTask.cs @@ -51,7 +51,7 @@ public partial class BusinessScenarioTask : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BusinessScenarioTask CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BusinessScenarioTask(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("businessScenarioProperties", BusinessScenarioProperties); writer.WriteObjectValue("target", Target); diff --git a/src/Microsoft.Graph/Generated/Models/BusinessScenarioTaskCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/BusinessScenarioTaskCollectionResponse.cs index c03c51cbc83..2ec31fa9e97 100644 --- a/src/Microsoft.Graph/Generated/Models/BusinessScenarioTaskCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/BusinessScenarioTaskCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BusinessScenarioTaskCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.BusinessScenarioTaskCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.BusinessScenarioTaskCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/BusinessScenarioTaskTargetBase.cs b/src/Microsoft.Graph/Generated/Models/BusinessScenarioTaskTargetBase.cs index 73b05ae9478..482aab3a800 100644 --- a/src/Microsoft.Graph/Generated/Models/BusinessScenarioTaskTargetBase.cs +++ b/src/Microsoft.Graph/Generated/Models/BusinessScenarioTaskTargetBase.cs @@ -58,7 +58,7 @@ public BusinessScenarioTaskTargetBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.BusinessScenarioTaskTargetBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -84,7 +84,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("taskTargetKind", TaskTargetKind); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CalculatedColumn.cs b/src/Microsoft.Graph/Generated/Models/CalculatedColumn.cs index f148230fd01..457e784031b 100644 --- a/src/Microsoft.Graph/Generated/Models/CalculatedColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/CalculatedColumn.cs @@ -100,7 +100,7 @@ public CalculatedColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CalculatedColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CalculatedColumn(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("format", Format); writer.WriteStringValue("formula", Formula); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Calendar.cs b/src/Microsoft.Graph/Generated/Models/Calendar.cs index 62fb397f9c1..5a7563f46f0 100644 --- a/src/Microsoft.Graph/Generated/Models/Calendar.cs +++ b/src/Microsoft.Graph/Generated/Models/Calendar.cs @@ -255,7 +255,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Calendar CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Calendar(); } /// @@ -295,7 +295,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfEnumValues("allowedOnlineMeetingProviders", AllowedOnlineMeetingProviders); writer.WriteStringValue("calendarGroupId", CalendarGroupId); diff --git a/src/Microsoft.Graph/Generated/Models/CalendarCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CalendarCollectionResponse.cs index c6dbc134266..be6700cb0e3 100644 --- a/src/Microsoft.Graph/Generated/Models/CalendarCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CalendarCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CalendarCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CalendarCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CalendarCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CalendarGroup.cs b/src/Microsoft.Graph/Generated/Models/CalendarGroup.cs index aadaac1f75b..9dad0d82b28 100644 --- a/src/Microsoft.Graph/Generated/Models/CalendarGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/CalendarGroup.cs @@ -73,7 +73,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CalendarGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CalendarGroup(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("calendars", Calendars); writer.WriteStringValue("changeKey", ChangeKey); diff --git a/src/Microsoft.Graph/Generated/Models/CalendarGroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CalendarGroupCollectionResponse.cs index fdbe4fab10f..a7c18a6f6cd 100644 --- a/src/Microsoft.Graph/Generated/Models/CalendarGroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CalendarGroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CalendarGroupCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CalendarGroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CalendarGroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CalendarPermission.cs b/src/Microsoft.Graph/Generated/Models/CalendarPermission.cs index ac11506adcc..9db610d0e76 100644 --- a/src/Microsoft.Graph/Generated/Models/CalendarPermission.cs +++ b/src/Microsoft.Graph/Generated/Models/CalendarPermission.cs @@ -69,7 +69,7 @@ public bool? IsRemovable /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CalendarPermission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CalendarPermission(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfEnumValues("allowedRoles", AllowedRoles); writer.WriteObjectValue("emailAddress", EmailAddress); diff --git a/src/Microsoft.Graph/Generated/Models/CalendarPermissionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CalendarPermissionCollectionResponse.cs index 47e7207184c..af3d57c713d 100644 --- a/src/Microsoft.Graph/Generated/Models/CalendarPermissionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CalendarPermissionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CalendarPermissionCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CalendarPermissionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CalendarPermissionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CalendarSharingMessage.cs b/src/Microsoft.Graph/Generated/Models/CalendarSharingMessage.cs index 720943a0da8..40ad25e4a22 100644 --- a/src/Microsoft.Graph/Generated/Models/CalendarSharingMessage.cs +++ b/src/Microsoft.Graph/Generated/Models/CalendarSharingMessage.cs @@ -80,7 +80,7 @@ public CalendarSharingMessage() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CalendarSharingMessage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CalendarSharingMessage(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("canAccept", CanAccept); writer.WriteObjectValue("sharingMessageAction", SharingMessageAction); diff --git a/src/Microsoft.Graph/Generated/Models/CalendarSharingMessageAction.cs b/src/Microsoft.Graph/Generated/Models/CalendarSharingMessageAction.cs index 925085de0ae..964fed64711 100644 --- a/src/Microsoft.Graph/Generated/Models/CalendarSharingMessageAction.cs +++ b/src/Microsoft.Graph/Generated/Models/CalendarSharingMessageAction.cs @@ -70,7 +70,7 @@ public CalendarSharingMessageAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CalendarSharingMessageAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CalendarSharingMessageAction(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteEnumValue("actionType", ActionType); writer.WriteEnumValue("importance", Importance); diff --git a/src/Microsoft.Graph/Generated/Models/Call.cs b/src/Microsoft.Graph/Generated/Models/Call.cs index 8c556ee5447..1e24ab16971 100644 --- a/src/Microsoft.Graph/Generated/Models/Call.cs +++ b/src/Microsoft.Graph/Generated/Models/Call.cs @@ -469,7 +469,7 @@ public string TerminationReason /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Call CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Call(); } /// @@ -518,7 +518,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfEnumValues("activeModalities", ActiveModalities); writer.WriteObjectValue("answeredBy", AnsweredBy); diff --git a/src/Microsoft.Graph/Generated/Models/CallActivityStatistics.cs b/src/Microsoft.Graph/Generated/Models/CallActivityStatistics.cs index c11ad61b1e7..40084cc3e2b 100644 --- a/src/Microsoft.Graph/Generated/Models/CallActivityStatistics.cs +++ b/src/Microsoft.Graph/Generated/Models/CallActivityStatistics.cs @@ -32,7 +32,7 @@ public CallActivityStatistics() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallActivityStatistics CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallActivityStatistics(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeSpanValue("afterHours", AfterHours); } diff --git a/src/Microsoft.Graph/Generated/Models/CallAiInsight.cs b/src/Microsoft.Graph/Generated/Models/CallAiInsight.cs index d8c14b201f2..f1e9c04f5dd 100644 --- a/src/Microsoft.Graph/Generated/Models/CallAiInsight.cs +++ b/src/Microsoft.Graph/Generated/Models/CallAiInsight.cs @@ -111,7 +111,7 @@ public DateTimeOffset? EndDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallAiInsight CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallAiInsight(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("actionItems", ActionItems); writer.WriteStringValue("callId", CallId); diff --git a/src/Microsoft.Graph/Generated/Models/CallAiInsightCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CallAiInsightCollectionResponse.cs index 4fadfc769bd..79211bb2f4f 100644 --- a/src/Microsoft.Graph/Generated/Models/CallAiInsightCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CallAiInsightCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CallAiInsightCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallAiInsightCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallAiInsightCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CallAiInsightViewPoint.cs b/src/Microsoft.Graph/Generated/Models/CallAiInsightViewPoint.cs index 5bf1a540e42..558c7489fc0 100644 --- a/src/Microsoft.Graph/Generated/Models/CallAiInsightViewPoint.cs +++ b/src/Microsoft.Graph/Generated/Models/CallAiInsightViewPoint.cs @@ -68,7 +68,7 @@ public CallAiInsightViewPoint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallAiInsightViewPoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallAiInsightViewPoint(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("mentionEvents", MentionEvents); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CallCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CallCollectionResponse.cs index 7d20157b6e1..ca5fd822bfe 100644 --- a/src/Microsoft.Graph/Generated/Models/CallCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CallCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CallCollectionResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CallEndedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/CallEndedEventMessageDetail.cs index 81caf62237e..801125d4379 100644 --- a/src/Microsoft.Graph/Generated/Models/CallEndedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/CallEndedEventMessageDetail.cs @@ -86,7 +86,7 @@ public CallEndedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallEndedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallEndedEventMessageDetail(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeSpanValue("callDuration", CallDuration); writer.WriteEnumValue("callEventType", CallEventType); diff --git a/src/Microsoft.Graph/Generated/Models/CallEvent.cs b/src/Microsoft.Graph/Generated/Models/CallEvent.cs index fbcd07783af..bd0d36f8e4b 100644 --- a/src/Microsoft.Graph/Generated/Models/CallEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/CallEvent.cs @@ -79,7 +79,7 @@ public DateTimeOffset? EventDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -108,7 +108,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("callEventType", CallEventType); writer.WriteDateTimeOffsetValue("eventDateTime", EventDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/CallMediaState.cs b/src/Microsoft.Graph/Generated/Models/CallMediaState.cs index 2f2b7834f4a..dcf1efa372b 100644 --- a/src/Microsoft.Graph/Generated/Models/CallMediaState.cs +++ b/src/Microsoft.Graph/Generated/Models/CallMediaState.cs @@ -58,7 +58,7 @@ public CallMediaState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallMediaState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallMediaState(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("audio", Audio); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CallOptions.cs b/src/Microsoft.Graph/Generated/Models/CallOptions.cs index 2c697a4a067..1879a621655 100644 --- a/src/Microsoft.Graph/Generated/Models/CallOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/CallOptions.cs @@ -76,7 +76,7 @@ public CallOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("hideBotAfterEscalation", HideBotAfterEscalation); writer.WriteBoolValue("isContentSharingNotificationEnabled", IsContentSharingNotificationEnabled); writer.WriteBoolValue("isDeltaRosterEnabled", IsDeltaRosterEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/CallParticipantInfo.cs b/src/Microsoft.Graph/Generated/Models/CallParticipantInfo.cs index 5eaf07eea7d..e27ac092caa 100644 --- a/src/Microsoft.Graph/Generated/Models/CallParticipantInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/CallParticipantInfo.cs @@ -68,7 +68,7 @@ public CallParticipantInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallParticipantInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallParticipantInfo(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("participant", Participant); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecording.cs b/src/Microsoft.Graph/Generated/Models/CallRecording.cs index b972ee69225..f4fb8840024 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecording.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecording.cs @@ -127,7 +127,7 @@ public string RecordingContentUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecording CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecording(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("callId", CallId); writer.WriteByteArrayValue("content", Content); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecordingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CallRecordingCollectionResponse.cs index 88754f32d4b..66b30c5225d 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecordingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecordingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CallRecordingCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecordingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecordingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CallRecordingEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/CallRecordingEventMessageDetail.cs index f76e2cff0a1..a6ac450de22 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecordingEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecordingEventMessageDetail.cs @@ -118,7 +118,7 @@ public CallRecordingEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecordingEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecordingEventMessageDetail(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("callId", CallId); writer.WriteStringValue("callRecordingDisplayName", CallRecordingDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/AdministrativeUnitInfo.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/AdministrativeUnitInfo.cs index e7b2f79b9c5..0bbbe72a1a1 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/AdministrativeUnitInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/AdministrativeUnitInfo.cs @@ -68,7 +68,7 @@ public AdministrativeUnitInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRecords.AdministrativeUnitInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.AdministrativeUnitInfo(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/CallLogRow.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/CallLogRow.cs index db9d28b7dc2..15d2152d3ad 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/CallLogRow.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/CallLogRow.cs @@ -148,7 +148,7 @@ public CallLogRow() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRecords.CallLogRow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -181,7 +181,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("administrativeUnitInfos", AdministrativeUnitInfos); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/CallRecord.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/CallRecord.cs index 93aa0ca8910..70b4449801e 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/CallRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/CallRecord.cs @@ -161,7 +161,7 @@ public long? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.CallRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.CallRecord(); } /// @@ -192,7 +192,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("joinWebUrl", JoinWebUrl); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/CallRecordCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/CallRecordCollectionResponse.cs index c574558f4bc..ce68fd99876 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/CallRecordCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/CallRecordCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CallRecordCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.CallRecordCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.CallRecordCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/ClientUserAgent.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/ClientUserAgent.cs index 116e225ea57..da768e1a77d 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/ClientUserAgent.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/ClientUserAgent.cs @@ -70,7 +70,7 @@ public ClientUserAgent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.ClientUserAgent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.ClientUserAgent(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("azureADAppId", AzureADAppId); writer.WriteStringValue("communicationServiceId", CommunicationServiceId); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/DeviceInfo.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/DeviceInfo.cs index 9a15c1e8604..1f3725500b8 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/DeviceInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/DeviceInfo.cs @@ -218,7 +218,7 @@ public DeviceInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRecords.DeviceInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.DeviceInfo(); } /// @@ -259,7 +259,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("captureDeviceDriver", CaptureDeviceDriver); writer.WriteStringValue("captureDeviceName", CaptureDeviceName); writer.WriteFloatValue("captureNotFunctioningEventRatio", CaptureNotFunctioningEventRatio); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/DirectRoutingLogRow.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/DirectRoutingLogRow.cs index 99d11e49111..9007911f451 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/DirectRoutingLogRow.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/DirectRoutingLogRow.cs @@ -233,7 +233,7 @@ public string UserCountryCode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.DirectRoutingLogRow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.DirectRoutingLogRow(); } /// @@ -271,7 +271,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("calleeNumber", CalleeNumber); writer.WriteIntValue("callEndSubReason", CallEndSubReason); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/Endpoint.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/Endpoint.cs index 3be21bf04f7..38fab588615 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/Endpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/Endpoint.cs @@ -68,7 +68,7 @@ public Endpoint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRecords.Endpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -95,7 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("userAgent", UserAgent); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/FailureInfo.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/FailureInfo.cs index 7bcc3e99b88..0d95a192805 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/FailureInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/FailureInfo.cs @@ -74,7 +74,7 @@ public FailureInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRecords.FailureInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.FailureInfo(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("reason", Reason); writer.WriteEnumValue("stage", Stage); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/FeedbackTokenSet.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/FeedbackTokenSet.cs index b3152f9098a..f5656c903a0 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/FeedbackTokenSet.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/FeedbackTokenSet.cs @@ -52,7 +52,7 @@ public FeedbackTokenSet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRecords.FeedbackTokenSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.FeedbackTokenSet(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/Media.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/Media.cs index e385d040a06..fb9be2ee64d 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/Media.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/Media.cs @@ -148,7 +148,7 @@ public Media() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRecords.Media CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.Media(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("calleeDevice", CalleeDevice); writer.WriteObjectValue("calleeNetwork", CalleeNetwork); writer.WriteObjectValue("callerDevice", CallerDevice); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/MediaStream.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/MediaStream.cs index 1b87036de35..53d42e6587f 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/MediaStream.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/MediaStream.cs @@ -242,7 +242,7 @@ public MediaStream() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRecords.MediaStream CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.MediaStream(); } /// @@ -292,7 +292,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("audioCodec", AudioCodec); writer.WriteFloatValue("averageAudioDegradation", AverageAudioDegradation); writer.WriteTimeSpanValue("averageAudioNetworkJitter", AverageAudioNetworkJitter); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/NetworkInfo.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/NetworkInfo.cs index eaf30b3c166..719a1100471 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/NetworkInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/NetworkInfo.cs @@ -328,7 +328,7 @@ public NetworkInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRecords.NetworkInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.NetworkInfo(); } /// @@ -374,7 +374,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteFloatValue("bandwidthLowEventRatio", BandwidthLowEventRatio); writer.WriteStringValue("basicServiceSetIdentifier", BasicServiceSetIdentifier); writer.WriteEnumValue("connectionType", ConnectionType); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/Organizer.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/Organizer.cs index 4513abfffff..8e9f3808234 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/Organizer.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/Organizer.cs @@ -26,7 +26,7 @@ public Organizer() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.Organizer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.Organizer(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/Participant.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/Participant.cs index 237b55c72e9..5e61673fa71 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/Participant.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/Participant.cs @@ -26,7 +26,7 @@ public Participant() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.Participant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.Participant(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/ParticipantBase.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/ParticipantBase.cs index 6e0afa32d6d..11ead01cfbd 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/ParticipantBase.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/ParticipantBase.cs @@ -51,7 +51,7 @@ public partial class ParticipantBase : global::Microsoft.Graph.Beta.Models.Entit /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.ParticipantBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("administrativeUnitInfos", AdministrativeUnitInfos); writer.WriteObjectValue("identity", Identity); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/ParticipantCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/ParticipantCollectionResponse.cs index 942ec500b61..e27a95a8905 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/ParticipantCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/ParticipantCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ParticipantCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.ParticipantCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.ParticipantCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/ParticipantEndpoint.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/ParticipantEndpoint.cs index d4b68428489..4dc48dac6ce 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/ParticipantEndpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/ParticipantEndpoint.cs @@ -118,7 +118,7 @@ public ParticipantEndpoint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.ParticipantEndpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.ParticipantEndpoint(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("associatedIdentity", AssociatedIdentity); writer.WriteIntValue("cpuCoresCount", CpuCoresCount); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/PstnBlockedUsersLogRow.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/PstnBlockedUsersLogRow.cs index f9b72b409c0..d561ca0bab9 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/PstnBlockedUsersLogRow.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/PstnBlockedUsersLogRow.cs @@ -160,7 +160,7 @@ public PstnBlockedUsersLogRow() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRecords.PstnBlockedUsersLogRow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.PstnBlockedUsersLogRow(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("blockDateTime", BlockDateTime); writer.WriteStringValue("blockReason", BlockReason); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/PstnCallLogRow.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/PstnCallLogRow.cs index bb4e1070986..0aa1d6880cf 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/PstnCallLogRow.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/PstnCallLogRow.cs @@ -327,7 +327,7 @@ public string UsageCountryCode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.PstnCallLogRow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.PstnCallLogRow(); } /// @@ -369,7 +369,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("callDurationSource", CallDurationSource); writer.WriteStringValue("calleeNumber", CalleeNumber); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/PstnOnlineMeetingDialoutReport.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/PstnOnlineMeetingDialoutReport.cs index 6b1d14daac0..3267b1c30d3 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/PstnOnlineMeetingDialoutReport.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/PstnOnlineMeetingDialoutReport.cs @@ -166,7 +166,7 @@ public PstnOnlineMeetingDialoutReport() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRecords.PstnOnlineMeetingDialoutReport CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.PstnOnlineMeetingDialoutReport(); } /// @@ -195,7 +195,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("currency", Currency); writer.WriteStringValue("destinationContext", DestinationContext); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/Segment.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/Segment.cs index 1e8febd1305..be13ac9aebf 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/Segment.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/Segment.cs @@ -95,7 +95,7 @@ public DateTimeOffset? StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.Segment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.Segment(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("callee", Callee); writer.WriteObjectValue("caller", Caller); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/SegmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/SegmentCollectionResponse.cs index e75223e7a2d..1b0cd1afdf9 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/SegmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/SegmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SegmentCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.SegmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.SegmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/ServiceEndpoint.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/ServiceEndpoint.cs index 8139f1aebd8..556060bb6cb 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/ServiceEndpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/ServiceEndpoint.cs @@ -26,7 +26,7 @@ public ServiceEndpoint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.ServiceEndpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.ServiceEndpoint(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/ServiceUserAgent.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/ServiceUserAgent.cs index 3b62f90ed4d..11706697a26 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/ServiceUserAgent.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/ServiceUserAgent.cs @@ -32,7 +32,7 @@ public ServiceUserAgent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.ServiceUserAgent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.ServiceUserAgent(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("role", Role); } diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/Session.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/Session.cs index 4ce4ef6b11b..8035fce736e 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/Session.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/Session.cs @@ -117,7 +117,7 @@ public DateTimeOffset? StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.Session CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.Session(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("callee", Callee); writer.WriteObjectValue("caller", Caller); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/SessionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/SessionCollectionResponse.cs index 0aec5af1bd9..a40232d8354 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/SessionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/SessionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SessionCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.SessionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.SessionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/SmsLogRow.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/SmsLogRow.cs index c369d67bd54..02d4f4433a3 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/SmsLogRow.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/SmsLogRow.cs @@ -197,7 +197,7 @@ public string UserCountryCode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.SmsLogRow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.SmsLogRow(); } /// @@ -229,7 +229,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDecimalValue("callCharge", CallCharge); writer.WriteStringValue("currency", Currency); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/TraceRouteHop.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/TraceRouteHop.cs index a466f9755a4..2cdd83a39f8 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/TraceRouteHop.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/TraceRouteHop.cs @@ -80,7 +80,7 @@ public TraceRouteHop() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRecords.TraceRouteHop CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.TraceRouteHop(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("hopCount", HopCount); writer.WriteStringValue("ipAddress", IpAddress); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/UserAgent.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/UserAgent.cs index d5daf000f69..2d4bafbfd77 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/UserAgent.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/UserAgent.cs @@ -84,7 +84,7 @@ public UserAgent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRecords.UserAgent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -112,7 +112,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applicationVersion", ApplicationVersion); writer.WriteStringValue("headerValue", HeaderValue); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/UserFeedback.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/UserFeedback.cs index d9be7f9f8ad..5cfc009b0b9 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/UserFeedback.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/UserFeedback.cs @@ -90,7 +90,7 @@ public UserFeedback() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRecords.UserFeedback CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.UserFeedback(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("rating", Rating); writer.WriteStringValue("text", Text); diff --git a/src/Microsoft.Graph/Generated/Models/CallRecords/UserIdentity.cs b/src/Microsoft.Graph/Generated/Models/CallRecords/UserIdentity.cs index 7b381912e9d..0dbbe746497 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRecords/UserIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRecords/UserIdentity.cs @@ -42,7 +42,7 @@ public UserIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallRecords.UserIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRecords.UserIdentity(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userPrincipalName", UserPrincipalName); } diff --git a/src/Microsoft.Graph/Generated/Models/CallRoute.cs b/src/Microsoft.Graph/Generated/Models/CallRoute.cs index e70a68c33c6..1cc5f2a84b5 100644 --- a/src/Microsoft.Graph/Generated/Models/CallRoute.cs +++ b/src/Microsoft.Graph/Generated/Models/CallRoute.cs @@ -90,7 +90,7 @@ public CallRoute() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallRoute CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallRoute(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("final", Final); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("original", Original); diff --git a/src/Microsoft.Graph/Generated/Models/CallSettings.cs b/src/Microsoft.Graph/Generated/Models/CallSettings.cs index 0d75873659a..f7c67bd8a87 100644 --- a/src/Microsoft.Graph/Generated/Models/CallSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/CallSettings.cs @@ -51,7 +51,7 @@ public partial class CallSettings : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallSettings(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("delegates", Delegates); writer.WriteCollectionOfObjectValues("delegators", Delegators); diff --git a/src/Microsoft.Graph/Generated/Models/CallStartedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/CallStartedEventMessageDetail.cs index 56abfdcf2e7..8f86ac32cde 100644 --- a/src/Microsoft.Graph/Generated/Models/CallStartedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/CallStartedEventMessageDetail.cs @@ -64,7 +64,7 @@ public CallStartedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallStartedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallStartedEventMessageDetail(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("callEventType", CallEventType); writer.WriteStringValue("callId", CallId); diff --git a/src/Microsoft.Graph/Generated/Models/CallTranscript.cs b/src/Microsoft.Graph/Generated/Models/CallTranscript.cs index 2510dd765a9..5449dd0d869 100644 --- a/src/Microsoft.Graph/Generated/Models/CallTranscript.cs +++ b/src/Microsoft.Graph/Generated/Models/CallTranscript.cs @@ -143,7 +143,7 @@ public string TranscriptContentUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallTranscript CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallTranscript(); } /// @@ -171,7 +171,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("callId", CallId); writer.WriteByteArrayValue("content", Content); diff --git a/src/Microsoft.Graph/Generated/Models/CallTranscriptCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CallTranscriptCollectionResponse.cs index d92b83b5c71..3abdfe0a834 100644 --- a/src/Microsoft.Graph/Generated/Models/CallTranscriptCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CallTranscriptCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CallTranscriptCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallTranscriptCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallTranscriptCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CallTranscriptEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/CallTranscriptEventMessageDetail.cs index c39b43c494c..dc55b6436e0 100644 --- a/src/Microsoft.Graph/Generated/Models/CallTranscriptEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/CallTranscriptEventMessageDetail.cs @@ -74,7 +74,7 @@ public CallTranscriptEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CallTranscriptEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallTranscriptEventMessageDetail(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("callId", CallId); writer.WriteStringValue("callTranscriptICalUid", CallTranscriptICalUid); diff --git a/src/Microsoft.Graph/Generated/Models/CallTranscriptionInfo.cs b/src/Microsoft.Graph/Generated/Models/CallTranscriptionInfo.cs index 98fcf213e5a..84fa639c87c 100644 --- a/src/Microsoft.Graph/Generated/Models/CallTranscriptionInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/CallTranscriptionInfo.cs @@ -64,7 +64,7 @@ public CallTranscriptionInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CallTranscriptionInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CallTranscriptionInfo(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("state", State); diff --git a/src/Microsoft.Graph/Generated/Models/CampaignSchedule.cs b/src/Microsoft.Graph/Generated/Models/CampaignSchedule.cs index bf6c12678f5..c2a5797c648 100644 --- a/src/Microsoft.Graph/Generated/Models/CampaignSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/CampaignSchedule.cs @@ -70,7 +70,7 @@ public CampaignSchedule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CampaignSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CampaignSchedule(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("completionDateTime", CompletionDateTime); writer.WriteDateTimeOffsetValue("launchDateTime", LaunchDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CancelMediaProcessingOperation.cs b/src/Microsoft.Graph/Generated/Models/CancelMediaProcessingOperation.cs index 9ae5ada619e..a855ea0fcea 100644 --- a/src/Microsoft.Graph/Generated/Models/CancelMediaProcessingOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/CancelMediaProcessingOperation.cs @@ -19,7 +19,7 @@ public partial class CancelMediaProcessingOperation : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CancelMediaProcessingOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CancelMediaProcessingOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CanvasLayout.cs b/src/Microsoft.Graph/Generated/Models/CanvasLayout.cs index eeda524ea1c..734e6cda10b 100644 --- a/src/Microsoft.Graph/Generated/Models/CanvasLayout.cs +++ b/src/Microsoft.Graph/Generated/Models/CanvasLayout.cs @@ -51,7 +51,7 @@ public partial class CanvasLayout : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CanvasLayout CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CanvasLayout(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("horizontalSections", HorizontalSections); writer.WriteObjectValue("verticalSection", VerticalSection); diff --git a/src/Microsoft.Graph/Generated/Models/CartToClassAssociation.cs b/src/Microsoft.Graph/Generated/Models/CartToClassAssociation.cs index 9043fd01273..365b34c6504 100644 --- a/src/Microsoft.Graph/Generated/Models/CartToClassAssociation.cs +++ b/src/Microsoft.Graph/Generated/Models/CartToClassAssociation.cs @@ -102,7 +102,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CartToClassAssociation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CartToClassAssociation(); } /// @@ -128,7 +128,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("classroomIds", ClassroomIds); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/CartToClassAssociationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CartToClassAssociationCollectionResponse.cs index ecb9abd72ec..faa47aeaea3 100644 --- a/src/Microsoft.Graph/Generated/Models/CartToClassAssociationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CartToClassAssociationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CartToClassAssociationCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CartToClassAssociationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CartToClassAssociationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CertificateAuthority.cs b/src/Microsoft.Graph/Generated/Models/CertificateAuthority.cs index 6c670c4fa4a..2ff19230e42 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateAuthority.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateAuthority.cs @@ -138,7 +138,7 @@ public CertificateAuthority() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CertificateAuthority CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateAuthority(); } /// @@ -164,7 +164,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("certificate", Certificate); writer.WriteStringValue("certificateRevocationListUrl", CertificateRevocationListUrl); writer.WriteStringValue("deltaCertificateRevocationListUrl", DeltaCertificateRevocationListUrl); diff --git a/src/Microsoft.Graph/Generated/Models/CertificateAuthorityAsEntity.cs b/src/Microsoft.Graph/Generated/Models/CertificateAuthorityAsEntity.cs index 5a8a35b30b4..25593ab7e2e 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateAuthorityAsEntity.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateAuthorityAsEntity.cs @@ -73,7 +73,7 @@ public string IssuerSubjectKeyIdentifier /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CertificateAuthorityAsEntity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateAuthorityAsEntity(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("certificate", Certificate); writer.WriteBoolValue("isRootAuthority", IsRootAuthority); diff --git a/src/Microsoft.Graph/Generated/Models/CertificateAuthorityAsEntityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CertificateAuthorityAsEntityCollectionResponse.cs index 455abfaf2ef..c75b5d0a9e7 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateAuthorityAsEntityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateAuthorityAsEntityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CertificateAuthorityAsEntityCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CertificateAuthorityAsEntityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateAuthorityAsEntityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CertificateAuthorityDetail.cs b/src/Microsoft.Graph/Generated/Models/CertificateAuthorityDetail.cs index 34167ee4edf..7ffe9abc294 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateAuthorityDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateAuthorityDetail.cs @@ -162,7 +162,7 @@ public CertificateAuthorityDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CertificateAuthorityDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateAuthorityDetail(); } /// @@ -192,7 +192,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("certificate", Certificate); writer.WriteEnumValue("certificateAuthorityType", CertificateAuthorityType); diff --git a/src/Microsoft.Graph/Generated/Models/CertificateAuthorityDetailCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CertificateAuthorityDetailCollectionResponse.cs index 514465755a2..83146510131 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateAuthorityDetailCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateAuthorityDetailCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CertificateAuthorityDetailCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CertificateAuthorityDetailCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateAuthorityDetailCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CertificateAuthorityPath.cs b/src/Microsoft.Graph/Generated/Models/CertificateAuthorityPath.cs index bafd4daf6fa..cd928991f78 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateAuthorityPath.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateAuthorityPath.cs @@ -51,7 +51,7 @@ public partial class CertificateAuthorityPath : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CertificateAuthorityPath CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateAuthorityPath(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("certificateBasedApplicationConfigurations", CertificateBasedApplicationConfigurations); writer.WriteCollectionOfObjectValues("mutualTlsOauthConfigurations", MutualTlsOauthConfigurations); diff --git a/src/Microsoft.Graph/Generated/Models/CertificateBasedApplicationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CertificateBasedApplicationConfiguration.cs index 2124fc81226..681e7e90077 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateBasedApplicationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateBasedApplicationConfiguration.cs @@ -58,7 +58,7 @@ public CertificateBasedApplicationConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CertificateBasedApplicationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateBasedApplicationConfiguration(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/CertificateBasedApplicationConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CertificateBasedApplicationConfigurationCollectionResponse.cs index 4faa81ba442..79d5cabd6ff 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateBasedApplicationConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateBasedApplicationConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CertificateBasedApplicationConfigurationCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CertificateBasedApplicationConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateBasedApplicationConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthConfiguration.cs index 48a1032b1c0..d6f2a399c33 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthConfiguration.cs @@ -35,7 +35,7 @@ public partial class CertificateBasedAuthConfiguration : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CertificateBasedAuthConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateBasedAuthConfiguration(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("certificateAuthorities", CertificateAuthorities); } diff --git a/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthConfigurationCollectionResponse.cs index 07c75beea15..3f89d4c90e7 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CertificateBasedAuthConfigurationCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CertificateBasedAuthConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateBasedAuthConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthPki.cs b/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthPki.cs index bb34e9e0f11..a511c6b7648 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthPki.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthPki.cs @@ -96,7 +96,7 @@ public CertificateBasedAuthPki() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CertificateBasedAuthPki CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateBasedAuthPki(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("certificateAuthorities", CertificateAuthorities); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthPkiCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthPkiCollectionResponse.cs index 7c00ef0cad8..85361dbbb04 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthPkiCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateBasedAuthPkiCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CertificateBasedAuthPkiCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CertificateBasedAuthPkiCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateBasedAuthPkiCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CertificateConnectorDetails.cs b/src/Microsoft.Graph/Generated/Models/CertificateConnectorDetails.cs index b03ae56066d..bfd53e0c2c5 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateConnectorDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateConnectorDetails.cs @@ -80,7 +80,7 @@ public string MachineName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CertificateConnectorDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateConnectorDetails(); } /// @@ -104,7 +104,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("connectorName", ConnectorName); writer.WriteStringValue("connectorVersion", ConnectorVersion); diff --git a/src/Microsoft.Graph/Generated/Models/CertificateConnectorDetailsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CertificateConnectorDetailsCollectionResponse.cs index 36de4d23273..9e765afc418 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateConnectorDetailsCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateConnectorDetailsCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CertificateConnectorDetailsCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CertificateConnectorDetailsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateConnectorDetailsCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CertificateConnectorHealthMetricValue.cs b/src/Microsoft.Graph/Generated/Models/CertificateConnectorHealthMetricValue.cs index 8ce6dc61477..e0c2ae47b12 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateConnectorHealthMetricValue.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateConnectorHealthMetricValue.cs @@ -71,7 +71,7 @@ public CertificateConnectorHealthMetricValue() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CertificateConnectorHealthMetricValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateConnectorHealthMetricValue(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("dateTime", DateTime); writer.WriteLongValue("failureCount", FailureCount); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CertificateConnectorSetting.cs b/src/Microsoft.Graph/Generated/Models/CertificateConnectorSetting.cs index b70495f4776..5a5b2400995 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificateConnectorSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificateConnectorSetting.cs @@ -109,7 +109,7 @@ public CertificateConnectorSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CertificateConnectorSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificateConnectorSetting(); } /// @@ -135,7 +135,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("certExpiryTime", CertExpiryTime); writer.WriteStringValue("connectorVersion", ConnectorVersion); writer.WriteStringValue("enrollmentError", EnrollmentError); diff --git a/src/Microsoft.Graph/Generated/Models/Certification.cs b/src/Microsoft.Graph/Generated/Models/Certification.cs index 83c801f5363..daa343207c9 100644 --- a/src/Microsoft.Graph/Generated/Models/Certification.cs +++ b/src/Microsoft.Graph/Generated/Models/Certification.cs @@ -92,7 +92,7 @@ public Certification() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Certification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Certification(); } /// @@ -117,7 +117,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("certificationExpirationDateTime", CertificationExpirationDateTime); writer.WriteBoolValue("isPublisherAttested", IsPublisherAttested); writer.WriteDateTimeOffsetValue("lastCertificationDateTime", LastCertificationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/CertificationControl.cs b/src/Microsoft.Graph/Generated/Models/CertificationControl.cs index 4a548e9649f..60e0e84b889 100644 --- a/src/Microsoft.Graph/Generated/Models/CertificationControl.cs +++ b/src/Microsoft.Graph/Generated/Models/CertificationControl.cs @@ -84,7 +84,7 @@ public CertificationControl() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CertificationControl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CertificationControl(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("url", Url); diff --git a/src/Microsoft.Graph/Generated/Models/ChallengingWord.cs b/src/Microsoft.Graph/Generated/Models/ChallengingWord.cs index 538bd63b18a..dc4a170fc28 100644 --- a/src/Microsoft.Graph/Generated/Models/ChallengingWord.cs +++ b/src/Microsoft.Graph/Generated/Models/ChallengingWord.cs @@ -74,7 +74,7 @@ public ChallengingWord() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChallengingWord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChallengingWord(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("count", Count); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("word", Word); diff --git a/src/Microsoft.Graph/Generated/Models/ChangeAssignmentsActionResult.cs b/src/Microsoft.Graph/Generated/Models/ChangeAssignmentsActionResult.cs index e7f9dfc0f6b..0417a7b5477 100644 --- a/src/Microsoft.Graph/Generated/Models/ChangeAssignmentsActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ChangeAssignmentsActionResult.cs @@ -36,7 +36,7 @@ public partial class ChangeAssignmentsActionResult : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChangeAssignmentsActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChangeAssignmentsActionResult(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("deviceAssignmentItems", DeviceAssignmentItems); } diff --git a/src/Microsoft.Graph/Generated/Models/ChangeTrackedEntity.cs b/src/Microsoft.Graph/Generated/Models/ChangeTrackedEntity.cs index e4952efba95..7cc4086359a 100644 --- a/src/Microsoft.Graph/Generated/Models/ChangeTrackedEntity.cs +++ b/src/Microsoft.Graph/Generated/Models/ChangeTrackedEntity.cs @@ -63,7 +63,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChangeTrackedEntity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -104,7 +104,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); } diff --git a/src/Microsoft.Graph/Generated/Models/Channel.cs b/src/Microsoft.Graph/Generated/Models/Channel.cs index 06707a339c3..568e03a881e 100644 --- a/src/Microsoft.Graph/Generated/Models/Channel.cs +++ b/src/Microsoft.Graph/Generated/Models/Channel.cs @@ -273,7 +273,7 @@ public string WebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Channel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Channel(); } /// @@ -311,7 +311,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("allMembers", AllMembers); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ChannelAddedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/ChannelAddedEventMessageDetail.cs index de6b893b938..4774daa5026 100644 --- a/src/Microsoft.Graph/Generated/Models/ChannelAddedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/ChannelAddedEventMessageDetail.cs @@ -74,7 +74,7 @@ public ChannelAddedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChannelAddedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChannelAddedEventMessageDetail(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("channelDisplayName", ChannelDisplayName); writer.WriteStringValue("channelId", ChannelId); diff --git a/src/Microsoft.Graph/Generated/Models/ChannelCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ChannelCollectionResponse.cs index bdbc115a531..8843b52e318 100644 --- a/src/Microsoft.Graph/Generated/Models/ChannelCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ChannelCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ChannelCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChannelCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChannelCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ChannelDeletedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/ChannelDeletedEventMessageDetail.cs index 6bcde18e7b6..7a06a012ddb 100644 --- a/src/Microsoft.Graph/Generated/Models/ChannelDeletedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/ChannelDeletedEventMessageDetail.cs @@ -74,7 +74,7 @@ public ChannelDeletedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChannelDeletedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChannelDeletedEventMessageDetail(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("channelDisplayName", ChannelDisplayName); writer.WriteStringValue("channelId", ChannelId); diff --git a/src/Microsoft.Graph/Generated/Models/ChannelDescriptionUpdatedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/ChannelDescriptionUpdatedEventMessageDetail.cs index b7eb006b948..730d4e28be8 100644 --- a/src/Microsoft.Graph/Generated/Models/ChannelDescriptionUpdatedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/ChannelDescriptionUpdatedEventMessageDetail.cs @@ -74,7 +74,7 @@ public ChannelDescriptionUpdatedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChannelDescriptionUpdatedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChannelDescriptionUpdatedEventMessageDetail(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("channelDescription", ChannelDescription); writer.WriteStringValue("channelId", ChannelId); diff --git a/src/Microsoft.Graph/Generated/Models/ChannelIdentity.cs b/src/Microsoft.Graph/Generated/Models/ChannelIdentity.cs index 66834c40cf5..ff11c68d0d5 100644 --- a/src/Microsoft.Graph/Generated/Models/ChannelIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/ChannelIdentity.cs @@ -84,7 +84,7 @@ public ChannelIdentity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChannelIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChannelIdentity(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("channelId", ChannelId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("teamId", TeamId); diff --git a/src/Microsoft.Graph/Generated/Models/ChannelMembersNotificationRecipient.cs b/src/Microsoft.Graph/Generated/Models/ChannelMembersNotificationRecipient.cs index e6c35d7d6a0..5fb8c18797f 100644 --- a/src/Microsoft.Graph/Generated/Models/ChannelMembersNotificationRecipient.cs +++ b/src/Microsoft.Graph/Generated/Models/ChannelMembersNotificationRecipient.cs @@ -58,7 +58,7 @@ public ChannelMembersNotificationRecipient() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChannelMembersNotificationRecipient CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChannelMembersNotificationRecipient(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("channelId", ChannelId); writer.WriteStringValue("teamId", TeamId); diff --git a/src/Microsoft.Graph/Generated/Models/ChannelModerationSettings.cs b/src/Microsoft.Graph/Generated/Models/ChannelModerationSettings.cs index ad3a59023bb..cdee33dc282 100644 --- a/src/Microsoft.Graph/Generated/Models/ChannelModerationSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/ChannelModerationSettings.cs @@ -76,7 +76,7 @@ public ChannelModerationSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChannelModerationSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChannelModerationSettings(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowNewMessageFromBots", AllowNewMessageFromBots); writer.WriteBoolValue("allowNewMessageFromConnectors", AllowNewMessageFromConnectors); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ChannelRenamedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/ChannelRenamedEventMessageDetail.cs index ce78acdee62..384590ca3d4 100644 --- a/src/Microsoft.Graph/Generated/Models/ChannelRenamedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/ChannelRenamedEventMessageDetail.cs @@ -74,7 +74,7 @@ public ChannelRenamedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChannelRenamedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChannelRenamedEventMessageDetail(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("channelDisplayName", ChannelDisplayName); writer.WriteStringValue("channelId", ChannelId); diff --git a/src/Microsoft.Graph/Generated/Models/ChannelSetAsFavoriteByDefaultEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/ChannelSetAsFavoriteByDefaultEventMessageDetail.cs index f624f9dcf4d..afde51565e7 100644 --- a/src/Microsoft.Graph/Generated/Models/ChannelSetAsFavoriteByDefaultEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/ChannelSetAsFavoriteByDefaultEventMessageDetail.cs @@ -58,7 +58,7 @@ public ChannelSetAsFavoriteByDefaultEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChannelSetAsFavoriteByDefaultEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChannelSetAsFavoriteByDefaultEventMessageDetail(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("channelId", ChannelId); writer.WriteObjectValue("initiator", Initiator); diff --git a/src/Microsoft.Graph/Generated/Models/ChannelSharingUpdatedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/ChannelSharingUpdatedEventMessageDetail.cs index fd6a9bf9786..ee5d0b68296 100644 --- a/src/Microsoft.Graph/Generated/Models/ChannelSharingUpdatedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/ChannelSharingUpdatedEventMessageDetail.cs @@ -90,7 +90,7 @@ public ChannelSharingUpdatedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChannelSharingUpdatedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChannelSharingUpdatedEventMessageDetail(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteStringValue("ownerTeamId", OwnerTeamId); diff --git a/src/Microsoft.Graph/Generated/Models/ChannelSummary.cs b/src/Microsoft.Graph/Generated/Models/ChannelSummary.cs index bcde6602fba..e04cb2d0c42 100644 --- a/src/Microsoft.Graph/Generated/Models/ChannelSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ChannelSummary.cs @@ -76,7 +76,7 @@ public ChannelSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChannelSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChannelSummary(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("guestsCount", GuestsCount); writer.WriteBoolValue("hasMembersFromOtherTenants", HasMembersFromOtherTenants); writer.WriteIntValue("membersCount", MembersCount); diff --git a/src/Microsoft.Graph/Generated/Models/ChannelUnsetAsFavoriteByDefaultEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/ChannelUnsetAsFavoriteByDefaultEventMessageDetail.cs index c6edde2541c..8a2b8537c6f 100644 --- a/src/Microsoft.Graph/Generated/Models/ChannelUnsetAsFavoriteByDefaultEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/ChannelUnsetAsFavoriteByDefaultEventMessageDetail.cs @@ -58,7 +58,7 @@ public ChannelUnsetAsFavoriteByDefaultEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChannelUnsetAsFavoriteByDefaultEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChannelUnsetAsFavoriteByDefaultEventMessageDetail(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("channelId", ChannelId); writer.WriteObjectValue("initiator", Initiator); diff --git a/src/Microsoft.Graph/Generated/Models/Chat.cs b/src/Microsoft.Graph/Generated/Models/Chat.cs index 46abfdc2ab9..50631f83520 100644 --- a/src/Microsoft.Graph/Generated/Models/Chat.cs +++ b/src/Microsoft.Graph/Generated/Models/Chat.cs @@ -267,7 +267,7 @@ public string WebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Chat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Chat(); } /// @@ -304,7 +304,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("chatType", ChatType); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/ChatActivityStatistics.cs b/src/Microsoft.Graph/Generated/Models/ChatActivityStatistics.cs index 01189a040d8..5852bbaccaa 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatActivityStatistics.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatActivityStatistics.cs @@ -32,7 +32,7 @@ public ChatActivityStatistics() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChatActivityStatistics CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatActivityStatistics(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeSpanValue("afterHours", AfterHours); } diff --git a/src/Microsoft.Graph/Generated/Models/ChatCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ChatCollectionResponse.cs index f45d541a972..2177c2c1454 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ChatCollectionResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChatCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ChatInfo.cs b/src/Microsoft.Graph/Generated/Models/ChatInfo.cs index 33c34e5b087..bea30d69e41 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatInfo.cs @@ -100,7 +100,7 @@ public ChatInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChatInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatInfo(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("messageId", MessageId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("replyChainMessageId", ReplyChainMessageId); diff --git a/src/Microsoft.Graph/Generated/Models/ChatMembersNotificationRecipient.cs b/src/Microsoft.Graph/Generated/Models/ChatMembersNotificationRecipient.cs index 4d4954378e9..9af11f5ec17 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMembersNotificationRecipient.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMembersNotificationRecipient.cs @@ -42,7 +42,7 @@ public ChatMembersNotificationRecipient() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChatMembersNotificationRecipient CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMembersNotificationRecipient(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("chatId", ChatId); } diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessage.cs b/src/Microsoft.Graph/Generated/Models/ChatMessage.cs index 123f78a765b..056d40bd287 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessage.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessage.cs @@ -359,7 +359,7 @@ public string WebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChatMessage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMessage(); } /// @@ -403,7 +403,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("attachments", Attachments); writer.WriteObjectValue("body", Body); diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessageAttachment.cs b/src/Microsoft.Graph/Generated/Models/ChatMessageAttachment.cs index 5916b9e4bed..13b4b04a47e 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessageAttachment.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessageAttachment.cs @@ -164,7 +164,7 @@ public ChatMessageAttachment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChatMessageAttachment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMessageAttachment(); } /// @@ -191,7 +191,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("content", Content); writer.WriteStringValue("contentType", ContentType); writer.WriteStringValue("contentUrl", ContentUrl); diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ChatMessageCollectionResponse.cs index dc423f55b4c..275ed41f1b3 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ChatMessageCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChatMessageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMessageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessageFromIdentitySet.cs b/src/Microsoft.Graph/Generated/Models/ChatMessageFromIdentitySet.cs index c8cd42f66ae..dd0e09feba5 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessageFromIdentitySet.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessageFromIdentitySet.cs @@ -26,7 +26,7 @@ public ChatMessageFromIdentitySet() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChatMessageFromIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMessageFromIdentitySet(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessageHistoryItem.cs b/src/Microsoft.Graph/Generated/Models/ChatMessageHistoryItem.cs index f54e3fbf175..a291686371e 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessageHistoryItem.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessageHistoryItem.cs @@ -80,7 +80,7 @@ public ChatMessageHistoryItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChatMessageHistoryItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMessageHistoryItem(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("actions", Actions); writer.WriteDateTimeOffsetValue("modifiedDateTime", ModifiedDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessageHostedContent.cs b/src/Microsoft.Graph/Generated/Models/ChatMessageHostedContent.cs index 091297548ae..9c59f5e6617 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessageHostedContent.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessageHostedContent.cs @@ -26,7 +26,7 @@ public ChatMessageHostedContent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMessageHostedContent(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessageHostedContentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ChatMessageHostedContentCollectionResponse.cs index 2cbacbaa5b7..19d512bef58 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessageHostedContentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessageHostedContentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ChatMessageHostedContentCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChatMessageHostedContentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMessageHostedContentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessageInfo.cs b/src/Microsoft.Graph/Generated/Models/ChatMessageInfo.cs index b109d83b1dc..1cf9329179a 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessageInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessageInfo.cs @@ -85,7 +85,7 @@ public bool? IsDeleted /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChatMessageInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMessageInfo(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("body", Body); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessageMention.cs b/src/Microsoft.Graph/Generated/Models/ChatMessageMention.cs index d64c6c032f8..1002a662e93 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessageMention.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessageMention.cs @@ -90,7 +90,7 @@ public ChatMessageMention() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChatMessageMention CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMessageMention(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("id", Id); writer.WriteObjectValue("mentioned", Mentioned); writer.WriteStringValue("mentionText", MentionText); diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessageMentionedIdentitySet.cs b/src/Microsoft.Graph/Generated/Models/ChatMessageMentionedIdentitySet.cs index 75c85e3e336..c3a0556255d 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessageMentionedIdentitySet.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessageMentionedIdentitySet.cs @@ -58,7 +58,7 @@ public ChatMessageMentionedIdentitySet() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChatMessageMentionedIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMessageMentionedIdentitySet(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("conversation", Conversation); writer.WriteObjectValue("tag", Tag); diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessagePolicyViolation.cs b/src/Microsoft.Graph/Generated/Models/ChatMessagePolicyViolation.cs index 1db8a0a3ffa..f7e87786ac8 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessagePolicyViolation.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessagePolicyViolation.cs @@ -102,7 +102,7 @@ public ChatMessagePolicyViolation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChatMessagePolicyViolation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMessagePolicyViolation(); } /// @@ -127,7 +127,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("dlpAction", DlpAction); writer.WriteStringValue("justificationText", JustificationText); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessagePolicyViolationPolicyTip.cs b/src/Microsoft.Graph/Generated/Models/ChatMessagePolicyViolationPolicyTip.cs index 50a9f80e799..dc2d9234dd2 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessagePolicyViolationPolicyTip.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessagePolicyViolationPolicyTip.cs @@ -100,7 +100,7 @@ public ChatMessagePolicyViolationPolicyTip() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChatMessagePolicyViolationPolicyTip CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMessagePolicyViolationPolicyTip(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("complianceUrl", ComplianceUrl); writer.WriteStringValue("generalText", GeneralText); writer.WriteCollectionOfPrimitiveValues("matchedConditionDescriptions", MatchedConditionDescriptions); diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessageReaction.cs b/src/Microsoft.Graph/Generated/Models/ChatMessageReaction.cs index 6dfd1763540..4dd92f145e8 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessageReaction.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessageReaction.cs @@ -122,7 +122,7 @@ public ChatMessageReaction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChatMessageReaction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMessageReaction(); } /// @@ -147,7 +147,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessageReactionIdentitySet.cs b/src/Microsoft.Graph/Generated/Models/ChatMessageReactionIdentitySet.cs index a6483746c3b..84a377edbfd 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessageReactionIdentitySet.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessageReactionIdentitySet.cs @@ -26,7 +26,7 @@ public ChatMessageReactionIdentitySet() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChatMessageReactionIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatMessageReactionIdentitySet(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ChatRenamedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/ChatRenamedEventMessageDetail.cs index b5020c3e289..9210c506e81 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatRenamedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatRenamedEventMessageDetail.cs @@ -74,7 +74,7 @@ public ChatRenamedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChatRenamedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatRenamedEventMessageDetail(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("chatDisplayName", ChatDisplayName); writer.WriteStringValue("chatId", ChatId); diff --git a/src/Microsoft.Graph/Generated/Models/ChatRestrictions.cs b/src/Microsoft.Graph/Generated/Models/ChatRestrictions.cs index ab0a52ceb1e..efb4ad929fc 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatRestrictions.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatRestrictions.cs @@ -58,7 +58,7 @@ public ChatRestrictions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChatRestrictions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatRestrictions(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowTextOnly", AllowTextOnly); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ChatViewpoint.cs b/src/Microsoft.Graph/Generated/Models/ChatViewpoint.cs index feb31f038f2..ee5558e1a5d 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatViewpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatViewpoint.cs @@ -64,7 +64,7 @@ public ChatViewpoint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChatViewpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChatViewpoint(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isHidden", IsHidden); writer.WriteDateTimeOffsetValue("lastMessageReadDateTime", LastMessageReadDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ChecklistItem.cs b/src/Microsoft.Graph/Generated/Models/ChecklistItem.cs index e7e91316cdc..fef316b4214 100644 --- a/src/Microsoft.Graph/Generated/Models/ChecklistItem.cs +++ b/src/Microsoft.Graph/Generated/Models/ChecklistItem.cs @@ -53,7 +53,7 @@ public bool? IsChecked /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChecklistItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChecklistItem(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("checkedDateTime", CheckedDateTime); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ChecklistItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ChecklistItemCollectionResponse.cs index ac125e6a3a4..c5a0b21155b 100644 --- a/src/Microsoft.Graph/Generated/Models/ChecklistItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ChecklistItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ChecklistItemCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChecklistItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChecklistItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ChoiceColumn.cs b/src/Microsoft.Graph/Generated/Models/ChoiceColumn.cs index 3df4a69b0d8..6b7c9b2a9e5 100644 --- a/src/Microsoft.Graph/Generated/Models/ChoiceColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/ChoiceColumn.cs @@ -90,7 +90,7 @@ public ChoiceColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChoiceColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChoiceColumn(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowTextEntry", AllowTextEntry); writer.WriteCollectionOfPrimitiveValues("choices", Choices); writer.WriteStringValue("displayAs", DisplayAs); diff --git a/src/Microsoft.Graph/Generated/Models/ChromeOSDeviceProperty.cs b/src/Microsoft.Graph/Generated/Models/ChromeOSDeviceProperty.cs index 1f96b4e4595..324ede6ab74 100644 --- a/src/Microsoft.Graph/Generated/Models/ChromeOSDeviceProperty.cs +++ b/src/Microsoft.Graph/Generated/Models/ChromeOSDeviceProperty.cs @@ -107,7 +107,7 @@ public ChromeOSDeviceProperty() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ChromeOSDeviceProperty CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChromeOSDeviceProperty(); } /// @@ -131,7 +131,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("updatable", Updatable); diff --git a/src/Microsoft.Graph/Generated/Models/ChromeOSOnboardingSettings.cs b/src/Microsoft.Graph/Generated/Models/ChromeOSOnboardingSettings.cs index 2a5f174054d..7b40d3fd1d0 100644 --- a/src/Microsoft.Graph/Generated/Models/ChromeOSOnboardingSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/ChromeOSOnboardingSettings.cs @@ -54,7 +54,7 @@ public string OwnerUserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChromeOSOnboardingSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChromeOSOnboardingSettings(); } /// @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("lastDirectorySyncDateTime", LastDirectorySyncDateTime); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ChromeOSOnboardingSettingsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ChromeOSOnboardingSettingsCollectionResponse.cs index c8232ba50dd..6723f33277e 100644 --- a/src/Microsoft.Graph/Generated/Models/ChromeOSOnboardingSettingsCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ChromeOSOnboardingSettingsCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ChromeOSOnboardingSettingsCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ChromeOSOnboardingSettingsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ChromeOSOnboardingSettingsCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ClaimsMapping.cs b/src/Microsoft.Graph/Generated/Models/ClaimsMapping.cs index 6426b2884e0..5bfb6f9dda9 100644 --- a/src/Microsoft.Graph/Generated/Models/ClaimsMapping.cs +++ b/src/Microsoft.Graph/Generated/Models/ClaimsMapping.cs @@ -132,7 +132,7 @@ public ClaimsMapping() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ClaimsMapping CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ClaimsMapping(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("email", Email); writer.WriteStringValue("givenName", GivenName); diff --git a/src/Microsoft.Graph/Generated/Models/ClaimsMappingPolicy.cs b/src/Microsoft.Graph/Generated/Models/ClaimsMappingPolicy.cs index c4238eca4f1..ffc629b2f15 100644 --- a/src/Microsoft.Graph/Generated/Models/ClaimsMappingPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/ClaimsMappingPolicy.cs @@ -26,7 +26,7 @@ public ClaimsMappingPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ClaimsMappingPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ClaimsMappingPolicy(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ClaimsMappingPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ClaimsMappingPolicyCollectionResponse.cs index 2a6815c6673..86aac53896e 100644 --- a/src/Microsoft.Graph/Generated/Models/ClaimsMappingPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ClaimsMappingPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ClaimsMappingPolicyCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ClaimsMappingPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ClaimsMappingPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ClassifcationErrorBase.cs b/src/Microsoft.Graph/Generated/Models/ClassifcationErrorBase.cs index 4763604f6c1..7f0eb4035a1 100644 --- a/src/Microsoft.Graph/Generated/Models/ClassifcationErrorBase.cs +++ b/src/Microsoft.Graph/Generated/Models/ClassifcationErrorBase.cs @@ -116,7 +116,7 @@ public ClassifcationErrorBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ClassifcationErrorBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -146,7 +146,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteObjectValue("innerError", InnerError); writer.WriteStringValue("message", Message); diff --git a/src/Microsoft.Graph/Generated/Models/ClassificationAttribute.cs b/src/Microsoft.Graph/Generated/Models/ClassificationAttribute.cs index a375603da78..335e200e339 100644 --- a/src/Microsoft.Graph/Generated/Models/ClassificationAttribute.cs +++ b/src/Microsoft.Graph/Generated/Models/ClassificationAttribute.cs @@ -64,7 +64,7 @@ public ClassificationAttribute() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ClassificationAttribute CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ClassificationAttribute(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("confidence", Confidence); writer.WriteIntValue("count", Count); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ClassificationError.cs b/src/Microsoft.Graph/Generated/Models/ClassificationError.cs index 2f62c0d579b..13619d59a0a 100644 --- a/src/Microsoft.Graph/Generated/Models/ClassificationError.cs +++ b/src/Microsoft.Graph/Generated/Models/ClassificationError.cs @@ -35,7 +35,7 @@ public partial class ClassificationError : global::Microsoft.Graph.Beta.Models.C /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ClassificationError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("details", Details); } diff --git a/src/Microsoft.Graph/Generated/Models/ClassificationInnerError.cs b/src/Microsoft.Graph/Generated/Models/ClassificationInnerError.cs index 0eb7b3ee94c..c103eac1c85 100644 --- a/src/Microsoft.Graph/Generated/Models/ClassificationInnerError.cs +++ b/src/Microsoft.Graph/Generated/Models/ClassificationInnerError.cs @@ -106,7 +106,7 @@ public ClassificationInnerError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ClassificationInnerError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ClassificationInnerError(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("activityId", ActivityId); writer.WriteStringValue("clientRequestId", ClientRequestId); writer.WriteStringValue("code", Code); diff --git a/src/Microsoft.Graph/Generated/Models/ClassificationJobResponse.cs b/src/Microsoft.Graph/Generated/Models/ClassificationJobResponse.cs index 3d0aa37908e..d7e3df9d881 100644 --- a/src/Microsoft.Graph/Generated/Models/ClassificationJobResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ClassificationJobResponse.cs @@ -35,7 +35,7 @@ public partial class ClassificationJobResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ClassificationJobResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ClassificationJobResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("result", Result); } diff --git a/src/Microsoft.Graph/Generated/Models/ClassificationRequestContentMetaData.cs b/src/Microsoft.Graph/Generated/Models/ClassificationRequestContentMetaData.cs index a1804f31dfc..be36b310c06 100644 --- a/src/Microsoft.Graph/Generated/Models/ClassificationRequestContentMetaData.cs +++ b/src/Microsoft.Graph/Generated/Models/ClassificationRequestContentMetaData.cs @@ -68,7 +68,7 @@ public ClassificationRequestContentMetaData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ClassificationRequestContentMetaData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ClassificationRequestContentMetaData(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("sourceId", SourceId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ClassificationResult.cs b/src/Microsoft.Graph/Generated/Models/ClassificationResult.cs index 873608c899e..68474fcade1 100644 --- a/src/Microsoft.Graph/Generated/Models/ClassificationResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ClassificationResult.cs @@ -80,7 +80,7 @@ public ClassificationResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ClassificationResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ClassificationResult(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("confidenceLevel", ConfidenceLevel); writer.WriteIntValue("count", Count); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ClientCertificateAuthentication.cs b/src/Microsoft.Graph/Generated/Models/ClientCertificateAuthentication.cs index 013393c448f..0e68081e711 100644 --- a/src/Microsoft.Graph/Generated/Models/ClientCertificateAuthentication.cs +++ b/src/Microsoft.Graph/Generated/Models/ClientCertificateAuthentication.cs @@ -42,7 +42,7 @@ public ClientCertificateAuthentication() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ClientCertificateAuthentication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ClientCertificateAuthentication(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("certificateList", CertificateList); } diff --git a/src/Microsoft.Graph/Generated/Models/ClientCredentials.cs b/src/Microsoft.Graph/Generated/Models/ClientCredentials.cs index 9f42802bec7..29bdb7139e7 100644 --- a/src/Microsoft.Graph/Generated/Models/ClientCredentials.cs +++ b/src/Microsoft.Graph/Generated/Models/ClientCredentials.cs @@ -84,7 +84,7 @@ public ClientCredentials() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ClientCredentials CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ClientCredentials(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("certificateName", CertificateName); writer.WriteStringValue("keyVaultUri", KeyVaultUri); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudAppSecurityProfile.cs b/src/Microsoft.Graph/Generated/Models/CloudAppSecurityProfile.cs index 0c5ca293d36..6f125614287 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudAppSecurityProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudAppSecurityProfile.cs @@ -251,7 +251,7 @@ public string Type /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudAppSecurityProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudAppSecurityProfile(); } /// @@ -287,7 +287,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("azureSubscriptionId", AzureSubscriptionId); writer.WriteStringValue("azureTenantId", AzureTenantId); diff --git a/src/Microsoft.Graph/Generated/Models/CloudAppSecurityProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudAppSecurityProfileCollectionResponse.cs index 3a8b054287f..26770cf1bb2 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudAppSecurityProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudAppSecurityProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudAppSecurityProfileCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudAppSecurityProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudAppSecurityProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudAppSecuritySessionControl.cs b/src/Microsoft.Graph/Generated/Models/CloudAppSecuritySessionControl.cs index 09c8b4edc66..a2893a562bf 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudAppSecuritySessionControl.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudAppSecuritySessionControl.cs @@ -32,7 +32,7 @@ public CloudAppSecuritySessionControl() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudAppSecuritySessionControl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudAppSecuritySessionControl(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("cloudAppSecurityType", CloudAppSecurityType); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudAppSecurityState.cs b/src/Microsoft.Graph/Generated/Models/CloudAppSecurityState.cs index 63ba1fa9ee8..9eb51cca85e 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudAppSecurityState.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudAppSecurityState.cs @@ -100,7 +100,7 @@ public CloudAppSecurityState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudAppSecurityState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudAppSecurityState(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("destinationServiceIp", DestinationServiceIp); writer.WriteStringValue("destinationServiceName", DestinationServiceName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthority.cs b/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthority.cs index 5e20cf5cba4..f139ebe198b 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthority.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthority.cs @@ -470,7 +470,7 @@ public int? VersionNumber /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudCertificationAuthority CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudCertificationAuthority(); } /// @@ -524,7 +524,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certificateDownloadUrl", CertificateDownloadUrl); writer.WriteEnumValue("certificateKeySize", CertificateKeySize); diff --git a/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthorityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthorityCollectionResponse.cs index c7024abfc0e..24d55243b7b 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthorityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthorityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudCertificationAuthorityCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudCertificationAuthorityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudCertificationAuthorityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthorityLeafCertificate.cs b/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthorityLeafCertificate.cs index 994751faaaa..cf921dbf099 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthorityLeafCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthorityLeafCertificate.cs @@ -284,7 +284,7 @@ public DateTimeOffset? ValidityStartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudCertificationAuthorityLeafCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudCertificationAuthorityLeafCertificate(); } /// @@ -322,7 +322,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateStatus", CertificateStatus); writer.WriteStringValue("certificationAuthorityIssuerUri", CertificationAuthorityIssuerUri); diff --git a/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthorityLeafCertificateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthorityLeafCertificateCollectionResponse.cs index bac6eac52ee..d17b9a7f212 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthorityLeafCertificateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudCertificationAuthorityLeafCertificateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudCertificationAuthorityLeafCertificateCollectionRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudCertificationAuthorityLeafCertificateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudCertificationAuthorityLeafCertificateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudClipboardItem.cs b/src/Microsoft.Graph/Generated/Models/CloudClipboardItem.cs index 586a744df82..0dcc072ac52 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudClipboardItem.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudClipboardItem.cs @@ -53,7 +53,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudClipboardItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudClipboardItem(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/CloudClipboardItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudClipboardItemCollectionResponse.cs index 249f366ed3b..991ea3dce4e 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudClipboardItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudClipboardItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudClipboardItemCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudClipboardItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudClipboardItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudClipboardItemPayload.cs b/src/Microsoft.Graph/Generated/Models/CloudClipboardItemPayload.cs index a21c5fb0065..3260bfc7f4a 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudClipboardItemPayload.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudClipboardItemPayload.cs @@ -84,7 +84,7 @@ public CloudClipboardItemPayload() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudClipboardItemPayload CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudClipboardItemPayload(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("content", Content); writer.WriteStringValue("formatName", FormatName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudClipboardRoot.cs b/src/Microsoft.Graph/Generated/Models/CloudClipboardRoot.cs index e1214e5a74e..4d2503d177e 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudClipboardRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudClipboardRoot.cs @@ -35,7 +35,7 @@ public partial class CloudClipboardRoot : global::Microsoft.Graph.Beta.Models.En /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudClipboardRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudClipboardRoot(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("items", Items); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudCommunications.cs b/src/Microsoft.Graph/Generated/Models/CloudCommunications.cs index 12fc7a908ec..bf81036654c 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudCommunications.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudCommunications.cs @@ -134,7 +134,7 @@ public CloudCommunications() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudCommunications CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudCommunications(); } /// @@ -159,7 +159,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("callRecords", CallRecords); writer.WriteCollectionOfObjectValues("calls", Calls); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudLicensing/GroupCloudLicensing.cs b/src/Microsoft.Graph/Generated/Models/CloudLicensing/GroupCloudLicensing.cs index 0fa8d087652..7f4c69eff79 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudLicensing/GroupCloudLicensing.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudLicensing/GroupCloudLicensing.cs @@ -68,7 +68,7 @@ public GroupCloudLicensing() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudLicensing.GroupCloudLicensing CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudLicensing.GroupCloudLicensing(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("usageRights", UsageRights); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CloudLicensing/Service.cs b/src/Microsoft.Graph/Generated/Models/CloudLicensing/Service.cs index 06ff47e57bb..de405d5e2ce 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudLicensing/Service.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudLicensing/Service.cs @@ -80,7 +80,7 @@ public Service() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudLicensing.Service CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudLicensing.Service(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("assignableTo", AssignableTo); writer.WriteStringValue("@odata.type", OdataType); writer.WriteGuidValue("planId", PlanId); diff --git a/src/Microsoft.Graph/Generated/Models/CloudLicensing/UsageRight.cs b/src/Microsoft.Graph/Generated/Models/CloudLicensing/UsageRight.cs index 28b579dd1c7..2a15a514e2d 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudLicensing/UsageRight.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudLicensing/UsageRight.cs @@ -57,7 +57,7 @@ public string SkuPartNumber /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudLicensing.UsageRight CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudLicensing.UsageRight(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("services", Services); writer.WriteGuidValue("skuId", SkuId); diff --git a/src/Microsoft.Graph/Generated/Models/CloudLicensing/UserCloudLicensing.cs b/src/Microsoft.Graph/Generated/Models/CloudLicensing/UserCloudLicensing.cs index 7c71f206a82..b3718c3eced 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudLicensing/UserCloudLicensing.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudLicensing/UserCloudLicensing.cs @@ -68,7 +68,7 @@ public UserCloudLicensing() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudLicensing.UserCloudLicensing CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudLicensing.UserCloudLicensing(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("usageRights", UsageRights); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPC.cs b/src/Microsoft.Graph/Generated/Models/CloudPC.cs index 453b6e96dd1..80b2c41408d 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPC.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPC.cs @@ -452,7 +452,7 @@ public string ServicePlanName get { return BackingStore?.Get("userAccountType"); } set { BackingStore?.Set("userAccountType", value); } } - /// The userExperienceType property + /// Specifies the type of cloud object the end user can access. The possible values are: cloudPc, cloudApp, unknownFutureValue. When set to cloudPc, it indicates that the end user can access the entire desktop. When set to cloudApp, it indicates that the end user can only access cloud apps published under the associated provisioning policy. Since the cloud app experience also creates Cloud PC devices that appear in the Cloud PC device list, this property helps differentiate them. The default value is cloudPc. This property is defined in the provisioning policy. public global::Microsoft.Graph.Beta.Models.CloudPcUserExperienceType? UserExperienceType { get { return BackingStore?.Get("userExperienceType"); } @@ -481,7 +481,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPC CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPC(); } /// @@ -537,7 +537,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("aadDeviceId", AadDeviceId); writer.WriteStringValue("allotmentDisplayName", AllotmentDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPCCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPCCollectionResponse.cs index 88b72d6175d..b7f0e9fc5b0 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPCCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPCCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPCCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPCCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPCCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPCConnectivityIssue.cs b/src/Microsoft.Graph/Generated/Models/CloudPCConnectivityIssue.cs index bb1df81ca97..e5df4402065 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPCConnectivityIssue.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPCConnectivityIssue.cs @@ -106,7 +106,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPCConnectivityIssue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPCConnectivityIssue(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceId", DeviceId); writer.WriteStringValue("errorCode", ErrorCode); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPCConnectivityIssueCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPCConnectivityIssueCollectionResponse.cs index 0d3e1c7c6b8..3c6689aef38 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPCConnectivityIssueCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPCConnectivityIssueCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPCConnectivityIssueCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPCConnectivityIssueCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPCConnectivityIssueCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcAuditActor.cs b/src/Microsoft.Graph/Generated/Models/CloudPcAuditActor.cs index 6b5c3077034..511bf9b8284 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcAuditActor.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcAuditActor.cs @@ -218,7 +218,7 @@ public CloudPcAuditActor() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcAuditActor CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcAuditActor(); } /// @@ -249,7 +249,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applicationDisplayName", ApplicationDisplayName); writer.WriteStringValue("applicationId", ApplicationId); writer.WriteStringValue("ipAddress", IpAddress); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcAuditEvent.cs b/src/Microsoft.Graph/Generated/Models/CloudPcAuditEvent.cs index 0319de2d9d9..cadfe438fdc 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcAuditEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcAuditEvent.cs @@ -155,7 +155,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcAuditEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcAuditEvent(); } /// @@ -185,7 +185,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("activity", Activity); writer.WriteDateTimeOffsetValue("activityDateTime", ActivityDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcAuditEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcAuditEventCollectionResponse.cs index a925032b251..a6080785890 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcAuditEventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcAuditEventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcAuditEventCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcAuditEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcAuditEventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcAuditProperty.cs b/src/Microsoft.Graph/Generated/Models/CloudPcAuditProperty.cs index 0f45c401c14..155209646b3 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcAuditProperty.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcAuditProperty.cs @@ -100,7 +100,7 @@ public CloudPcAuditProperty() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcAuditProperty CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcAuditProperty(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("newValue", NewValue); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcAuditResource.cs b/src/Microsoft.Graph/Generated/Models/CloudPcAuditResource.cs index 8b0a7ae1dc1..567dcc2e2aa 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcAuditResource.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcAuditResource.cs @@ -116,7 +116,7 @@ public CloudPcAuditResource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcAuditResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcAuditResource(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfObjectValues("modifiedProperties", ModifiedProperties); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcAutopilotConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CloudPcAutopilotConfiguration.cs index 1aa79ce689b..7cd8ce869c4 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcAutopilotConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcAutopilotConfiguration.cs @@ -80,7 +80,7 @@ public CloudPcAutopilotConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcAutopilotConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcAutopilotConfiguration(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("applicationTimeoutInMinutes", ApplicationTimeoutInMinutes); writer.WriteStringValue("devicePreparationProfileId", DevicePreparationProfileId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkAction.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkAction.cs index e7767de13c0..93c68eefd75 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkAction.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkAction.cs @@ -101,7 +101,7 @@ public bool? ScheduledDuringMaintenanceWindow /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -146,7 +146,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("actionSummary", ActionSummary); writer.WriteCollectionOfPrimitiveValues("cloudPcIds", CloudPcIds); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkActionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkActionCollectionResponse.cs index 6b54846e408..515108b97b5 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkActionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkActionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcBulkActionCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkActionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkActionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkActionSummary.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkActionSummary.cs index c9803ceef69..6c36b01e770 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkActionSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkActionSummary.cs @@ -82,7 +82,7 @@ public CloudPcBulkActionSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcBulkActionSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkActionSummary(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("failedCount", FailedCount); writer.WriteIntValue("inProgressCount", InProgressCount); writer.WriteIntValue("notSupportedCount", NotSupportedCount); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkCreateSnapshot.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkCreateSnapshot.cs index 7528de66880..eef11d398b5 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkCreateSnapshot.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkCreateSnapshot.cs @@ -48,7 +48,7 @@ public CloudPcBulkCreateSnapshot() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkCreateSnapshot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkCreateSnapshot(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessTier", AccessTier); writer.WriteStringValue("storageAccountId", StorageAccountId); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkDisasterRecovery.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkDisasterRecovery.cs index 767932a9cac..bf0432704eb 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkDisasterRecovery.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkDisasterRecovery.cs @@ -38,7 +38,7 @@ public CloudPcBulkDisasterRecovery() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkDisasterRecovery CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkDisasterRecovery(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("capabilityType", CapabilityType); writer.WriteEnumValue("licenseType", LicenseType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkDisasterRecoveryFailback.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkDisasterRecoveryFailback.cs index be35761f1bf..b2adbb7fe32 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkDisasterRecoveryFailback.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkDisasterRecoveryFailback.cs @@ -26,7 +26,7 @@ public CloudPcBulkDisasterRecoveryFailback() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkDisasterRecoveryFailback CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkDisasterRecoveryFailback(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkDisasterRecoveryFailover.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkDisasterRecoveryFailover.cs index 44d9ef18676..820ee872838 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkDisasterRecoveryFailover.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkDisasterRecoveryFailover.cs @@ -26,7 +26,7 @@ public CloudPcBulkDisasterRecoveryFailover() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkDisasterRecoveryFailover CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkDisasterRecoveryFailover(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkModifyDiskEncryptionType.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkModifyDiskEncryptionType.cs index 8e97ffcb7c2..3281e21f94e 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkModifyDiskEncryptionType.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkModifyDiskEncryptionType.cs @@ -32,7 +32,7 @@ public CloudPcBulkModifyDiskEncryptionType() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkModifyDiskEncryptionType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkModifyDiskEncryptionType(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("diskEncryptionType", DiskEncryptionType); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkMove.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkMove.cs index 79dbbbab693..1d64c1b03a5 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkMove.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkMove.cs @@ -26,7 +26,7 @@ public CloudPcBulkMove() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkMove CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkMove(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkPowerOff.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkPowerOff.cs index 7d2914a8ff2..601cc5df501 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkPowerOff.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkPowerOff.cs @@ -26,7 +26,7 @@ public CloudPcBulkPowerOff() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkPowerOff CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkPowerOff(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkPowerOn.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkPowerOn.cs index a898bd3b2f0..b53a20fca38 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkPowerOn.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkPowerOn.cs @@ -26,7 +26,7 @@ public CloudPcBulkPowerOn() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkPowerOn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkPowerOn(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkReinstallAgent.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkReinstallAgent.cs index 06a57058b36..7f32768db01 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkReinstallAgent.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkReinstallAgent.cs @@ -26,7 +26,7 @@ public CloudPcBulkReinstallAgent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkReinstallAgent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkReinstallAgent(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkReprovision.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkReprovision.cs index 6a231aaddec..5c8903edc08 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkReprovision.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkReprovision.cs @@ -26,7 +26,7 @@ public CloudPcBulkReprovision() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkReprovision CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkReprovision(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkResize.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkResize.cs index b6f1244c367..15facb21b97 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkResize.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkResize.cs @@ -42,7 +42,7 @@ public CloudPcBulkResize() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkResize CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkResize(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("targetServicePlanId", TargetServicePlanId); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkRestart.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkRestart.cs index c0bcf1ae25b..dbd8beeb668 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkRestart.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkRestart.cs @@ -26,7 +26,7 @@ public CloudPcBulkRestart() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkRestart CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkRestart(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkRestore.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkRestore.cs index 4433f084972..b2e022b6a08 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkRestore.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkRestore.cs @@ -44,7 +44,7 @@ public CloudPcBulkRestore() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkRestore CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkRestore(); } /// @@ -66,7 +66,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("ignoreUnhealthySnapshots", IgnoreUnhealthySnapshots); writer.WriteDateTimeOffsetValue("restorePointDateTime", RestorePointDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkSetReviewStatus.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkSetReviewStatus.cs index f2998bdd175..171fcc32025 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkSetReviewStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkSetReviewStatus.cs @@ -42,7 +42,7 @@ public CloudPcBulkSetReviewStatus() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkSetReviewStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkSetReviewStatus(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("reviewStatus", ReviewStatus); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcBulkTroubleshoot.cs b/src/Microsoft.Graph/Generated/Models/CloudPcBulkTroubleshoot.cs index 03e53aa3fd2..76f4450ad35 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcBulkTroubleshoot.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcBulkTroubleshoot.cs @@ -26,7 +26,7 @@ public CloudPcBulkTroubleshoot() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcBulkTroubleshoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcBulkTroubleshoot(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcCloudApp.cs b/src/Microsoft.Graph/Generated/Models/CloudPcCloudApp.cs index cebf0eb4338..3c15f10b781 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcCloudApp.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcCloudApp.cs @@ -12,13 +12,13 @@ namespace Microsoft.Graph.Beta.Models public partial class CloudPcCloudApp : global::Microsoft.Graph.Beta.Models.Entity, IParsable #pragma warning restore CS1591 { - /// The actionFailedErrorCode property + /// The error code if publishing, unpublishing, or resetting a cloud app fails. Possible values are: cloudAppQuotaExceeded, cloudPcLicenseNotFound, internalServerError, appDiscoveryFailed, unknownFutureValue. The default value is null. Supports $filter, $select, $orderBy. Read-only. public global::Microsoft.Graph.Beta.Models.CloudPcCloudAppActionFailedErrorCode? ActionFailedErrorCode { get { return BackingStore?.Get("actionFailedErrorCode"); } set { BackingStore?.Set("actionFailedErrorCode", value); } } - /// The actionFailedErrorMessage property + /// The error message when the IT admin failed to publish, unpublish, update, or reset a cloud app. For example: 'Publish failed because it exceeds the 500 cloud apps limitation under the policy. You need to unpublish some cloud apps under this policy in order to publish this cloud app again.' Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ActionFailedErrorMessage @@ -34,7 +34,7 @@ public string ActionFailedErrorMessage set { BackingStore?.Set("actionFailedErrorMessage", value); } } #endif - /// The addedDateTime property + /// The date and time when the cloud app was added to this tenant and became visible in the admin portal. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. An IT admin can't set or modify it. Supports $filter, $select, and $orderBy. Read-only. public DateTimeOffset? AddedDateTime { get { return BackingStore?.Get("addedDateTime"); } @@ -62,13 +62,13 @@ public DateTimeOffset? AddedDateTime get { return BackingStore?.Get("appStatus"); } set { BackingStore?.Set("appStatus", value); } } - /// The availableToUser property + /// Indicates whether this cloud app is available to end users through the end-user portal or the Windows App. The default value is false. It changes to true if the cloud app is successfully published, and reverts to false when the admin unpublishes the cloud app. Supports $filter, $select, and $orderBy. public bool? AvailableToUser { get { return BackingStore?.Get("availableToUser"); } set { BackingStore?.Set("availableToUser", value); } } - /// The description property + /// The description associated with the cloud app. The maximum allowed length for this property is 512 characters. Supports $filter, $select, and $orderBy. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Description @@ -84,7 +84,7 @@ public string Description set { BackingStore?.Set("description", value); } } #endif - /// The discoveredAppName property + /// Name of the discovered app associated with the cloud app. For example, Paint, Supports $filter, $select, and $orderBy. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DiscoveredAppName @@ -100,7 +100,7 @@ public string DiscoveredAppName set { BackingStore?.Set("discoveredAppName", value); } } #endif - /// The displayName property + /// The display name for the cloud app. The display name for the cloud app, which appears on the end-user portal and must be unique within a single provisioning policy. It uses the discovered app name as the default value. The maximum allowed length for this property is 64 characters. For example, Paint. Supports $filter, $select, and $orderBy. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DisplayName @@ -116,13 +116,13 @@ public string DisplayName set { BackingStore?.Set("displayName", value); } } #endif - /// The lastPublishedDateTime property + /// The latest date time when the admin published the cloud app. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. An IT admin can't set or modify it. Supports $filter, $select, and $orderBy. Read-only. public DateTimeOffset? LastPublishedDateTime { get { return BackingStore?.Get("lastPublishedDateTime"); } set { BackingStore?.Set("lastPublishedDateTime", value); } } - /// The provisioningPolicyId property + /// The ID of the provisioning policy associated with this cloud app. For example, 96133506-c05b-4dbb-a150-ed4adc59895f. Supports $filter, $select, and $orderBy. Read-only. Required. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? ProvisioningPolicyId @@ -138,7 +138,7 @@ public string ProvisioningPolicyId set { BackingStore?.Set("provisioningPolicyId", value); } } #endif - /// The scopeIds property + /// The list of scope tag IDs for this cloud app. Inherited from the provisioning policy when the app is created or updated. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? ScopeIds @@ -161,7 +161,7 @@ public List ScopeIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcCloudApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcCloudApp(); } /// @@ -192,7 +192,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("actionFailedErrorCode", ActionFailedErrorCode); writer.WriteStringValue("actionFailedErrorMessage", ActionFailedErrorMessage); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcCloudAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcCloudAppCollectionResponse.cs index 79fcf1f31f3..41c9847b783 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcCloudAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcCloudAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcCloudAppCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcCloudAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcCloudAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcCloudAppDetail.cs b/src/Microsoft.Graph/Generated/Models/CloudPcCloudAppDetail.cs index 2cdd63d3232..9974b424d3d 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcCloudAppDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcCloudAppDetail.cs @@ -21,7 +21,7 @@ public IDictionary AdditionalData } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// The commandLineArguments property + /// Specifies the command-line arguments for the cloud app. These parameters are passed to the cloud app when it's launched. The maximum allowed length for this property is 2,048 characters. For example, -fullscreen -loop. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? CommandLineArguments @@ -37,7 +37,7 @@ public string CommandLineArguments set { BackingStore?.Set("commandLineArguments", value); } } #endif - /// The filePath property + /// Specifies the path to the executable file for the application within the OS of the hosting Cloud PC. The value should be an absolute path to a Windows or Universal app. For example, C:/app.exe or shell:AppsFolder/appname!App. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? FilePath @@ -53,13 +53,13 @@ public string FilePath set { BackingStore?.Set("filePath", value); } } #endif - /// The iconIndex property + /// Specifies the index of the icon within the file specified by the iconPath property. For example, if iconPath is set to C:/Program Files/MyApp/myapp.ico and iconIndex is set to 0, the system uses the first icon in the myapp.ico file. The default value is 0. public int? IconIndex { get { return BackingStore?.Get("iconIndex"); } set { BackingStore?.Set("iconIndex", value); } } - /// The iconPath property + /// Specifies the path to the icon file for the application within the OS of the hosting Cloud PC. When an admin updates the path of a cloud app, the value should be a rooted absolute path. For example, C:/Windows/system32/WindowsPowerShell/v1.0/powershell_ise.exe. If this property isn't defined, a default icon is used. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? IconPath @@ -106,7 +106,7 @@ public CloudPcCloudAppDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcCloudAppDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcCloudAppDetail(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("commandLineArguments", CommandLineArguments); writer.WriteStringValue("filePath", FilePath); writer.WriteIntValue("iconIndex", IconIndex); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcConnectionSetting.cs b/src/Microsoft.Graph/Generated/Models/CloudPcConnectionSetting.cs index d667a6a5ef7..2f3b8565e07 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcConnectionSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcConnectionSetting.cs @@ -58,7 +58,7 @@ public CloudPcConnectionSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcConnectionSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcConnectionSetting(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("enableSingleSignOn", EnableSingleSignOn); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcConnectionSettings.cs b/src/Microsoft.Graph/Generated/Models/CloudPcConnectionSettings.cs index c8db657fda6..e9131417abe 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcConnectionSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcConnectionSettings.cs @@ -58,7 +58,7 @@ public CloudPcConnectionSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcConnectionSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcConnectionSettings(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("enableSingleSignOn", EnableSingleSignOn); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcConnectivityEvent.cs b/src/Microsoft.Graph/Generated/Models/CloudPcConnectivityEvent.cs index 20c65fbecf8..450a767c778 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcConnectivityEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcConnectivityEvent.cs @@ -118,7 +118,7 @@ public CloudPcConnectivityEvent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcConnectivityEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcConnectivityEvent(); } /// @@ -144,7 +144,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("activityId", ActivityId); writer.WriteDateTimeOffsetValue("eventDateTime", EventDateTime); writer.WriteStringValue("eventName", EventName); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcConnectivityResult.cs b/src/Microsoft.Graph/Generated/Models/CloudPcConnectivityResult.cs index f22dff95357..9d499c5e936 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcConnectivityResult.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcConnectivityResult.cs @@ -86,7 +86,7 @@ public CloudPcConnectivityResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcConnectivityResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcConnectivityResult(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("failedHealthCheckItems", FailedHealthCheckItems); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcCrossCloudGovernmentOrganizationMapping.cs b/src/Microsoft.Graph/Generated/Models/CloudPcCrossCloudGovernmentOrganizationMapping.cs index 398ca6b3058..f372e854a18 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcCrossCloudGovernmentOrganizationMapping.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcCrossCloudGovernmentOrganizationMapping.cs @@ -35,7 +35,7 @@ public List OrganizationIdsInUSGovCloud /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcCrossCloudGovernmentOrganizationMapping CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcCrossCloudGovernmentOrganizationMapping(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("organizationIdsInUSGovCloud", OrganizationIdsInUSGovCloud); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcCrossRegionDisasterRecoverySetting.cs b/src/Microsoft.Graph/Generated/Models/CloudPcCrossRegionDisasterRecoverySetting.cs index 2c706667d6f..bf2dab734e1 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcCrossRegionDisasterRecoverySetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcCrossRegionDisasterRecoverySetting.cs @@ -92,7 +92,7 @@ public CloudPcCrossRegionDisasterRecoverySetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcCrossRegionDisasterRecoverySetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcCrossRegionDisasterRecoverySetting(); } /// @@ -117,7 +117,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("crossRegionDisasterRecoveryEnabled", CrossRegionDisasterRecoveryEnabled); writer.WriteObjectValue("disasterRecoveryNetworkSetting", DisasterRecoveryNetworkSetting); writer.WriteEnumValue("disasterRecoveryType", DisasterRecoveryType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcDeviceImage.cs b/src/Microsoft.Graph/Generated/Models/CloudPcDeviceImage.cs index c602d9036ac..d1196cedb64 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcDeviceImage.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcDeviceImage.cs @@ -174,7 +174,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcDeviceImage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcDeviceImage(); } /// @@ -207,7 +207,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteEnumValue("errorCode", ErrorCode); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcDeviceImageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcDeviceImageCollectionResponse.cs index 3c2496f0087..61edf9d07e5 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcDeviceImageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcDeviceImageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcDeviceImageCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcDeviceImageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcDeviceImageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryAzureConnectionSetting.cs b/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryAzureConnectionSetting.cs index dd7bbb60ffe..1da01edbec5 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryAzureConnectionSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryAzureConnectionSetting.cs @@ -42,7 +42,7 @@ public CloudPcDisasterRecoveryAzureConnectionSetting() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcDisasterRecoveryAzureConnectionSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcDisasterRecoveryAzureConnectionSetting(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("onPremisesConnectionId", OnPremisesConnectionId); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryCapability.cs b/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryCapability.cs index 8d51cfb9814..90207cf8616 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryCapability.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryCapability.cs @@ -96,7 +96,7 @@ public CloudPcDisasterRecoveryCapability() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcDisasterRecoveryCapability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcDisasterRecoveryCapability(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("capabilityType", CapabilityType); writer.WriteEnumValue("licenseType", LicenseType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting.cs b/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting.cs index f7fda62a446..8237a8f81a9 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting.cs @@ -48,7 +48,7 @@ public CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcDisasterRecoveryMicrosoftHostedNetworkSetting(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("regionGroup", RegionGroup); writer.WriteStringValue("regionName", RegionName); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryNetworkSetting.cs b/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryNetworkSetting.cs index 2613b125bde..0405c6c0725 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryNetworkSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcDisasterRecoveryNetworkSetting.cs @@ -52,7 +52,7 @@ public CloudPcDisasterRecoveryNetworkSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcDisasterRecoveryNetworkSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcDiscoveredApp.cs b/src/Microsoft.Graph/Generated/Models/CloudPcDiscoveredApp.cs index 0912151788d..e30f3f2ae61 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcDiscoveredApp.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcDiscoveredApp.cs @@ -35,7 +35,7 @@ public IDictionary AdditionalData set { BackingStore?.Set("appDetail", value); } } #endif - /// The appName property + /// The name of the discovered app; for example, Paint. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? AppName @@ -53,7 +53,7 @@ public string AppName #endif /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// The discoveredAppId property + /// The unique identifier of the discovered app. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DiscoveredAppId @@ -85,7 +85,7 @@ public string OdataType set { BackingStore?.Set("@odata.type", value); } } #endif - /// The sourceId property + /// The ID of the source of the discovered app. For example, if the source is a custom device image, the sourceId value is the ID of that image. For example, 3035e17f-c0f7-49c1-9502-5990afcaf86f. Read-only. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? SourceId @@ -116,7 +116,7 @@ public CloudPcDiscoveredApp() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcDiscoveredApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcDiscoveredApp(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("appDetail", AppDetail); writer.WriteStringValue("appName", AppName); writer.WriteStringValue("discoveredAppId", DiscoveredAppId); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcDomainJoinConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CloudPcDomainJoinConfiguration.cs index b230d0749d8..0b8cdb40797 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcDomainJoinConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcDomainJoinConfiguration.cs @@ -102,7 +102,7 @@ public CloudPcDomainJoinConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcDomainJoinConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcDomainJoinConfiguration(); } /// @@ -127,7 +127,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("domainJoinType", DomainJoinType); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("onPremisesConnectionId", OnPremisesConnectionId); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcExportJob.cs b/src/Microsoft.Graph/Generated/Models/CloudPcExportJob.cs index 362f5c00ac0..4348608b39f 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcExportJob.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcExportJob.cs @@ -107,7 +107,7 @@ public List Select /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcExportJob CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcExportJob(); } /// @@ -134,7 +134,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteEnumValue("exportJobStatus", ExportJobStatus); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcExportJobCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcExportJobCollectionResponse.cs index 7e445fc32db..c80b75b1f2e 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcExportJobCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcExportJobCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcExportJobCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcExportJobCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcExportJobCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcExternalPartnerSetting.cs b/src/Microsoft.Graph/Generated/Models/CloudPcExternalPartnerSetting.cs index a3021848aaf..53e706db3d0 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcExternalPartnerSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcExternalPartnerSetting.cs @@ -69,7 +69,7 @@ public string StatusDetails /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcExternalPartnerSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcExternalPartnerSetting(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("enableConnection", EnableConnection); writer.WriteDateTimeOffsetValue("lastSyncDateTime", LastSyncDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcExternalPartnerSettingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcExternalPartnerSettingCollectionResponse.cs index 391962bad74..17500a4e06a 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcExternalPartnerSettingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcExternalPartnerSettingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcExternalPartnerSettingCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcExternalPartnerSettingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcExternalPartnerSettingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcForensicStorageAccount.cs b/src/Microsoft.Graph/Generated/Models/CloudPcForensicStorageAccount.cs index 0546e3e04fd..a28d15fae7a 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcForensicStorageAccount.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcForensicStorageAccount.cs @@ -63,7 +63,7 @@ public string StorageAccountName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcForensicStorageAccount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcForensicStorageAccount(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessTier", AccessTier); writer.WriteBoolValue("immutableStorage", ImmutableStorage); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcFrontLineServicePlan.cs b/src/Microsoft.Graph/Generated/Models/CloudPcFrontLineServicePlan.cs index 263eadccb2b..567a017136b 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcFrontLineServicePlan.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcFrontLineServicePlan.cs @@ -53,7 +53,7 @@ public int? UsedCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcFrontLineServicePlan CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcFrontLineServicePlan(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("allotmentLicensesCount", AllotmentLicensesCount); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcFrontLineServicePlanCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcFrontLineServicePlanCollectionResponse.cs index b4b94f92f2a..20496f88fd7 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcFrontLineServicePlanCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcFrontLineServicePlanCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcFrontLineServicePlanCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcFrontLineServicePlanCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcFrontLineServicePlanCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcFrontlineSharedDeviceDetail.cs b/src/Microsoft.Graph/Generated/Models/CloudPcFrontlineSharedDeviceDetail.cs index 21147da3f92..0e9e4566ee1 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcFrontlineSharedDeviceDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcFrontlineSharedDeviceDetail.cs @@ -68,7 +68,7 @@ public CloudPcFrontlineSharedDeviceDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcFrontlineSharedDeviceDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcFrontlineSharedDeviceDetail(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("assignedToUserPrincipalName", AssignedToUserPrincipalName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcGalleryImage.cs b/src/Microsoft.Graph/Generated/Models/CloudPcGalleryImage.cs index 2dea6a97868..d0b8eac8d5b 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcGalleryImage.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcGalleryImage.cs @@ -226,7 +226,7 @@ public Date? StartDate /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcGalleryImage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcGalleryImage(); } /// @@ -261,7 +261,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateValue("endDate", EndDate); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcGalleryImageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcGalleryImageCollectionResponse.cs index 48e43fa076b..9ef3e5f05f5 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcGalleryImageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcGalleryImageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcGalleryImageCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcGalleryImageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcGalleryImageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcHealthCheckItem.cs b/src/Microsoft.Graph/Generated/Models/CloudPcHealthCheckItem.cs index 8c04fd9ddf7..07e48c3e647 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcHealthCheckItem.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcHealthCheckItem.cs @@ -96,7 +96,7 @@ public CloudPcHealthCheckItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcHealthCheckItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcHealthCheckItem(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("additionalDetails", AdditionalDetails); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("lastHealthCheckDateTime", LastHealthCheckDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcLaunchInfo.cs b/src/Microsoft.Graph/Generated/Models/CloudPcLaunchInfo.cs index 88892d03170..ac5a6f8797c 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcLaunchInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcLaunchInfo.cs @@ -106,7 +106,7 @@ public CloudPcLaunchInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcLaunchInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcLaunchInfo(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("cloudPcId", CloudPcId); writer.WriteStringValue("cloudPcLaunchUrl", CloudPcLaunchUrl); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcLoginResult.cs b/src/Microsoft.Graph/Generated/Models/CloudPcLoginResult.cs index 05865f46cf6..abf0a120242 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcLoginResult.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcLoginResult.cs @@ -58,7 +58,7 @@ public CloudPcLoginResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcLoginResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcLoginResult(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("time", Time); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcManagementAssignmentTarget.cs b/src/Microsoft.Graph/Generated/Models/CloudPcManagementAssignmentTarget.cs index 000472a5702..b3f02860be5 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcManagementAssignmentTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcManagementAssignmentTarget.cs @@ -52,7 +52,7 @@ public CloudPcManagementAssignmentTarget() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcManagementAssignmentTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcManagementGroupAssignmentTarget.cs b/src/Microsoft.Graph/Generated/Models/CloudPcManagementGroupAssignmentTarget.cs index 4cf6627fa8d..f4da5d2f726 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcManagementGroupAssignmentTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcManagementGroupAssignmentTarget.cs @@ -80,7 +80,7 @@ public CloudPcManagementGroupAssignmentTarget() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcManagementGroupAssignmentTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcManagementGroupAssignmentTarget(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("allotmentDisplayName", AllotmentDisplayName); writer.WriteIntValue("allotmentLicensesCount", AllotmentLicensesCount); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcNotificationSetting.cs b/src/Microsoft.Graph/Generated/Models/CloudPcNotificationSetting.cs index 02c2422ef61..275939089fd 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcNotificationSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcNotificationSetting.cs @@ -58,7 +58,7 @@ public CloudPcNotificationSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcNotificationSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcNotificationSetting(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("restartPromptsDisabled", RestartPromptsDisabled); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnection.cs b/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnection.cs index 337975e4259..2a0a547fb97 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnection.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnection.cs @@ -301,7 +301,7 @@ public string VirtualNetworkLocation /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcOnPremisesConnection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcOnPremisesConnection(); } /// @@ -342,7 +342,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("adDomainName", AdDomainName); writer.WriteStringValue("adDomainPassword", AdDomainPassword); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionCollectionResponse.cs index 47f235b4105..5d20cf01998 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcOnPremisesConnectionCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcOnPremisesConnectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcOnPremisesConnectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionHealthCheck.cs b/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionHealthCheck.cs index 0a19632624f..5590845c66c 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionHealthCheck.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionHealthCheck.cs @@ -156,7 +156,7 @@ public CloudPcOnPremisesConnectionHealthCheck() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcOnPremisesConnectionHealthCheck CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcOnPremisesConnectionHealthCheck(); } /// @@ -185,7 +185,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("additionalDetail", AdditionalDetail); writer.WriteStringValue("additionalDetails", AdditionalDetails); writer.WriteStringValue("correlationId", CorrelationId); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionStatusDetail.cs b/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionStatusDetail.cs index 5d76f8ce2b3..01f030531ab 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionStatusDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionStatusDetail.cs @@ -80,7 +80,7 @@ public CloudPcOnPremisesConnectionStatusDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcOnPremisesConnectionStatusDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcOnPremisesConnectionStatusDetail(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteCollectionOfObjectValues("healthChecks", HealthChecks); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionStatusDetails.cs b/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionStatusDetails.cs index eed4e9db720..a259c1a0786 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionStatusDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcOnPremisesConnectionStatusDetails.cs @@ -80,7 +80,7 @@ public CloudPcOnPremisesConnectionStatusDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcOnPremisesConnectionStatusDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcOnPremisesConnectionStatusDetails(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteCollectionOfObjectValues("healthChecks", HealthChecks); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcOrganizationSettings.cs b/src/Microsoft.Graph/Generated/Models/CloudPcOrganizationSettings.cs index 40f2d590fe9..d7c8c94e708 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcOrganizationSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcOrganizationSettings.cs @@ -59,7 +59,7 @@ public bool? EnableSingleSignOn /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcOrganizationSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcOrganizationSettings(); } /// @@ -83,7 +83,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("enableMEMAutoEnroll", EnableMEMAutoEnroll); writer.WriteBoolValue("enableSingleSignOn", EnableSingleSignOn); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcPartnerAgentInstallResult.cs b/src/Microsoft.Graph/Generated/Models/CloudPcPartnerAgentInstallResult.cs index 578eff55142..135363b929f 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcPartnerAgentInstallResult.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcPartnerAgentInstallResult.cs @@ -92,7 +92,7 @@ public CloudPcPartnerAgentInstallResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcPartnerAgentInstallResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcPartnerAgentInstallResult(); } /// @@ -117,7 +117,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("errorMessage", ErrorMessage); writer.WriteEnumValue("installStatus", InstallStatus); writer.WriteBoolValue("isThirdPartyPartner", IsThirdPartyPartner); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcPolicyApplyActionResult.cs b/src/Microsoft.Graph/Generated/Models/CloudPcPolicyApplyActionResult.cs index f4321df6f20..b63d2da28ce 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcPolicyApplyActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcPolicyApplyActionResult.cs @@ -37,7 +37,7 @@ public DateTimeOffset? StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcPolicyApplyActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcPolicyApplyActionResult(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("finishDateTime", FinishDateTime); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcPolicyScheduledApplyActionDetail.cs b/src/Microsoft.Graph/Generated/Models/CloudPcPolicyScheduledApplyActionDetail.cs index 5c63ea9819b..287ec34f8e3 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcPolicyScheduledApplyActionDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcPolicyScheduledApplyActionDetail.cs @@ -95,7 +95,7 @@ public string StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcPolicyScheduledApplyActionDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcPolicyScheduledApplyActionDetail(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("cronScheduleExpression", CronScheduleExpression); writer.WriteStringValue("endDateTime", EndDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicy.cs b/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicy.cs index dc9a7a78f0e..bc55c9526f9 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicy.cs @@ -300,7 +300,7 @@ public List ScopeIds set { BackingStore?.Set("scopeIds", value); } } #endif - /// The userExperienceType property + /// Specifies the type of cloud object the end user can access. Possible values are: cloudPc, cloudApp, unknownFutureValue. cloudPc indicates that the end user can access the entire desktop. cloudApp indicates that the end user can only access apps published under this provisioning policy. The type can't be changed once the provisioning policy is created. If not specified during creation, the default value is cloudPc. When cloudApp is selected, the provisioningType must be sharedByEntraGroup. Supports $filter, $select, $orderBy. public global::Microsoft.Graph.Beta.Models.CloudPcUserExperienceType? UserExperienceType { get { return BackingStore?.Get("userExperienceType"); } @@ -345,7 +345,7 @@ public List ScopeIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicy(); } /// @@ -390,7 +390,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("alternateResourceUrl", AlternateResourceUrl); writer.WriteCollectionOfObjectValues("assignments", Assignments); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyAssignment.cs b/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyAssignment.cs index d95e0705c6c..e73a2b1bff1 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyAssignment.cs @@ -51,7 +51,7 @@ public partial class CloudPcProvisioningPolicyAssignment : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicyAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicyAssignment(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignedUsers", AssignedUsers); writer.WriteObjectValue("target", Target); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyAssignmentCollectionResponse.cs index 85c4eee07fd..dbbd0c9f9f1 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcProvisioningPolicyAssignmentCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicyAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicyAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyAutopatch.cs b/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyAutopatch.cs index 4ca73c96fea..06cfefa7dee 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyAutopatch.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyAutopatch.cs @@ -68,7 +68,7 @@ public CloudPcProvisioningPolicyAutopatch() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicyAutopatch CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicyAutopatch(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("autopatchGroupId", AutopatchGroupId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyCollectionResponse.cs index 0f17a6da5d9..c739a43cfe5 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcProvisioningPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcProvisioningPolicyCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcProvisioningPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcRemoteActionCapability.cs b/src/Microsoft.Graph/Generated/Models/CloudPcRemoteActionCapability.cs index 8d35465ab4b..db3cbe59854 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcRemoteActionCapability.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcRemoteActionCapability.cs @@ -64,7 +64,7 @@ public CloudPcRemoteActionCapability() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcRemoteActionCapability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcRemoteActionCapability(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("actionCapability", ActionCapability); writer.WriteEnumValue("actionName", ActionName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcRemoteActionResult.cs b/src/Microsoft.Graph/Generated/Models/CloudPcRemoteActionResult.cs index 44ef2ef6c97..3b801f281da 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcRemoteActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcRemoteActionResult.cs @@ -150,7 +150,7 @@ public CloudPcRemoteActionResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcRemoteActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcRemoteActionResult(); } /// @@ -178,7 +178,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("actionName", ActionName); writer.WriteEnumValue("actionState", ActionState); writer.WriteStringValue("cloudPcId", CloudPcId); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcReports.cs b/src/Microsoft.Graph/Generated/Models/CloudPcReports.cs index 8731ac3d693..b9b916899d4 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcReports.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcReports.cs @@ -35,7 +35,7 @@ public partial class CloudPcReports : global::Microsoft.Graph.Beta.Models.Entity /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcReports CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcReports(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("exportJobs", ExportJobs); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcResizeValidationResult.cs b/src/Microsoft.Graph/Generated/Models/CloudPcResizeValidationResult.cs index 4ea127988dc..4717079cedb 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcResizeValidationResult.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcResizeValidationResult.cs @@ -74,7 +74,7 @@ public CloudPcResizeValidationResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcResizeValidationResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcResizeValidationResult(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("cloudPcId", CloudPcId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("validationResult", ValidationResult); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcRestorePointSetting.cs b/src/Microsoft.Graph/Generated/Models/CloudPcRestorePointSetting.cs index 994a451d118..7c8ba5c54a6 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcRestorePointSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcRestorePointSetting.cs @@ -70,7 +70,7 @@ public CloudPcRestorePointSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcRestorePointSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcRestorePointSetting(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("frequencyInHours", FrequencyInHours); writer.WriteEnumValue("frequencyType", FrequencyType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcReviewStatus.cs b/src/Microsoft.Graph/Generated/Models/CloudPcReviewStatus.cs index f711261ec97..3d013797df3 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcReviewStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcReviewStatus.cs @@ -162,7 +162,7 @@ public CloudPcReviewStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcReviewStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcReviewStatus(); } /// @@ -192,7 +192,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("accessTier", AccessTier); writer.WriteStringValue("azureStorageAccountId", AzureStorageAccountId); writer.WriteStringValue("azureStorageAccountName", AzureStorageAccountName); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcScopedPermission.cs b/src/Microsoft.Graph/Generated/Models/CloudPcScopedPermission.cs index fc021bb890d..44abbc894a8 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcScopedPermission.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcScopedPermission.cs @@ -84,7 +84,7 @@ public CloudPcScopedPermission() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcScopedPermission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcScopedPermission(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("permission", Permission); writer.WriteCollectionOfPrimitiveValues("scopeIds", ScopeIds); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcServicePlan.cs b/src/Microsoft.Graph/Generated/Models/CloudPcServicePlan.cs index 0de9d5a1b15..d5d21c88ec4 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcServicePlan.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcServicePlan.cs @@ -77,7 +77,7 @@ public int? VCpuCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcServicePlan CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcServicePlan(); } /// @@ -104,7 +104,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteEnumValue("provisioningType", ProvisioningType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcServicePlanCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcServicePlanCollectionResponse.cs index c32e18a0ae8..ceeada1bcd6 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcServicePlanCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcServicePlanCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcServicePlanCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcServicePlanCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcServicePlanCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcSnapshot.cs b/src/Microsoft.Graph/Generated/Models/CloudPcSnapshot.cs index a85beaba7d6..668e7c81318 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcSnapshot.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcSnapshot.cs @@ -71,7 +71,7 @@ public DateTimeOffset? LastRestoredDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcSnapshot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcSnapshot(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("cloudPcId", CloudPcId); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcSnapshotCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcSnapshotCollectionResponse.cs index 210811b825a..4a86972a852 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcSnapshotCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcSnapshotCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcSnapshotCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcSnapshotCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcSnapshotCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcSourceDeviceImage.cs b/src/Microsoft.Graph/Generated/Models/CloudPcSourceDeviceImage.cs index 372b4c99880..63cf9cec949 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcSourceDeviceImage.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcSourceDeviceImage.cs @@ -132,7 +132,7 @@ public CloudPcSourceDeviceImage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcSourceDeviceImage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcSourceDeviceImage(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcStatusDetail.cs b/src/Microsoft.Graph/Generated/Models/CloudPcStatusDetail.cs index 610dfcbb185..66321d15bc0 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcStatusDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcStatusDetail.cs @@ -100,7 +100,7 @@ public CloudPcStatusDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcStatusDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcStatusDetail(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("additionalInformation", AdditionalInformation); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcStatusDetails.cs b/src/Microsoft.Graph/Generated/Models/CloudPcStatusDetails.cs index 81d677ccdcd..67ed27f937c 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcStatusDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcStatusDetails.cs @@ -100,7 +100,7 @@ public CloudPcStatusDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcStatusDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcStatusDetails(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("additionalInformation", AdditionalInformation); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcStatusSummary.cs b/src/Microsoft.Graph/Generated/Models/CloudPcStatusSummary.cs index 9200baaae87..d446f476fec 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcStatusSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcStatusSummary.cs @@ -64,7 +64,7 @@ public CloudPcStatusSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcStatusSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcStatusSummary(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("count", Count); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcSubscription.cs b/src/Microsoft.Graph/Generated/Models/CloudPcSubscription.cs index cd90598144d..18213ea2082 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcSubscription.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcSubscription.cs @@ -51,7 +51,7 @@ public string SubscriptionName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcSubscription CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcSubscription(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("subscriptionId", SubscriptionId); writer.WriteStringValue("subscriptionName", SubscriptionName); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcSupportedRegion.cs b/src/Microsoft.Graph/Generated/Models/CloudPcSupportedRegion.cs index 2bf26f7aaf8..66a145612d0 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcSupportedRegion.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcSupportedRegion.cs @@ -69,7 +69,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcSupportedRegion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcSupportedRegion(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteEnumValue("regionGroup", RegionGroup); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcSupportedRegionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcSupportedRegionCollectionResponse.cs index 7ac641f1828..d897ec4de71 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcSupportedRegionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcSupportedRegionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcSupportedRegionCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcSupportedRegionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcSupportedRegionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcSupportedRegionRestrictionDetail.cs b/src/Microsoft.Graph/Generated/Models/CloudPcSupportedRegionRestrictionDetail.cs index 7389d5879bf..548033a15af 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcSupportedRegionRestrictionDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcSupportedRegionRestrictionDetail.cs @@ -70,7 +70,7 @@ public CloudPcSupportedRegionRestrictionDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcSupportedRegionRestrictionDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcSupportedRegionRestrictionDetail(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("cPURestricted", CPURestricted); writer.WriteBoolValue("gPURestricted", GPURestricted); writer.WriteBoolValue("nestedVirtualizationRestricted", NestedVirtualizationRestricted); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcTenantEncryptionSetting.cs b/src/Microsoft.Graph/Generated/Models/CloudPcTenantEncryptionSetting.cs index 94b1dbe705d..5819dfc1466 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcTenantEncryptionSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcTenantEncryptionSetting.cs @@ -64,7 +64,7 @@ public CloudPcTenantEncryptionSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcTenantEncryptionSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcTenantEncryptionSetting(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastSyncDateTime", LastSyncDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("tenantDiskEncryptionType", TenantDiskEncryptionType); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcUserRoleScopeTagInfo.cs b/src/Microsoft.Graph/Generated/Models/CloudPcUserRoleScopeTagInfo.cs index df2214f953d..9f2a530c52b 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcUserRoleScopeTagInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcUserRoleScopeTagInfo.cs @@ -84,7 +84,7 @@ public CloudPcUserRoleScopeTagInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcUserRoleScopeTagInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcUserRoleScopeTagInfo(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("roleScopeTagId", RoleScopeTagId); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcUserSetting.cs b/src/Microsoft.Graph/Generated/Models/CloudPcUserSetting.cs index b8ed5fa9519..540e9429d95 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcUserSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcUserSetting.cs @@ -94,7 +94,7 @@ public bool? LocalAdminEnabled set { BackingStore?.Set("notificationSetting", value); } } #endif - /// The provisioningSourceType property + /// Indicates the provisioning source of the Cloud PC prepared for an end user. Possible values are: image, snapshot, unknownFutureValue. The default value is image. If this property isn't set or set to null, its functionality is the same as setting it to image. public global::Microsoft.Graph.Beta.Models.CloudPcProvisioningSourceType? ProvisioningSourceType { get { return BackingStore?.Get("provisioningSourceType"); } @@ -122,7 +122,7 @@ public bool? ResetEnabled set { BackingStore?.Set("restorePointSetting", value); } } #endif - /// Indicates whether the self-service option is enabled. Default value is false. To enable the self-service option, change the setting to true. If the self-service option is enabled, the end user is allowed to perform some self-service operations, such as upgrading the Cloud PC through the end user portal. The selfServiceEnabled property is deprecated and will stop returning data on December 1, 2023. + /// Indicates whether the self-service option is enabled. Default value is false. To enable the self-service option, change the setting to true. If the self-service option is enabled, the end user is allowed to perform some self-service operations, such as upgrading the Cloud PC through the end user portal. The selfServiceEnabled property is deprecated and stopped returning data on December 1, 2023. public bool? SelfServiceEnabled { get { return BackingStore?.Get("selfServiceEnabled"); } @@ -135,7 +135,7 @@ public bool? SelfServiceEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcUserSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcUserSetting(); } /// @@ -165,7 +165,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcUserSettingAssignment.cs b/src/Microsoft.Graph/Generated/Models/CloudPcUserSettingAssignment.cs index 246aeef15aa..c856528ea54 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcUserSettingAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcUserSettingAssignment.cs @@ -41,7 +41,7 @@ public DateTimeOffset? CreatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcUserSettingAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcUserSettingAssignment(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteObjectValue("target", Target); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcUserSettingAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcUserSettingAssignmentCollectionResponse.cs index 8a34a0b847b..c6d5eb81509 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcUserSettingAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcUserSettingAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcUserSettingAssignmentCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcUserSettingAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcUserSettingAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcUserSettingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CloudPcUserSettingCollectionResponse.cs index c5f5fc8094c..0d2c36d44aa 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcUserSettingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcUserSettingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcUserSettingCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CloudPcUserSettingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcUserSettingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcWindowsSetting.cs b/src/Microsoft.Graph/Generated/Models/CloudPcWindowsSetting.cs index 1918011550c..d23a25b86f4 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcWindowsSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcWindowsSetting.cs @@ -68,7 +68,7 @@ public CloudPcWindowsSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcWindowsSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcWindowsSetting(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("locale", Locale); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CloudPcWindowsSettings.cs b/src/Microsoft.Graph/Generated/Models/CloudPcWindowsSettings.cs index db5f64505af..4ad9e62dce9 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudPcWindowsSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudPcWindowsSettings.cs @@ -68,7 +68,7 @@ public CloudPcWindowsSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudPcWindowsSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudPcWindowsSettings(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("language", Language); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CloudRealtimeCommunicationInfo.cs b/src/Microsoft.Graph/Generated/Models/CloudRealtimeCommunicationInfo.cs index 9e06cfa3165..4c5eb91c5f8 100644 --- a/src/Microsoft.Graph/Generated/Models/CloudRealtimeCommunicationInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/CloudRealtimeCommunicationInfo.cs @@ -58,7 +58,7 @@ public CloudRealtimeCommunicationInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CloudRealtimeCommunicationInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CloudRealtimeCommunicationInfo(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isSipEnabled", IsSipEnabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CoachmarkLocation.cs b/src/Microsoft.Graph/Generated/Models/CoachmarkLocation.cs index a5c1ef31dd4..dba2ff95fca 100644 --- a/src/Microsoft.Graph/Generated/Models/CoachmarkLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/CoachmarkLocation.cs @@ -70,7 +70,7 @@ public CoachmarkLocation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CoachmarkLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CoachmarkLocation(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("length", Length); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("offset", Offset); diff --git a/src/Microsoft.Graph/Generated/Models/CollapseProperty.cs b/src/Microsoft.Graph/Generated/Models/CollapseProperty.cs index 19d30629ed7..ecc0d309348 100644 --- a/src/Microsoft.Graph/Generated/Models/CollapseProperty.cs +++ b/src/Microsoft.Graph/Generated/Models/CollapseProperty.cs @@ -74,7 +74,7 @@ public CollapseProperty() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CollapseProperty CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CollapseProperty(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("fields", Fields); writer.WriteIntValue("limit", Limit); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ColumnDefinition.cs b/src/Microsoft.Graph/Generated/Models/ColumnDefinition.cs index 5d1c9f5d720..3e7a1a3d9c6 100644 --- a/src/Microsoft.Graph/Generated/Models/ColumnDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/ColumnDefinition.cs @@ -431,7 +431,7 @@ public bool? Required /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ColumnDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ColumnDefinition(); } /// @@ -482,7 +482,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("boolean", Boolean); writer.WriteObjectValue("calculated", Calculated); diff --git a/src/Microsoft.Graph/Generated/Models/ColumnDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ColumnDefinitionCollectionResponse.cs index 46cc974316c..9f3b9567e2f 100644 --- a/src/Microsoft.Graph/Generated/Models/ColumnDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ColumnDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ColumnDefinitionCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ColumnDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ColumnDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ColumnLink.cs b/src/Microsoft.Graph/Generated/Models/ColumnLink.cs index 762d8300bb8..b469ff9ac63 100644 --- a/src/Microsoft.Graph/Generated/Models/ColumnLink.cs +++ b/src/Microsoft.Graph/Generated/Models/ColumnLink.cs @@ -35,7 +35,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ColumnLink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ColumnLink(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); } diff --git a/src/Microsoft.Graph/Generated/Models/ColumnLinkCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ColumnLinkCollectionResponse.cs index 51753ed5b7d..3175553083f 100644 --- a/src/Microsoft.Graph/Generated/Models/ColumnLinkCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ColumnLinkCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ColumnLinkCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ColumnLinkCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ColumnLinkCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ColumnValidation.cs b/src/Microsoft.Graph/Generated/Models/ColumnValidation.cs index b317921211d..b55ffed727d 100644 --- a/src/Microsoft.Graph/Generated/Models/ColumnValidation.cs +++ b/src/Microsoft.Graph/Generated/Models/ColumnValidation.cs @@ -100,7 +100,7 @@ public ColumnValidation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ColumnValidation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ColumnValidation(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("defaultLanguage", DefaultLanguage); writer.WriteCollectionOfObjectValues("descriptions", Descriptions); writer.WriteStringValue("formula", Formula); diff --git a/src/Microsoft.Graph/Generated/Models/ComanagedDevicesSummary.cs b/src/Microsoft.Graph/Generated/Models/ComanagedDevicesSummary.cs index a8ef111c3e7..01ed556a164 100644 --- a/src/Microsoft.Graph/Generated/Models/ComanagedDevicesSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ComanagedDevicesSummary.cs @@ -107,7 +107,7 @@ public ComanagedDevicesSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ComanagedDevicesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ComanagedDevicesSummary(); } /// @@ -136,7 +136,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/ComanagementEligibleDevice.cs b/src/Microsoft.Graph/Generated/Models/ComanagementEligibleDevice.cs index 8924be2f563..12ef84b4a9e 100644 --- a/src/Microsoft.Graph/Generated/Models/ComanagementEligibleDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/ComanagementEligibleDevice.cs @@ -254,7 +254,7 @@ public string UserName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ComanagementEligibleDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ComanagementEligibleDevice(); } /// @@ -292,7 +292,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("clientRegistrationStatus", ClientRegistrationStatus); writer.WriteStringValue("deviceName", DeviceName); diff --git a/src/Microsoft.Graph/Generated/Models/ComanagementEligibleDeviceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ComanagementEligibleDeviceCollectionResponse.cs index e63de2ecf92..9a2fc4b5995 100644 --- a/src/Microsoft.Graph/Generated/Models/ComanagementEligibleDeviceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ComanagementEligibleDeviceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ComanagementEligibleDeviceCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ComanagementEligibleDeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ComanagementEligibleDeviceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ComanagementEligibleDevicesSummary.cs b/src/Microsoft.Graph/Generated/Models/ComanagementEligibleDevicesSummary.cs index cad3aa55566..5288e1b8bcd 100644 --- a/src/Microsoft.Graph/Generated/Models/ComanagementEligibleDevicesSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ComanagementEligibleDevicesSummary.cs @@ -88,7 +88,7 @@ public ComanagementEligibleDevicesSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ComanagementEligibleDevicesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ComanagementEligibleDevicesSummary(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("comanagedCount", ComanagedCount); writer.WriteIntValue("eligibleButNotAzureAdJoinedCount", EligibleButNotAzureAdJoinedCount); writer.WriteIntValue("eligibleCount", EligibleCount); diff --git a/src/Microsoft.Graph/Generated/Models/Command.cs b/src/Microsoft.Graph/Generated/Models/Command.cs index 317bf7c5ad3..14a40f24452 100644 --- a/src/Microsoft.Graph/Generated/Models/Command.cs +++ b/src/Microsoft.Graph/Generated/Models/Command.cs @@ -163,7 +163,7 @@ public string Type /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Command CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Command(); } /// @@ -191,7 +191,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appServiceName", AppServiceName); writer.WriteStringValue("error", Error); diff --git a/src/Microsoft.Graph/Generated/Models/CommandCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CommandCollectionResponse.cs index f85c2012bbf..e219bd145fe 100644 --- a/src/Microsoft.Graph/Generated/Models/CommandCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CommandCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CommandCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CommandCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CommandCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CommentAction.cs b/src/Microsoft.Graph/Generated/Models/CommentAction.cs index e72e3822ddb..1bc34906c02 100644 --- a/src/Microsoft.Graph/Generated/Models/CommentAction.cs +++ b/src/Microsoft.Graph/Generated/Models/CommentAction.cs @@ -90,7 +90,7 @@ public CommentAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CommentAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CommentAction(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isReply", IsReply); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("parentAuthor", ParentAuthor); diff --git a/src/Microsoft.Graph/Generated/Models/CommsApplication.cs b/src/Microsoft.Graph/Generated/Models/CommsApplication.cs index a5be46b30bb..bb57c9584cc 100644 --- a/src/Microsoft.Graph/Generated/Models/CommsApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/CommsApplication.cs @@ -84,7 +84,7 @@ public CommsApplication() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CommsApplication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CommsApplication(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("calls", Calls); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("onlineMeetings", OnlineMeetings); diff --git a/src/Microsoft.Graph/Generated/Models/CommsOperation.cs b/src/Microsoft.Graph/Generated/Models/CommsOperation.cs index cc88b64f415..17306016cd2 100644 --- a/src/Microsoft.Graph/Generated/Models/CommsOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/CommsOperation.cs @@ -57,7 +57,7 @@ public string ClientContext /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CommsOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -100,7 +100,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("clientContext", ClientContext); writer.WriteObjectValue("resultInfo", ResultInfo); diff --git a/src/Microsoft.Graph/Generated/Models/CommsOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CommsOperationCollectionResponse.cs index 715a6c6dd3f..9fc178d625b 100644 --- a/src/Microsoft.Graph/Generated/Models/CommsOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CommsOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CommsOperationCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CommsOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CommsOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CommunicationsApplicationIdentity.cs b/src/Microsoft.Graph/Generated/Models/CommunicationsApplicationIdentity.cs index 8d4b5e7ca73..e0e82cf9c7b 100644 --- a/src/Microsoft.Graph/Generated/Models/CommunicationsApplicationIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/CommunicationsApplicationIdentity.cs @@ -48,7 +48,7 @@ public CommunicationsApplicationIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CommunicationsApplicationIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CommunicationsApplicationIdentity(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("applicationType", ApplicationType); writer.WriteBoolValue("hidden", Hidden); diff --git a/src/Microsoft.Graph/Generated/Models/CommunicationsApplicationInstanceIdentity.cs b/src/Microsoft.Graph/Generated/Models/CommunicationsApplicationInstanceIdentity.cs index 97ea40d39f6..0f28a6a6efb 100644 --- a/src/Microsoft.Graph/Generated/Models/CommunicationsApplicationInstanceIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/CommunicationsApplicationInstanceIdentity.cs @@ -48,7 +48,7 @@ public CommunicationsApplicationInstanceIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CommunicationsApplicationInstanceIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CommunicationsApplicationInstanceIdentity(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("hidden", Hidden); writer.WriteStringValue("tenantId", TenantId); diff --git a/src/Microsoft.Graph/Generated/Models/CommunicationsEncryptedIdentity.cs b/src/Microsoft.Graph/Generated/Models/CommunicationsEncryptedIdentity.cs index bc7b2c7299b..c0865bd321b 100644 --- a/src/Microsoft.Graph/Generated/Models/CommunicationsEncryptedIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/CommunicationsEncryptedIdentity.cs @@ -26,7 +26,7 @@ public CommunicationsEncryptedIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CommunicationsEncryptedIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CommunicationsEncryptedIdentity(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CommunicationsGuestIdentity.cs b/src/Microsoft.Graph/Generated/Models/CommunicationsGuestIdentity.cs index cf35775f8ac..5a377b7fc05 100644 --- a/src/Microsoft.Graph/Generated/Models/CommunicationsGuestIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/CommunicationsGuestIdentity.cs @@ -42,7 +42,7 @@ public CommunicationsGuestIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CommunicationsGuestIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CommunicationsGuestIdentity(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("email", Email); } diff --git a/src/Microsoft.Graph/Generated/Models/CommunicationsIdentitySet.cs b/src/Microsoft.Graph/Generated/Models/CommunicationsIdentitySet.cs index 71f6faf60b8..153e670bebb 100644 --- a/src/Microsoft.Graph/Generated/Models/CommunicationsIdentitySet.cs +++ b/src/Microsoft.Graph/Generated/Models/CommunicationsIdentitySet.cs @@ -144,7 +144,7 @@ public CommunicationsIdentitySet() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CommunicationsIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CommunicationsIdentitySet(); } /// @@ -171,7 +171,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("applicationInstance", ApplicationInstance); writer.WriteObjectValue("assertedIdentity", AssertedIdentity); diff --git a/src/Microsoft.Graph/Generated/Models/CommunicationsPhoneIdentity.cs b/src/Microsoft.Graph/Generated/Models/CommunicationsPhoneIdentity.cs index 2f801a0a2ac..5de7fd1a090 100644 --- a/src/Microsoft.Graph/Generated/Models/CommunicationsPhoneIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/CommunicationsPhoneIdentity.cs @@ -26,7 +26,7 @@ public CommunicationsPhoneIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CommunicationsPhoneIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CommunicationsPhoneIdentity(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CommunicationsUserIdentity.cs b/src/Microsoft.Graph/Generated/Models/CommunicationsUserIdentity.cs index becbcdcf9ec..aa3a2e782dc 100644 --- a/src/Microsoft.Graph/Generated/Models/CommunicationsUserIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/CommunicationsUserIdentity.cs @@ -42,7 +42,7 @@ public CommunicationsUserIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CommunicationsUserIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CommunicationsUserIdentity(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("tenantId", TenantId); } diff --git a/src/Microsoft.Graph/Generated/Models/Community.cs b/src/Microsoft.Graph/Generated/Models/Community.cs index e1ca2edb6f9..63ce57d098f 100644 --- a/src/Microsoft.Graph/Generated/Models/Community.cs +++ b/src/Microsoft.Graph/Generated/Models/Community.cs @@ -106,7 +106,7 @@ public string GroupId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Community CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Community(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/CommunityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CommunityCollectionResponse.cs index 3fe7b5c28f1..210dfd04b67 100644 --- a/src/Microsoft.Graph/Generated/Models/CommunityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CommunityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CommunityCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CommunityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CommunityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Company.cs b/src/Microsoft.Graph/Generated/Models/Company.cs index c96c8cfb816..cb6a874177f 100644 --- a/src/Microsoft.Graph/Generated/Models/Company.cs +++ b/src/Microsoft.Graph/Generated/Models/Company.cs @@ -682,7 +682,7 @@ public Company() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Company CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Company(); } /// @@ -742,7 +742,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("accounts", Accounts); writer.WriteCollectionOfObjectValues("agedAccountsPayable", AgedAccountsPayable); writer.WriteCollectionOfObjectValues("agedAccountsReceivable", AgedAccountsReceivable); diff --git a/src/Microsoft.Graph/Generated/Models/CompanyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CompanyCollectionResponse.cs index ffaa39df927..7e32b614cb3 100644 --- a/src/Microsoft.Graph/Generated/Models/CompanyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CompanyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CompanyCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CompanyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CompanyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CompanyDetail.cs b/src/Microsoft.Graph/Generated/Models/CompanyDetail.cs index 60bd814891f..01374a78d63 100644 --- a/src/Microsoft.Graph/Generated/Models/CompanyDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/CompanyDetail.cs @@ -212,7 +212,7 @@ public CompanyDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CompanyDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CompanyDetail(); } /// @@ -242,7 +242,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("address", Address); writer.WriteStringValue("companyCode", CompanyCode); writer.WriteStringValue("costCenter", CostCenter); diff --git a/src/Microsoft.Graph/Generated/Models/CompanyInformation.cs b/src/Microsoft.Graph/Generated/Models/CompanyInformation.cs index afc7e9a7946..2020ade1101 100644 --- a/src/Microsoft.Graph/Generated/Models/CompanyInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/CompanyInformation.cs @@ -231,7 +231,7 @@ public CompanyInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CompanyInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CompanyInformation(); } /// @@ -264,7 +264,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("address", Address); writer.WriteStringValue("currencyCode", CurrencyCode); writer.WriteDateValue("currentFiscalYearStartDate", CurrentFiscalYearStartDate); diff --git a/src/Microsoft.Graph/Generated/Models/CompanyInformationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CompanyInformationCollectionResponse.cs index 4bcc1f57c2f..439068dccc6 100644 --- a/src/Microsoft.Graph/Generated/Models/CompanyInformationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CompanyInformationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CompanyInformationCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CompanyInformationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CompanyInformationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CompanyPortalBlockedAction.cs b/src/Microsoft.Graph/Generated/Models/CompanyPortalBlockedAction.cs index a016368f2fb..a47e795f4c0 100644 --- a/src/Microsoft.Graph/Generated/Models/CompanyPortalBlockedAction.cs +++ b/src/Microsoft.Graph/Generated/Models/CompanyPortalBlockedAction.cs @@ -71,7 +71,7 @@ public CompanyPortalBlockedAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CompanyPortalBlockedAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CompanyPortalBlockedAction(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("ownerType", OwnerType); diff --git a/src/Microsoft.Graph/Generated/Models/CompanySubscription.cs b/src/Microsoft.Graph/Generated/Models/CompanySubscription.cs index 954c961362d..d740f18a9fc 100644 --- a/src/Microsoft.Graph/Generated/Models/CompanySubscription.cs +++ b/src/Microsoft.Graph/Generated/Models/CompanySubscription.cs @@ -187,7 +187,7 @@ public int? TotalLicenses /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CompanySubscription CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CompanySubscription(); } /// @@ -219,7 +219,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("commerceSubscriptionId", CommerceSubscriptionId); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/CompanySubscriptionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CompanySubscriptionCollectionResponse.cs index f6f46e75ce9..43f3e5f8608 100644 --- a/src/Microsoft.Graph/Generated/Models/CompanySubscriptionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CompanySubscriptionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CompanySubscriptionCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CompanySubscriptionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CompanySubscriptionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Compliance.cs b/src/Microsoft.Graph/Generated/Models/Compliance.cs index 881275a5116..e36b338b654 100644 --- a/src/Microsoft.Graph/Generated/Models/Compliance.cs +++ b/src/Microsoft.Graph/Generated/Models/Compliance.cs @@ -69,7 +69,7 @@ public Compliance() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Compliance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Compliance(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("ediscovery", Ediscovery); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ComplianceInformation.cs b/src/Microsoft.Graph/Generated/Models/ComplianceInformation.cs index 77c2750a6a6..1f7d173cc81 100644 --- a/src/Microsoft.Graph/Generated/Models/ComplianceInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ComplianceInformation.cs @@ -84,7 +84,7 @@ public ComplianceInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ComplianceInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ComplianceInformation(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("certificationControls", CertificationControls); writer.WriteStringValue("certificationName", CertificationName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ComplianceManagementPartner.cs b/src/Microsoft.Graph/Generated/Models/ComplianceManagementPartner.cs index 3980f7637fb..46fad95401f 100644 --- a/src/Microsoft.Graph/Generated/Models/ComplianceManagementPartner.cs +++ b/src/Microsoft.Graph/Generated/Models/ComplianceManagementPartner.cs @@ -136,7 +136,7 @@ public bool? MacOsOnboarded /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ComplianceManagementPartner CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ComplianceManagementPartner(); } /// @@ -166,7 +166,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("androidEnrollmentAssignments", AndroidEnrollmentAssignments); writer.WriteBoolValue("androidOnboarded", AndroidOnboarded); diff --git a/src/Microsoft.Graph/Generated/Models/ComplianceManagementPartnerAssignment.cs b/src/Microsoft.Graph/Generated/Models/ComplianceManagementPartnerAssignment.cs index e9dc36af665..03edbbab80a 100644 --- a/src/Microsoft.Graph/Generated/Models/ComplianceManagementPartnerAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/ComplianceManagementPartnerAssignment.cs @@ -69,7 +69,7 @@ public ComplianceManagementPartnerAssignment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ComplianceManagementPartnerAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ComplianceManagementPartnerAssignment(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("target", Target); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ComplianceManagementPartnerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ComplianceManagementPartnerCollectionResponse.cs index 97f3fed5c40..6c78200cfd5 100644 --- a/src/Microsoft.Graph/Generated/Models/ComplianceManagementPartnerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ComplianceManagementPartnerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ComplianceManagementPartnerCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ComplianceManagementPartnerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ComplianceManagementPartnerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ComputeRightsAndInheritanceResult.cs b/src/Microsoft.Graph/Generated/Models/ComputeRightsAndInheritanceResult.cs index 6641cf2173d..72fcb117d46 100644 --- a/src/Microsoft.Graph/Generated/Models/ComputeRightsAndInheritanceResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ComputeRightsAndInheritanceResult.cs @@ -100,7 +100,7 @@ public ComputeRightsAndInheritanceResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ComputeRightsAndInheritanceResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ComputeRightsAndInheritanceResult(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("contentRights", ContentRights); writer.WriteObjectValue("inheritedLabel", InheritedLabel); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessAllExternalTenants.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessAllExternalTenants.cs index 7288adb20b2..c5df527ad0e 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessAllExternalTenants.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessAllExternalTenants.cs @@ -26,7 +26,7 @@ public ConditionalAccessAllExternalTenants() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConditionalAccessAllExternalTenants CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessAllExternalTenants(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessApplications.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessApplications.cs index d0c6618bf28..9edbd7bfc1d 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessApplications.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessApplications.cs @@ -164,7 +164,7 @@ public ConditionalAccessApplications() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessApplications CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessApplications(); } /// @@ -191,7 +191,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("applicationFilter", ApplicationFilter); writer.WriteCollectionOfPrimitiveValues("excludeApplications", ExcludeApplications); writer.WriteObjectValue("globalSecureAccess", GlobalSecureAccess); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessAuthenticationFlows.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessAuthenticationFlows.cs index 393dc5cc636..39358b270c8 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessAuthenticationFlows.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessAuthenticationFlows.cs @@ -58,7 +58,7 @@ public ConditionalAccessAuthenticationFlows() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessAuthenticationFlows CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessAuthenticationFlows(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("transferMethods", TransferMethods); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessClientApplications.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessClientApplications.cs index a7c054832d4..5c7357b486b 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessClientApplications.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessClientApplications.cs @@ -100,7 +100,7 @@ public ConditionalAccessClientApplications() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessClientApplications CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessClientApplications(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("excludeServicePrincipals", ExcludeServicePrincipals); writer.WriteCollectionOfPrimitiveValues("includeServicePrincipals", IncludeServicePrincipals); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessConditionSet.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessConditionSet.cs index dc026efacac..1cb47aedbba 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessConditionSet.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessConditionSet.cs @@ -250,7 +250,7 @@ public ConditionalAccessConditionSet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessConditionSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessConditionSet(); } /// @@ -283,7 +283,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("applications", Applications); writer.WriteObjectValue("authenticationFlows", AuthenticationFlows); writer.WriteObjectValue("clientApplications", ClientApplications); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessDeviceStates.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessDeviceStates.cs index 160f9a92425..6dc1f1a14ce 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessDeviceStates.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessDeviceStates.cs @@ -84,7 +84,7 @@ public ConditionalAccessDeviceStates() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessDeviceStates CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessDeviceStates(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("excludeStates", ExcludeStates); writer.WriteCollectionOfPrimitiveValues("includeStates", IncludeStates); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessDevices.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessDevices.cs index e1cafc64c13..f50c5af7397 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessDevices.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessDevices.cs @@ -132,7 +132,7 @@ public ConditionalAccessDevices() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessDevices CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessDevices(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("deviceFilter", DeviceFilter); writer.WriteCollectionOfPrimitiveValues("excludeDevices", ExcludeDevices); writer.WriteCollectionOfPrimitiveValues("excludeDeviceStates", ExcludeDeviceStates); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessEnumeratedExternalTenants.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessEnumeratedExternalTenants.cs index eb89f011ec0..4b322977471 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessEnumeratedExternalTenants.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessEnumeratedExternalTenants.cs @@ -42,7 +42,7 @@ public ConditionalAccessEnumeratedExternalTenants() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConditionalAccessEnumeratedExternalTenants CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessEnumeratedExternalTenants(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("members", Members); } diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessExternalTenants.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessExternalTenants.cs index 236c4e6e7b4..3e8b538e01b 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessExternalTenants.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessExternalTenants.cs @@ -58,7 +58,7 @@ public ConditionalAccessExternalTenants() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessExternalTenants CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -85,7 +85,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("membershipKind", MembershipKind); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessFilter.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessFilter.cs index 829cbf47d08..2a8c5e0fe9a 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessFilter.cs @@ -74,7 +74,7 @@ public ConditionalAccessFilter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessFilter(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("mode", Mode); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("rule", Rule); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessGlobalSecureAccess.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessGlobalSecureAccess.cs index f81cf0b7e0a..b81264ebaf4 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessGlobalSecureAccess.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessGlobalSecureAccess.cs @@ -52,7 +52,7 @@ public ConditionalAccessGlobalSecureAccess() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessGlobalSecureAccess CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessGlobalSecureAccess(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessGrantControls.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessGrantControls.cs index 4ccbb8a33f7..47eecf521b8 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessGrantControls.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessGrantControls.cs @@ -132,7 +132,7 @@ public ConditionalAccessGrantControls() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessGrantControls CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessGrantControls(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("authenticationStrength", AuthenticationStrength); writer.WriteCollectionOfEnumValues("builtInControls", BuiltInControls); writer.WriteCollectionOfPrimitiveValues("customAuthenticationFactors", CustomAuthenticationFactors); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessGuestsOrExternalUsers.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessGuestsOrExternalUsers.cs index 317190dd5be..c00670de89e 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessGuestsOrExternalUsers.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessGuestsOrExternalUsers.cs @@ -74,7 +74,7 @@ public ConditionalAccessGuestsOrExternalUsers() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessGuestsOrExternalUsers CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessGuestsOrExternalUsers(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("externalTenants", ExternalTenants); writer.WriteEnumValue("guestOrExternalUserTypes", GuestOrExternalUserTypes); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessLocations.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessLocations.cs index 21ae079f7dd..42da5c4182d 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessLocations.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessLocations.cs @@ -84,7 +84,7 @@ public ConditionalAccessLocations() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessLocations CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessLocations(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("excludeLocations", ExcludeLocations); writer.WriteCollectionOfPrimitiveValues("includeLocations", IncludeLocations); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessNetworkAccess.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessNetworkAccess.cs index 309d1dfcfb6..2d1e021e108 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessNetworkAccess.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessNetworkAccess.cs @@ -52,7 +52,7 @@ public ConditionalAccessNetworkAccess() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessNetworkAccess CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessNetworkAccess(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessPlatforms.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessPlatforms.cs index 2c81ee70ab7..399622c6799 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessPlatforms.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessPlatforms.cs @@ -84,7 +84,7 @@ public ConditionalAccessPlatforms() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessPlatforms CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessPlatforms(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfEnumValues("excludePlatforms", ExcludePlatforms); writer.WriteCollectionOfEnumValues("includePlatforms", IncludePlatforms); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessPolicyDetail.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessPolicyDetail.cs index 892475f73a7..d771a12ffee 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessPolicyDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessPolicyDetail.cs @@ -100,7 +100,7 @@ public ConditionalAccessPolicyDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessPolicyDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessPolicyDetail(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("conditions", Conditions); writer.WriteObjectValue("grantControls", GrantControls); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessRoot.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessRoot.cs index 7f0d6ca55bb..462a4b312d2 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessRoot.cs @@ -83,7 +83,7 @@ public partial class ConditionalAccessRoot : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConditionalAccessRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessRoot(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("authenticationContextClassReferences", AuthenticationContextClassReferences); writer.WriteObjectValue("authenticationStrength", AuthenticationStrength); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessRuleSatisfied.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessRuleSatisfied.cs index 9595d9644ed..ada95d06a86 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessRuleSatisfied.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessRuleSatisfied.cs @@ -64,7 +64,7 @@ public ConditionalAccessRuleSatisfied() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessRuleSatisfied CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessRuleSatisfied(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("conditionalAccessCondition", ConditionalAccessCondition); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("ruleSatisfied", RuleSatisfied); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessSessionControl.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessSessionControl.cs index 04050a361fb..800087cf384 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessSessionControl.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessSessionControl.cs @@ -58,7 +58,7 @@ public ConditionalAccessSessionControl() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessSessionControl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isEnabled", IsEnabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessSessionControls.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessSessionControls.cs index 24b3f02a355..cc9cb90a372 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessSessionControls.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessSessionControls.cs @@ -170,7 +170,7 @@ public ConditionalAccessSessionControls() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessSessionControls CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessSessionControls(); } /// @@ -198,7 +198,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("applicationEnforcedRestrictions", ApplicationEnforcedRestrictions); writer.WriteObjectValue("cloudAppSecurity", CloudAppSecurity); writer.WriteObjectValue("continuousAccessEvaluation", ContinuousAccessEvaluation); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessTemplate.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessTemplate.cs index 6cbd1751b95..6676682d8ce 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessTemplate.cs @@ -73,7 +73,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConditionalAccessTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessTemplate(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteObjectValue("details", Details); diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessTemplateCollectionResponse.cs index 3466cc8185a..45c05b0f83f 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConditionalAccessTemplateCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConditionalAccessTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ConditionalAccessUsers.cs b/src/Microsoft.Graph/Generated/Models/ConditionalAccessUsers.cs index f0bda7375e2..f032c3a1bd8 100644 --- a/src/Microsoft.Graph/Generated/Models/ConditionalAccessUsers.cs +++ b/src/Microsoft.Graph/Generated/Models/ConditionalAccessUsers.cs @@ -180,7 +180,7 @@ public ConditionalAccessUsers() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConditionalAccessUsers CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConditionalAccessUsers(); } /// @@ -208,7 +208,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("excludeGroups", ExcludeGroups); writer.WriteObjectValue("excludeGuestsOrExternalUsers", ExcludeGuestsOrExternalUsers); writer.WriteCollectionOfPrimitiveValues("excludeRoles", ExcludeRoles); diff --git a/src/Microsoft.Graph/Generated/Models/ConfigManagerCollection.cs b/src/Microsoft.Graph/Generated/Models/ConfigManagerCollection.cs index 5fbf5875549..30b4f027680 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigManagerCollection.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigManagerCollection.cs @@ -96,7 +96,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigManagerCollection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigManagerCollection(); } /// @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("collectionIdentifier", CollectionIdentifier); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ConfigManagerCollectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ConfigManagerCollectionCollectionResponse.cs index 7d3bee305b9..7fadf70727d 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigManagerCollectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigManagerCollectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConfigManagerCollectionCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigManagerCollectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigManagerCollectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ConfigManagerPolicySummary.cs b/src/Microsoft.Graph/Generated/Models/ConfigManagerPolicySummary.cs index 04c9ef8c97d..9cab211c139 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigManagerPolicySummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigManagerPolicySummary.cs @@ -89,7 +89,7 @@ public ConfigManagerPolicySummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConfigManagerPolicySummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigManagerPolicySummary(); } /// @@ -115,7 +115,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("compliantDeviceCount", CompliantDeviceCount); writer.WriteIntValue("enforcedDeviceCount", EnforcedDeviceCount); writer.WriteIntValue("failedDeviceCount", FailedDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/Configuration.cs b/src/Microsoft.Graph/Generated/Models/Configuration.cs index 2beadaf307f..9bd7480bcaa 100644 --- a/src/Microsoft.Graph/Generated/Models/Configuration.cs +++ b/src/Microsoft.Graph/Generated/Models/Configuration.cs @@ -84,7 +84,7 @@ public Configuration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Configuration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Configuration(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("authorizedAppIds", AuthorizedAppIds); writer.WriteCollectionOfPrimitiveValues("authorizedApps", AuthorizedApps); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationApplication.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationApplication.cs index 325d481f834..f29ee82358a 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationApplication.cs @@ -159,7 +159,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationApplication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationApplication(); } /// @@ -188,7 +188,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("appOwnerOrganizationId", AppOwnerOrganizationId); diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationApplicationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationApplicationCollectionResponse.cs index 3f26689fefc..6752c1a100c 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationApplicationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationApplicationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConfigurationApplicationCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationApplicationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationApplicationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationBaseline.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationBaseline.cs index 6014e2c9292..bd7b13e2bec 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationBaseline.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationBaseline.cs @@ -83,7 +83,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationBaseline CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationBaseline(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationBaselineCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationBaselineCollectionResponse.cs index 9bb346c3fc3..863b020551b 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationBaselineCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationBaselineCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConfigurationBaselineCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationBaselineCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationBaselineCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationDrift.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationDrift.cs index 6f9ae18bcb4..fce6fac4877 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationDrift.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationDrift.cs @@ -127,7 +127,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationDrift CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationDrift(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("resourceInstanceIdentifier", ResourceInstanceIdentifier); writer.WriteEnumValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationDriftCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationDriftCollectionResponse.cs index 428febfb8a7..91a8854f6ae 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationDriftCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationDriftCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConfigurationDriftCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationDriftCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationDriftCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationManagement.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationManagement.cs index 18ccbe8f8af..dd138c5783d 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationManagement.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationManagement.cs @@ -115,7 +115,7 @@ public partial class ConfigurationManagement : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationManagement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationManagement(); } /// @@ -140,7 +140,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("configurationApplications", ConfigurationApplications); writer.WriteCollectionOfObjectValues("configurationDrifts", ConfigurationDrifts); diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationManagerAction.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationManagerAction.cs index faf600b1300..69c0c53a48f 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationManagerAction.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationManagerAction.cs @@ -59,7 +59,7 @@ public ConfigurationManagerAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConfigurationManagerAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationManagerAction(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationManagerActionResult.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationManagerActionResult.cs index a10ce2ec04b..1c1a44b2d98 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationManagerActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationManagerActionResult.cs @@ -32,7 +32,7 @@ public int? ErrorCode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationManagerActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationManagerActionResult(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("actionDeliveryStatus", ActionDeliveryStatus); writer.WriteIntValue("errorCode", ErrorCode); diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationManagerClientEnabledFeatures.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationManagerClientEnabledFeatures.cs index 3926267a20a..69ad5dfc46b 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationManagerClientEnabledFeatures.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationManagerClientEnabledFeatures.cs @@ -101,7 +101,7 @@ public ConfigurationManagerClientEnabledFeatures() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConfigurationManagerClientEnabledFeatures CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationManagerClientEnabledFeatures(); } /// @@ -129,7 +129,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("compliancePolicy", CompliancePolicy); writer.WriteBoolValue("deviceConfiguration", DeviceConfiguration); writer.WriteBoolValue("endpointProtection", EndpointProtection); diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationManagerClientHealthState.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationManagerClientHealthState.cs index 5893ba242eb..993ae5931b4 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationManagerClientHealthState.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationManagerClientHealthState.cs @@ -71,7 +71,7 @@ public ConfigurationManagerClientHealthState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConfigurationManagerClientHealthState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationManagerClientHealthState(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("errorCode", ErrorCode); writer.WriteDateTimeOffsetValue("lastSyncDateTime", LastSyncDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationManagerClientInformation.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationManagerClientInformation.cs index a4bb7dd9635..771d6a3daaa 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationManagerClientInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationManagerClientInformation.cs @@ -91,7 +91,7 @@ public ConfigurationManagerClientInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConfigurationManagerClientInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationManagerClientInformation(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientIdentifier", ClientIdentifier); writer.WriteStringValue("clientVersion", ClientVersion); writer.WriteBoolValue("isBlocked", IsBlocked); diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationManagerCollectionAssignmentTarget.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationManagerCollectionAssignmentTarget.cs index cffc6ba602a..9db77fa132f 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationManagerCollectionAssignmentTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationManagerCollectionAssignmentTarget.cs @@ -43,7 +43,7 @@ public ConfigurationManagerCollectionAssignmentTarget() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationManagerCollectionAssignmentTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationManagerCollectionAssignmentTarget(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("collectionId", CollectionId); } diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationMonitor.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationMonitor.cs index d9fe1b7963f..7dc1f41cee1 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationMonitor.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationMonitor.cs @@ -161,7 +161,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationMonitor CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationMonitor(); } /// @@ -192,7 +192,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("baseline", Baseline); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationMonitorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationMonitorCollectionResponse.cs index 1ff832c8737..1047318c1e5 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationMonitorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationMonitorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConfigurationMonitorCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationMonitorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationMonitorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationMonitoringResult.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationMonitoringResult.cs index f00f54c433d..038b7a17575 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationMonitoringResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationMonitoringResult.cs @@ -91,7 +91,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationMonitoringResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationMonitoringResult(); } /// @@ -117,7 +117,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("runStatus", RunStatus); } diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationMonitoringResultCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationMonitoringResultCollectionResponse.cs index 24c9c734a98..239b9b20e50 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationMonitoringResultCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationMonitoringResultCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConfigurationMonitoringResultCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationMonitoringResultCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationMonitoringResultCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationSnapshotJob.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationSnapshotJob.cs index 7393020bc9a..d2aaf944635 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationSnapshotJob.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationSnapshotJob.cs @@ -149,7 +149,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationSnapshotJob CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationSnapshotJob(); } /// @@ -178,7 +178,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationSnapshotJobCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationSnapshotJobCollectionResponse.cs index 87be20aea8f..05f052ce61d 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationSnapshotJobCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationSnapshotJobCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConfigurationSnapshotJobCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConfigurationSnapshotJobCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationSnapshotJobCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ConfigurationUri.cs b/src/Microsoft.Graph/Generated/Models/ConfigurationUri.cs index bfc807aaca4..0e04a1ad00d 100644 --- a/src/Microsoft.Graph/Generated/Models/ConfigurationUri.cs +++ b/src/Microsoft.Graph/Generated/Models/ConfigurationUri.cs @@ -112,7 +112,7 @@ public ConfigurationUri() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConfigurationUri CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConfigurationUri(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appliesToSingleSignOnMode", AppliesToSingleSignOnMode); writer.WriteCollectionOfPrimitiveValues("examples", Examples); writer.WriteBoolValue("isRequired", IsRequired); diff --git a/src/Microsoft.Graph/Generated/Models/ConnectedOrganization.cs b/src/Microsoft.Graph/Generated/Models/ConnectedOrganization.cs index 8badaacf137..a60450a59ae 100644 --- a/src/Microsoft.Graph/Generated/Models/ConnectedOrganization.cs +++ b/src/Microsoft.Graph/Generated/Models/ConnectedOrganization.cs @@ -149,7 +149,7 @@ public DateTimeOffset? ModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConnectedOrganization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConnectedOrganization(); } /// @@ -178,7 +178,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ConnectedOrganizationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ConnectedOrganizationCollectionResponse.cs index cfe4b402674..c244ebf9592 100644 --- a/src/Microsoft.Graph/Generated/Models/ConnectedOrganizationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ConnectedOrganizationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConnectedOrganizationCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConnectedOrganizationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConnectedOrganizationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ConnectedOrganizationMembers.cs b/src/Microsoft.Graph/Generated/Models/ConnectedOrganizationMembers.cs index 6725303763b..05a6f992280 100644 --- a/src/Microsoft.Graph/Generated/Models/ConnectedOrganizationMembers.cs +++ b/src/Microsoft.Graph/Generated/Models/ConnectedOrganizationMembers.cs @@ -58,7 +58,7 @@ public ConnectedOrganizationMembers() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConnectedOrganizationMembers CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConnectedOrganizationMembers(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/ConnectionInfo.cs b/src/Microsoft.Graph/Generated/Models/ConnectionInfo.cs index e3b7407ef9d..9db73aea0e5 100644 --- a/src/Microsoft.Graph/Generated/Models/ConnectionInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ConnectionInfo.cs @@ -68,7 +68,7 @@ public ConnectionInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConnectionInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConnectionInfo(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("url", Url); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ConnectionOperation.cs b/src/Microsoft.Graph/Generated/Models/ConnectionOperation.cs index d2374eb7ee3..ec1c7999290 100644 --- a/src/Microsoft.Graph/Generated/Models/ConnectionOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/ConnectionOperation.cs @@ -41,7 +41,7 @@ public partial class ConnectionOperation : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConnectionOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConnectionOperation(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("error", Error); writer.WriteEnumValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/ConnectionType.cs b/src/Microsoft.Graph/Generated/Models/ConnectionType.cs new file mode 100644 index 00000000000..2afbc6690bb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ConnectionType.cs @@ -0,0 +1,20 @@ +// +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Beta.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public enum ConnectionType + #pragma warning restore CS1591 + { + [EnumMember(Value = "webSocket")] + #pragma warning disable CS1591 + WebSocket, + #pragma warning restore CS1591 + [EnumMember(Value = "unknownFutureValue")] + #pragma warning disable CS1591 + UnknownFutureValue, + #pragma warning restore CS1591 + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Connector.cs b/src/Microsoft.Graph/Generated/Models/Connector.cs index 0c3f9d3c02e..27b9478c8d4 100644 --- a/src/Microsoft.Graph/Generated/Models/Connector.cs +++ b/src/Microsoft.Graph/Generated/Models/Connector.cs @@ -89,7 +89,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Connector CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Connector(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("externalIp", ExternalIp); writer.WriteStringValue("machineName", MachineName); diff --git a/src/Microsoft.Graph/Generated/Models/ConnectorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ConnectorCollectionResponse.cs index b8f9c1a9ccc..a2f24a45f41 100644 --- a/src/Microsoft.Graph/Generated/Models/ConnectorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ConnectorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConnectorCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConnectorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConnectorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ConnectorGroup.cs b/src/Microsoft.Graph/Generated/Models/ConnectorGroup.cs index 7a1e98995a5..c27e5a21aee 100644 --- a/src/Microsoft.Graph/Generated/Models/ConnectorGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/ConnectorGroup.cs @@ -85,7 +85,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConnectorGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConnectorGroup(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("applications", Applications); writer.WriteEnumValue("connectorGroupType", ConnectorGroupType); diff --git a/src/Microsoft.Graph/Generated/Models/ConnectorGroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ConnectorGroupCollectionResponse.cs index 6d593d4a490..33edea35d46 100644 --- a/src/Microsoft.Graph/Generated/Models/ConnectorGroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ConnectorGroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConnectorGroupCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConnectorGroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConnectorGroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ConnectorStatusDetails.cs b/src/Microsoft.Graph/Generated/Models/ConnectorStatusDetails.cs index 6cdd0f3b730..8a460b6be40 100644 --- a/src/Microsoft.Graph/Generated/Models/ConnectorStatusDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/ConnectorStatusDetails.cs @@ -87,7 +87,7 @@ public ConnectorStatusDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConnectorStatusDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConnectorStatusDetails(); } /// @@ -111,7 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("connectorInstanceId", ConnectorInstanceId); writer.WriteEnumValue("connectorName", ConnectorName); writer.WriteDateTimeOffsetValue("eventDateTime", EventDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Contact.cs b/src/Microsoft.Graph/Generated/Models/Contact.cs index b91843a284b..ecc66a63bc9 100644 --- a/src/Microsoft.Graph/Generated/Models/Contact.cs +++ b/src/Microsoft.Graph/Generated/Models/Contact.cs @@ -589,7 +589,7 @@ public Contact() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Contact CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Contact(); } /// @@ -645,7 +645,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assistantName", AssistantName); writer.WriteDateTimeOffsetValue("birthday", Birthday); diff --git a/src/Microsoft.Graph/Generated/Models/ContactCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ContactCollectionResponse.cs index f29518d6648..cd771ce0e5e 100644 --- a/src/Microsoft.Graph/Generated/Models/ContactCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ContactCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ContactCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContactCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContactCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ContactFolder.cs b/src/Microsoft.Graph/Generated/Models/ContactFolder.cs index 8fde709e416..d48d501cdf5 100644 --- a/src/Microsoft.Graph/Generated/Models/ContactFolder.cs +++ b/src/Microsoft.Graph/Generated/Models/ContactFolder.cs @@ -131,7 +131,7 @@ public string WellKnownName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContactFolder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContactFolder(); } /// @@ -157,7 +157,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("childFolders", ChildFolders); writer.WriteCollectionOfObjectValues("contacts", Contacts); diff --git a/src/Microsoft.Graph/Generated/Models/ContactFolderCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ContactFolderCollectionResponse.cs index 60c5961c4ce..d94d4c969aa 100644 --- a/src/Microsoft.Graph/Generated/Models/ContactFolderCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ContactFolderCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ContactFolderCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContactFolderCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContactFolderCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ContactMergeSuggestions.cs b/src/Microsoft.Graph/Generated/Models/ContactMergeSuggestions.cs index e660386c5eb..0c1f9e7e313 100644 --- a/src/Microsoft.Graph/Generated/Models/ContactMergeSuggestions.cs +++ b/src/Microsoft.Graph/Generated/Models/ContactMergeSuggestions.cs @@ -25,7 +25,7 @@ public bool? IsEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContactMergeSuggestions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContactMergeSuggestions(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isEnabled", IsEnabled); } diff --git a/src/Microsoft.Graph/Generated/Models/ContainerFilter.cs b/src/Microsoft.Graph/Generated/Models/ContainerFilter.cs index 4d7f8fe9b24..521d34a82f5 100644 --- a/src/Microsoft.Graph/Generated/Models/ContainerFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/ContainerFilter.cs @@ -68,7 +68,7 @@ public ContainerFilter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ContainerFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContainerFilter(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("includedContainers", IncludedContainers); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ContainsTransformation.cs b/src/Microsoft.Graph/Generated/Models/ContainsTransformation.cs index 3c73c354e10..10236bf42cb 100644 --- a/src/Microsoft.Graph/Generated/Models/ContainsTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ContainsTransformation.cs @@ -58,7 +58,7 @@ public ContainsTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContainsTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContainsTransformation(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("output", Output); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/ContentActivity.cs b/src/Microsoft.Graph/Generated/Models/ContentActivity.cs index 22b414a6d0f..b373a099ae2 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentActivity.cs @@ -67,7 +67,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContentActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentActivity(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("contentMetadata", ContentMetadata); writer.WriteStringValue("scopeIdentifier", ScopeIdentifier); diff --git a/src/Microsoft.Graph/Generated/Models/ContentActivityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ContentActivityCollectionResponse.cs index 1e06ec0a262..6a7f4647230 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentActivityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentActivityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ContentActivityCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContentActivityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentActivityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ContentApprovalStatusColumn.cs b/src/Microsoft.Graph/Generated/Models/ContentApprovalStatusColumn.cs index 51381e2ec37..614f102f242 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentApprovalStatusColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentApprovalStatusColumn.cs @@ -52,7 +52,7 @@ public ContentApprovalStatusColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ContentApprovalStatusColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentApprovalStatusColumn(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/ContentBase.cs b/src/Microsoft.Graph/Generated/Models/ContentBase.cs index 81e8608f553..a25b7ac7d61 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentBase.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentBase.cs @@ -52,7 +52,7 @@ public ContentBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ContentBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/ContentClassification.cs b/src/Microsoft.Graph/Generated/Models/ContentClassification.cs index 96080ceb3a9..17f0833ebc2 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentClassification.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentClassification.cs @@ -96,7 +96,7 @@ public ContentClassification() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ContentClassification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentClassification(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("confidence", Confidence); writer.WriteCollectionOfObjectValues("matches", Matches); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ContentCustomization.cs b/src/Microsoft.Graph/Generated/Models/ContentCustomization.cs index 93b43d0569b..182040cc752 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentCustomization.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentCustomization.cs @@ -116,7 +116,7 @@ public ContentCustomization() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ContentCustomization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentCustomization(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attributeCollection", AttributeCollection); writer.WriteStringValue("attributeCollectionRelativeUrl", AttributeCollectionRelativeUrl); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ContentInfo.cs b/src/Microsoft.Graph/Generated/Models/ContentInfo.cs index 175fc6ff582..ddc1bfbeded 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentInfo.cs @@ -96,7 +96,7 @@ public ContentInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ContentInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentInfo(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("format", Format); writer.WriteStringValue("identifier", Identifier); writer.WriteCollectionOfObjectValues("metadata", Metadata); diff --git a/src/Microsoft.Graph/Generated/Models/ContentMetadata.cs b/src/Microsoft.Graph/Generated/Models/ContentMetadata.cs index 86e51c0768f..ea2d46610db 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentMetadata.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentMetadata.cs @@ -52,7 +52,7 @@ public ContentMetadata() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ContentMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentMetadata(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/ContentModel.cs b/src/Microsoft.Graph/Generated/Models/ContentModel.cs index 5396556318a..77986749d2d 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentModel.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentModel.cs @@ -85,7 +85,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContentModel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentModel(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ContentModelCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ContentModelCollectionResponse.cs index 14a11f3b1c7..ef4f94e8b42 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentModelCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentModelCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ContentModelCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContentModelCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentModelCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ContentModelUsage.cs b/src/Microsoft.Graph/Generated/Models/ContentModelUsage.cs index f1cefa535b2..56693e3ae4a 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentModelUsage.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentModelUsage.cs @@ -144,7 +144,7 @@ public ContentModelUsage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ContentModelUsage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentModelUsage(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("driveId", DriveId); diff --git a/src/Microsoft.Graph/Generated/Models/ContentProperties.cs b/src/Microsoft.Graph/Generated/Models/ContentProperties.cs index 48f9a722c4b..4b4eb6476c4 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentProperties.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentProperties.cs @@ -106,7 +106,7 @@ public ContentProperties() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ContentProperties CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentProperties(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("extensions", Extensions); writer.WriteStringValue("lastModifiedBy", LastModifiedBy); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ContentSharingSession.cs b/src/Microsoft.Graph/Generated/Models/ContentSharingSession.cs index eb0684ecad3..d063f09bce3 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentSharingSession.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentSharingSession.cs @@ -51,7 +51,7 @@ public string PresenterParticipantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContentSharingSession CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentSharingSession(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("pngOfCurrentSlide", PngOfCurrentSlide); writer.WriteStringValue("presenterParticipantId", PresenterParticipantId); diff --git a/src/Microsoft.Graph/Generated/Models/ContentSharingSessionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ContentSharingSessionCollectionResponse.cs index 8813ac1d34e..4b3d8583036 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentSharingSessionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentSharingSessionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ContentSharingSessionCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContentSharingSessionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentSharingSessionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ContentType.cs b/src/Microsoft.Graph/Generated/Models/ContentType.cs index 451891b2104..73344d3f4d8 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentType.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentType.cs @@ -273,7 +273,7 @@ public bool? Sealed /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContentType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentType(); } /// @@ -311,7 +311,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("associatedHubsUrls", AssociatedHubsUrls); writer.WriteObjectValue("base", Base); diff --git a/src/Microsoft.Graph/Generated/Models/ContentTypeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ContentTypeCollectionResponse.cs index 81f5e31bf85..df579813423 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentTypeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentTypeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ContentTypeCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContentTypeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentTypeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ContentTypeInfo.cs b/src/Microsoft.Graph/Generated/Models/ContentTypeInfo.cs index 089d4ad5341..fac8fbc17d8 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentTypeInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentTypeInfo.cs @@ -84,7 +84,7 @@ public ContentTypeInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ContentTypeInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentTypeInfo(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ContentTypeOrder.cs b/src/Microsoft.Graph/Generated/Models/ContentTypeOrder.cs index 06a1eb6745b..51b4a5ea863 100644 --- a/src/Microsoft.Graph/Generated/Models/ContentTypeOrder.cs +++ b/src/Microsoft.Graph/Generated/Models/ContentTypeOrder.cs @@ -64,7 +64,7 @@ public ContentTypeOrder() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ContentTypeOrder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContentTypeOrder(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("default", Default); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("position", Position); diff --git a/src/Microsoft.Graph/Generated/Models/ContinuousAccessEvaluationPolicy.cs b/src/Microsoft.Graph/Generated/Models/ContinuousAccessEvaluationPolicy.cs index c17a352d81a..62a41596091 100644 --- a/src/Microsoft.Graph/Generated/Models/ContinuousAccessEvaluationPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/ContinuousAccessEvaluationPolicy.cs @@ -95,7 +95,7 @@ public List Users /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContinuousAccessEvaluationPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContinuousAccessEvaluationPolicy(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ContinuousAccessEvaluationSessionControl.cs b/src/Microsoft.Graph/Generated/Models/ContinuousAccessEvaluationSessionControl.cs index b585e325612..f4f83828fb2 100644 --- a/src/Microsoft.Graph/Generated/Models/ContinuousAccessEvaluationSessionControl.cs +++ b/src/Microsoft.Graph/Generated/Models/ContinuousAccessEvaluationSessionControl.cs @@ -58,7 +58,7 @@ public ContinuousAccessEvaluationSessionControl() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ContinuousAccessEvaluationSessionControl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContinuousAccessEvaluationSessionControl(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("mode", Mode); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Contract.cs b/src/Microsoft.Graph/Generated/Models/Contract.cs index 5486ef28482..8058dbf9e08 100644 --- a/src/Microsoft.Graph/Generated/Models/Contract.cs +++ b/src/Microsoft.Graph/Generated/Models/Contract.cs @@ -80,7 +80,7 @@ public Contract() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Contract CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Contract(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contractType", ContractType); writer.WriteGuidValue("customerId", CustomerId); diff --git a/src/Microsoft.Graph/Generated/Models/ContractCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ContractCollectionResponse.cs index 92dd4df08dc..a80535b14e3 100644 --- a/src/Microsoft.Graph/Generated/Models/ContractCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ContractCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ContractCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ContractCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ContractCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ControlScore.cs b/src/Microsoft.Graph/Generated/Models/ControlScore.cs index d559d137e91..13c5b86ae74 100644 --- a/src/Microsoft.Graph/Generated/Models/ControlScore.cs +++ b/src/Microsoft.Graph/Generated/Models/ControlScore.cs @@ -106,7 +106,7 @@ public ControlScore() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ControlScore CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ControlScore(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("controlCategory", ControlCategory); writer.WriteStringValue("controlName", ControlName); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/Conversation.cs b/src/Microsoft.Graph/Generated/Models/Conversation.cs index d070d242871..868ebacb560 100644 --- a/src/Microsoft.Graph/Generated/Models/Conversation.cs +++ b/src/Microsoft.Graph/Generated/Models/Conversation.cs @@ -95,7 +95,7 @@ public List UniqueSenders /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Conversation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Conversation(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("hasAttachments", HasAttachments); writer.WriteDateTimeOffsetValue("lastDeliveredDateTime", LastDeliveredDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ConversationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ConversationCollectionResponse.cs index 6bb24fd44b0..ebdccf079af 100644 --- a/src/Microsoft.Graph/Generated/Models/ConversationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ConversationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConversationCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConversationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConversationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ConversationMember.cs b/src/Microsoft.Graph/Generated/Models/ConversationMember.cs index 0e51d35f80c..23c31f9768b 100644 --- a/src/Microsoft.Graph/Generated/Models/ConversationMember.cs +++ b/src/Microsoft.Graph/Generated/Models/ConversationMember.cs @@ -57,7 +57,7 @@ public DateTimeOffset? VisibleHistoryStartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConversationMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfPrimitiveValues("roles", Roles); diff --git a/src/Microsoft.Graph/Generated/Models/ConversationMemberCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ConversationMemberCollectionResponse.cs index a37277ca974..85115c747a2 100644 --- a/src/Microsoft.Graph/Generated/Models/ConversationMemberCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ConversationMemberCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConversationMemberCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConversationMemberCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConversationMemberCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ConversationMemberRoleUpdatedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/ConversationMemberRoleUpdatedEventMessageDetail.cs index e31647dc0fe..3ebd829f4d3 100644 --- a/src/Microsoft.Graph/Generated/Models/ConversationMemberRoleUpdatedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/ConversationMemberRoleUpdatedEventMessageDetail.cs @@ -74,7 +74,7 @@ public ConversationMemberRoleUpdatedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConversationMemberRoleUpdatedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConversationMemberRoleUpdatedEventMessageDetail(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("conversationMemberRoles", ConversationMemberRoles); writer.WriteObjectValue("conversationMemberUser", ConversationMemberUser); diff --git a/src/Microsoft.Graph/Generated/Models/ConversationThread.cs b/src/Microsoft.Graph/Generated/Models/ConversationThread.cs index e68e5aa609e..a5dc155de92 100644 --- a/src/Microsoft.Graph/Generated/Models/ConversationThread.cs +++ b/src/Microsoft.Graph/Generated/Models/ConversationThread.cs @@ -133,7 +133,7 @@ public List UniqueSenders /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConversationThread CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConversationThread(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("ccRecipients", CcRecipients); writer.WriteBoolValue("hasAttachments", HasAttachments); diff --git a/src/Microsoft.Graph/Generated/Models/ConversationThreadCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ConversationThreadCollectionResponse.cs index b8e7c0d5828..2f1a50b6057 100644 --- a/src/Microsoft.Graph/Generated/Models/ConversationThreadCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ConversationThreadCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConversationThreadCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ConversationThreadCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConversationThreadCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ConversionUserDetails.cs b/src/Microsoft.Graph/Generated/Models/ConversionUserDetails.cs index 690d0a79a4b..5e2dd6a7640 100644 --- a/src/Microsoft.Graph/Generated/Models/ConversionUserDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/ConversionUserDetails.cs @@ -106,7 +106,7 @@ public ConversionUserDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConversionUserDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConversionUserDetails(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("convertedToInternalUserDateTime", ConvertedToInternalUserDateTime); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("mail", Mail); diff --git a/src/Microsoft.Graph/Generated/Models/ConvertIdResult.cs b/src/Microsoft.Graph/Generated/Models/ConvertIdResult.cs index f24fe6a3000..5710d42876b 100644 --- a/src/Microsoft.Graph/Generated/Models/ConvertIdResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ConvertIdResult.cs @@ -100,7 +100,7 @@ public ConvertIdResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ConvertIdResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ConvertIdResult(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("errorDetails", ErrorDetails); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("sourceId", SourceId); diff --git a/src/Microsoft.Graph/Generated/Models/CopilotAdmin.cs b/src/Microsoft.Graph/Generated/Models/CopilotAdmin.cs index 6cc1213febc..5ecb30b4939 100644 --- a/src/Microsoft.Graph/Generated/Models/CopilotAdmin.cs +++ b/src/Microsoft.Graph/Generated/Models/CopilotAdmin.cs @@ -35,7 +35,7 @@ public partial class CopilotAdmin : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CopilotAdmin CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CopilotAdmin(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("settings", Settings); } diff --git a/src/Microsoft.Graph/Generated/Models/CopilotAdminLimitedMode.cs b/src/Microsoft.Graph/Generated/Models/CopilotAdminLimitedMode.cs index fda44c7f5bb..a82f97a4f55 100644 --- a/src/Microsoft.Graph/Generated/Models/CopilotAdminLimitedMode.cs +++ b/src/Microsoft.Graph/Generated/Models/CopilotAdminLimitedMode.cs @@ -41,7 +41,7 @@ public bool? IsEnabledForGroup /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CopilotAdminLimitedMode CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CopilotAdminLimitedMode(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("groupId", GroupId); writer.WriteBoolValue("isEnabledForGroup", IsEnabledForGroup); diff --git a/src/Microsoft.Graph/Generated/Models/CopilotAdminSetting.cs b/src/Microsoft.Graph/Generated/Models/CopilotAdminSetting.cs index c9378065fea..b3dbe7cef3a 100644 --- a/src/Microsoft.Graph/Generated/Models/CopilotAdminSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CopilotAdminSetting.cs @@ -35,7 +35,7 @@ public partial class CopilotAdminSetting : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CopilotAdminSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CopilotAdminSetting(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("limitedMode", LimitedMode); } diff --git a/src/Microsoft.Graph/Generated/Models/CopilotCommunicationsRoot.cs b/src/Microsoft.Graph/Generated/Models/CopilotCommunicationsRoot.cs new file mode 100644 index 00000000000..d81e8692b38 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/CopilotCommunicationsRoot.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Microsoft.Graph.Beta.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class CopilotCommunicationsRoot : global::Microsoft.Graph.Beta.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The realtimeActivityFeed property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Microsoft.Graph.Beta.Models.RealtimeActivityFeedRoot? RealtimeActivityFeed + { + get { return BackingStore?.Get("realtimeActivityFeed"); } + set { BackingStore?.Set("realtimeActivityFeed", value); } + } +#nullable restore +#else + public global::Microsoft.Graph.Beta.Models.RealtimeActivityFeedRoot RealtimeActivityFeed + { + get { return BackingStore?.Get("realtimeActivityFeed"); } + set { BackingStore?.Set("realtimeActivityFeed", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Microsoft.Graph.Beta.Models.CopilotCommunicationsRoot CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Microsoft.Graph.Beta.Models.CopilotCommunicationsRoot(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "realtimeActivityFeed", n => { RealtimeActivityFeed = n.GetObjectValue(global::Microsoft.Graph.Beta.Models.RealtimeActivityFeedRoot.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteObjectValue("realtimeActivityFeed", RealtimeActivityFeed); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Microsoft.Graph/Generated/Models/CopilotPeopleAdminSetting.cs b/src/Microsoft.Graph/Generated/Models/CopilotPeopleAdminSetting.cs index 5ad7c07da56..b203011a182 100644 --- a/src/Microsoft.Graph/Generated/Models/CopilotPeopleAdminSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CopilotPeopleAdminSetting.cs @@ -35,7 +35,7 @@ public partial class CopilotPeopleAdminSetting : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CopilotPeopleAdminSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CopilotPeopleAdminSetting(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("enhancedPersonalization", EnhancedPersonalization); } diff --git a/src/Microsoft.Graph/Generated/Models/CopilotSetting.cs b/src/Microsoft.Graph/Generated/Models/CopilotSetting.cs index 088b03ed7f4..9c139acd814 100644 --- a/src/Microsoft.Graph/Generated/Models/CopilotSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CopilotSetting.cs @@ -35,7 +35,7 @@ public partial class CopilotSetting : global::Microsoft.Graph.Beta.Models.Entity /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CopilotSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CopilotSetting(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("people", People); } diff --git a/src/Microsoft.Graph/Generated/Models/CopyNotebookModel.cs b/src/Microsoft.Graph/Generated/Models/CopyNotebookModel.cs index 0f048541b83..2f00aeff7fb 100644 --- a/src/Microsoft.Graph/Generated/Models/CopyNotebookModel.cs +++ b/src/Microsoft.Graph/Generated/Models/CopyNotebookModel.cs @@ -242,7 +242,7 @@ public CopyNotebookModel() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CopyNotebookModel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CopyNotebookModel(); } /// @@ -277,7 +277,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("createdBy", CreatedBy); writer.WriteObjectValue("createdByIdentity", CreatedByIdentity); writer.WriteDateTimeOffsetValue("createdTime", CreatedTime); diff --git a/src/Microsoft.Graph/Generated/Models/CorsConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CorsConfiguration.cs index 9e5290b9f2b..a512a3c112d 100644 --- a/src/Microsoft.Graph/Generated/Models/CorsConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CorsConfiguration.cs @@ -122,7 +122,7 @@ public CorsConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CorsConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CorsConfiguration(); } /// @@ -147,7 +147,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("allowedHeaders", AllowedHeaders); writer.WriteCollectionOfPrimitiveValues("allowedMethods", AllowedMethods); writer.WriteCollectionOfPrimitiveValues("allowedOrigins", AllowedOrigins); diff --git a/src/Microsoft.Graph/Generated/Models/CorsConfiguration_v2.cs b/src/Microsoft.Graph/Generated/Models/CorsConfiguration_v2.cs index be9852c923b..f637859ff70 100644 --- a/src/Microsoft.Graph/Generated/Models/CorsConfiguration_v2.cs +++ b/src/Microsoft.Graph/Generated/Models/CorsConfiguration_v2.cs @@ -89,7 +89,7 @@ public string Resource /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CorsConfiguration_v2 CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CorsConfiguration_v2(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("allowedHeaders", AllowedHeaders); writer.WriteCollectionOfPrimitiveValues("allowedMethods", AllowedMethods); diff --git a/src/Microsoft.Graph/Generated/Models/CountryRegion.cs b/src/Microsoft.Graph/Generated/Models/CountryRegion.cs index 86c45155ca8..8b49877ac8e 100644 --- a/src/Microsoft.Graph/Generated/Models/CountryRegion.cs +++ b/src/Microsoft.Graph/Generated/Models/CountryRegion.cs @@ -112,7 +112,7 @@ public CountryRegion() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CountryRegion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CountryRegion(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("addressFormat", AddressFormat); writer.WriteStringValue("code", Code); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/CountryRegionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CountryRegionCollectionResponse.cs index 548d50234ba..c230ef3fe81 100644 --- a/src/Microsoft.Graph/Generated/Models/CountryRegionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CountryRegionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CountryRegionCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CountryRegionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CountryRegionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CreateAction.cs b/src/Microsoft.Graph/Generated/Models/CreateAction.cs index c28cb53aae4..9468c54a684 100644 --- a/src/Microsoft.Graph/Generated/Models/CreateAction.cs +++ b/src/Microsoft.Graph/Generated/Models/CreateAction.cs @@ -52,7 +52,7 @@ public CreateAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CreateAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CreateAction(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Credential.cs b/src/Microsoft.Graph/Generated/Models/Credential.cs index f2a2909048c..ea64708e6e2 100644 --- a/src/Microsoft.Graph/Generated/Models/Credential.cs +++ b/src/Microsoft.Graph/Generated/Models/Credential.cs @@ -100,7 +100,7 @@ public Credential() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Credential CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Credential(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("fieldId", FieldId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/Models/CredentialSingleSignOnExtension.cs b/src/Microsoft.Graph/Generated/Models/CredentialSingleSignOnExtension.cs index fe5f1eb5a0f..6979ad87a41 100644 --- a/src/Microsoft.Graph/Generated/Models/CredentialSingleSignOnExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/CredentialSingleSignOnExtension.cs @@ -107,7 +107,7 @@ public CredentialSingleSignOnExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CredentialSingleSignOnExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CredentialSingleSignOnExtension(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("configurations", Configurations); writer.WriteCollectionOfPrimitiveValues("domains", Domains); diff --git a/src/Microsoft.Graph/Generated/Models/CredentialUsageSummary.cs b/src/Microsoft.Graph/Generated/Models/CredentialUsageSummary.cs index f13b3c138d8..29d76780916 100644 --- a/src/Microsoft.Graph/Generated/Models/CredentialUsageSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/CredentialUsageSummary.cs @@ -43,7 +43,7 @@ public long? SuccessfulActivityCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CredentialUsageSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CredentialUsageSummary(); } /// @@ -66,7 +66,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authMethod", AuthMethod); writer.WriteLongValue("failureActivityCount", FailureActivityCount); diff --git a/src/Microsoft.Graph/Generated/Models/CredentialUserRegistrationCount.cs b/src/Microsoft.Graph/Generated/Models/CredentialUserRegistrationCount.cs index ab6e691607b..a55c77eb63f 100644 --- a/src/Microsoft.Graph/Generated/Models/CredentialUserRegistrationCount.cs +++ b/src/Microsoft.Graph/Generated/Models/CredentialUserRegistrationCount.cs @@ -41,7 +41,7 @@ public long? TotalUserCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CredentialUserRegistrationCount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CredentialUserRegistrationCount(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("totalUserCount", TotalUserCount); writer.WriteCollectionOfObjectValues("userRegistrationCounts", UserRegistrationCounts); diff --git a/src/Microsoft.Graph/Generated/Models/CredentialUserRegistrationDetails.cs b/src/Microsoft.Graph/Generated/Models/CredentialUserRegistrationDetails.cs index dcc0fdbc8c6..6c52479049b 100644 --- a/src/Microsoft.Graph/Generated/Models/CredentialUserRegistrationDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/CredentialUserRegistrationDetails.cs @@ -91,7 +91,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CredentialUserRegistrationDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CredentialUserRegistrationDetails(); } /// @@ -117,7 +117,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfEnumValues("authMethods", AuthMethods); writer.WriteBoolValue("isCapable", IsCapable); diff --git a/src/Microsoft.Graph/Generated/Models/CredentialUserRegistrationDetailsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CredentialUserRegistrationDetailsCollectionResponse.cs index 01d54d84ebe..5b9b08f066a 100644 --- a/src/Microsoft.Graph/Generated/Models/CredentialUserRegistrationDetailsCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CredentialUserRegistrationDetailsCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CredentialUserRegistrationDetailsCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CredentialUserRegistrationDetailsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CredentialUserRegistrationDetailsCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CrossCloudAzureActiveDirectoryTenant.cs b/src/Microsoft.Graph/Generated/Models/CrossCloudAzureActiveDirectoryTenant.cs index 22eac0f6af3..112ce1851b0 100644 --- a/src/Microsoft.Graph/Generated/Models/CrossCloudAzureActiveDirectoryTenant.cs +++ b/src/Microsoft.Graph/Generated/Models/CrossCloudAzureActiveDirectoryTenant.cs @@ -74,7 +74,7 @@ public CrossCloudAzureActiveDirectoryTenant() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CrossCloudAzureActiveDirectoryTenant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CrossCloudAzureActiveDirectoryTenant(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("cloudInstance", CloudInstance); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicy.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicy.cs index 8a5d8bc2d47..b5489bc55b1 100644 --- a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicy.cs @@ -90,7 +90,7 @@ public CrossTenantAccessPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicy(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("allowedCloudEndpoints", AllowedCloudEndpoints); writer.WriteObjectValue("default", Default); diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyB2BSetting.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyB2BSetting.cs index a16f460c0fb..cae7ea484cb 100644 --- a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyB2BSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyB2BSetting.cs @@ -84,7 +84,7 @@ public CrossTenantAccessPolicyB2BSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyB2BSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -111,7 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("applications", Applications); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("usersAndGroups", UsersAndGroups); diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.cs index 25fb4e313b6..c9185fd30dd 100644 --- a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.cs +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationDefault.cs @@ -153,7 +153,7 @@ public bool? IsServiceDefault /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyConfigurationDefault CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyConfigurationDefault(); } /// @@ -181,7 +181,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("automaticUserConsentSettings", AutomaticUserConsentSettings); writer.WriteObjectValue("b2bCollaborationInbound", B2bCollaborationInbound); diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.cs index aa6116ed4c0..50cda869e22 100644 --- a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.cs +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationPartner.cs @@ -208,7 +208,7 @@ public CrossTenantAccessPolicyConfigurationPartner() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyConfigurationPartner CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyConfigurationPartner(); } /// @@ -239,7 +239,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("automaticUserConsentSettings", AutomaticUserConsentSettings); writer.WriteObjectValue("b2bCollaborationInbound", B2bCollaborationInbound); writer.WriteObjectValue("b2bCollaborationOutbound", B2bCollaborationOutbound); diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationPartnerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationPartnerCollectionResponse.cs index 6f65415bf62..e337b1123b6 100644 --- a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationPartnerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyConfigurationPartnerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CrossTenantAccessPolicyConfigurationPartnerCollectionRespon /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyConfigurationPartnerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyConfigurationPartnerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyInboundTrust.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyInboundTrust.cs index c8a2aecc56d..2390a2e286a 100644 --- a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyInboundTrust.cs +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyInboundTrust.cs @@ -70,7 +70,7 @@ public CrossTenantAccessPolicyInboundTrust() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyInboundTrust CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyInboundTrust(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isCompliantDeviceAccepted", IsCompliantDeviceAccepted); writer.WriteBoolValue("isHybridAzureADJoinedDeviceAccepted", IsHybridAzureADJoinedDeviceAccepted); writer.WriteBoolValue("isMfaAccepted", IsMfaAccepted); diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyTarget.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyTarget.cs index 81173e613ab..e3af4047b1a 100644 --- a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyTarget.cs @@ -74,7 +74,7 @@ public CrossTenantAccessPolicyTarget() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyTarget(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("target", Target); writer.WriteEnumValue("targetType", TargetType); diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyTargetConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyTargetConfiguration.cs index 82deb120d31..99327409c8f 100644 --- a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyTargetConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyTargetConfiguration.cs @@ -74,7 +74,7 @@ public CrossTenantAccessPolicyTargetConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyTargetConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyTargetConfiguration(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("accessType", AccessType); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("targets", Targets); diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyTenantRestrictions.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyTenantRestrictions.cs index ab98cc343af..867adced433 100644 --- a/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyTenantRestrictions.cs +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantAccessPolicyTenantRestrictions.cs @@ -42,7 +42,7 @@ public CrossTenantAccessPolicyTenantRestrictions() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyTenantRestrictions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyTenantRestrictions(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("devices", Devices); } diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantIdentitySyncPolicyPartner.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantIdentitySyncPolicyPartner.cs index d48fe29ed8e..e856f950080 100644 --- a/src/Microsoft.Graph/Generated/Models/CrossTenantIdentitySyncPolicyPartner.cs +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantIdentitySyncPolicyPartner.cs @@ -116,7 +116,7 @@ public CrossTenantIdentitySyncPolicyPartner() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CrossTenantIdentitySyncPolicyPartner CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CrossTenantIdentitySyncPolicyPartner(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("externalCloudAuthorizedApplicationId", ExternalCloudAuthorizedApplicationId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CrossTenantUserSyncInbound.cs b/src/Microsoft.Graph/Generated/Models/CrossTenantUserSyncInbound.cs index aac5ea40edd..506095d6470 100644 --- a/src/Microsoft.Graph/Generated/Models/CrossTenantUserSyncInbound.cs +++ b/src/Microsoft.Graph/Generated/Models/CrossTenantUserSyncInbound.cs @@ -58,7 +58,7 @@ public CrossTenantUserSyncInbound() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CrossTenantUserSyncInbound CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CrossTenantUserSyncInbound(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isSyncAllowed", IsSyncAllowed); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CryptographySuite.cs b/src/Microsoft.Graph/Generated/Models/CryptographySuite.cs index a580d7a4249..36f65bd43bd 100644 --- a/src/Microsoft.Graph/Generated/Models/CryptographySuite.cs +++ b/src/Microsoft.Graph/Generated/Models/CryptographySuite.cs @@ -89,7 +89,7 @@ public CryptographySuite() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CryptographySuite CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CryptographySuite(); } /// @@ -115,7 +115,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("authenticationTransformConstants", AuthenticationTransformConstants); writer.WriteEnumValue("cipherTransformConstants", CipherTransformConstants); writer.WriteEnumValue("dhGroup", DhGroup); diff --git a/src/Microsoft.Graph/Generated/Models/Currency.cs b/src/Microsoft.Graph/Generated/Models/Currency.cs index 4bba4e001ed..9b69e047554 100644 --- a/src/Microsoft.Graph/Generated/Models/Currency.cs +++ b/src/Microsoft.Graph/Generated/Models/Currency.cs @@ -134,7 +134,7 @@ public Currency() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Currency CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Currency(); } /// @@ -161,7 +161,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("amountDecimalPlaces", AmountDecimalPlaces); writer.WriteDecimalValue("amountRoundingPrecision", AmountRoundingPrecision); writer.WriteStringValue("code", Code); diff --git a/src/Microsoft.Graph/Generated/Models/CurrencyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CurrencyCollectionResponse.cs index e6d470fd27f..e36ca467d6e 100644 --- a/src/Microsoft.Graph/Generated/Models/CurrencyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CurrencyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CurrencyCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CurrencyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CurrencyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CurrencyColumn.cs b/src/Microsoft.Graph/Generated/Models/CurrencyColumn.cs index e3f49567e85..0172c7680e7 100644 --- a/src/Microsoft.Graph/Generated/Models/CurrencyColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/CurrencyColumn.cs @@ -68,7 +68,7 @@ public CurrencyColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CurrencyColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CurrencyColumn(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("locale", Locale); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CurrentLabel.cs b/src/Microsoft.Graph/Generated/Models/CurrentLabel.cs index 840027f7121..67ba0c86cbd 100644 --- a/src/Microsoft.Graph/Generated/Models/CurrentLabel.cs +++ b/src/Microsoft.Graph/Generated/Models/CurrentLabel.cs @@ -74,7 +74,7 @@ public CurrentLabel() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CurrentLabel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CurrentLabel(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("applicationMode", ApplicationMode); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CustomAccessPackageWorkflowExtension.cs b/src/Microsoft.Graph/Generated/Models/CustomAccessPackageWorkflowExtension.cs index e0ff94bf0fe..8f51706fa8c 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomAccessPackageWorkflowExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomAccessPackageWorkflowExtension.cs @@ -38,7 +38,7 @@ public CustomAccessPackageWorkflowExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomAccessPackageWorkflowExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomAccessPackageWorkflowExtension(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/CustomAccessPackageWorkflowExtensionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CustomAccessPackageWorkflowExtensionCollectionResponse.cs index 8697d0ec717..eb7cb666cb5 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomAccessPackageWorkflowExtensionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomAccessPackageWorkflowExtensionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CustomAccessPackageWorkflowExtensionCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomAccessPackageWorkflowExtensionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomAccessPackageWorkflowExtensionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomAction.cs b/src/Microsoft.Graph/Generated/Models/CustomAction.cs index a530ebec166..0ff926e8ad2 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomAction.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomAction.cs @@ -58,7 +58,7 @@ public CustomAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomAction(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); writer.WriteCollectionOfObjectValues("properties", Properties); diff --git a/src/Microsoft.Graph/Generated/Models/CustomAppManagementApplicationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CustomAppManagementApplicationConfiguration.cs index 45c8feec420..adcb9a86301 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomAppManagementApplicationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomAppManagementApplicationConfiguration.cs @@ -84,7 +84,7 @@ public CustomAppManagementApplicationConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomAppManagementApplicationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomAppManagementApplicationConfiguration(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("audiences", Audiences); writer.WriteObjectValue("identifierUris", IdentifierUris); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CustomAppManagementConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CustomAppManagementConfiguration.cs index c422b8d6264..48f1423ff30 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomAppManagementConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomAppManagementConfiguration.cs @@ -42,7 +42,7 @@ public CustomAppManagementConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomAppManagementConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomAppManagementConfiguration(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("applicationRestrictions", ApplicationRestrictions); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomAppScope.cs b/src/Microsoft.Graph/Generated/Models/CustomAppScope.cs index 655e40fe02c..d7ae99760b0 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomAppScope.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomAppScope.cs @@ -42,7 +42,7 @@ public CustomAppScope() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomAppScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomAppScope(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("customAttributes", CustomAttributes); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomAppScopeAttributesDictionary.cs b/src/Microsoft.Graph/Generated/Models/CustomAppScopeAttributesDictionary.cs index 706ad790dc7..d6a5636e097 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomAppScopeAttributesDictionary.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomAppScopeAttributesDictionary.cs @@ -19,7 +19,7 @@ public partial class CustomAppScopeAttributesDictionary : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomAppScopeAttributesDictionary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomAppScopeAttributesDictionary(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CustomAppScopeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CustomAppScopeCollectionResponse.cs index 62d04969dc9..3c3162b74ce 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomAppScopeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomAppScopeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CustomAppScopeCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomAppScopeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomAppScopeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomAppSettings.cs b/src/Microsoft.Graph/Generated/Models/CustomAppSettings.cs index c02fd16c62f..d58e759dc84 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomAppSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomAppSettings.cs @@ -58,7 +58,7 @@ public CustomAppSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomAppSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomAppSettings(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("developerToolsForShowingAppUsageMetrics", DeveloperToolsForShowingAppUsageMetrics); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CustomAuthenticationExtension.cs b/src/Microsoft.Graph/Generated/Models/CustomAuthenticationExtension.cs index 65969f80800..a284665d00a 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomAuthenticationExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomAuthenticationExtension.cs @@ -42,7 +42,7 @@ public CustomAuthenticationExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomAuthenticationExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("behaviorOnError", BehaviorOnError); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomAuthenticationExtensionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CustomAuthenticationExtensionCollectionResponse.cs index e9fa53f00a6..44abdf53e0b 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomAuthenticationExtensionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomAuthenticationExtensionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CustomAuthenticationExtensionCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomAuthenticationExtensionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomAuthenticationExtensionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomCalloutExtension.cs b/src/Microsoft.Graph/Generated/Models/CustomCalloutExtension.cs index b2c17fae525..c4cdc3a2d8e 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomCalloutExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomCalloutExtension.cs @@ -100,7 +100,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomCalloutExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("authenticationConfiguration", AuthenticationConfiguration); writer.WriteObjectValue("clientConfiguration", ClientConfiguration); diff --git a/src/Microsoft.Graph/Generated/Models/CustomCalloutExtensionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CustomCalloutExtensionCollectionResponse.cs index 56fccb6f2e6..7aefa427d42 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomCalloutExtensionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomCalloutExtensionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CustomCalloutExtensionCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomCalloutExtensionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomCalloutExtensionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomClaim.cs b/src/Microsoft.Graph/Generated/Models/CustomClaim.cs index c7cce1fc94a..4704fd0540d 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomClaim.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomClaim.cs @@ -80,7 +80,7 @@ public CustomClaim() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomClaim CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomClaim(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); writer.WriteStringValue("namespace", Namespace); diff --git a/src/Microsoft.Graph/Generated/Models/CustomClaimAttributeBase.cs b/src/Microsoft.Graph/Generated/Models/CustomClaimAttributeBase.cs index b631cc93161..0556cacbe72 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomClaimAttributeBase.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomClaimAttributeBase.cs @@ -52,7 +52,7 @@ public CustomClaimAttributeBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomClaimAttributeBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomClaimBase.cs b/src/Microsoft.Graph/Generated/Models/CustomClaimBase.cs index f7dd2902832..1835f01566f 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomClaimBase.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomClaimBase.cs @@ -68,7 +68,7 @@ public CustomClaimBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomClaimBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -95,7 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("configurations", Configurations); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CustomClaimCondition.cs b/src/Microsoft.Graph/Generated/Models/CustomClaimCondition.cs index dbf3916a763..a7c4b90bece 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomClaimCondition.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomClaimCondition.cs @@ -48,7 +48,7 @@ public CustomClaimCondition() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomClaimCondition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomClaimCondition(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("memberOf", MemberOf); writer.WriteEnumValue("userType", UserType); diff --git a/src/Microsoft.Graph/Generated/Models/CustomClaimConditionBase.cs b/src/Microsoft.Graph/Generated/Models/CustomClaimConditionBase.cs index 8b31782e1a2..bf408220d9f 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomClaimConditionBase.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomClaimConditionBase.cs @@ -52,7 +52,7 @@ public CustomClaimConditionBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomClaimConditionBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomClaimConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CustomClaimConfiguration.cs index 2d946a8406c..a6706f1db43 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomClaimConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomClaimConfiguration.cs @@ -100,7 +100,7 @@ public CustomClaimConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomClaimConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomClaimConfiguration(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("attribute", Attribute); writer.WriteObjectValue("condition", Condition); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CustomClaimTransformation.cs b/src/Microsoft.Graph/Generated/Models/CustomClaimTransformation.cs index 70b0a350db7..d6c994dfc69 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomClaimTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomClaimTransformation.cs @@ -68,7 +68,7 @@ public CustomClaimTransformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomClaimTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -108,7 +108,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("input", Input); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CustomClaimsPolicy.cs b/src/Microsoft.Graph/Generated/Models/CustomClaimsPolicy.cs index cca4b37663f..fb526c0ed5c 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomClaimsPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomClaimsPolicy.cs @@ -63,7 +63,7 @@ public bool? IncludeBasicClaimSet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomClaimsPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomClaimsPolicy(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("audienceOverride", AudienceOverride); writer.WriteCollectionOfObjectValues("claims", Claims); diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionAuthenticationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionAuthenticationConfiguration.cs index ee416aa88ab..7b1268b689e 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionAuthenticationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionAuthenticationConfiguration.cs @@ -52,7 +52,7 @@ public CustomExtensionAuthenticationConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomExtensionAuthenticationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionBehaviorOnError.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionBehaviorOnError.cs index fd03639eda8..9c23dfb3f66 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionBehaviorOnError.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionBehaviorOnError.cs @@ -52,7 +52,7 @@ public CustomExtensionBehaviorOnError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomExtensionBehaviorOnError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionCallbackConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionCallbackConfiguration.cs index f5c91fab501..3a329c563b3 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionCallbackConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionCallbackConfiguration.cs @@ -59,7 +59,7 @@ public CustomExtensionCallbackConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomExtensionCallbackConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteTimeSpanValue("timeoutDuration", TimeoutDuration); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutInstance.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutInstance.cs index ca45936012c..e8c1acdb72d 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutInstance.cs @@ -122,7 +122,7 @@ public CustomExtensionCalloutInstance() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomExtensionCalloutInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomExtensionCalloutInstance(); } /// @@ -147,7 +147,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("customExtensionId", CustomExtensionId); writer.WriteStringValue("detail", Detail); writer.WriteStringValue("externalCorrelationId", ExternalCorrelationId); diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutResult.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutResult.cs index 4ed9f0cbb78..dc0b1af16ed 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutResult.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionCalloutResult.cs @@ -66,7 +66,7 @@ public CustomExtensionCalloutResult() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomExtensionCalloutResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomExtensionCalloutResult(); } /// @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("calloutDateTime", CalloutDateTime); writer.WriteStringValue("customExtensionId", CustomExtensionId); diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionClientConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionClientConfiguration.cs index 0299fd91271..4505467cea6 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionClientConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionClientConfiguration.cs @@ -64,7 +64,7 @@ public CustomExtensionClientConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomExtensionClientConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomExtensionClientConfiguration(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("maximumRetries", MaximumRetries); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("timeoutInMilliseconds", TimeoutInMilliseconds); diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionData.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionData.cs index 015637309ee..fe3142ac090 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionData.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionData.cs @@ -53,7 +53,7 @@ public CustomExtensionData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomExtensionData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -81,7 +81,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionEndpointConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionEndpointConfiguration.cs index 64a08400dec..4260172004e 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionEndpointConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionEndpointConfiguration.cs @@ -52,7 +52,7 @@ public CustomExtensionEndpointConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomExtensionEndpointConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionHandler.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionHandler.cs index 31a795b3d6e..9b61b0b96b3 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionHandler.cs @@ -41,7 +41,7 @@ public partial class CustomExtensionHandler : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomExtensionHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomExtensionHandler(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("customExtension", CustomExtension); writer.WriteEnumValue("stage", Stage); diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionHandlerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionHandlerCollectionResponse.cs index 53a5fcc73d0..db9d392763d 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionHandlerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionHandlerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CustomExtensionHandlerCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomExtensionHandlerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomExtensionHandlerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionHandlerInstance.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionHandlerInstance.cs index a5f4b7efbfd..9953a73a5ea 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionHandlerInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionHandlerInstance.cs @@ -96,7 +96,7 @@ public CustomExtensionHandlerInstance() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomExtensionHandlerInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomExtensionHandlerInstance(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("customExtensionId", CustomExtensionId); writer.WriteStringValue("externalCorrelationId", ExternalCorrelationId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionOverwriteConfiguration.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionOverwriteConfiguration.cs index 2e367b21da4..538425a6e2d 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionOverwriteConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionOverwriteConfiguration.cs @@ -84,7 +84,7 @@ public CustomExtensionOverwriteConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomExtensionOverwriteConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomExtensionOverwriteConfiguration(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("behaviorOnError", BehaviorOnError); writer.WriteObjectValue("clientConfiguration", ClientConfiguration); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionStageSetting.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionStageSetting.cs index 297cd54b1c8..2816167c4d4 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionStageSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionStageSetting.cs @@ -41,7 +41,7 @@ public partial class CustomExtensionStageSetting : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomExtensionStageSetting(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("customExtension", CustomExtension); writer.WriteEnumValue("stage", Stage); diff --git a/src/Microsoft.Graph/Generated/Models/CustomExtensionStageSettingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CustomExtensionStageSettingCollectionResponse.cs index 5de86e6d353..e48b67bc91d 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomExtensionStageSettingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomExtensionStageSettingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CustomExtensionStageSettingCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomExtensionStageSettingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomExtensionStageSettingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomMetadataDictionary.cs b/src/Microsoft.Graph/Generated/Models/CustomMetadataDictionary.cs index da348d2e565..b8923ec3205 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomMetadataDictionary.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomMetadataDictionary.cs @@ -19,7 +19,7 @@ public partial class CustomMetadataDictionary : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomMetadataDictionary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomMetadataDictionary(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/CustomQuestionAnswer.cs b/src/Microsoft.Graph/Generated/Models/CustomQuestionAnswer.cs index fef4ae8b146..6aa7bb4a7a0 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomQuestionAnswer.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomQuestionAnswer.cs @@ -67,7 +67,7 @@ public string Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomQuestionAnswer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomQuestionAnswer(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("questionId", QuestionId); diff --git a/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeAudit.cs b/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeAudit.cs index 482ef766037..2db1f5c46e6 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeAudit.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeAudit.cs @@ -191,7 +191,7 @@ public string UserAgent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeAudit CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeAudit(); } /// @@ -222,7 +222,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("activityDateTime", ActivityDateTime); writer.WriteStringValue("activityDisplayName", ActivityDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeAuditCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeAuditCollectionResponse.cs index 2e6c912010e..e08fa15223a 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeAuditCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeAuditCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CustomSecurityAttributeAuditCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeAuditCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeAuditCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeDefinition.cs b/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeDefinition.cs index 7184182a28a..b82345da788 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeDefinition.cs @@ -133,7 +133,7 @@ public bool? UsePreDefinedValuesOnly /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeDefinition(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("allowedValues", AllowedValues); writer.WriteStringValue("attributeSet", AttributeSet); diff --git a/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeDefinitionCollectionResponse.cs index 69ec1c58f26..7e6f964c32d 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CustomSecurityAttributeDefinitionCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeExemption.cs b/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeExemption.cs index 80906cf3c47..a67a510471a 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeExemption.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeExemption.cs @@ -25,7 +25,7 @@ public partial class CustomSecurityAttributeExemption : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeExemption CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -50,7 +50,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("operator", Operator); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeStringValueExemption.cs b/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeStringValueExemption.cs index 6212ea72a34..46113f1462b 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeStringValueExemption.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeStringValueExemption.cs @@ -42,7 +42,7 @@ public CustomSecurityAttributeStringValueExemption() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeStringValueExemption CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeStringValueExemption(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeValue.cs b/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeValue.cs index 727d60fead5..179d9f78e62 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeValue.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomSecurityAttributeValue.cs @@ -52,7 +52,7 @@ public CustomSecurityAttributeValue() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomSecurityAttributeValue(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomSubjectAlternativeName.cs b/src/Microsoft.Graph/Generated/Models/CustomSubjectAlternativeName.cs index 855fae8e1e5..be5b4de662b 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomSubjectAlternativeName.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomSubjectAlternativeName.cs @@ -75,7 +75,7 @@ public CustomSubjectAlternativeName() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomSubjectAlternativeName CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomSubjectAlternativeName(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("sanType", SanType); diff --git a/src/Microsoft.Graph/Generated/Models/CustomTimeZone.cs b/src/Microsoft.Graph/Generated/Models/CustomTimeZone.cs index 6b1874319af..284fa9bd5e4 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomTimeZone.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomTimeZone.cs @@ -64,7 +64,7 @@ public CustomTimeZone() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomTimeZone CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomTimeZone(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("bias", Bias); writer.WriteObjectValue("daylightOffset", DaylightOffset); diff --git a/src/Microsoft.Graph/Generated/Models/CustomTrainingSetting.cs b/src/Microsoft.Graph/Generated/Models/CustomTrainingSetting.cs index e9db7827a9b..b5d607db67d 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomTrainingSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomTrainingSetting.cs @@ -96,7 +96,7 @@ public CustomTrainingSetting() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomTrainingSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomTrainingSetting(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfEnumValues("assignedTo", AssignedTo); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/CustomUpdateTimeWindow.cs b/src/Microsoft.Graph/Generated/Models/CustomUpdateTimeWindow.cs index f55e7fae854..bdff95b73bb 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomUpdateTimeWindow.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomUpdateTimeWindow.cs @@ -78,7 +78,7 @@ public CustomUpdateTimeWindow() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomUpdateTimeWindow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomUpdateTimeWindow(); } /// @@ -102,7 +102,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("endDay", EndDay); writer.WriteTimeValue("endTime", EndTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Customer.cs b/src/Microsoft.Graph/Generated/Models/Customer.cs index dd6159deb0f..5a4b74f3de0 100644 --- a/src/Microsoft.Graph/Generated/Models/Customer.cs +++ b/src/Microsoft.Graph/Generated/Models/Customer.cs @@ -356,7 +356,7 @@ public Customer() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Customer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Customer(); } /// @@ -400,7 +400,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("address", Address); writer.WriteStringValue("blocked", Blocked); writer.WriteObjectValue("currency", Currency); diff --git a/src/Microsoft.Graph/Generated/Models/CustomerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CustomerCollectionResponse.cs index 814a3518723..0f89c5cc2ba 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CustomerCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomerPayment.cs b/src/Microsoft.Graph/Generated/Models/CustomerPayment.cs index 7104f721fcd..799addf8b40 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomerPayment.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomerPayment.cs @@ -239,7 +239,7 @@ public CustomerPayment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomerPayment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomerPayment(); } /// @@ -275,7 +275,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDecimalValue("amount", Amount); writer.WriteGuidValue("appliesToInvoiceId", AppliesToInvoiceId); writer.WriteStringValue("appliesToInvoiceNumber", AppliesToInvoiceNumber); diff --git a/src/Microsoft.Graph/Generated/Models/CustomerPaymentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CustomerPaymentCollectionResponse.cs index 9ce11828eec..fa080ec27c5 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomerPaymentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomerPaymentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CustomerPaymentCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomerPaymentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomerPaymentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomerPaymentJournal.cs b/src/Microsoft.Graph/Generated/Models/CustomerPaymentJournal.cs index dd5c133c082..9c2b96672e0 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomerPaymentJournal.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomerPaymentJournal.cs @@ -150,7 +150,7 @@ public CustomerPaymentJournal() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomerPaymentJournal CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomerPaymentJournal(); } /// @@ -178,7 +178,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("account", Account); writer.WriteGuidValue("balancingAccountId", BalancingAccountId); writer.WriteStringValue("balancingAccountNumber", BalancingAccountNumber); diff --git a/src/Microsoft.Graph/Generated/Models/CustomerPaymentJournalCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/CustomerPaymentJournalCollectionResponse.cs index 2d4dfa3b315..d8f54618307 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomerPaymentJournalCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomerPaymentJournalCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CustomerPaymentJournalCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.CustomerPaymentJournalCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomerPaymentJournalCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/CustomerVoiceSettings.cs b/src/Microsoft.Graph/Generated/Models/CustomerVoiceSettings.cs index 6798370be9f..7e1dc864349 100644 --- a/src/Microsoft.Graph/Generated/Models/CustomerVoiceSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/CustomerVoiceSettings.cs @@ -70,7 +70,7 @@ public CustomerVoiceSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.CustomerVoiceSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.CustomerVoiceSettings(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isInOrgFormsPhishingScanEnabled", IsInOrgFormsPhishingScanEnabled); writer.WriteBoolValue("isRecordIdentityByDefaultEnabled", IsRecordIdentityByDefaultEnabled); writer.WriteBoolValue("isRestrictedSurveyAccessEnabled", IsRestrictedSurveyAccessEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersByApplicationMetric.cs b/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersByApplicationMetric.cs index f06d07a0c05..c23ece87f4d 100644 --- a/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersByApplicationMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersByApplicationMetric.cs @@ -25,7 +25,7 @@ public long? Inactive1DayCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DailyInactiveUsersByApplicationMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DailyInactiveUsersByApplicationMetric(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("inactive1DayCount", Inactive1DayCount); } diff --git a/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersByApplicationMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersByApplicationMetricCollectionResponse.cs index 3857f854fb6..fac10f04f0a 100644 --- a/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersByApplicationMetricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersByApplicationMetricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DailyInactiveUsersByApplicationMetricCollectionResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DailyInactiveUsersByApplicationMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DailyInactiveUsersByApplicationMetricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersMetric.cs b/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersMetric.cs index 37897966ef7..ddb13d2bef9 100644 --- a/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersMetric.cs @@ -25,7 +25,7 @@ public long? Inactive1DayCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DailyInactiveUsersMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DailyInactiveUsersMetric(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("inactive1DayCount", Inactive1DayCount); } diff --git a/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersMetricCollectionResponse.cs index d0299687c78..750851420f8 100644 --- a/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersMetricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DailyInactiveUsersMetricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DailyInactiveUsersMetricCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DailyInactiveUsersMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DailyInactiveUsersMetricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DailyUserInsightMetricsRoot.cs b/src/Microsoft.Graph/Generated/Models/DailyUserInsightMetricsRoot.cs index c1383e1f327..d26b4ff14a3 100644 --- a/src/Microsoft.Graph/Generated/Models/DailyUserInsightMetricsRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/DailyUserInsightMetricsRoot.cs @@ -163,7 +163,7 @@ public partial class DailyUserInsightMetricsRoot : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DailyUserInsightMetricsRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DailyUserInsightMetricsRoot(); } /// @@ -191,7 +191,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("activeUsers", ActiveUsers); writer.WriteCollectionOfObjectValues("authentications", Authentications); diff --git a/src/Microsoft.Graph/Generated/Models/DataClassificationService.cs b/src/Microsoft.Graph/Generated/Models/DataClassificationService.cs index 366a3bd325f..e681ee09f09 100644 --- a/src/Microsoft.Graph/Generated/Models/DataClassificationService.cs +++ b/src/Microsoft.Graph/Generated/Models/DataClassificationService.cs @@ -163,7 +163,7 @@ public partial class DataClassificationService : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DataClassificationService CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DataClassificationService(); } /// @@ -191,7 +191,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("classifyFileJobs", ClassifyFileJobs); writer.WriteCollectionOfObjectValues("classifyTextJobs", ClassifyTextJobs); diff --git a/src/Microsoft.Graph/Generated/Models/DataCollectionInfo.cs b/src/Microsoft.Graph/Generated/Models/DataCollectionInfo.cs index 9dce6669f40..d0f2ca05b30 100644 --- a/src/Microsoft.Graph/Generated/Models/DataCollectionInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/DataCollectionInfo.cs @@ -35,7 +35,7 @@ public partial class DataCollectionInfo : global::Microsoft.Graph.Beta.Models.En /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DataCollectionInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DataCollectionInfo(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("entitlements", Entitlements); } diff --git a/src/Microsoft.Graph/Generated/Models/DataLossPreventionPolicy.cs b/src/Microsoft.Graph/Generated/Models/DataLossPreventionPolicy.cs index eb21132c099..7f542f2d4ff 100644 --- a/src/Microsoft.Graph/Generated/Models/DataLossPreventionPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/DataLossPreventionPolicy.cs @@ -35,7 +35,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicy(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); } diff --git a/src/Microsoft.Graph/Generated/Models/DataLossPreventionPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DataLossPreventionPolicyCollectionResponse.cs index 01cb0a92bc2..124fe364645 100644 --- a/src/Microsoft.Graph/Generated/Models/DataLossPreventionPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DataLossPreventionPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DataLossPreventionPolicyCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DataLossPreventionPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DataPolicyOperation.cs b/src/Microsoft.Graph/Generated/Models/DataPolicyOperation.cs index 6d7970354ad..21a1efcc819 100644 --- a/src/Microsoft.Graph/Generated/Models/DataPolicyOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/DataPolicyOperation.cs @@ -75,7 +75,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DataPolicyOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DataPolicyOperation(); } /// @@ -100,7 +100,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); writer.WriteDoubleValue("progress", Progress); diff --git a/src/Microsoft.Graph/Generated/Models/DataPolicyOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DataPolicyOperationCollectionResponse.cs index 34426e1f5fa..66930110ed9 100644 --- a/src/Microsoft.Graph/Generated/Models/DataPolicyOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DataPolicyOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DataPolicyOperationCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DataPolicyOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DataPolicyOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DataProcessorServiceForWindowsFeaturesOnboarding.cs b/src/Microsoft.Graph/Generated/Models/DataProcessorServiceForWindowsFeaturesOnboarding.cs index 82e9bb41306..9dc2fc9dc7d 100644 --- a/src/Microsoft.Graph/Generated/Models/DataProcessorServiceForWindowsFeaturesOnboarding.cs +++ b/src/Microsoft.Graph/Generated/Models/DataProcessorServiceForWindowsFeaturesOnboarding.cs @@ -65,7 +65,7 @@ public DataProcessorServiceForWindowsFeaturesOnboarding() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DataProcessorServiceForWindowsFeaturesOnboarding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DataProcessorServiceForWindowsFeaturesOnboarding(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("areDataProcessorServiceForWindowsFeaturesEnabled", AreDataProcessorServiceForWindowsFeaturesEnabled); writer.WriteBoolValue("hasValidWindowsLicense", HasValidWindowsLicense); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DataSecurityAndGovernance.cs b/src/Microsoft.Graph/Generated/Models/DataSecurityAndGovernance.cs index 86aa105d7eb..7ce16a7145f 100644 --- a/src/Microsoft.Graph/Generated/Models/DataSecurityAndGovernance.cs +++ b/src/Microsoft.Graph/Generated/Models/DataSecurityAndGovernance.cs @@ -35,7 +35,7 @@ public partial class DataSecurityAndGovernance : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DataSecurityAndGovernance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -61,7 +61,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("sensitivityLabels", SensitivityLabels); } diff --git a/src/Microsoft.Graph/Generated/Models/DataSharingConsent.cs b/src/Microsoft.Graph/Generated/Models/DataSharingConsent.cs index f69d8211e71..1b7b53fee2c 100644 --- a/src/Microsoft.Graph/Generated/Models/DataSharingConsent.cs +++ b/src/Microsoft.Graph/Generated/Models/DataSharingConsent.cs @@ -96,7 +96,7 @@ public string TermsUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DataSharingConsent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DataSharingConsent(); } /// @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("grantDateTime", GrantDateTime); writer.WriteBoolValue("granted", Granted); diff --git a/src/Microsoft.Graph/Generated/Models/DataSharingConsentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DataSharingConsentCollectionResponse.cs index 6e41b30fbd5..0f4196ac4e2 100644 --- a/src/Microsoft.Graph/Generated/Models/DataSharingConsentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DataSharingConsentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DataSharingConsentCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DataSharingConsentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DataSharingConsentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DataSubject.cs b/src/Microsoft.Graph/Generated/Models/DataSubject.cs index f0c71033cfe..aeadeceeda5 100644 --- a/src/Microsoft.Graph/Generated/Models/DataSubject.cs +++ b/src/Microsoft.Graph/Generated/Models/DataSubject.cs @@ -116,7 +116,7 @@ public DataSubject() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DataSubject CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DataSubject(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("email", Email); writer.WriteStringValue("firstName", FirstName); writer.WriteStringValue("lastName", LastName); diff --git a/src/Microsoft.Graph/Generated/Models/DateTimeColumn.cs b/src/Microsoft.Graph/Generated/Models/DateTimeColumn.cs index d7e2644f74f..769f60a26e6 100644 --- a/src/Microsoft.Graph/Generated/Models/DateTimeColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/DateTimeColumn.cs @@ -84,7 +84,7 @@ public DateTimeColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DateTimeColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DateTimeColumn(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayAs", DisplayAs); writer.WriteStringValue("format", Format); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DateTimeTimeZone.cs b/src/Microsoft.Graph/Generated/Models/DateTimeTimeZone.cs index 85949b70362..1b79cb5b5f9 100644 --- a/src/Microsoft.Graph/Generated/Models/DateTimeTimeZone.cs +++ b/src/Microsoft.Graph/Generated/Models/DateTimeTimeZone.cs @@ -84,7 +84,7 @@ public DateTimeTimeZone() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DateTimeTimeZone CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DateTimeTimeZone(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("dateTime", DateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("timeZone", TimeZone); diff --git a/src/Microsoft.Graph/Generated/Models/DayNote.cs b/src/Microsoft.Graph/Generated/Models/DayNote.cs index 29bd01ef7c1..37e0881e5b4 100644 --- a/src/Microsoft.Graph/Generated/Models/DayNote.cs +++ b/src/Microsoft.Graph/Generated/Models/DayNote.cs @@ -65,7 +65,7 @@ public DayNote() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DayNote CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DayNote(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateValue("dayNoteDate", DayNoteDate); writer.WriteObjectValue("draftDayNote", DraftDayNote); diff --git a/src/Microsoft.Graph/Generated/Models/DayNoteCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DayNoteCollectionResponse.cs index 65a6147734c..efbcf721824 100644 --- a/src/Microsoft.Graph/Generated/Models/DayNoteCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DayNoteCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DayNoteCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DayNoteCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DayNoteCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DaylightTimeZoneOffset.cs b/src/Microsoft.Graph/Generated/Models/DaylightTimeZoneOffset.cs index 76328530dd8..a8c0ffa8744 100644 --- a/src/Microsoft.Graph/Generated/Models/DaylightTimeZoneOffset.cs +++ b/src/Microsoft.Graph/Generated/Models/DaylightTimeZoneOffset.cs @@ -32,7 +32,7 @@ public DaylightTimeZoneOffset() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DaylightTimeZoneOffset CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DaylightTimeZoneOffset(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("daylightBias", DaylightBias); } diff --git a/src/Microsoft.Graph/Generated/Models/DecisionItemPrincipalResourceMembership.cs b/src/Microsoft.Graph/Generated/Models/DecisionItemPrincipalResourceMembership.cs index 1afb718bf97..311038d3bbe 100644 --- a/src/Microsoft.Graph/Generated/Models/DecisionItemPrincipalResourceMembership.cs +++ b/src/Microsoft.Graph/Generated/Models/DecisionItemPrincipalResourceMembership.cs @@ -58,7 +58,7 @@ public DecisionItemPrincipalResourceMembership() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DecisionItemPrincipalResourceMembership CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DecisionItemPrincipalResourceMembership(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("membershipType", MembershipType); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DefaultColumnValue.cs b/src/Microsoft.Graph/Generated/Models/DefaultColumnValue.cs index c28e348d8b3..41bb9524c38 100644 --- a/src/Microsoft.Graph/Generated/Models/DefaultColumnValue.cs +++ b/src/Microsoft.Graph/Generated/Models/DefaultColumnValue.cs @@ -84,7 +84,7 @@ public DefaultColumnValue() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DefaultColumnValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DefaultColumnValue(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("formula", Formula); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/DefaultDeviceCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/DefaultDeviceCompliancePolicy.cs index 2cba37b262b..0433e934464 100644 --- a/src/Microsoft.Graph/Generated/Models/DefaultDeviceCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/DefaultDeviceCompliancePolicy.cs @@ -27,7 +27,7 @@ public DefaultDeviceCompliancePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DefaultDeviceCompliancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DefaultDeviceCompliancePolicy(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DefaultInvitationRedemptionIdentityProviderConfiguration.cs b/src/Microsoft.Graph/Generated/Models/DefaultInvitationRedemptionIdentityProviderConfiguration.cs index 8ab643154ef..6ee6d20b0a2 100644 --- a/src/Microsoft.Graph/Generated/Models/DefaultInvitationRedemptionIdentityProviderConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/DefaultInvitationRedemptionIdentityProviderConfiguration.cs @@ -19,7 +19,7 @@ public partial class DefaultInvitationRedemptionIdentityProviderConfiguration : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DefaultInvitationRedemptionIdentityProviderConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DefaultInvitationRedemptionIdentityProviderConfiguration(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DefaultManagedAppProtection.cs b/src/Microsoft.Graph/Generated/Models/DefaultManagedAppProtection.cs index 45ec70431fc..a54a3d5b931 100644 --- a/src/Microsoft.Graph/Generated/Models/DefaultManagedAppProtection.cs +++ b/src/Microsoft.Graph/Generated/Models/DefaultManagedAppProtection.cs @@ -641,7 +641,7 @@ public DefaultManagedAppProtection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DefaultManagedAppProtection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DefaultManagedAppProtection(); } /// @@ -719,7 +719,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("allowedAndroidDeviceManufacturers", AllowedAndroidDeviceManufacturers); writer.WriteCollectionOfPrimitiveValues("allowedAndroidDeviceModels", AllowedAndroidDeviceModels); diff --git a/src/Microsoft.Graph/Generated/Models/DefaultManagedAppProtectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DefaultManagedAppProtectionCollectionResponse.cs index 83526c52a7d..1efab44e1f5 100644 --- a/src/Microsoft.Graph/Generated/Models/DefaultManagedAppProtectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DefaultManagedAppProtectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DefaultManagedAppProtectionCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DefaultManagedAppProtectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DefaultManagedAppProtectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DefaultSharingLink.cs b/src/Microsoft.Graph/Generated/Models/DefaultSharingLink.cs index d2ed782bc2f..03b859e2547 100644 --- a/src/Microsoft.Graph/Generated/Models/DefaultSharingLink.cs +++ b/src/Microsoft.Graph/Generated/Models/DefaultSharingLink.cs @@ -70,7 +70,7 @@ public DefaultSharingLink() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DefaultSharingLink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DefaultSharingLink(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("defaultToExistingAccess", DefaultToExistingAccess); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("role", Role); diff --git a/src/Microsoft.Graph/Generated/Models/DefaultUserRoleOverride.cs b/src/Microsoft.Graph/Generated/Models/DefaultUserRoleOverride.cs index 7530efda650..bc9c3242cae 100644 --- a/src/Microsoft.Graph/Generated/Models/DefaultUserRoleOverride.cs +++ b/src/Microsoft.Graph/Generated/Models/DefaultUserRoleOverride.cs @@ -41,7 +41,7 @@ public bool? IsDefault /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DefaultUserRoleOverride CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DefaultUserRoleOverride(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isDefault", IsDefault); writer.WriteCollectionOfObjectValues("rolePermissions", RolePermissions); diff --git a/src/Microsoft.Graph/Generated/Models/DefaultUserRoleOverrideCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DefaultUserRoleOverrideCollectionResponse.cs index 1a2a8f774bc..e0114b35a6b 100644 --- a/src/Microsoft.Graph/Generated/Models/DefaultUserRoleOverrideCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DefaultUserRoleOverrideCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DefaultUserRoleOverrideCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DefaultUserRoleOverrideCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DefaultUserRoleOverrideCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DefaultUserRolePermissions.cs b/src/Microsoft.Graph/Generated/Models/DefaultUserRolePermissions.cs index 48fe8010c54..21e3463c80a 100644 --- a/src/Microsoft.Graph/Generated/Models/DefaultUserRolePermissions.cs +++ b/src/Microsoft.Graph/Generated/Models/DefaultUserRolePermissions.cs @@ -82,7 +82,7 @@ public DefaultUserRolePermissions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DefaultUserRolePermissions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DefaultUserRolePermissions(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowedToCreateApps", AllowedToCreateApps); writer.WriteBoolValue("allowedToCreateSecurityGroups", AllowedToCreateSecurityGroups); writer.WriteBoolValue("allowedToCreateTenants", AllowedToCreateTenants); diff --git a/src/Microsoft.Graph/Generated/Models/DefenderDetectedMalwareActions.cs b/src/Microsoft.Graph/Generated/Models/DefenderDetectedMalwareActions.cs index f01cbcde9a1..26b0619c57e 100644 --- a/src/Microsoft.Graph/Generated/Models/DefenderDetectedMalwareActions.cs +++ b/src/Microsoft.Graph/Generated/Models/DefenderDetectedMalwareActions.cs @@ -77,7 +77,7 @@ public DefenderDetectedMalwareActions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DefenderDetectedMalwareActions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DefenderDetectedMalwareActions(); } /// @@ -101,7 +101,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("highSeverity", HighSeverity); writer.WriteEnumValue("lowSeverity", LowSeverity); writer.WriteEnumValue("moderateSeverity", ModerateSeverity); diff --git a/src/Microsoft.Graph/Generated/Models/DelegateAllowedActions.cs b/src/Microsoft.Graph/Generated/Models/DelegateAllowedActions.cs index 2fd74c25b00..d075ea5dfaf 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegateAllowedActions.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegateAllowedActions.cs @@ -82,7 +82,7 @@ public DelegateAllowedActions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DelegateAllowedActions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegateAllowedActions(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("joinActiveCalls", JoinActiveCalls); writer.WriteBoolValue("makeCalls", MakeCalls); writer.WriteBoolValue("manageCallAndDelegateSettings", ManageCallAndDelegateSettings); diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessAssignment.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessAssignment.cs index d8ab0fe15c3..82a96dbb055 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessAssignment.cs @@ -69,7 +69,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegatedAdminAccessAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedAdminAccessAssignment(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("accessContainer", AccessContainer); writer.WriteObjectValue("accessDetails", AccessDetails); diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessAssignmentCollectionResponse.cs index b5411074fb7..10030c377a2 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DelegatedAdminAccessAssignmentCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegatedAdminAccessAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedAdminAccessAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessContainer.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessContainer.cs index dfe38bb305b..8ddb1c13f83 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessContainer.cs @@ -74,7 +74,7 @@ public DelegatedAdminAccessContainer() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DelegatedAdminAccessContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedAdminAccessContainer(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("accessContainerId", AccessContainerId); writer.WriteEnumValue("accessContainerType", AccessContainerType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessDetails.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessDetails.cs index 9adaadf917f..76cb7c6d03c 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminAccessDetails.cs @@ -68,7 +68,7 @@ public DelegatedAdminAccessDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DelegatedAdminAccessDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedAdminAccessDetails(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("unifiedRoles", UnifiedRoles); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminCustomer.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminCustomer.cs index 81797e2135c..95c3fe5d314 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminCustomer.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminCustomer.cs @@ -67,7 +67,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegatedAdminCustomer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedAdminCustomer(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfObjectValues("serviceManagementDetails", ServiceManagementDetails); diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminCustomerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminCustomerCollectionResponse.cs index 807c79c2e84..9c30287c5d6 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminCustomerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminCustomerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DelegatedAdminCustomerCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegatedAdminCustomerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedAdminCustomerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationship.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationship.cs index 58d54106fcb..504c4c8fe45 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationship.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationship.cs @@ -157,7 +157,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegatedAdminRelationship CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -194,7 +194,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("accessAssignments", AccessAssignments); writer.WriteObjectValue("accessDetails", AccessDetails); diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipCollectionResponse.cs index 48688bca5f9..91c62ed13b5 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DelegatedAdminRelationshipCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegatedAdminRelationshipCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedAdminRelationshipCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipCustomerParticipant.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipCustomerParticipant.cs index e9257003753..c5c77ce04c0 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipCustomerParticipant.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipCustomerParticipant.cs @@ -84,7 +84,7 @@ public DelegatedAdminRelationshipCustomerParticipant() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DelegatedAdminRelationshipCustomerParticipant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedAdminRelationshipCustomerParticipant(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("tenantId", TenantId); diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipOperation.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipOperation.cs index 19b06dbd3e5..8ee1e95fa1f 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipOperation.cs @@ -59,7 +59,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegatedAdminRelationshipOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedAdminRelationshipOperation(); } /// @@ -83,7 +83,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("data", Data); diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipOperationCollectionResponse.cs index b2f5a5bbd55..0afce0c682e 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DelegatedAdminRelationshipOperationCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegatedAdminRelationshipOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedAdminRelationshipOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipRequest.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipRequest.cs index f2d959a4663..b26e9021cfe 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipRequest.cs @@ -43,7 +43,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegatedAdminRelationshipRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedAdminRelationshipRequest(); } /// @@ -66,7 +66,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("action", Action); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipRequestCollectionResponse.cs index 9497dda7b08..12238c79c41 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminRelationshipRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DelegatedAdminRelationshipRequestCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegatedAdminRelationshipRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedAdminRelationshipRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminServiceManagementDetail.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminServiceManagementDetail.cs index e7775293296..c492533790e 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminServiceManagementDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminServiceManagementDetail.cs @@ -51,7 +51,7 @@ public string ServiceName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegatedAdminServiceManagementDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedAdminServiceManagementDetail(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("serviceManagementUrl", ServiceManagementUrl); writer.WriteStringValue("serviceName", ServiceName); diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedAdminServiceManagementDetailCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DelegatedAdminServiceManagementDetailCollectionResponse.cs index 4c17cc6ca02..e08999579f6 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedAdminServiceManagementDetailCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedAdminServiceManagementDetailCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DelegatedAdminServiceManagementDetailCollectionResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegatedAdminServiceManagementDetailCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedAdminServiceManagementDetailCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedPermissionClassification.cs b/src/Microsoft.Graph/Generated/Models/DelegatedPermissionClassification.cs index 1c73f84d4bd..9c711675ef4 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedPermissionClassification.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedPermissionClassification.cs @@ -57,7 +57,7 @@ public string PermissionName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegatedPermissionClassification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedPermissionClassification(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("classification", Classification); writer.WriteStringValue("permissionId", PermissionId); diff --git a/src/Microsoft.Graph/Generated/Models/DelegatedPermissionClassificationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DelegatedPermissionClassificationCollectionResponse.cs index fdb0ea57454..dc8e890abbb 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegatedPermissionClassificationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegatedPermissionClassificationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DelegatedPermissionClassificationCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegatedPermissionClassificationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegatedPermissionClassificationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DelegationSettings.cs b/src/Microsoft.Graph/Generated/Models/DelegationSettings.cs index d901532411c..c9b3729ef4d 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegationSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegationSettings.cs @@ -47,7 +47,7 @@ public bool? IsActive /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegationSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegationSettings(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("allowedActions", AllowedActions); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DelegationSettingsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DelegationSettingsCollectionResponse.cs index 28bd88dc981..adbde8aa678 100644 --- a/src/Microsoft.Graph/Generated/Models/DelegationSettingsCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DelegationSettingsCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DelegationSettingsCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DelegationSettingsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DelegationSettingsCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeleteAction.cs b/src/Microsoft.Graph/Generated/Models/DeleteAction.cs index 0b4eb5df7dd..ad9ba644f0a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeleteAction.cs +++ b/src/Microsoft.Graph/Generated/Models/DeleteAction.cs @@ -84,7 +84,7 @@ public DeleteAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeleteAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeleteAction(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("objectType", ObjectType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeleteUserFromSharedAppleDeviceActionResult.cs b/src/Microsoft.Graph/Generated/Models/DeleteUserFromSharedAppleDeviceActionResult.cs index c49379825f9..710e8bc8e02 100644 --- a/src/Microsoft.Graph/Generated/Models/DeleteUserFromSharedAppleDeviceActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/DeleteUserFromSharedAppleDeviceActionResult.cs @@ -36,7 +36,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeleteUserFromSharedAppleDeviceActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeleteUserFromSharedAppleDeviceActionResult(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userPrincipalName", UserPrincipalName); } diff --git a/src/Microsoft.Graph/Generated/Models/Deleted.cs b/src/Microsoft.Graph/Generated/Models/Deleted.cs index b63c1981f9b..53cf82c67df 100644 --- a/src/Microsoft.Graph/Generated/Models/Deleted.cs +++ b/src/Microsoft.Graph/Generated/Models/Deleted.cs @@ -68,7 +68,7 @@ public Deleted() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Deleted CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Deleted(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("state", State); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DeletedChat.cs b/src/Microsoft.Graph/Generated/Models/DeletedChat.cs index 5d4412ad5d3..b2930f49080 100644 --- a/src/Microsoft.Graph/Generated/Models/DeletedChat.cs +++ b/src/Microsoft.Graph/Generated/Models/DeletedChat.cs @@ -19,7 +19,7 @@ public partial class DeletedChat : global::Microsoft.Graph.Beta.Models.Entity, I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeletedChat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeletedChat(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeletedChatCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeletedChatCollectionResponse.cs index 9ddc3dfe3fd..5c764823d4e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeletedChatCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeletedChatCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeletedChatCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeletedChatCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeletedChatCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeletedItemContainer.cs b/src/Microsoft.Graph/Generated/Models/DeletedItemContainer.cs index 4501cd997bf..a04777f7c08 100644 --- a/src/Microsoft.Graph/Generated/Models/DeletedItemContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/DeletedItemContainer.cs @@ -36,7 +36,7 @@ public partial class DeletedItemContainer : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeletedItemContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeletedItemContainer(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("workflows", Workflows); } diff --git a/src/Microsoft.Graph/Generated/Models/DeletedTeam.cs b/src/Microsoft.Graph/Generated/Models/DeletedTeam.cs index 0c483b5a36f..f76f2aaff38 100644 --- a/src/Microsoft.Graph/Generated/Models/DeletedTeam.cs +++ b/src/Microsoft.Graph/Generated/Models/DeletedTeam.cs @@ -35,7 +35,7 @@ public partial class DeletedTeam : global::Microsoft.Graph.Beta.Models.Entity, I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeletedTeam CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeletedTeam(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("channels", Channels); } diff --git a/src/Microsoft.Graph/Generated/Models/DeletedTeamCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeletedTeamCollectionResponse.cs index 3783e621a7e..b76551a3d6e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeletedTeamCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeletedTeamCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeletedTeamCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeletedTeamCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeletedTeamCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidth.cs b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidth.cs index d30c73f4f1e..7f08bca1f76 100644 --- a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidth.cs +++ b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidth.cs @@ -53,7 +53,7 @@ public DeliveryOptimizationBandwidth() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeliveryOptimizationBandwidth CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthAbsolute.cs b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthAbsolute.cs index 3578ac973d1..f5d8f7c3cc2 100644 --- a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthAbsolute.cs +++ b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthAbsolute.cs @@ -39,7 +39,7 @@ public DeliveryOptimizationBandwidthAbsolute() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationBandwidthAbsolute CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationBandwidthAbsolute(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("maximumDownloadBandwidthInKilobytesPerSecond", MaximumDownloadBandwidthInKilobytesPerSecond); writer.WriteLongValue("maximumUploadBandwidthInKilobytesPerSecond", MaximumUploadBandwidthInKilobytesPerSecond); diff --git a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthBusinessHoursLimit.cs b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthBusinessHoursLimit.cs index 798e9ebd1f8..17aef269035 100644 --- a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthBusinessHoursLimit.cs +++ b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthBusinessHoursLimit.cs @@ -77,7 +77,7 @@ public DeliveryOptimizationBandwidthBusinessHoursLimit() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeliveryOptimizationBandwidthBusinessHoursLimit CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationBandwidthBusinessHoursLimit(); } /// @@ -101,7 +101,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("bandwidthBeginBusinessHours", BandwidthBeginBusinessHours); writer.WriteIntValue("bandwidthEndBusinessHours", BandwidthEndBusinessHours); writer.WriteIntValue("bandwidthPercentageDuringBusinessHours", BandwidthPercentageDuringBusinessHours); diff --git a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthHoursWithPercentage.cs b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthHoursWithPercentage.cs index cc507e3d54a..b54f65508e8 100644 --- a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthHoursWithPercentage.cs +++ b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthHoursWithPercentage.cs @@ -59,7 +59,7 @@ public DeliveryOptimizationBandwidthHoursWithPercentage() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationBandwidthHoursWithPercentage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationBandwidthHoursWithPercentage(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("bandwidthBackgroundPercentageHours", BandwidthBackgroundPercentageHours); writer.WriteObjectValue("bandwidthForegroundPercentageHours", BandwidthForegroundPercentageHours); diff --git a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthPercentage.cs b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthPercentage.cs index ab2b4d051d1..f0650c9ccc4 100644 --- a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthPercentage.cs +++ b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationBandwidthPercentage.cs @@ -39,7 +39,7 @@ public DeliveryOptimizationBandwidthPercentage() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationBandwidthPercentage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationBandwidthPercentage(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("maximumBackgroundBandwidthPercentage", MaximumBackgroundBandwidthPercentage); writer.WriteIntValue("maximumForegroundBandwidthPercentage", MaximumForegroundBandwidthPercentage); diff --git a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationGroupIdCustom.cs b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationGroupIdCustom.cs index 9c08cf67d3a..524d20e6049 100644 --- a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationGroupIdCustom.cs +++ b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationGroupIdCustom.cs @@ -43,7 +43,7 @@ public DeliveryOptimizationGroupIdCustom() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationGroupIdCustom CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationGroupIdCustom(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("groupIdCustom", GroupIdCustom); } diff --git a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationGroupIdSource.cs b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationGroupIdSource.cs index 1d55a159c5e..f03e3a6b191 100644 --- a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationGroupIdSource.cs +++ b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationGroupIdSource.cs @@ -53,7 +53,7 @@ public DeliveryOptimizationGroupIdSource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeliveryOptimizationGroupIdSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationGroupIdSourceOptions.cs b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationGroupIdSourceOptions.cs index 8454460a65f..1b33b831fea 100644 --- a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationGroupIdSourceOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationGroupIdSourceOptions.cs @@ -33,7 +33,7 @@ public DeliveryOptimizationGroupIdSourceOptions() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationGroupIdSourceOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationGroupIdSourceOptions(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("groupIdSourceOption", GroupIdSourceOption); } diff --git a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationMaxCacheSize.cs b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationMaxCacheSize.cs index d4ac4bb1e45..d529b0a5cc5 100644 --- a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationMaxCacheSize.cs +++ b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationMaxCacheSize.cs @@ -53,7 +53,7 @@ public DeliveryOptimizationMaxCacheSize() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeliveryOptimizationMaxCacheSize CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationMaxCacheSizeAbsolute.cs b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationMaxCacheSizeAbsolute.cs index 0506d077f04..f19c9a00eca 100644 --- a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationMaxCacheSizeAbsolute.cs +++ b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationMaxCacheSizeAbsolute.cs @@ -33,7 +33,7 @@ public DeliveryOptimizationMaxCacheSizeAbsolute() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationMaxCacheSizeAbsolute CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationMaxCacheSizeAbsolute(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("maximumCacheSizeInGigabytes", MaximumCacheSizeInGigabytes); } diff --git a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationMaxCacheSizePercentage.cs b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationMaxCacheSizePercentage.cs index 1bb431bb5c2..ad70e0c03c9 100644 --- a/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationMaxCacheSizePercentage.cs +++ b/src/Microsoft.Graph/Generated/Models/DeliveryOptimizationMaxCacheSizePercentage.cs @@ -33,7 +33,7 @@ public DeliveryOptimizationMaxCacheSizePercentage() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationMaxCacheSizePercentage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeliveryOptimizationMaxCacheSizePercentage(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("maximumCacheSizePercentage", MaximumCacheSizePercentage); } diff --git a/src/Microsoft.Graph/Generated/Models/DeltaParticipants.cs b/src/Microsoft.Graph/Generated/Models/DeltaParticipants.cs index 45e5de816fa..cc205c993a1 100644 --- a/src/Microsoft.Graph/Generated/Models/DeltaParticipants.cs +++ b/src/Microsoft.Graph/Generated/Models/DeltaParticipants.cs @@ -41,7 +41,7 @@ public long? SequenceNumber /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeltaParticipants CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeltaParticipants(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("participants", Participants); writer.WriteLongValue("sequenceNumber", SequenceNumber); diff --git a/src/Microsoft.Graph/Generated/Models/DepEnrollmentBaseProfile.cs b/src/Microsoft.Graph/Generated/Models/DepEnrollmentBaseProfile.cs index b6412565e31..8680f3b5ed5 100644 --- a/src/Microsoft.Graph/Generated/Models/DepEnrollmentBaseProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/DepEnrollmentBaseProfile.cs @@ -209,7 +209,7 @@ public DepEnrollmentBaseProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DepEnrollmentBaseProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -256,7 +256,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("appleIdDisabled", AppleIdDisabled); writer.WriteBoolValue("applePayDisabled", ApplePayDisabled); diff --git a/src/Microsoft.Graph/Generated/Models/DepEnrollmentProfile.cs b/src/Microsoft.Graph/Generated/Models/DepEnrollmentProfile.cs index 2cea4116b97..574747f4388 100644 --- a/src/Microsoft.Graph/Generated/Models/DepEnrollmentProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/DepEnrollmentProfile.cs @@ -201,7 +201,7 @@ public DepEnrollmentProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DepEnrollmentProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DepEnrollmentProfile(); } /// @@ -244,7 +244,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("appleIdDisabled", AppleIdDisabled); writer.WriteBoolValue("applePayDisabled", ApplePayDisabled); diff --git a/src/Microsoft.Graph/Generated/Models/DepIOSEnrollmentProfile.cs b/src/Microsoft.Graph/Generated/Models/DepIOSEnrollmentProfile.cs index 037dedc135a..bcedfb96fa4 100644 --- a/src/Microsoft.Graph/Generated/Models/DepIOSEnrollmentProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/DepIOSEnrollmentProfile.cs @@ -231,7 +231,7 @@ public DepIOSEnrollmentProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DepIOSEnrollmentProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DepIOSEnrollmentProfile(); } /// @@ -279,7 +279,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("appearanceScreenDisabled", AppearanceScreenDisabled); writer.WriteBoolValue("awaitDeviceConfiguredConfirmation", AwaitDeviceConfiguredConfirmation); diff --git a/src/Microsoft.Graph/Generated/Models/DepMacOSEnrollmentProfile.cs b/src/Microsoft.Graph/Generated/Models/DepMacOSEnrollmentProfile.cs index e9ec7d246bf..de3f77a02b8 100644 --- a/src/Microsoft.Graph/Generated/Models/DepMacOSEnrollmentProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/DepMacOSEnrollmentProfile.cs @@ -203,7 +203,7 @@ public DepMacOSEnrollmentProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DepMacOSEnrollmentProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DepMacOSEnrollmentProfile(); } /// @@ -243,7 +243,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("accessibilityScreenDisabled", AccessibilityScreenDisabled); writer.WriteStringValue("adminAccountFullName", AdminAccountFullName); diff --git a/src/Microsoft.Graph/Generated/Models/DepOnboardingSetting.cs b/src/Microsoft.Graph/Generated/Models/DepOnboardingSetting.cs index f18f7680785..cae624a758b 100644 --- a/src/Microsoft.Graph/Generated/Models/DepOnboardingSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/DepOnboardingSetting.cs @@ -218,7 +218,7 @@ public string TokenName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DepOnboardingSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DepOnboardingSetting(); } /// @@ -255,7 +255,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appleIdentifier", AppleIdentifier); writer.WriteBoolValue("dataSharingConsentGranted", DataSharingConsentGranted); diff --git a/src/Microsoft.Graph/Generated/Models/DepOnboardingSettingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DepOnboardingSettingCollectionResponse.cs index 97e982e7bfe..8c398a83db5 100644 --- a/src/Microsoft.Graph/Generated/Models/DepOnboardingSettingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DepOnboardingSettingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DepOnboardingSettingCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DepOnboardingSettingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DepOnboardingSettingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DepTvOSEnrollmentProfile.cs b/src/Microsoft.Graph/Generated/Models/DepTvOSEnrollmentProfile.cs index 496618aed72..cd3708340f5 100644 --- a/src/Microsoft.Graph/Generated/Models/DepTvOSEnrollmentProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/DepTvOSEnrollmentProfile.cs @@ -27,7 +27,7 @@ public DepTvOSEnrollmentProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DepTvOSEnrollmentProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DepTvOSEnrollmentProfile(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DepVisionOSEnrollmentProfile.cs b/src/Microsoft.Graph/Generated/Models/DepVisionOSEnrollmentProfile.cs index a76ea073723..63af5344545 100644 --- a/src/Microsoft.Graph/Generated/Models/DepVisionOSEnrollmentProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/DepVisionOSEnrollmentProfile.cs @@ -27,7 +27,7 @@ public DepVisionOSEnrollmentProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DepVisionOSEnrollmentProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DepVisionOSEnrollmentProfile(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Desk.cs b/src/Microsoft.Graph/Generated/Models/Desk.cs index b7d721e08d2..cb581345f9f 100644 --- a/src/Microsoft.Graph/Generated/Models/Desk.cs +++ b/src/Microsoft.Graph/Generated/Models/Desk.cs @@ -74,7 +74,7 @@ public Desk() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Desk CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Desk(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayDeviceName", DisplayDeviceName); writer.WriteObjectValue("mailboxDetails", MailboxDetails); diff --git a/src/Microsoft.Graph/Generated/Models/DetailsInfo.cs b/src/Microsoft.Graph/Generated/Models/DetailsInfo.cs index cd5786aac34..efbc94a87a8 100644 --- a/src/Microsoft.Graph/Generated/Models/DetailsInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/DetailsInfo.cs @@ -52,7 +52,7 @@ public DetailsInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DetailsInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DetailsInfo(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/DetectedApp.cs b/src/Microsoft.Graph/Generated/Models/DetectedApp.cs index a8dab2bef77..053f967d5ab 100644 --- a/src/Microsoft.Graph/Generated/Models/DetectedApp.cs +++ b/src/Microsoft.Graph/Generated/Models/DetectedApp.cs @@ -102,7 +102,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DetectedApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DetectedApp(); } /// @@ -128,7 +128,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("deviceCount", DeviceCount); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/DetectedAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DetectedAppCollectionResponse.cs index 2bc31472760..fd1b2f73f15 100644 --- a/src/Microsoft.Graph/Generated/Models/DetectedAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DetectedAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DetectedAppCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DetectedAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DetectedAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DetectedSensitiveContent.cs b/src/Microsoft.Graph/Generated/Models/DetectedSensitiveContent.cs index d87cfae8195..42f4e3da231 100644 --- a/src/Microsoft.Graph/Generated/Models/DetectedSensitiveContent.cs +++ b/src/Microsoft.Graph/Generated/Models/DetectedSensitiveContent.cs @@ -69,7 +69,7 @@ public partial class DetectedSensitiveContent : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DetectedSensitiveContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -98,7 +98,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("classificationAttributes", ClassificationAttributes); writer.WriteEnumValue("classificationMethod", ClassificationMethod); diff --git a/src/Microsoft.Graph/Generated/Models/DetectedSensitiveContentBase.cs b/src/Microsoft.Graph/Generated/Models/DetectedSensitiveContentBase.cs index c3bcec479c2..bcff2159560 100644 --- a/src/Microsoft.Graph/Generated/Models/DetectedSensitiveContentBase.cs +++ b/src/Microsoft.Graph/Generated/Models/DetectedSensitiveContentBase.cs @@ -92,7 +92,7 @@ public DetectedSensitiveContentBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DetectedSensitiveContentBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("confidence", Confidence); writer.WriteStringValue("displayName", DisplayName); writer.WriteGuidValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/DetectedSensitiveContentWrapper.cs b/src/Microsoft.Graph/Generated/Models/DetectedSensitiveContentWrapper.cs index 4e0b39a6a2d..5d30276bdb2 100644 --- a/src/Microsoft.Graph/Generated/Models/DetectedSensitiveContentWrapper.cs +++ b/src/Microsoft.Graph/Generated/Models/DetectedSensitiveContentWrapper.cs @@ -68,7 +68,7 @@ public DetectedSensitiveContentWrapper() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DetectedSensitiveContentWrapper CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DetectedSensitiveContentWrapper(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("classification", Classification); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Device.cs b/src/Microsoft.Graph/Generated/Models/Device.cs index e3a4a2288eb..8c5906995e1 100644 --- a/src/Microsoft.Graph/Generated/Models/Device.cs +++ b/src/Microsoft.Graph/Generated/Models/Device.cs @@ -652,7 +652,7 @@ public Device() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Device CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Device(); } /// @@ -717,7 +717,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("accountEnabled", AccountEnabled); writer.WriteCollectionOfPrimitiveValues("alternativeNames", AlternativeNames); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceActionResult.cs b/src/Microsoft.Graph/Generated/Models/DeviceActionResult.cs index 18327e91991..e42b88270dc 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceActionResult.cs @@ -87,7 +87,7 @@ public DeviceActionResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -125,7 +125,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("actionName", ActionName); writer.WriteEnumValue("actionState", ActionState); writer.WriteDateTimeOffsetValue("lastUpdatedDateTime", LastUpdatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignedRoleDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignedRoleDefinition.cs index 6cb01c65221..8cb7a840b1f 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignedRoleDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignedRoleDefinition.cs @@ -85,7 +85,7 @@ public DeviceAndAppManagementAssignedRoleDefinition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementAssignedRoleDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementAssignedRoleDefinition(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignedRoleDetail.cs b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignedRoleDetail.cs index 5832cfef105..c2e8408fdc0 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignedRoleDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignedRoleDetail.cs @@ -85,7 +85,7 @@ public DeviceAndAppManagementAssignedRoleDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementAssignedRoleDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementAssignedRoleDetail(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignedRoleDetails.cs b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignedRoleDetails.cs index 3ba94fb8703..f40d40014b3 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignedRoleDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignedRoleDetails.cs @@ -85,7 +85,7 @@ public DeviceAndAppManagementAssignedRoleDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementAssignedRoleDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementAssignedRoleDetails(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignmentFilter.cs b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignmentFilter.cs index a03e407229e..76dd3b500cb 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignmentFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignmentFilter.cs @@ -124,7 +124,7 @@ public string Rule /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementAssignmentFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -157,7 +157,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("assignmentFilterManagementType", AssignmentFilterManagementType); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignmentFilterCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignmentFilterCollectionResponse.cs index 98ae9b65257..0e352fbc94c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignmentFilterCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignmentFilterCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceAndAppManagementAssignmentFilterCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementAssignmentFilterCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementAssignmentFilterCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignmentTarget.cs b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignmentTarget.cs index ae00d82533f..487ad29105f 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignmentTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementAssignmentTarget.cs @@ -75,7 +75,7 @@ public DeviceAndAppManagementAssignmentTarget() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementAssignmentTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceAndAppManagementAssignmentFilterId", DeviceAndAppManagementAssignmentFilterId); writer.WriteEnumValue("deviceAndAppManagementAssignmentFilterType", DeviceAndAppManagementAssignmentFilterType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementData.cs b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementData.cs index 535cf2a10a6..94576e3a8e8 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementData.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementData.cs @@ -69,7 +69,7 @@ public DeviceAndAppManagementData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementData(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("content", Content); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementRoleAssignment.cs b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementRoleAssignment.cs index 676954b493e..81f9feb3f3b 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementRoleAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementRoleAssignment.cs @@ -68,7 +68,7 @@ public List RoleScopeTagIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementRoleAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementRoleAssignment(); } /// @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("members", Members); writer.WriteCollectionOfPrimitiveValues("roleScopeTagIds", RoleScopeTagIds); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementRoleAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementRoleAssignmentCollectionResponse.cs index cc75a8a434d..de3a9c7dfcc 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementRoleAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementRoleAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceAndAppManagementRoleAssignmentCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementRoleAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementRoleAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementRoleDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementRoleDefinition.cs index c57a9d4a6c5..2720fb0854e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementRoleDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceAndAppManagementRoleDefinition.cs @@ -27,7 +27,7 @@ public DeviceAndAppManagementRoleDefinition() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementRoleDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceAndAppManagementRoleDefinition(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceAppManagement.cs b/src/Microsoft.Graph/Generated/Models/DeviceAppManagement.cs index 645ea1de7bb..03b41076318 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceAppManagement.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceAppManagement.cs @@ -492,7 +492,7 @@ public DateTimeOffset? MicrosoftStoreForBusinessLastSuccessfulSyncDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceAppManagement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceAppManagement(); } /// @@ -543,7 +543,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("androidManagedAppProtections", AndroidManagedAppProtections); writer.WriteCollectionOfObjectValues("defaultManagedAppProtections", DefaultManagedAppProtections); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceAppManagementTask.cs b/src/Microsoft.Graph/Generated/Models/DeviceAppManagementTask.cs index f30f45e7e1e..a5a8c7698bd 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceAppManagementTask.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceAppManagementTask.cs @@ -130,7 +130,7 @@ public DateTimeOffset? DueDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceAppManagementTask CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -166,7 +166,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assignedTo", AssignedTo); writer.WriteEnumValue("category", Category); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceAppManagementTaskCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceAppManagementTaskCollectionResponse.cs index 9b0bfaac6de..a2c93233981 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceAppManagementTaskCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceAppManagementTaskCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceAppManagementTaskCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceAppManagementTaskCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceAppManagementTaskCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceAssignmentItem.cs b/src/Microsoft.Graph/Generated/Models/DeviceAssignmentItem.cs index d6673f1b67d..bbbc37b0151 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceAssignmentItem.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceAssignmentItem.cs @@ -153,7 +153,7 @@ public DeviceAssignmentItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceAssignmentItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceAssignmentItem(); } /// @@ -183,7 +183,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("assignmentItemActionIntent", AssignmentItemActionIntent); writer.WriteEnumValue("assignmentItemActionStatus", AssignmentItemActionStatus); writer.WriteStringValue("itemId", ItemId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCategory.cs b/src/Microsoft.Graph/Generated/Models/DeviceCategory.cs index ea3c47f3946..53b4c372e59 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCategory.cs @@ -68,7 +68,7 @@ public List RoleScopeTagIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCategory(); } /// @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCategoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceCategoryCollectionResponse.cs index 8cd7b1bcb35..2b8d34b2d76 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCategoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCategoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceCategoryCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCategoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceCollectionResponse.cs index c0c4fd52cac..c793d36273d 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceCollectionResponse : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComanagementAuthorityConfiguration.cs b/src/Microsoft.Graph/Generated/Models/DeviceComanagementAuthorityConfiguration.cs index c54a7740da9..d6cb38669cf 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComanagementAuthorityConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComanagementAuthorityConfiguration.cs @@ -55,7 +55,7 @@ public DeviceComanagementAuthorityConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComanagementAuthorityConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComanagementAuthorityConfiguration(); } /// @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("configurationManagerAgentCommandLineArgument", ConfigurationManagerAgentCommandLineArgument); writer.WriteBoolValue("installConfigurationManagerAgent", InstallConfigurationManagerAgent); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceActionItem.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceActionItem.cs index 0ab946f0a10..6f82390cd5c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceActionItem.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceActionItem.cs @@ -64,7 +64,7 @@ public string NotificationTemplateId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceActionItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceActionItem(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("actionType", ActionType); writer.WriteIntValue("gracePeriodHours", GracePeriodHours); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceActionItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceActionItemCollectionResponse.cs index f8cc090f2b1..75a5643fa15 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceActionItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceActionItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceComplianceActionItemCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceActionItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceActionItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceDeviceOverview.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceDeviceOverview.cs index d68a4bf3eb2..658febe00ab 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceDeviceOverview.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceDeviceOverview.cs @@ -73,7 +73,7 @@ public int? SuccessCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceDeviceOverview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceDeviceOverview(); } /// @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("configurationVersion", ConfigurationVersion); writer.WriteIntValue("conflictCount", ConflictCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceDeviceStatus.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceDeviceStatus.cs index dcc5fb27662..622535ae6f0 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceDeviceStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceDeviceStatus.cs @@ -107,7 +107,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceDeviceStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceDeviceStatus(); } /// @@ -134,7 +134,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("complianceGracePeriodExpirationDateTime", ComplianceGracePeriodExpirationDateTime); writer.WriteStringValue("deviceDisplayName", DeviceDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceDeviceStatusCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceDeviceStatusCollectionResponse.cs index 957156d51f0..b10c2bba446 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceDeviceStatusCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceDeviceStatusCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceComplianceDeviceStatusCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceDeviceStatusCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceDeviceStatusCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicy.cs index d1090bda124..3349970e586 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicy.cs @@ -198,7 +198,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -246,7 +246,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyAssignment.cs b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyAssignment.cs index 2c4ecd96f61..6c52410c308 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyAssignment.cs @@ -58,7 +58,7 @@ public string SourceId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyAssignment(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("source", Source); writer.WriteStringValue("sourceId", SourceId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyAssignmentCollectionResponse.cs index 741da50e21e..82ee55c158d 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceCompliancePolicyAssignmentCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyCollectionResponse.cs index 3e50393b74d..53cef79e940 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceCompliancePolicyCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyDeviceStateSummary.cs b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyDeviceStateSummary.cs index bb287080c41..c2cc02431d5 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyDeviceStateSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyDeviceStateSummary.cs @@ -73,7 +73,7 @@ public int? UnknownDeviceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyDeviceStateSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyDeviceStateSummary(); } /// @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("compliantDeviceCount", CompliantDeviceCount); writer.WriteIntValue("configManagerCount", ConfigManagerCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyGroupAssignment.cs b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyGroupAssignment.cs index 45aa4ff30d4..38f40d45ac4 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyGroupAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyGroupAssignment.cs @@ -58,7 +58,7 @@ public string TargetGroupId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyGroupAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyGroupAssignment(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("deviceCompliancePolicy", DeviceCompliancePolicy); writer.WriteBoolValue("excludeGroup", ExcludeGroup); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyPolicySetItem.cs b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyPolicySetItem.cs index 9e233cdd04f..2e3ad6c0078 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyPolicySetItem.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyPolicySetItem.cs @@ -27,7 +27,7 @@ public DeviceCompliancePolicyPolicySetItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyPolicySetItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyPolicySetItem(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyScript.cs b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyScript.cs index 5cf018707bc..f46828ff0ee 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyScript.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyScript.cs @@ -84,7 +84,7 @@ public DeviceCompliancePolicyScript() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyScript CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyScript(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceComplianceScriptId", DeviceComplianceScriptId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteByteArrayValue("rulesContent", RulesContent); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicySettingState.cs b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicySettingState.cs index 8f1a13cfa23..dfab5cf7ed7 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicySettingState.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicySettingState.cs @@ -241,7 +241,7 @@ public DeviceCompliancePolicySettingState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicySettingState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicySettingState(); } /// @@ -274,7 +274,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("currentValue", CurrentValue); writer.WriteLongValue("errorCode", ErrorCode); writer.WriteStringValue("errorDescription", ErrorDescription); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicySettingStateSummary.cs b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicySettingStateSummary.cs index bea863ce4ba..002c1903010 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicySettingStateSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicySettingStateSummary.cs @@ -116,7 +116,7 @@ public int? UnknownDeviceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicySettingStateSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicySettingStateSummary(); } /// @@ -146,7 +146,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("compliantDeviceCount", CompliantDeviceCount); writer.WriteIntValue("conflictDeviceCount", ConflictDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicySettingStateSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicySettingStateSummaryCollectionResponse.cs index f97185d1e3a..b88f89fac17 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicySettingStateSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicySettingStateSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceCompliancePolicySettingStateSummaryCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicySettingStateSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicySettingStateSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyState.cs b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyState.cs index 89da653a577..91aa6d7216c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyState.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyState.cs @@ -108,7 +108,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyState(); } /// @@ -135,7 +135,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteEnumValue("platformType", PlatformType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyStateCollectionResponse.cs index a9036925bcc..58d5ada69fa 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCompliancePolicyStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceCompliancePolicyStateCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCompliancePolicyStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScheduledActionForRule.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScheduledActionForRule.cs index 55e6a35e611..cdf2a512995 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScheduledActionForRule.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScheduledActionForRule.cs @@ -52,7 +52,7 @@ public string RuleName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceScheduledActionForRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceScheduledActionForRule(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("ruleName", RuleName); writer.WriteCollectionOfObjectValues("scheduledActionConfigurations", ScheduledActionConfigurations); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScheduledActionForRuleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScheduledActionForRuleCollectionResponse.cs index b53e194bc0c..4c8600f1f2a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScheduledActionForRuleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScheduledActionForRuleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceComplianceScheduledActionForRuleCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceScheduledActionForRuleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceScheduledActionForRuleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScript.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScript.cs index 1ae20845d19..ccf5c20d1f5 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScript.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScript.cs @@ -194,7 +194,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceScript CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceScript(); } /// @@ -227,7 +227,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptCollectionResponse.cs index c5af18f0e52..69cbe5a146d 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceComplianceScriptCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptDeviceState.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptDeviceState.cs index dd51400dc30..15963631c99 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptDeviceState.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptDeviceState.cs @@ -92,7 +92,7 @@ public string ScriptOutput /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptDeviceState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptDeviceState(); } /// @@ -118,7 +118,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("detectionState", DetectionState); writer.WriteDateTimeOffsetValue("expectedStateUpdateDateTime", ExpectedStateUpdateDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptDeviceStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptDeviceStateCollectionResponse.cs index 023027ba381..481c18376c6 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptDeviceStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptDeviceStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceComplianceScriptDeviceStateCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptDeviceStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptDeviceStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptError.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptError.cs index dba9ac47bb5..9fb0c0af049 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptError.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptError.cs @@ -80,7 +80,7 @@ public DeviceComplianceScriptError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -108,7 +108,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("code", Code); writer.WriteEnumValue("deviceComplianceScriptRulesValidationError", DeviceComplianceScriptRulesValidationError); writer.WriteStringValue("message", Message); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptRule.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptRule.cs index fa2dc051d73..eae928bf90e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptRule.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptRule.cs @@ -108,7 +108,7 @@ public DeviceComplianceScriptRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptRule(); } /// @@ -134,7 +134,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("dataType", DataType); writer.WriteEnumValue("deviceComplianceScriptRuleDataType", DeviceComplianceScriptRuleDataType); writer.WriteEnumValue("deviceComplianceScriptRulOperator", DeviceComplianceScriptRulOperator); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptRuleError.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptRuleError.cs index 08df6e594f5..66076b03b61 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptRuleError.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptRuleError.cs @@ -35,7 +35,7 @@ public string SettingName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptRuleError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptRuleError(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("settingName", SettingName); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptRunSummary.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptRunSummary.cs index 34700445f6b..e52c8824775 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptRunSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptRunSummary.cs @@ -50,7 +50,7 @@ public int? NoIssueDetectedDeviceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptRunSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptRunSummary(); } /// @@ -74,7 +74,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("detectionScriptErrorDeviceCount", DetectionScriptErrorDeviceCount); writer.WriteIntValue("detectionScriptPendingDeviceCount", DetectionScriptPendingDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptValidationResult.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptValidationResult.cs index d8389f146fb..6ff8398288e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptValidationResult.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceScriptValidationResult.cs @@ -100,7 +100,7 @@ public DeviceComplianceScriptValidationResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptValidationResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceScriptValidationResult(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("ruleErrors", RuleErrors); writer.WriteCollectionOfObjectValues("rules", Rules); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceSettingState.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceSettingState.cs index b5c2326425b..1e947bcea63 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceSettingState.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceSettingState.cs @@ -182,7 +182,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceSettingState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceSettingState(); } /// @@ -213,7 +213,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("complianceGracePeriodExpirationDateTime", ComplianceGracePeriodExpirationDateTime); writer.WriteStringValue("deviceId", DeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceSettingStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceSettingStateCollectionResponse.cs index a87f142e18c..b8668918efb 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceSettingStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceSettingStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceComplianceSettingStateCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceSettingStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceSettingStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceUserOverview.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceUserOverview.cs index 7cf0307a767..7dccb888054 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceUserOverview.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceUserOverview.cs @@ -67,7 +67,7 @@ public int? SuccessCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceUserOverview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceUserOverview(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("configurationVersion", ConfigurationVersion); writer.WriteIntValue("conflictCount", ConflictCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceUserStatus.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceUserStatus.cs index 6cf1558adb4..5f61706179a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceUserStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceUserStatus.cs @@ -69,7 +69,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceUserStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceUserStatus(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("devicesCount", DevicesCount); writer.WriteDateTimeOffsetValue("lastReportedDateTime", LastReportedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceComplianceUserStatusCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceComplianceUserStatusCollectionResponse.cs index cc470e949d8..4f53319e7b2 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceComplianceUserStatusCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceComplianceUserStatusCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceComplianceUserStatusCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceComplianceUserStatusCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceComplianceUserStatusCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfiguration.cs index 614c8d02a72..c30ee7a94a4 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfiguration.cs @@ -252,7 +252,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -429,7 +429,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationAssignment.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationAssignment.cs index c65994dfcd7..72605b9688b 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationAssignment.cs @@ -64,7 +64,7 @@ public string SourceId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationAssignment(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("intent", Intent); writer.WriteEnumValue("source", Source); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationAssignmentCollectionResponse.cs index d4d6a797890..212b70f9323 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceConfigurationAssignmentCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationCollectionResponse.cs index 4f7bbe105d1..89689eae744 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceConfigurationCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationConflictSummary.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationConflictSummary.cs index 7b800438349..4f5c76af003 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationConflictSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationConflictSummary.cs @@ -58,7 +58,7 @@ public int? DeviceCheckinsImpacted /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationConflictSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationConflictSummary(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("conflictingDeviceConfigurations", ConflictingDeviceConfigurations); writer.WriteCollectionOfPrimitiveValues("contributingSettings", ContributingSettings); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationConflictSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationConflictSummaryCollectionResponse.cs index c3e13c5984d..122286ed196 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationConflictSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationConflictSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceConfigurationConflictSummaryCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationConflictSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationConflictSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceOverview.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceOverview.cs index cb2c746e9e0..6e0b645f302 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceOverview.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceOverview.cs @@ -73,7 +73,7 @@ public int? SuccessCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceOverview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceOverview(); } /// @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("configurationVersion", ConfigurationVersion); writer.WriteIntValue("conflictCount", ConflictCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceStateSummary.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceStateSummary.cs index 60959665a3f..53d9656ea62 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceStateSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceStateSummary.cs @@ -61,7 +61,7 @@ public int? UnknownDeviceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceStateSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceStateSummary(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("compliantDeviceCount", CompliantDeviceCount); writer.WriteIntValue("conflictDeviceCount", ConflictDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceStatus.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceStatus.cs index daa11c2ab79..f1b6fce2905 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceStatus.cs @@ -108,7 +108,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceStatus(); } /// @@ -135,7 +135,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("complianceGracePeriodExpirationDateTime", ComplianceGracePeriodExpirationDateTime); writer.WriteStringValue("deviceDisplayName", DeviceDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceStatusCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceStatusCollectionResponse.cs index 9de65de33f0..035af58cfcd 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceStatusCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationDeviceStatusCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceConfigurationDeviceStatusCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceStatusCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationDeviceStatusCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationGroupAssignment.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationGroupAssignment.cs index 79e295be860..a822ac44b61 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationGroupAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationGroupAssignment.cs @@ -58,7 +58,7 @@ public string TargetGroupId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationGroupAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationGroupAssignment(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("deviceConfiguration", DeviceConfiguration); writer.WriteBoolValue("excludeGroup", ExcludeGroup); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationGroupAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationGroupAssignmentCollectionResponse.cs index 2ff973a5208..e0d01f380c1 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationGroupAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationGroupAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceConfigurationGroupAssignmentCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationGroupAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationGroupAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationPolicySetItem.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationPolicySetItem.cs index 8ed93ccc55e..61827deeeac 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationPolicySetItem.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationPolicySetItem.cs @@ -27,7 +27,7 @@ public DeviceConfigurationPolicySetItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationPolicySetItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationPolicySetItem(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationSettingState.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationSettingState.cs index 88b260e06d0..b9153a3461c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationSettingState.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationSettingState.cs @@ -241,7 +241,7 @@ public DeviceConfigurationSettingState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceConfigurationSettingState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationSettingState(); } /// @@ -274,7 +274,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("currentValue", CurrentValue); writer.WriteLongValue("errorCode", ErrorCode); writer.WriteStringValue("errorDescription", ErrorDescription); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationState.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationState.cs index 364dd989365..486c04106f6 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationState.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationState.cs @@ -108,7 +108,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationState(); } /// @@ -135,7 +135,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteEnumValue("platformType", PlatformType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationStateCollectionResponse.cs index fd3cae5b627..b3998739e93 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceConfigurationStateCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationTargetedUserAndDevice.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationTargetedUserAndDevice.cs index 2f452475160..02823c48d52 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationTargetedUserAndDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationTargetedUserAndDevice.cs @@ -139,7 +139,7 @@ public DeviceConfigurationTargetedUserAndDevice() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceConfigurationTargetedUserAndDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationTargetedUserAndDevice(); } /// @@ -165,7 +165,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceId", DeviceId); writer.WriteStringValue("deviceName", DeviceName); writer.WriteDateTimeOffsetValue("lastCheckinDateTime", LastCheckinDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserOverview.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserOverview.cs index a9ff16b7c9c..6dbd1b85e63 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserOverview.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserOverview.cs @@ -67,7 +67,7 @@ public int? SuccessCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserOverview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserOverview(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("configurationVersion", ConfigurationVersion); writer.WriteIntValue("conflictCount", ConflictCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserStateSummary.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserStateSummary.cs index 5fc0012117a..93a9c031c8f 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserStateSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserStateSummary.cs @@ -61,7 +61,7 @@ public int? UnknownUserCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserStateSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserStateSummary(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("compliantUserCount", CompliantUserCount); writer.WriteIntValue("conflictUserCount", ConflictUserCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserStatus.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserStatus.cs index d179228d3ad..78c75f8c4a5 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserStatus.cs @@ -69,7 +69,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserStatus(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("devicesCount", DevicesCount); writer.WriteDateTimeOffsetValue("lastReportedDateTime", LastReportedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserStatusCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserStatusCollectionResponse.cs index 8b80bcc4808..80fa52f9ed4 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserStatusCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceConfigurationUserStatusCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceConfigurationUserStatusCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserStatusCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceConfigurationUserStatusCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCustomAttributeShellScript.cs b/src/Microsoft.Graph/Generated/Models/DeviceCustomAttributeShellScript.cs index 788fa7af947..8b530d5022e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCustomAttributeShellScript.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCustomAttributeShellScript.cs @@ -220,7 +220,7 @@ public byte[] ScriptContent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCustomAttributeShellScript CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCustomAttributeShellScript(); } /// @@ -254,7 +254,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteStringValue("customAttributeName", CustomAttributeName); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCustomAttributeShellScriptCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceCustomAttributeShellScriptCollectionResponse.cs index 6b3f6611090..b81af4cff03 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCustomAttributeShellScriptCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCustomAttributeShellScriptCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceCustomAttributeShellScriptCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceCustomAttributeShellScriptCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceCustomAttributeShellScriptCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceDetail.cs b/src/Microsoft.Graph/Generated/Models/DeviceDetail.cs index 264a950c786..2ff494fac30 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceDetail.cs @@ -160,7 +160,7 @@ public DeviceDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceDetail(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("browser", Browser); writer.WriteStringValue("browserId", BrowserId); writer.WriteStringValue("deviceId", DeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentConfiguration.cs b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentConfiguration.cs index 79c31dfe867..c25cf8ec0f5 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentConfiguration.cs @@ -114,7 +114,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceEnrollmentConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentConfigurationCollectionResponse.cs index 9bbeaa93901..58b6cc74de3 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceEnrollmentConfigurationCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceEnrollmentConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceEnrollmentConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentLimitConfiguration.cs b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentLimitConfiguration.cs index 110d7abe006..2504a96eb8a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentLimitConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentLimitConfiguration.cs @@ -33,7 +33,7 @@ public DeviceEnrollmentLimitConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceEnrollmentLimitConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceEnrollmentLimitConfiguration(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("limit", Limit); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentNotificationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentNotificationConfiguration.cs index 4a700f841a3..c5036b20440 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentNotificationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentNotificationConfiguration.cs @@ -83,7 +83,7 @@ public DeviceEnrollmentNotificationConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceEnrollmentNotificationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceEnrollmentNotificationConfiguration(); } /// @@ -108,7 +108,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("brandingOptions", BrandingOptions); writer.WriteStringValue("defaultLocale", DefaultLocale); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentPlatformRestriction.cs b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentPlatformRestriction.cs index c50fd6aa510..722523c089c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentPlatformRestriction.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentPlatformRestriction.cs @@ -129,7 +129,7 @@ public DeviceEnrollmentPlatformRestriction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceEnrollmentPlatformRestriction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceEnrollmentPlatformRestriction(); } /// @@ -155,7 +155,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("blockedManufacturers", BlockedManufacturers); writer.WriteCollectionOfPrimitiveValues("blockedSkus", BlockedSkus); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentPlatformRestrictionConfiguration.cs b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentPlatformRestrictionConfiguration.cs index 4928f02cad3..a0ac31cf073 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentPlatformRestrictionConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentPlatformRestrictionConfiguration.cs @@ -49,7 +49,7 @@ public DeviceEnrollmentPlatformRestrictionConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceEnrollmentPlatformRestrictionConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceEnrollmentPlatformRestrictionConfiguration(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("platformRestriction", PlatformRestriction); writer.WriteEnumValue("platformType", PlatformType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentPlatformRestrictionsConfiguration.cs b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentPlatformRestrictionsConfiguration.cs index bfeade400ef..613c4bee417 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentPlatformRestrictionsConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentPlatformRestrictionsConfiguration.cs @@ -187,7 +187,7 @@ public DeviceEnrollmentPlatformRestrictionsConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceEnrollmentPlatformRestrictionsConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceEnrollmentPlatformRestrictionsConfiguration(); } /// @@ -216,7 +216,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("androidForWorkRestriction", AndroidForWorkRestriction); writer.WriteObjectValue("androidRestriction", AndroidRestriction); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentWindowsHelloForBusinessConfiguration.cs b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentWindowsHelloForBusinessConfiguration.cs index 77a0ead0541..c277673d322 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentWindowsHelloForBusinessConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceEnrollmentWindowsHelloForBusinessConfiguration.cs @@ -111,7 +111,7 @@ public DeviceEnrollmentWindowsHelloForBusinessConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceEnrollmentWindowsHelloForBusinessConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceEnrollmentWindowsHelloForBusinessConfiguration(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("enhancedBiometricsState", EnhancedBiometricsState); writer.WriteIntValue("enhancedSignInSecurity", EnhancedSignInSecurity); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceExchangeAccessStateSummary.cs b/src/Microsoft.Graph/Generated/Models/DeviceExchangeAccessStateSummary.cs index 9486ad6dcb3..385e81fdf04 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceExchangeAccessStateSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceExchangeAccessStateSummary.cs @@ -83,7 +83,7 @@ public DeviceExchangeAccessStateSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceExchangeAccessStateSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceExchangeAccessStateSummary(); } /// @@ -108,7 +108,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("allowedDeviceCount", AllowedDeviceCount); writer.WriteIntValue("blockedDeviceCount", BlockedDeviceCount); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceGeoLocation.cs b/src/Microsoft.Graph/Generated/Models/DeviceGeoLocation.cs index ed7d1aac502..803c40a0a1d 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceGeoLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceGeoLocation.cs @@ -101,7 +101,7 @@ public DeviceGeoLocation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceGeoLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceGeoLocation(); } /// @@ -129,7 +129,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDoubleValue("altitude", Altitude); writer.WriteDoubleValue("heading", Heading); writer.WriteDoubleValue("horizontalAccuracy", HorizontalAccuracy); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealth.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealth.cs index 5107b357593..6efd24a56af 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealth.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealth.cs @@ -58,7 +58,7 @@ public DeviceHealth() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceHealth CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealth(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastConnectionTime", LastConnectionTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthAttestationState.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthAttestationState.cs index dcad690f2bb..6bec5b2f5d9 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthAttestationState.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthAttestationState.cs @@ -570,7 +570,7 @@ public DeviceHealthAttestationState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceHealthAttestationState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthAttestationState(); } /// @@ -628,7 +628,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("attestationIdentityKey", AttestationIdentityKey); writer.WriteStringValue("bitLockerStatus", BitLockerStatus); writer.WriteStringValue("bootAppSecurityVersion", BootAppSecurityVersion); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScript.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScript.cs index d1fa644ef8a..25b571377ec 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScript.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScript.cs @@ -270,7 +270,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScript CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScript(); } /// @@ -309,7 +309,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptAssignment.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptAssignment.cs index 0b69f40ba39..32cb3b3d34a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptAssignment.cs @@ -58,7 +58,7 @@ public bool? RunRemediationScript /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptAssignment(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("runRemediationScript", RunRemediationScript); writer.WriteObjectValue("runSchedule", RunSchedule); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptAssignmentCollectionResponse.cs index 621269ef628..cfdb8bb058d 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceHealthScriptAssignmentCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptBooleanParameter.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptBooleanParameter.cs index 67867f3f864..594d27397ac 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptBooleanParameter.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptBooleanParameter.cs @@ -33,7 +33,7 @@ public DeviceHealthScriptBooleanParameter() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptBooleanParameter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptBooleanParameter(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("defaultValue", DefaultValue); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptCollectionResponse.cs index 64ccedd08c9..3f5810799c6 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceHealthScriptCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptDailySchedule.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptDailySchedule.cs index c5fa2de2e78..4e1a99c9a1c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptDailySchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptDailySchedule.cs @@ -27,7 +27,7 @@ public DeviceHealthScriptDailySchedule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptDailySchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptDailySchedule(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptDeviceState.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptDeviceState.cs index 21b48605867..4aae0a8aa7e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptDeviceState.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptDeviceState.cs @@ -162,7 +162,7 @@ public string RemediationScriptError /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptDeviceState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptDeviceState(); } /// @@ -193,7 +193,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("assignmentFilterIds", AssignmentFilterIds); writer.WriteEnumValue("detectionState", DetectionState); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptDeviceStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptDeviceStateCollectionResponse.cs index 7d0cf1dce66..563e6d64448 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptDeviceStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptDeviceStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceHealthScriptDeviceStateCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptDeviceStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptDeviceStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptHourlySchedule.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptHourlySchedule.cs index 72d72d11855..92f535ade7f 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptHourlySchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptHourlySchedule.cs @@ -27,7 +27,7 @@ public DeviceHealthScriptHourlySchedule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptHourlySchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptHourlySchedule(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptIntegerParameter.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptIntegerParameter.cs index 4202098cd2d..0cd09307cff 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptIntegerParameter.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptIntegerParameter.cs @@ -33,7 +33,7 @@ public DeviceHealthScriptIntegerParameter() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptIntegerParameter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptIntegerParameter(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("defaultValue", DefaultValue); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptParameter.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptParameter.cs index 1b3faf48b0c..df22828dc3a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptParameter.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptParameter.cs @@ -97,7 +97,7 @@ public DeviceHealthScriptParameter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceHealthScriptParameter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -128,7 +128,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("applyDefaultValueWhenNotAssigned", ApplyDefaultValueWhenNotAssigned); writer.WriteStringValue("description", Description); writer.WriteBoolValue("isRequired", IsRequired); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptPolicyState.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptPolicyState.cs index 20a8cefbf6f..563fd086800 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptPolicyState.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptPolicyState.cs @@ -291,7 +291,7 @@ public DeviceHealthScriptPolicyState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyState(); } /// @@ -329,7 +329,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("assignmentFilterIds", AssignmentFilterIds); writer.WriteEnumValue("detectionState", DetectionState); writer.WriteStringValue("deviceId", DeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptPolicyStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptPolicyStateCollectionResponse.cs index da6fa047b26..9394d5f71aa 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptPolicyStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptPolicyStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceHealthScriptPolicyStateCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptPolicyStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRemediationHistory.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRemediationHistory.cs index 1a2c654bea8..812ea2bae5a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRemediationHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRemediationHistory.cs @@ -75,7 +75,7 @@ public DeviceHealthScriptRemediationHistory() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceHealthScriptRemediationHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptRemediationHistory(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("historyData", HistoryData); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRemediationHistoryData.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRemediationHistoryData.cs index 1aaffbb5728..265c3cc36fb 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRemediationHistoryData.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRemediationHistoryData.cs @@ -78,7 +78,7 @@ public DeviceHealthScriptRemediationHistoryData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceHealthScriptRemediationHistoryData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptRemediationHistoryData(); } /// @@ -102,7 +102,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateValue("date", Date); writer.WriteIntValue("detectFailedDeviceCount", DetectFailedDeviceCount); writer.WriteIntValue("noIssueDeviceCount", NoIssueDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRemediationSummary.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRemediationSummary.cs index 59ffe0b35f9..07e3411ad70 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRemediationSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRemediationSummary.cs @@ -65,7 +65,7 @@ public DeviceHealthScriptRemediationSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceHealthScriptRemediationSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptRemediationSummary(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("remediatedDeviceCount", RemediatedDeviceCount); writer.WriteIntValue("scriptCount", ScriptCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRunOnceSchedule.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRunOnceSchedule.cs index 409a82d6318..17db8d88954 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRunOnceSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRunOnceSchedule.cs @@ -34,7 +34,7 @@ public DeviceHealthScriptRunOnceSchedule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptRunOnceSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptRunOnceSchedule(); } /// @@ -54,7 +54,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateValue("date", Date); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRunSchedule.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRunSchedule.cs index 98d199727bb..2c822936846 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRunSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRunSchedule.cs @@ -59,7 +59,7 @@ public DeviceHealthScriptRunSchedule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceHealthScriptRunSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -88,7 +88,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("interval", Interval); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRunSummary.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRunSummary.cs index 5fbf935dd2e..face046d369 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRunSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptRunSummary.cs @@ -86,7 +86,7 @@ public int? RemediationSkippedDeviceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptRunSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptRunSummary(); } /// @@ -116,7 +116,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("detectionScriptErrorDeviceCount", DetectionScriptErrorDeviceCount); writer.WriteIntValue("detectionScriptNotApplicableDeviceCount", DetectionScriptNotApplicableDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptStringParameter.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptStringParameter.cs index 905f9937ad8..cd22afc500e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptStringParameter.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptStringParameter.cs @@ -43,7 +43,7 @@ public DeviceHealthScriptStringParameter() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptStringParameter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptStringParameter(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("defaultValue", DefaultValue); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptTimeSchedule.cs b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptTimeSchedule.cs index 742df102e33..fcd17f5f3e0 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptTimeSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceHealthScriptTimeSchedule.cs @@ -40,7 +40,7 @@ public DeviceHealthScriptTimeSchedule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceHealthScriptTimeSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeValue("time", Time); writer.WriteBoolValue("useUtc", UseUtc); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceInstallState.cs b/src/Microsoft.Graph/Generated/Models/DeviceInstallState.cs index c6f4c423fc5..76c13ef441a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceInstallState.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceInstallState.cs @@ -128,7 +128,7 @@ public string UserName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceInstallState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceInstallState(); } /// @@ -155,7 +155,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceId", DeviceId); writer.WriteStringValue("deviceName", DeviceName); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceInstallStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceInstallStateCollectionResponse.cs index 0ef54e0a841..b349c1aa077 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceInstallStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceInstallStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceInstallStateCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceInstallStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceInstallStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceKey.cs b/src/Microsoft.Graph/Generated/Models/DeviceKey.cs index dc8b67e546a..3b322daab30 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceKey.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceKey.cs @@ -90,7 +90,7 @@ public DeviceKey() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceKey CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceKey(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteGuidValue("deviceId", DeviceId); writer.WriteByteArrayValue("keyMaterial", KeyMaterial); writer.WriteStringValue("keyType", KeyType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceLocalCredential.cs b/src/Microsoft.Graph/Generated/Models/DeviceLocalCredential.cs index 276d7ced19e..e5f79f8f1e8 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceLocalCredential.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceLocalCredential.cs @@ -73,7 +73,7 @@ public string PasswordBase64 /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceLocalCredential CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceLocalCredential(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("accountName", AccountName); writer.WriteStringValue("accountSid", AccountSid); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceLocalCredentialInfo.cs b/src/Microsoft.Graph/Generated/Models/DeviceLocalCredentialInfo.cs index 96497ebbff2..ed6047bf421 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceLocalCredentialInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceLocalCredentialInfo.cs @@ -63,7 +63,7 @@ public DateTimeOffset? RefreshDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceLocalCredentialInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceLocalCredentialInfo(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("credentials", Credentials); writer.WriteStringValue("deviceName", DeviceName); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceLocalCredentialInfoCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceLocalCredentialInfoCollectionResponse.cs index 85b08d9d41d..4b86c75282a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceLocalCredentialInfoCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceLocalCredentialInfoCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceLocalCredentialInfoCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceLocalCredentialInfoCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceLocalCredentialInfoCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionRequest.cs b/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionRequest.cs index 6e9878ef8c0..7af77f06141 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionRequest.cs @@ -75,7 +75,7 @@ public DeviceLogCollectionRequest() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceLogCollectionRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceLogCollectionRequest(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("templateType", TemplateType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionResponse.cs index b96c35f75ed..b6c7bb6a33e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionResponse.cs @@ -100,7 +100,7 @@ public double? SizeInKB /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponse(); } /// @@ -129,7 +129,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("enrolledByUser", EnrolledByUser); writer.WriteLongValue("errorCode", ErrorCode); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionResponseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionResponseCollectionResponse.cs index a81ad58e4a7..7dbab2eb4d3 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionResponseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceLogCollectionResponseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceLogCollectionResponseCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceLogCollectionResponseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertImpact.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertImpact.cs index 8c8cb4933e3..0c403fc0af2 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertImpact.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertImpact.cs @@ -80,7 +80,7 @@ public AlertImpact() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertImpact CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertImpact(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("aggregationType", AggregationType); writer.WriteCollectionOfObjectValues("alertImpactDetails", AlertImpactDetails); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRecord.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRecord.cs index a0f420175ba..c34742311ea 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRecord.cs @@ -103,7 +103,7 @@ public DateTimeOffset? ResolvedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRecord(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("alertImpact", AlertImpact); writer.WriteStringValue("alertRuleId", AlertRuleId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRecordCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRecordCollectionResponse.cs index 8431986683b..44e0ea98d70 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRecordCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRecordCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AlertRecordCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRecordCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRecordCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRule.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRule.cs index 926ee74c8ee..6656204ff20 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRule.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRule.cs @@ -123,7 +123,7 @@ public bool? IsSystemRule /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRule(); } /// @@ -151,7 +151,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("alertRuleTemplate", AlertRuleTemplate); writer.WriteCollectionOfObjectValues("conditions", Conditions); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRuleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRuleCollectionResponse.cs index 5b5e6041951..8cb6b30a1c3 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRuleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagement/AlertRuleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AlertRuleCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRuleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRuleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagement/DeviceManagement.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagement/DeviceManagement.cs index 52ce99825b0..1404df69df3 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagement/DeviceManagement.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagement/DeviceManagement.cs @@ -3001,7 +3001,7 @@ public bool? UnlicensedAdminstratorsEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagement.DeviceManagement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagement.DeviceManagement(); } /// @@ -3212,7 +3212,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("accountMoveCompletionDateTime", AccountMoveCompletionDateTime); writer.WriteObjectValue("adminConsent", AdminConsent); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagement/Monitoring.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagement/Monitoring.cs index 89719591b9d..c488811eceb 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagement/Monitoring.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagement/Monitoring.cs @@ -51,7 +51,7 @@ public partial class Monitoring : global::Microsoft.Graph.Beta.Models.Entity, IP /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagement.Monitoring CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagement.Monitoring(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("alertRecords", AlertRecords); writer.WriteCollectionOfObjectValues("alertRules", AlertRules); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagement/NotificationChannel.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagement/NotificationChannel.cs index 7cc316897e7..4e25c459018 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagement/NotificationChannel.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagement/NotificationChannel.cs @@ -74,7 +74,7 @@ public NotificationChannel() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagement.NotificationChannel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagement.NotificationChannel(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("notificationChannelType", NotificationChannelType); writer.WriteCollectionOfObjectValues("notificationReceivers", NotificationReceivers); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagement/NotificationReceiver.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagement/NotificationReceiver.cs index 3a19fba10b9..40e961e77eb 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagement/NotificationReceiver.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagement/NotificationReceiver.cs @@ -84,7 +84,7 @@ public NotificationReceiver() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagement.NotificationReceiver CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagement.NotificationReceiver(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("contactInformation", ContactInformation); writer.WriteStringValue("locale", Locale); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagement/PortalNotification.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagement/PortalNotification.cs index 0ca25660f4b..c1e5b503d79 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagement/PortalNotification.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagement/PortalNotification.cs @@ -150,7 +150,7 @@ public PortalNotification() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagement.PortalNotification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagement.PortalNotification(); } /// @@ -178,7 +178,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("alertImpact", AlertImpact); writer.WriteStringValue("alertRecordId", AlertRecordId); writer.WriteStringValue("alertRuleId", AlertRuleId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagement/RuleCondition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagement/RuleCondition.cs index a5f37ce0803..1683201ce02 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagement/RuleCondition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagement/RuleCondition.cs @@ -92,7 +92,7 @@ public RuleCondition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagement.RuleCondition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagement.RuleCondition(); } /// @@ -117,7 +117,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("aggregation", Aggregation); writer.WriteEnumValue("conditionCategory", ConditionCategory); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagement/RuleThreshold.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagement/RuleThreshold.cs index 6695c4b618e..8d225ff89ba 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagement/RuleThreshold.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagement/RuleThreshold.cs @@ -70,7 +70,7 @@ public RuleThreshold() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagement.RuleThreshold CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagement.RuleThreshold(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("aggregation", Aggregation); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("operator", Operator); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementAbstractComplexSettingDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementAbstractComplexSettingDefinition.cs index 6640fd2287e..f7463695e58 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementAbstractComplexSettingDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementAbstractComplexSettingDefinition.cs @@ -36,7 +36,7 @@ public List Implementations /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementAbstractComplexSettingDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementAbstractComplexSettingDefinition(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("implementations", Implementations); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementAbstractComplexSettingInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementAbstractComplexSettingInstance.cs index 5555e13ee4d..47d04a56d79 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementAbstractComplexSettingInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementAbstractComplexSettingInstance.cs @@ -59,7 +59,7 @@ public DeviceManagementAbstractComplexSettingInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementAbstractComplexSettingInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementAbstractComplexSettingInstance(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("implementationId", ImplementationId); writer.WriteCollectionOfObjectValues("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementApplicabilityRuleDeviceMode.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementApplicabilityRuleDeviceMode.cs index c30dad6ba08..9c7044ec613 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementApplicabilityRuleDeviceMode.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementApplicabilityRuleDeviceMode.cs @@ -80,7 +80,7 @@ public DeviceManagementApplicabilityRuleDeviceMode() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementApplicabilityRuleDeviceMode CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementApplicabilityRuleDeviceMode(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("deviceMode", DeviceMode); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementApplicabilityRuleOsEdition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementApplicabilityRuleOsEdition.cs index 7f4427d1e8c..1da2f6e28fd 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementApplicabilityRuleOsEdition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementApplicabilityRuleOsEdition.cs @@ -90,7 +90,7 @@ public DeviceManagementApplicabilityRuleOsEdition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementApplicabilityRuleOsEdition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementApplicabilityRuleOsEdition(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfEnumValues("osEditionTypes", OsEditionTypes); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementApplicabilityRuleOsVersion.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementApplicabilityRuleOsVersion.cs index 431c1e1d418..67c9becd7b2 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementApplicabilityRuleOsVersion.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementApplicabilityRuleOsVersion.cs @@ -106,7 +106,7 @@ public DeviceManagementApplicabilityRuleOsVersion() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementApplicabilityRuleOsVersion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementApplicabilityRuleOsVersion(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("maxOSVersion", MaxOSVersion); writer.WriteStringValue("minOSVersion", MinOSVersion); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementAutopilotEvent.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementAutopilotEvent.cs index 6adb4cd4968..5dac04b6743 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementAutopilotEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementAutopilotEvent.cs @@ -264,7 +264,7 @@ public string WindowsAutopilotDeploymentProfileDisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementAutopilotEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementAutopilotEvent(); } /// @@ -307,7 +307,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeSpanValue("accountSetupDuration", AccountSetupDuration); writer.WriteEnumValue("accountSetupStatus", AccountSetupStatus); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementAutopilotEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementAutopilotEventCollectionResponse.cs index 8f93baa99bb..aa39e47b7a1 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementAutopilotEventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementAutopilotEventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementAutopilotEventCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementAutopilotEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementAutopilotEventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementAutopilotPolicyStatusDetail.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementAutopilotPolicyStatusDetail.cs index 743b6b7501e..d0dda5318f5 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementAutopilotPolicyStatusDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementAutopilotPolicyStatusDetail.cs @@ -66,7 +66,7 @@ public bool? TrackedOnEnrollmentStatus /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementAutopilotPolicyStatusDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementAutopilotPolicyStatusDetail(); } /// @@ -91,7 +91,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("complianceStatus", ComplianceStatus); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementBooleanSettingInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementBooleanSettingInstance.cs index b4e3a36767b..701838229ec 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementBooleanSettingInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementBooleanSettingInstance.cs @@ -33,7 +33,7 @@ public DeviceManagementBooleanSettingInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementBooleanSettingInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementBooleanSettingInstance(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementCachedReportConfiguration.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementCachedReportConfiguration.cs index 302c3a99233..1070aac369b 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementCachedReportConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementCachedReportConfiguration.cs @@ -118,7 +118,7 @@ public List Select /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementCachedReportConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementCachedReportConfiguration(); } /// @@ -145,7 +145,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteStringValue("filter", Filter); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementCachedReportConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementCachedReportConfigurationCollectionResponse.cs index 6de760e39b2..3b9d412d7ae 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementCachedReportConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementCachedReportConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementCachedReportConfigurationCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementCachedReportConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementCachedReportConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementCollectionSettingDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementCollectionSettingDefinition.cs index 35a621a9e61..17ddacfb584 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementCollectionSettingDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementCollectionSettingDefinition.cs @@ -36,7 +36,7 @@ public string ElementDefinitionId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementCollectionSettingDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementCollectionSettingDefinition(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("elementDefinitionId", ElementDefinitionId); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementCollectionSettingInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementCollectionSettingInstance.cs index a73f17099c4..81ae90ec4aa 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementCollectionSettingInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementCollectionSettingInstance.cs @@ -43,7 +43,7 @@ public DeviceManagementCollectionSettingInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementCollectionSettingInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementCollectionSettingInstance(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementComplexSettingDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementComplexSettingDefinition.cs index 1eaf803b3ed..15c2684a0f4 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementComplexSettingDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementComplexSettingDefinition.cs @@ -36,7 +36,7 @@ public List PropertyDefinitionIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementComplexSettingDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementComplexSettingDefinition(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("propertyDefinitionIds", PropertyDefinitionIds); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementComplexSettingInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementComplexSettingInstance.cs index f15cc4fbcd8..6024022d345 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementComplexSettingInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementComplexSettingInstance.cs @@ -43,7 +43,7 @@ public DeviceManagementComplexSettingInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementComplexSettingInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementComplexSettingInstance(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceActionItem.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceActionItem.cs index 2fd0c9a6f67..1f4981e66f0 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceActionItem.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceActionItem.cs @@ -64,7 +64,7 @@ public string NotificationTemplateId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceActionItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceActionItem(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("actionType", ActionType); writer.WriteIntValue("gracePeriodHours", GracePeriodHours); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceActionItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceActionItemCollectionResponse.cs index f3a04f295de..01235b6a595 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceActionItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceActionItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementComplianceActionItemCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceActionItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceActionItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementCompliancePolicy.cs index 8388ff350be..60352230402 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementCompliancePolicy.cs @@ -168,7 +168,7 @@ public int? SettingCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementCompliancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementCompliancePolicy(); } /// @@ -200,7 +200,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteStringValue("creationSource", CreationSource); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementCompliancePolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementCompliancePolicyCollectionResponse.cs index ec754b5d978..224f5de2bee 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementCompliancePolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementCompliancePolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementCompliancePolicyCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementCompliancePolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementCompliancePolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceScheduledActionForRule.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceScheduledActionForRule.cs index 694cbd9c832..45be103b33f 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceScheduledActionForRule.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceScheduledActionForRule.cs @@ -52,7 +52,7 @@ public string RuleName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceScheduledActionForRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceScheduledActionForRule(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("ruleName", RuleName); writer.WriteCollectionOfObjectValues("scheduledActionConfigurations", ScheduledActionConfigurations); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceScheduledActionForRuleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceScheduledActionForRuleCollectionResponse.cs index 15f3e553ba7..f96c1f591fe 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceScheduledActionForRuleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementComplianceScheduledActionForRuleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementComplianceScheduledActionForRuleCollectionR /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceScheduledActionForRuleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementComplianceScheduledActionForRuleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationAndroidSettingApplicability.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationAndroidSettingApplicability.cs index 55a8257d4dc..6d029cdbf6e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationAndroidSettingApplicability.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationAndroidSettingApplicability.cs @@ -26,7 +26,7 @@ public DeviceManagementConfigurationAndroidSettingApplicability() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationAndroidSettingApplicability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationAndroidSettingApplicability(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationAppleOSSupportedVersions.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationAppleOSSupportedVersions.cs index c447d3109e7..366b4b93828 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationAppleOSSupportedVersions.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationAppleOSSupportedVersions.cs @@ -97,7 +97,7 @@ public DeviceManagementConfigurationAppleOSSupportedVersions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationAppleOSSupportedVersions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationAppleOSSupportedVersions(); } /// @@ -121,7 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("includesMaxVersion", IncludesMaxVersion); writer.WriteBoolValue("includesMinVersion", IncludesMinVersion); writer.WriteStringValue("maxVersion", MaxVersion); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationAppleSettingVersionApplicability.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationAppleSettingVersionApplicability.cs index 233ad20bde3..e4a80d9c8f3 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationAppleSettingVersionApplicability.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationAppleSettingVersionApplicability.cs @@ -81,7 +81,7 @@ public DeviceManagementConfigurationAppleSettingVersionApplicability() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationAppleSettingVersionApplicability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationAppleSettingVersionApplicability(); } /// @@ -104,7 +104,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("constraints", Constraints); writer.WriteEnumValue("deviceType", DeviceType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationApplicationSettingApplicability.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationApplicationSettingApplicability.cs index cbb49f8067c..3236f3db6cb 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationApplicationSettingApplicability.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationApplicationSettingApplicability.cs @@ -27,7 +27,7 @@ public DeviceManagementConfigurationApplicationSettingApplicability() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationApplicationSettingApplicability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationApplicationSettingApplicability(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationCategory.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationCategory.cs index 7eea68338a9..7f488a9882d 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationCategory.cs @@ -166,7 +166,7 @@ public string RootCategoryId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationCategory(); } /// @@ -196,7 +196,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("categoryDescription", CategoryDescription); writer.WriteCollectionOfPrimitiveValues("childCategoryIds", ChildCategoryIds); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationCategoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationCategoryCollectionResponse.cs index 5150dae7018..b57902a05ad 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationCategoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationCategoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementConfigurationCategoryCollectionResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationCategoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingCollectionDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingCollectionDefinition.cs index 5bf8a0af1cc..5757be5ee6b 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingCollectionDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingCollectionDefinition.cs @@ -31,7 +31,7 @@ public int? MinimumCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingCollectionDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingCollectionDefinition(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("maximumCount", MaximumCount); writer.WriteIntValue("minimumCount", MinimumCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingCollectionInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingCollectionInstance.cs index 2b839df4e62..d876ef59a3c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingCollectionInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingCollectionInstance.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationChoiceSettingCollectionInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingCollectionInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingCollectionInstance(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("choiceSettingCollectionValue", ChoiceSettingCollectionValue); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate.cs index 26e4bf67534..ea51296d1c9 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate.cs @@ -49,7 +49,7 @@ public DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate() : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowUnmanagedValues", AllowUnmanagedValues); writer.WriteCollectionOfObjectValues("choiceSettingCollectionValueTemplate", ChoiceSettingCollectionValueTemplate); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingDefinition.cs index f52f86e1480..ca7fe3fac01 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingDefinition.cs @@ -12,7 +12,7 @@ namespace Microsoft.Graph.Beta.Models public partial class DeviceManagementConfigurationChoiceSettingDefinition : global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition, IParsable #pragma warning restore CS1591 { - /// Default option for the choice setting. + /// Default option for choice setting #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DefaultOptionId @@ -28,7 +28,7 @@ public string DefaultOptionId set { BackingStore?.Set("defaultOptionId", value); } } #endif - /// Options for the setting that can be selected. + /// Options for the setting that can be selected #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? Options @@ -51,7 +51,7 @@ public string DefaultOptionId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("defaultOptionId", DefaultOptionId); writer.WriteCollectionOfObjectValues("options", Options); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingInstance.cs index e310c7681ca..d54d52f7481 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingInstance.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationChoiceSettingInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingInstance(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("choiceSettingValue", ChoiceSettingValue); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingInstanceTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingInstanceTemplate.cs index 46daf1313e7..fcc89d3e566 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingInstanceTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingInstanceTemplate.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationChoiceSettingInstanceTemplate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingInstanceTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingInstanceTemplate(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("choiceSettingValueTemplate", ChoiceSettingValueTemplate); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValue.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValue.cs index b9628705a40..d6f84eb81aa 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValue.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValue.cs @@ -59,7 +59,7 @@ public DeviceManagementConfigurationChoiceSettingValue() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingValue(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("children", Children); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate.cs index e616ddfd7a2..916212bbd69 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate.cs @@ -59,7 +59,7 @@ public DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("children", Children); writer.WriteStringValue("settingDefinitionOptionId", SettingDefinitionOptionId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueDefaultTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueDefaultTemplate.cs index 8e69996f859..ec6d6aa790a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueDefaultTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueDefaultTemplate.cs @@ -53,7 +53,7 @@ public DeviceManagementConfigurationChoiceSettingValueDefaultTemplate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingValueDefaultTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate.cs index 55d910f534d..f2312303fa5 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate.cs @@ -69,7 +69,7 @@ public DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("allowedOptions", AllowedOptions); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueTemplate.cs index b2f13eac68c..ef1cfccd925 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationChoiceSettingValueTemplate.cs @@ -117,7 +117,7 @@ public DeviceManagementConfigurationChoiceSettingValueTemplate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingValueTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationChoiceSettingValueTemplate(); } /// @@ -141,7 +141,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("defaultValue", DefaultValue); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("recommendedValueDefinition", RecommendedValueDefinition); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationDependentOn.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationDependentOn.cs index 89aba532de9..6c19d02bd20 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationDependentOn.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationDependentOn.cs @@ -84,7 +84,7 @@ public DeviceManagementConfigurationDependentOn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationDependentOn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationDependentOn(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("dependentOn", DependentOn); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("parentSettingId", ParentSettingId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationEdgeSettingApplicability.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationEdgeSettingApplicability.cs index e7f1ba2401b..66fb65502a0 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationEdgeSettingApplicability.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationEdgeSettingApplicability.cs @@ -27,7 +27,7 @@ public DeviceManagementConfigurationEdgeSettingApplicability() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationEdgeSettingApplicability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationEdgeSettingApplicability(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationExchangeOnlineSettingApplicability.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationExchangeOnlineSettingApplicability.cs index 99e3469f11f..7073c206d4f 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationExchangeOnlineSettingApplicability.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationExchangeOnlineSettingApplicability.cs @@ -27,7 +27,7 @@ public DeviceManagementConfigurationExchangeOnlineSettingApplicability() : base( /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationExchangeOnlineSettingApplicability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationExchangeOnlineSettingApplicability(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationFloatSettingValueDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationFloatSettingValueDefinition.cs index eed588b49d3..daf85cf108e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationFloatSettingValueDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationFloatSettingValueDefinition.cs @@ -38,7 +38,7 @@ public DeviceManagementConfigurationFloatSettingValueDefinition() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationFloatSettingValueDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationFloatSettingValueDefinition(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDoubleValue("maximumValue", MaximumValue); writer.WriteDoubleValue("minimumValue", MinimumValue); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingCollectionInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingCollectionInstance.cs index 595bcfeb238..663a017f02c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingCollectionInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingCollectionInstance.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationGroupSettingCollectionInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationGroupSettingCollectionInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationGroupSettingCollectionInstance(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("groupSettingCollectionValue", GroupSettingCollectionValue); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate.cs index 0b6784088df..ca644aa605a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate.cs @@ -49,7 +49,7 @@ public DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate() : b /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowUnmanagedValues", AllowUnmanagedValues); writer.WriteCollectionOfObjectValues("groupSettingCollectionValueTemplate", GroupSettingCollectionValueTemplate); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingInstance.cs index 5e9d17e7dd4..384883db528 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingInstance.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationGroupSettingInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationGroupSettingInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationGroupSettingInstance(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("groupSettingValue", GroupSettingValue); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingInstanceTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingInstanceTemplate.cs index dc0ac8ac57f..f35168b4e2c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingInstanceTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingInstanceTemplate.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationGroupSettingInstanceTemplate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationGroupSettingInstanceTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationGroupSettingInstanceTemplate(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("groupSettingValueTemplate", GroupSettingValueTemplate); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingValue.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingValue.cs index 3403e6b3d3c..f8ae9aa77d9 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingValue.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingValue.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationGroupSettingValue() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationGroupSettingValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationGroupSettingValue(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("children", Children); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingValueTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingValueTemplate.cs index ef50123df52..eb301aa25fe 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingValueTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationGroupSettingValueTemplate.cs @@ -85,7 +85,7 @@ public DeviceManagementConfigurationGroupSettingValueTemplate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationGroupSettingValueTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationGroupSettingValueTemplate(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("children", Children); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("settingValueTemplateId", SettingValueTemplateId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValue.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValue.cs index 9360d6a9e67..b85d7ad76e1 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValue.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValue.cs @@ -33,7 +33,7 @@ public DeviceManagementConfigurationIntegerSettingValue() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationIntegerSettingValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationIntegerSettingValue(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate.cs index c42af194a1d..3602487f2e6 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate.cs @@ -33,7 +33,7 @@ public DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("constantValue", ConstantValue); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueDefaultTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueDefaultTemplate.cs index 62d0ef971ed..a506bc07c98 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueDefaultTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueDefaultTemplate.cs @@ -53,7 +53,7 @@ public DeviceManagementConfigurationIntegerSettingValueDefaultTemplate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationIntegerSettingValueDefaultTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueDefinition.cs index 470b0c908e9..de5079b99ab 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueDefinition.cs @@ -38,7 +38,7 @@ public DeviceManagementConfigurationIntegerSettingValueDefinition() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationIntegerSettingValueDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationIntegerSettingValueDefinition(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("maximumValue", MaximumValue); writer.WriteLongValue("minimumValue", MinimumValue); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate.cs index 921bbca2a2d..38f3f5cd690 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate.cs @@ -65,7 +65,7 @@ public DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("maxValue", MaxValue); writer.WriteIntValue("minValue", MinValue); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueTemplate.cs index 2d6a708415f..43a16c0702e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIntegerSettingValueTemplate.cs @@ -75,7 +75,7 @@ public DeviceManagementConfigurationIntegerSettingValueTemplate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationIntegerSettingValueTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationIntegerSettingValueTemplate(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("defaultValue", DefaultValue); writer.WriteObjectValue("recommendedValueDefinition", RecommendedValueDefinition); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIosSettingApplicability.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIosSettingApplicability.cs index f5f8465e0bc..bc27ca11c11 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIosSettingApplicability.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationIosSettingApplicability.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationIosSettingApplicability() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationIosSettingApplicability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationIosSettingApplicability(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("versionApplicabilities", VersionApplicabilities); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationLinuxSettingApplicability.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationLinuxSettingApplicability.cs index 8692b7fb22d..0562ac6d866 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationLinuxSettingApplicability.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationLinuxSettingApplicability.cs @@ -27,7 +27,7 @@ public DeviceManagementConfigurationLinuxSettingApplicability() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationLinuxSettingApplicability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationLinuxSettingApplicability(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationOptionDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationOptionDefinition.cs index 12d8847d7c5..73b74f3852c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationOptionDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationOptionDefinition.cs @@ -180,7 +180,7 @@ public DeviceManagementConfigurationOptionDefinition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationOptionDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationOptionDefinition(); } /// @@ -208,7 +208,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("dependedOnBy", DependedOnBy); writer.WriteCollectionOfObjectValues("dependentOn", DependentOn); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationOptionDefinitionTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationOptionDefinitionTemplate.cs index fd0b9364bab..bd963394873 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationOptionDefinitionTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationOptionDefinitionTemplate.cs @@ -85,7 +85,7 @@ public DeviceManagementConfigurationOptionDefinitionTemplate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationOptionDefinitionTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationOptionDefinitionTemplate(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("children", Children); writer.WriteStringValue("itemId", ItemId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicy.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicy.cs index ade02005e3c..efe7ad79d00 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicy.cs @@ -184,7 +184,7 @@ public int? SettingCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicy(); } /// @@ -217,7 +217,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyAssignment.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyAssignment.cs index 20e89c6ead8..2e5d0a18bdc 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyAssignment.cs @@ -58,7 +58,7 @@ public string SourceId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignment(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("source", Source); writer.WriteStringValue("sourceId", SourceId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyAssignmentCollectionResponse.cs index f332e3fc948..833a2a8aeee 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementConfigurationPolicyAssignmentCollectionResp /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyCollectionResponse.cs index 6a5b0b5ae05..bfe0fa7f467 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementConfigurationPolicyCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyPolicySetItem.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyPolicySetItem.cs index 4649ad2156f..0dd3f119cac 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyPolicySetItem.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyPolicySetItem.cs @@ -27,7 +27,7 @@ public DeviceManagementConfigurationPolicyPolicySetItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyPolicySetItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyPolicySetItem(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyTemplate.cs index 8e8e4afbc0a..47f5642d18a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyTemplate.cs @@ -142,7 +142,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyTemplate(); } /// @@ -173,7 +173,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowUnmanagedSettings", AllowUnmanagedSettings); writer.WriteStringValue("baseId", BaseId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyTemplateCollectionResponse.cs index 696965afc8b..42aa20c249a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementConfigurationPolicyTemplateCollectionRespon /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyTemplateReference.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyTemplateReference.cs index e50449c37f8..de95625f4d2 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyTemplateReference.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationPolicyTemplateReference.cs @@ -107,7 +107,7 @@ public DeviceManagementConfigurationPolicyTemplateReference() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyTemplateReference CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationPolicyTemplateReference(); } /// @@ -131,7 +131,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("templateFamily", TemplateFamily); writer.WriteStringValue("templateId", TemplateId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationRedirectSettingDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationRedirectSettingDefinition.cs index bd5e6f0cec2..a6a2bb81cc6 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationRedirectSettingDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationRedirectSettingDefinition.cs @@ -67,7 +67,7 @@ public string RedirectReason /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationRedirectSettingDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationRedirectSettingDefinition(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deepLink", DeepLink); writer.WriteStringValue("redirectMessage", RedirectMessage); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationReferenceSettingValue.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationReferenceSettingValue.cs index b1778dbb482..06531f11dcc 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationReferenceSettingValue.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationReferenceSettingValue.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationReferenceSettingValue() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationReferenceSettingValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationReferenceSettingValue(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("note", Note); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationReferredSettingInformation.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationReferredSettingInformation.cs index 3dfc5abe6dc..80a44fa67b0 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationReferredSettingInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationReferredSettingInformation.cs @@ -69,7 +69,7 @@ public DeviceManagementConfigurationReferredSettingInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationReferredSettingInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationReferredSettingInformation(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("settingDefinitionId", SettingDefinitionId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSecretSettingValue.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSecretSettingValue.cs index 7f6177f5359..50135dd5857 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSecretSettingValue.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSecretSettingValue.cs @@ -49,7 +49,7 @@ public DeviceManagementConfigurationSecretSettingValue() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSecretSettingValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSecretSettingValue(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); writer.WriteEnumValue("valueState", ValueState); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSetting.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSetting.cs index bff708ee3b6..a1e01429bdd 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSetting.cs @@ -52,7 +52,7 @@ public partial class DeviceManagementConfigurationSetting : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSetting(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("settingDefinitions", SettingDefinitions); writer.WriteObjectValue("settingInstance", SettingInstance); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingApplicability.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingApplicability.cs index 526f2b7cd6e..4e6776055d0 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingApplicability.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingApplicability.cs @@ -86,7 +86,7 @@ public DeviceManagementConfigurationSettingApplicability() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingApplicability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -121,7 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteEnumValue("deviceMode", DeviceMode); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingCollectionResponse.cs index b79d572dbf7..b94f0f0ed97 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementConfigurationSettingCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingDefinition.cs index efa41520880..4d28f8ff00d 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingDefinition.cs @@ -18,7 +18,7 @@ public partial class DeviceManagementConfigurationSettingDefinition : global::Mi get { return BackingStore?.Get("accessTypes"); } set { BackingStore?.Set("accessTypes", value); } } - /// Details which device setting is applicable on + /// Details which device setting is applicable on. Supports: $filters. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingApplicability? Applicability @@ -50,7 +50,7 @@ public string BaseUri set { BackingStore?.Set("baseUri", value); } } #endif - /// Specifies the area group under which the setting is configured in a specified configuration service provider (CSP) + /// Specify category in which the setting is under. Support $filters. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? CategoryId @@ -66,7 +66,7 @@ public string CategoryId set { BackingStore?.Set("categoryId", value); } } #endif - /// Description of the item + /// Description of the setting. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Description @@ -82,7 +82,7 @@ public string Description set { BackingStore?.Set("description", value); } } #endif - /// Display name of the item + /// Name of the setting. For example: Allow Toast. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DisplayName @@ -98,7 +98,7 @@ public string DisplayName set { BackingStore?.Set("displayName", value); } } #endif - /// Help text of the item + /// Help text of the setting. Give more details of the setting. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? HelpText @@ -114,7 +114,7 @@ public string HelpText set { BackingStore?.Set("helpText", value); } } #endif - /// List of links more info for the setting can be found at + /// List of links more info for the setting can be found at. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? InfoUrls @@ -216,7 +216,7 @@ public string OffsetUri get { return BackingStore?.Get("riskLevel"); } set { BackingStore?.Set("riskLevel", value); } } - /// Root setting definition if the setting is a child setting. + /// Root setting definition id if the setting is a child setting. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? RootDefinitionId @@ -273,7 +273,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -322,7 +322,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessTypes", AccessTypes); writer.WriteObjectValue("applicability", Applicability); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingDefinitionCollectionResponse.cs index a98ab982a81..18f227d28e2 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementConfigurationSettingDefinitionCollectionRes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingDependedOnBy.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingDependedOnBy.cs index 887fbf36ac3..c2b1deee5a4 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingDependedOnBy.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingDependedOnBy.cs @@ -74,7 +74,7 @@ public DeviceManagementConfigurationSettingDependedOnBy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDependedOnBy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDependedOnBy(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("dependedOnBy", DependedOnBy); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("required", Required); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupCollectionDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupCollectionDefinition.cs index d75785746ab..5cad72866f1 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupCollectionDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupCollectionDefinition.cs @@ -31,7 +31,7 @@ public int? MinimumCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingGroupCollectionDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingGroupCollectionDefinition(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("maximumCount", MaximumCount); writer.WriteIntValue("minimumCount", MinimumCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupCollectionInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupCollectionInstance.cs index a06df248df2..ada599f6efc 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupCollectionInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupCollectionInstance.cs @@ -27,7 +27,7 @@ public DeviceManagementConfigurationSettingGroupCollectionInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingGroupCollectionInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingGroupCollectionInstance(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupDefinition.cs index 9fb765632b3..a31a2addc28 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupDefinition.cs @@ -12,7 +12,7 @@ namespace Microsoft.Graph.Beta.Models public partial class DeviceManagementConfigurationSettingGroupDefinition : global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition, IParsable #pragma warning restore CS1591 { - /// Dependent child settings to this group of settings + /// Dependent child settings to this group of settings. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? ChildIds @@ -67,7 +67,7 @@ public List ChildIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingGroupDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("childIds", ChildIds); writer.WriteCollectionOfObjectValues("dependedOnBy", DependedOnBy); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupInstance.cs index e7cff79bd60..9f1f7500a99 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingGroupInstance.cs @@ -27,7 +27,7 @@ public DeviceManagementConfigurationSettingGroupInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingGroupInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingGroupInstance(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingInstance.cs index b9f8f2268c9..5d799b3743f 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingInstance.cs @@ -85,7 +85,7 @@ public DeviceManagementConfigurationSettingInstance() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -119,7 +119,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("settingDefinitionId", SettingDefinitionId); writer.WriteObjectValue("settingInstanceTemplateReference", SettingInstanceTemplateReference); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingInstanceTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingInstanceTemplate.cs index 0ae610a9be0..b17038e30c9 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingInstanceTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingInstanceTemplate.cs @@ -91,7 +91,7 @@ public DeviceManagementConfigurationSettingInstanceTemplate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingInstanceTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isRequired", IsRequired); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("settingDefinitionId", SettingDefinitionId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingInstanceTemplateReference.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingInstanceTemplateReference.cs index fd6297b0e65..0a60b73036e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingInstanceTemplateReference.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingInstanceTemplateReference.cs @@ -69,7 +69,7 @@ public DeviceManagementConfigurationSettingInstanceTemplateReference() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingInstanceTemplateReference CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingInstanceTemplateReference(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("settingInstanceTemplateId", SettingInstanceTemplateId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingOccurrence.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingOccurrence.cs index 548bc04badf..ffc11a0531b 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingOccurrence.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingOccurrence.cs @@ -64,7 +64,7 @@ public DeviceManagementConfigurationSettingOccurrence() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingOccurrence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingOccurrence(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("maxDeviceOccurrence", MaxDeviceOccurrence); writer.WriteIntValue("minDeviceOccurrence", MinDeviceOccurrence); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingTemplate.cs index fea26a4226b..f24c0154587 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingTemplate.cs @@ -52,7 +52,7 @@ public partial class DeviceManagementConfigurationSettingTemplate : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingTemplate(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("settingDefinitions", SettingDefinitions); writer.WriteObjectValue("settingInstanceTemplate", SettingInstanceTemplate); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingTemplateCollectionResponse.cs index 87c84b7cb4c..5c48c7a08bc 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementConfigurationSettingTemplateCollectionRespo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingValue.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingValue.cs index 7481f8f3966..e634b7a94ab 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingValue.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingValue.cs @@ -69,7 +69,7 @@ public DeviceManagementConfigurationSettingValue() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -101,7 +101,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("settingValueTemplateReference", SettingValueTemplateReference); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingValueDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingValueDefinition.cs index 683fc5e5559..db37fef951e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingValueDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingValueDefinition.cs @@ -52,7 +52,7 @@ public DeviceManagementConfigurationSettingValueDefinition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingValueDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingValueTemplateReference.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingValueTemplateReference.cs index 8c977ca1bae..2c374cf1307 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingValueTemplateReference.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSettingValueTemplateReference.cs @@ -75,7 +75,7 @@ public DeviceManagementConfigurationSettingValueTemplateReference() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingValueTemplateReference CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingValueTemplateReference(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("settingValueTemplateId", SettingValueTemplateId); writer.WriteBoolValue("useTemplateDefault", UseTemplateDefault); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionDefinition.cs index 1475e256b38..e4a8fc09e4b 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionDefinition.cs @@ -12,13 +12,13 @@ namespace Microsoft.Graph.Beta.Models public partial class DeviceManagementConfigurationSimpleSettingCollectionDefinition : global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSimpleSettingDefinition, IParsable #pragma warning restore CS1591 { - /// Maximum number of simple settings in the collection + /// Maximum number of simple settings in the collection. Valid values 1 to 100 public int? MaximumCount { get { return BackingStore?.Get("maximumCount"); } set { BackingStore?.Set("maximumCount", value); } } - /// Minimum number of simple settings in the collection + /// Minimum number of simple settings in the collection. Valid values 1 to 100 public int? MinimumCount { get { return BackingStore?.Get("minimumCount"); } @@ -31,7 +31,7 @@ public int? MinimumCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSimpleSettingCollectionDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSimpleSettingCollectionDefinition(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("maximumCount", MaximumCount); writer.WriteIntValue("minimumCount", MinimumCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionInstance.cs index 35adb1ad1a0..42c0b8bae60 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionInstance.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationSimpleSettingCollectionInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSimpleSettingCollectionInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSimpleSettingCollectionInstance(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("simpleSettingCollectionValue", SimpleSettingCollectionValue); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate.cs index 422142068ef..59c45dc3ae4 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate.cs @@ -49,7 +49,7 @@ public DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate() : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowUnmanagedValues", AllowUnmanagedValues); writer.WriteCollectionOfObjectValues("simpleSettingCollectionValueTemplate", SimpleSettingCollectionValueTemplate); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingDefinition.cs index 9edac36a142..448bb539aa1 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingDefinition.cs @@ -12,7 +12,7 @@ namespace Microsoft.Graph.Beta.Models public partial class DeviceManagementConfigurationSimpleSettingDefinition : global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingDefinition, IParsable #pragma warning restore CS1591 { - /// Default setting value for this setting. + /// Default setting value for this setting #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingValue? DefaultValue @@ -28,7 +28,7 @@ public partial class DeviceManagementConfigurationSimpleSettingDefinition : glob set { BackingStore?.Set("defaultValue", value); } } #endif - /// list of child settings that depend on this setting. + /// list of child settings that depend on this setting #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? DependedOnBy @@ -44,7 +44,7 @@ public partial class DeviceManagementConfigurationSimpleSettingDefinition : glob set { BackingStore?.Set("dependedOnBy", value); } } #endif - /// list of parent settings this setting is dependent on. + /// list of parent settings this setting is dependent on #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? DependentOn @@ -60,7 +60,7 @@ public partial class DeviceManagementConfigurationSimpleSettingDefinition : glob set { BackingStore?.Set("dependentOn", value); } } #endif - /// Definition of the value for this setting. + /// Definition of the value for this setting #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSettingValueDefinition? ValueDefinition @@ -83,7 +83,7 @@ public partial class DeviceManagementConfigurationSimpleSettingDefinition : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSimpleSettingDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -111,7 +111,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("defaultValue", DefaultValue); writer.WriteCollectionOfObjectValues("dependedOnBy", DependedOnBy); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingInstance.cs index 32ae79c8715..dac2a5a93ed 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingInstance.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationSimpleSettingInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSimpleSettingInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSimpleSettingInstance(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("simpleSettingValue", SimpleSettingValue); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingInstanceTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingInstanceTemplate.cs index 2b0cfc716e7..78ea0f687da 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingInstanceTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingInstanceTemplate.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationSimpleSettingInstanceTemplate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSimpleSettingInstanceTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSimpleSettingInstanceTemplate(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("simpleSettingValueTemplate", SimpleSettingValueTemplate); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingValue.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingValue.cs index e717c31047d..6219ab33d6b 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingValue.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingValue.cs @@ -27,7 +27,7 @@ public DeviceManagementConfigurationSimpleSettingValue() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSimpleSettingValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -54,7 +54,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingValueTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingValueTemplate.cs index 6896007c7a3..ea0b8a7f0a1 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingValueTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationSimpleSettingValueTemplate.cs @@ -69,7 +69,7 @@ public DeviceManagementConfigurationSimpleSettingValueTemplate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationSimpleSettingValueTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("settingValueTemplateId", SettingValueTemplateId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValue.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValue.cs index e48f0e9f09f..9c6b18831fd 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValue.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValue.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationStringSettingValue() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationStringSettingValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -68,7 +68,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate.cs index 68c239d685c..df9c30c2a0a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("constantValue", ConstantValue); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueDefaultTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueDefaultTemplate.cs index 7815e4cd265..ad2aab76133 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueDefaultTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueDefaultTemplate.cs @@ -53,7 +53,7 @@ public DeviceManagementConfigurationStringSettingValueDefaultTemplate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationStringSettingValueDefaultTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueDefinition.cs index f1f5e5a2ba6..68f64c2c089 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueDefinition.cs @@ -29,7 +29,7 @@ public List FileTypes set { BackingStore?.Set("fileTypes", value); } } #endif - /// Pre-defined format of the string. Possible values are: none, email, guid, ip, base64, url, version, xml, date, time, binary, regEx, json, dateTime, surfaceHub, bashScript, unknownFutureValue. + /// Pre-defined format of the string. Possible values are: none, email, guid, ip, base64, url, version, xml, date, time, binary, regEx, json, dateTime, surfaceHub. public global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationStringFormat? Format { get { return BackingStore?.Get("format"); } @@ -57,13 +57,13 @@ public bool? IsSecret get { return BackingStore?.Get("isSecret"); } set { BackingStore?.Set("isSecret", value); } } - /// Maximum length of string. Valid values 0 to 87516 + /// Maximum length of string public long? MaximumLength { get { return BackingStore?.Get("maximumLength"); } set { BackingStore?.Set("maximumLength", value); } } - /// Minimum length of string. Valid values 0 to 87516 + /// Minimum length of string public long? MinimumLength { get { return BackingStore?.Get("minimumLength"); } @@ -83,7 +83,7 @@ public DeviceManagementConfigurationStringSettingValueDefinition() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationStringSettingValueDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationStringSettingValueDefinition(); } /// @@ -108,7 +108,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("fileTypes", FileTypes); writer.WriteEnumValue("format", Format); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueTemplate.cs index 82ffae4b993..03db76b584f 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationStringSettingValueTemplate.cs @@ -43,7 +43,7 @@ public DeviceManagementConfigurationStringSettingValueTemplate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationStringSettingValueTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationStringSettingValueTemplate(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("defaultValue", DefaultValue); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationWindowsSettingApplicability.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationWindowsSettingApplicability.cs index e882cd0f17f..82ae1a256d9 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationWindowsSettingApplicability.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConfigurationWindowsSettingApplicability.cs @@ -102,7 +102,7 @@ public DeviceManagementConfigurationWindowsSettingApplicability() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationWindowsSettingApplicability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementConfigurationWindowsSettingApplicability(); } /// @@ -127,7 +127,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("configurationServiceProviderVersion", ConfigurationServiceProviderVersion); writer.WriteStringValue("maximumSupportedVersion", MaximumSupportedVersion); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementConstraint.cs index 0c745770efa..9ba9d25f0b0 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementConstraint.cs @@ -53,7 +53,7 @@ public DeviceManagementConstraint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -92,7 +92,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementDerivedCredentialSettings.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementDerivedCredentialSettings.cs index ec0b098f449..901b7256c25 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementDerivedCredentialSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementDerivedCredentialSettings.cs @@ -70,7 +70,7 @@ public int? RenewalThresholdPercentage /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementDerivedCredentialSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementDerivedCredentialSettings(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("helpUrl", HelpUrl); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementDerivedCredentialSettingsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementDerivedCredentialSettingsCollectionResponse.cs index 2ab3ba097da..9228a9e3d51 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementDerivedCredentialSettingsCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementDerivedCredentialSettingsCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementDerivedCredentialSettingsCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementDerivedCredentialSettingsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementDerivedCredentialSettingsCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementDomainJoinConnector.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementDomainJoinConnector.cs index 132e72372e6..2ba840ab14c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementDomainJoinConnector.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementDomainJoinConnector.cs @@ -64,7 +64,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementDomainJoinConnector CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementDomainJoinConnector(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("lastConnectionDateTime", LastConnectionDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementDomainJoinConnectorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementDomainJoinConnectorCollectionResponse.cs index 8ed1032f8b8..b3916e81ed3 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementDomainJoinConnectorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementDomainJoinConnectorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementDomainJoinConnectorCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementDomainJoinConnectorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementDomainJoinConnectorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementEnumConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementEnumConstraint.cs index 8441150fed6..f12e4654870 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementEnumConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementEnumConstraint.cs @@ -43,7 +43,7 @@ public DeviceManagementEnumConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementEnumConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementEnumConstraint(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("values", Values); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementEnumValue.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementEnumValue.cs index 221ad2a7d23..87d8045d2e0 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementEnumValue.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementEnumValue.cs @@ -85,7 +85,7 @@ public DeviceManagementEnumValue() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementEnumValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementEnumValue(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeAccessRule.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeAccessRule.cs index 3372cce4f9c..0c27b996b6a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeAccessRule.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeAccessRule.cs @@ -75,7 +75,7 @@ public DeviceManagementExchangeAccessRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeAccessRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeAccessRule(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("accessLevel", AccessLevel); writer.WriteObjectValue("deviceClass", DeviceClass); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeConnector.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeConnector.cs index 004626d7a98..d5cb1ec980a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeConnector.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeConnector.cs @@ -134,7 +134,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeConnector CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeConnector(); } /// @@ -162,7 +162,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("connectorServerName", ConnectorServerName); writer.WriteStringValue("exchangeAlias", ExchangeAlias); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeConnectorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeConnectorCollectionResponse.cs index e3d9fbead19..c7235d577b1 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeConnectorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeConnectorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementExchangeConnectorCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeConnectorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeConnectorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeDeviceClass.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeDeviceClass.cs index e1fb12db729..4d6034faef1 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeDeviceClass.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeDeviceClass.cs @@ -75,7 +75,7 @@ public DeviceManagementExchangeDeviceClass() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeDeviceClass CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeDeviceClass(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeOnPremisesPolicy.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeOnPremisesPolicy.cs index 63fd1c6ab88..826ea264e38 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeOnPremisesPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeOnPremisesPolicy.cs @@ -90,7 +90,7 @@ public byte[] NotificationContent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeOnPremisesPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeOnPremisesPolicy(); } /// @@ -114,7 +114,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("accessRules", AccessRules); writer.WriteObjectValue("conditionalAccessSettings", ConditionalAccessSettings); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeOnPremisesPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeOnPremisesPolicyCollectionResponse.cs index 1f053e7410f..de85a0511cc 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeOnPremisesPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementExchangeOnPremisesPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementExchangeOnPremisesPolicyCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeOnPremisesPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementExchangeOnPremisesPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementExportJob.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementExportJob.cs index 8279d150c3b..91332df9ea3 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementExportJob.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementExportJob.cs @@ -146,7 +146,7 @@ public string Url /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementExportJob CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementExportJob(); } /// @@ -176,7 +176,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteStringValue("filter", Filter); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementExportJobCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementExportJobCollectionResponse.cs index ffaceceee5d..a505df44974 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementExportJobCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementExportJobCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementExportJobCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementExportJobCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementExportJobCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntegerSettingInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntegerSettingInstance.cs index 5e881fedfb0..b8db562ad76 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntegerSettingInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntegerSettingInstance.cs @@ -33,7 +33,7 @@ public DeviceManagementIntegerSettingInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntegerSettingInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntegerSettingInstance(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntent.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntent.cs index 2a00903ef66..40b7731da59 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntent.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntent.cs @@ -230,7 +230,7 @@ public string TemplateId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntent(); } /// @@ -264,7 +264,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteCollectionOfObjectValues("categories", Categories); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentAssignment.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentAssignment.cs index 8103fbd37e8..65ab552a5be 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentAssignment.cs @@ -36,7 +36,7 @@ public partial class DeviceManagementIntentAssignment : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentAssignmentCollectionResponse.cs index 9b7cde306ea..46b6fdb3708 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementIntentAssignmentCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentCollectionResponse.cs index 73141f08aea..4db2ed9b75b 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementIntentCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentCustomizedSetting.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentCustomizedSetting.cs index 948f6f305cf..c2ab41e8664 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentCustomizedSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentCustomizedSetting.cs @@ -101,7 +101,7 @@ public DeviceManagementIntentCustomizedSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementIntentCustomizedSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentCustomizedSetting(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("customizedJson", CustomizedJson); writer.WriteStringValue("defaultJson", DefaultJson); writer.WriteStringValue("definitionId", DefinitionId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceSettingStateSummary.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceSettingStateSummary.cs index 0a168166867..76979087b92 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceSettingStateSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceSettingStateSummary.cs @@ -72,7 +72,7 @@ public string SettingName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceSettingStateSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceSettingStateSummary(); } /// @@ -98,7 +98,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("compliantCount", CompliantCount); writer.WriteIntValue("conflictCount", ConflictCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse.cs index bc0c98b2a69..8f19d0cfb13 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementIntentDeviceSettingStateSummaryCollectionRe /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceState.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceState.cs index fb21decf58c..781bf71932c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceState.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceState.cs @@ -96,7 +96,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceState(); } /// @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceDisplayName", DeviceDisplayName); writer.WriteStringValue("deviceId", DeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceStateCollectionResponse.cs index 2e1afce9748..fd4b3ea85df 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementIntentDeviceStateCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceStateSummary.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceStateSummary.cs index 2a684df25a1..13a4a84083d 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceStateSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentDeviceStateSummary.cs @@ -56,7 +56,7 @@ public int? SuccessCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceStateSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentDeviceStateSummary(); } /// @@ -81,7 +81,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("conflictCount", ConflictCount); writer.WriteIntValue("errorCount", ErrorCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentSettingCategory.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentSettingCategory.cs index 2b775dec913..21098e7993a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentSettingCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentSettingCategory.cs @@ -36,7 +36,7 @@ public partial class DeviceManagementIntentSettingCategory : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentSettingCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentSettingCategory(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("settings", Settings); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentSettingCategoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentSettingCategoryCollectionResponse.cs index 9d3a21d6ea0..da3a03e0794 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentSettingCategoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentSettingCategoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementIntentSettingCategoryCollectionResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentSettingCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentSettingCategoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentSettingSecretConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentSettingSecretConstraint.cs index e67e55fd887..ff9f914a233 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentSettingSecretConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentSettingSecretConstraint.cs @@ -27,7 +27,7 @@ public DeviceManagementIntentSettingSecretConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentSettingSecretConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentSettingSecretConstraint(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentUserState.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentUserState.cs index f3ebb1a321a..a47c84b6337 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentUserState.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentUserState.cs @@ -70,7 +70,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentUserState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentUserState(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("deviceCount", DeviceCount); writer.WriteDateTimeOffsetValue("lastReportedDateTime", LastReportedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentUserStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentUserStateCollectionResponse.cs index ea3d69c2b86..d5c7566ff85 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentUserStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentUserStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementIntentUserStateCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentUserStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentUserStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentUserStateSummary.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentUserStateSummary.cs index b244b4aa74c..58f14f26e99 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentUserStateSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementIntentUserStateSummary.cs @@ -50,7 +50,7 @@ public int? SuccessCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentUserStateSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementIntentUserStateSummary(); } /// @@ -74,7 +74,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("conflictCount", ConflictCount); writer.WriteIntValue("errorCount", ErrorCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementPartner.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementPartner.cs index b066b2d8548..42976c72281 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementPartner.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementPartner.cs @@ -104,7 +104,7 @@ public DateTimeOffset? WhenPartnerDevicesWillBeRemovedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementPartner CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementPartner(); } /// @@ -132,7 +132,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfObjectValues("groupsRequiringPartnerEnrollment", GroupsRequiringPartnerEnrollment); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementPartnerAssignment.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementPartnerAssignment.cs index 4238bd7b5d6..6ff7f5065d8 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementPartnerAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementPartnerAssignment.cs @@ -69,7 +69,7 @@ public DeviceManagementPartnerAssignment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementPartnerAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementPartnerAssignment(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("target", Target); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementPartnerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementPartnerCollectionResponse.cs index c40ad480b04..8eb8d9b6f27 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementPartnerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementPartnerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementPartnerCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementPartnerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementPartnerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementPriorityMetaData.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementPriorityMetaData.cs index 787e7c67b6a..fa1d729f195 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementPriorityMetaData.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementPriorityMetaData.cs @@ -59,7 +59,7 @@ public DeviceManagementPriorityMetaData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementPriorityMetaData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementPriorityMetaData(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("priority", Priority); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementReports.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementReports.cs index cebe992fadc..ef99593d023 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementReports.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementReports.cs @@ -51,7 +51,7 @@ public partial class DeviceManagementReports : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementReports CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementReports(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("cachedReportConfigurations", CachedReportConfigurations); writer.WriteCollectionOfObjectValues("exportJobs", ExportJobs); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileAssignment.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileAssignment.cs index ace2835a469..c6acf704b7e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileAssignment.cs @@ -58,7 +58,7 @@ public string SourceId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileAssignment(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("intent", Intent); writer.WriteStringValue("sourceId", SourceId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileAssignmentCollectionResponse.cs index ae5c4422bdf..1f33f9d18b4 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementResourceAccessProfileAssignmentCollectionRe /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileBase.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileBase.cs index 81ee8b407c5..4afaafe5b61 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileBase.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileBase.cs @@ -102,7 +102,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteDateTimeOffsetValue("creationDateTime", CreationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileBaseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileBaseCollectionResponse.cs index 6dce7b66a1e..891e3611ff0 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileBaseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementResourceAccessProfileBaseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementResourceAccessProfileBaseCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileBaseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementResourceAccessProfileBaseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementReusablePolicySetting.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementReusablePolicySetting.cs index 886cef1fd86..3a24994fcd6 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementReusablePolicySetting.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementReusablePolicySetting.cs @@ -124,7 +124,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementReusablePolicySetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementReusablePolicySetting(); } /// @@ -152,7 +152,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementReusablePolicySettingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementReusablePolicySettingCollectionResponse.cs index 6bd38228451..52d21d08b97 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementReusablePolicySettingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementReusablePolicySettingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementReusablePolicySettingCollectionResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementReusablePolicySettingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementReusablePolicySettingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementScript.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementScript.cs index 488ac309953..bc509b9c7f3 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementScript.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementScript.cs @@ -210,7 +210,7 @@ public byte[] ScriptContent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementScript CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementScript(); } /// @@ -244,7 +244,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptAssignment.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptAssignment.cs index 619410afaa4..92ef05c8932 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptAssignment.cs @@ -36,7 +36,7 @@ public partial class DeviceManagementScriptAssignment : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptAssignmentCollectionResponse.cs index a92f8e4f1f6..263e333de36 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementScriptAssignmentCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptCollectionResponse.cs index f798416d0a9..c62baf16c51 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementScriptCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptDeviceState.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptDeviceState.cs index ad75c159f1d..267abf2bdda 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptDeviceState.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptDeviceState.cs @@ -86,7 +86,7 @@ public string ResultMessage /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceState(); } /// @@ -111,7 +111,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("errorCode", ErrorCode); writer.WriteStringValue("errorDescription", ErrorDescription); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptDeviceStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptDeviceStateCollectionResponse.cs index 049d182274a..5cd2914315e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptDeviceStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptDeviceStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementScriptDeviceStateCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptDeviceStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptGroupAssignment.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptGroupAssignment.cs index a5122ddfbd0..1b10e44b08c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptGroupAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptGroupAssignment.cs @@ -36,7 +36,7 @@ public string TargetGroupId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("targetGroupId", TargetGroupId); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptGroupAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptGroupAssignmentCollectionResponse.cs index d49ed0455f0..429140de43d 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptGroupAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptGroupAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementScriptGroupAssignmentCollectionResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptGroupAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptPolicySetItem.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptPolicySetItem.cs index d37871d5e27..55d3ff35617 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptPolicySetItem.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptPolicySetItem.cs @@ -27,7 +27,7 @@ public DeviceManagementScriptPolicySetItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptPolicySetItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptPolicySetItem(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptRunSummary.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptRunSummary.cs index 2e1e1fe3ad8..dae51a0be8d 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptRunSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptRunSummary.cs @@ -44,7 +44,7 @@ public int? SuccessUserCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptRunSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptRunSummary(); } /// @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("errorDeviceCount", ErrorDeviceCount); writer.WriteIntValue("errorUserCount", ErrorUserCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptUserState.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptUserState.cs index c590170e9cd..749064dccdc 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptUserState.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptUserState.cs @@ -64,7 +64,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserState(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("deviceRunStates", DeviceRunStates); writer.WriteIntValue("errorDeviceCount", ErrorDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptUserStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptUserStateCollectionResponse.cs index 6e6052f63a0..5417edbe913 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptUserStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementScriptUserStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementScriptUserStateCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementScriptUserStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingAbstractImplementationConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingAbstractImplementationConstraint.cs index f6049712d0d..565d0b0853d 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingAbstractImplementationConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingAbstractImplementationConstraint.cs @@ -43,7 +43,7 @@ public DeviceManagementSettingAbstractImplementationConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingAbstractImplementationConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingAbstractImplementationConstraint(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("allowedAbstractImplementationDefinitionIds", AllowedAbstractImplementationDefinitionIds); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingAppConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingAppConstraint.cs index a0cf1bf3ff3..26bbdbc016f 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingAppConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingAppConstraint.cs @@ -43,7 +43,7 @@ public DeviceManagementSettingAppConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingAppConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingAppConstraint(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("supportedTypes", SupportedTypes); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingBooleanConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingBooleanConstraint.cs index 45d4f073aed..e7fd0eed6b7 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingBooleanConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingBooleanConstraint.cs @@ -33,7 +33,7 @@ public DeviceManagementSettingBooleanConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingBooleanConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingBooleanConstraint(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingCategory.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingCategory.cs index 21c7172de26..94793d05317 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingCategory.cs @@ -58,7 +58,7 @@ public bool? HasRequiredSetting /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteBoolValue("hasRequiredSetting", HasRequiredSetting); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingCategoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingCategoryCollectionResponse.cs index 312d96c9d21..2470c45c3fb 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingCategoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingCategoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementSettingCategoryCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingCategoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingCollectionConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingCollectionConstraint.cs index 85a8da90262..5d2289b643d 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingCollectionConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingCollectionConstraint.cs @@ -39,7 +39,7 @@ public DeviceManagementSettingCollectionConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingCollectionConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingCollectionConstraint(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("maximumLength", MaximumLength); writer.WriteIntValue("minimumLength", MinimumLength); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingComparison.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingComparison.cs index d9419c63dd3..333963d74b5 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingComparison.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingComparison.cs @@ -139,7 +139,7 @@ public DeviceManagementSettingComparison() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementSettingComparison CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingComparison(); } /// @@ -165,7 +165,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("comparisonResult", ComparisonResult); writer.WriteStringValue("currentValueJson", CurrentValueJson); writer.WriteStringValue("definitionId", DefinitionId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingDefinition.cs index f8a1c78d3c8..97b7998c605 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingDefinition.cs @@ -176,7 +176,7 @@ public string PlaceholderText /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -213,7 +213,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("constraints", Constraints); writer.WriteCollectionOfObjectValues("dependencies", Dependencies); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingDefinitionCollectionResponse.cs index 88890759390..47ce1cc244f 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementSettingDefinitionCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingDependency.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingDependency.cs index 97d3dc31169..92888a1b50e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingDependency.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingDependency.cs @@ -85,7 +85,7 @@ public DeviceManagementSettingDependency() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDependency CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingDependency(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("constraints", Constraints); writer.WriteStringValue("definitionId", DefinitionId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingEnrollmentTypeConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingEnrollmentTypeConstraint.cs index 475ea0645b8..9fca82d8fdb 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingEnrollmentTypeConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingEnrollmentTypeConstraint.cs @@ -43,7 +43,7 @@ public DeviceManagementSettingEnrollmentTypeConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingEnrollmentTypeConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingEnrollmentTypeConstraint(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("enrollmentTypes", EnrollmentTypes); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingFileConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingFileConstraint.cs index 34e5596b6ff..800783af924 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingFileConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingFileConstraint.cs @@ -43,7 +43,7 @@ public DeviceManagementSettingFileConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingFileConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingFileConstraint(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("supportedExtensions", SupportedExtensions); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingInsightsDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingInsightsDefinition.cs index 6a7ee301d2b..3f1e2251b7f 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingInsightsDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingInsightsDefinition.cs @@ -85,7 +85,7 @@ public DeviceManagementSettingInsightsDefinition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInsightsDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInsightsDefinition(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("settingDefinitionId", SettingDefinitionId); writer.WriteObjectValue("settingInsight", SettingInsight); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingInstance.cs index 559dfd84ff0..9a281a768f9 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingInstance.cs @@ -52,7 +52,7 @@ public string ValueJson /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -83,7 +83,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("definitionId", DefinitionId); writer.WriteStringValue("valueJson", ValueJson); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingInstanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingInstanceCollectionResponse.cs index 1eb07e3a1cd..bf79af0871d 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingInstanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingInstanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementSettingInstanceCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingInstanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingIntegerConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingIntegerConstraint.cs index f16873f959f..9ef88b67328 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingIntegerConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingIntegerConstraint.cs @@ -39,7 +39,7 @@ public DeviceManagementSettingIntegerConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingIntegerConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingIntegerConstraint(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("maximumValue", MaximumValue); writer.WriteIntValue("minimumValue", MinimumValue); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingProfileConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingProfileConstraint.cs index 2fd324c4401..5df4ba555f1 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingProfileConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingProfileConstraint.cs @@ -59,7 +59,7 @@ public DeviceManagementSettingProfileConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingProfileConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingProfileConstraint(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("source", Source); writer.WriteCollectionOfPrimitiveValues("types", Types); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingRegexConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingRegexConstraint.cs index 5465c61a5d6..294c6a1ed28 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingRegexConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingRegexConstraint.cs @@ -43,7 +43,7 @@ public DeviceManagementSettingRegexConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingRegexConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingRegexConstraint(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("regex", Regex); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingRequiredConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingRequiredConstraint.cs index 99251ae34be..1fa5382db7a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingRequiredConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingRequiredConstraint.cs @@ -43,7 +43,7 @@ public DeviceManagementSettingRequiredConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingRequiredConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingRequiredConstraint(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("notConfiguredValue", NotConfiguredValue); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingSddlConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingSddlConstraint.cs index 52c9075c47a..1c978282e6b 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingSddlConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingSddlConstraint.cs @@ -27,7 +27,7 @@ public DeviceManagementSettingSddlConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingSddlConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingSddlConstraint(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingStringLengthConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingStringLengthConstraint.cs index 71e5881547c..e469af75dea 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingStringLengthConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingStringLengthConstraint.cs @@ -39,7 +39,7 @@ public DeviceManagementSettingStringLengthConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingStringLengthConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingStringLengthConstraint(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("maximumLength", MaximumLength); writer.WriteIntValue("minimumLength", MinimumLength); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingXmlConstraint.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingXmlConstraint.cs index 634bb94b450..92fd7533b07 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingXmlConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettingXmlConstraint.cs @@ -27,7 +27,7 @@ public DeviceManagementSettingXmlConstraint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingXmlConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettingXmlConstraint(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettings.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettings.cs index a8cfa1d4f85..d85733a4283 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementSettings.cs @@ -146,7 +146,7 @@ public DeviceManagementSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementSettings(); } /// @@ -180,7 +180,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("androidDeviceAdministratorEnrollmentEnabled", AndroidDeviceAdministratorEnrollmentEnabled); writer.WriteEnumValue("derivedCredentialProvider", DerivedCredentialProvider); writer.WriteStringValue("derivedCredentialUrl", DerivedCredentialUrl); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementStringSettingInstance.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementStringSettingInstance.cs index 873dfd5af25..4366ef85bf6 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementStringSettingInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementStringSettingInstance.cs @@ -43,7 +43,7 @@ public DeviceManagementStringSettingInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementStringSettingInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementStringSettingInstance(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplate.cs index 509ce78b321..3764a6c284b 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplate.cs @@ -152,7 +152,7 @@ public string VersionInfo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -188,7 +188,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("categories", Categories); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateCollectionResponse.cs index 057e9e552ac..21a32b10d45 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementTemplateCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateInsightsDefinition.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateInsightsDefinition.cs index cb908d9d55f..8e80406a88f 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateInsightsDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateInsightsDefinition.cs @@ -36,7 +36,7 @@ public partial class DeviceManagementTemplateInsightsDefinition : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateInsightsDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateInsightsDefinition(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("settingInsights", SettingInsights); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateInsightsDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateInsightsDefinitionCollectionResponse.cs index 785ad54344e..6d07cd4d81b 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateInsightsDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateInsightsDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementTemplateInsightsDefinitionCollectionRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateInsightsDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateInsightsDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateSettingCategory.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateSettingCategory.cs index eb4050dcbbe..723f17a79d3 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateSettingCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateSettingCategory.cs @@ -36,7 +36,7 @@ public partial class DeviceManagementTemplateSettingCategory : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateSettingCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateSettingCategory(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("recommendedSettings", RecommendedSettings); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateSettingCategoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateSettingCategoryCollectionResponse.cs index e7890cb07eb..d65c33fccce 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateSettingCategoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementTemplateSettingCategoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementTemplateSettingCategoryCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateSettingCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementTemplateSettingCategoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingErrorDetails.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingErrorDetails.cs index 8cbc1277429..fb5d32faec7 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingErrorDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingErrorDetails.cs @@ -133,7 +133,7 @@ public DeviceManagementTroubleshootingErrorDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingErrorDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingErrorDetails(); } /// @@ -158,7 +158,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("context", Context); writer.WriteStringValue("failure", Failure); writer.WriteStringValue("failureDetails", FailureDetails); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingErrorResource.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingErrorResource.cs index c2dde71e879..97336958022 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingErrorResource.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingErrorResource.cs @@ -85,7 +85,7 @@ public DeviceManagementTroubleshootingErrorResource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingErrorResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingErrorResource(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("link", Link); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("text", Text); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingEvent.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingEvent.cs index d839af8d587..4b0532a543f 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingEvent.cs @@ -90,7 +90,7 @@ public string EventName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("additionalInformation", AdditionalInformation); writer.WriteStringValue("correlationId", CorrelationId); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingEventCollectionResponse.cs index 4c4bb7af649..8662954738b 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingEventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementTroubleshootingEventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceManagementTroubleshootingEventCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementTroubleshootingEventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementUserRightsLocalUserOrGroup.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementUserRightsLocalUserOrGroup.cs index 13d6a96e29f..afb4760b570 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementUserRightsLocalUserOrGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementUserRightsLocalUserOrGroup.cs @@ -101,7 +101,7 @@ public DeviceManagementUserRightsLocalUserOrGroup() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementUserRightsLocalUserOrGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementUserRightsLocalUserOrGroup(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceManagementUserRightsSetting.cs b/src/Microsoft.Graph/Generated/Models/DeviceManagementUserRightsSetting.cs index 7401d3a46ad..ce8be254b1a 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceManagementUserRightsSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceManagementUserRightsSetting.cs @@ -75,7 +75,7 @@ public DeviceManagementUserRightsSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceManagementUserRightsSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceManagementUserRightsSetting(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("localUsersOrGroups", LocalUsersOrGroups); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("state", State); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceMetadata.cs b/src/Microsoft.Graph/Generated/Models/DeviceMetadata.cs index 16d97c383fb..56802e7246c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceMetadata.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceMetadata.cs @@ -100,7 +100,7 @@ public DeviceMetadata() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceMetadata(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceType", DeviceType); writer.WriteStringValue("ipAddress", IpAddress); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceOperatingSystemSummary.cs b/src/Microsoft.Graph/Generated/Models/DeviceOperatingSystemSummary.cs index 36d60754f63..d425fcef06e 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceOperatingSystemSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceOperatingSystemSummary.cs @@ -149,7 +149,7 @@ public DeviceOperatingSystemSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceOperatingSystemSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceOperatingSystemSummary(); } /// @@ -185,7 +185,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("androidCorporateWorkProfileCount", AndroidCorporateWorkProfileCount); writer.WriteIntValue("androidCount", AndroidCount); writer.WriteIntValue("androidDedicatedCount", AndroidDedicatedCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceProtectionOverview.cs b/src/Microsoft.Graph/Generated/Models/DeviceProtectionOverview.cs index a0b78749ed5..95f62309e21 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceProtectionOverview.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceProtectionOverview.cs @@ -119,7 +119,7 @@ public DeviceProtectionOverview() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceProtectionOverview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceProtectionOverview(); } /// @@ -150,7 +150,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("cleanDeviceCount", CleanDeviceCount); writer.WriteIntValue("criticalFailuresDeviceCount", CriticalFailuresDeviceCount); writer.WriteIntValue("inactiveThreatAgentDeviceCount", InactiveThreatAgentDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceRegistrationMembership.cs b/src/Microsoft.Graph/Generated/Models/DeviceRegistrationMembership.cs index 91c8e21b4be..4e6311da440 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceRegistrationMembership.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceRegistrationMembership.cs @@ -52,7 +52,7 @@ public DeviceRegistrationMembership() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceRegistrationMembership CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceRegistrationPolicy.cs b/src/Microsoft.Graph/Generated/Models/DeviceRegistrationPolicy.cs index ae986eef1cb..b0d75d24b6c 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceRegistrationPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceRegistrationPolicy.cs @@ -111,7 +111,7 @@ public int? UserDeviceQuota /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceRegistrationPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceRegistrationPolicy(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("azureADJoin", AzureADJoin); writer.WriteObjectValue("azureADRegistration", AzureADRegistration); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceScopeActionResult.cs b/src/Microsoft.Graph/Generated/Models/DeviceScopeActionResult.cs index 131c18eda24..fd6f79630ef 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceScopeActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceScopeActionResult.cs @@ -107,7 +107,7 @@ public DeviceScopeActionResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DeviceScopeActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceScopeActionResult(); } /// @@ -131,7 +131,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceScopeAction", DeviceScopeAction); writer.WriteStringValue("deviceScopeId", DeviceScopeId); writer.WriteStringValue("failedMessage", FailedMessage); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceSetupConfiguration.cs b/src/Microsoft.Graph/Generated/Models/DeviceSetupConfiguration.cs index 58b10d2e78a..5857c3a8188 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceSetupConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceSetupConfiguration.cs @@ -70,7 +70,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceSetupConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceSetupConfiguration(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceShellScript.cs b/src/Microsoft.Graph/Generated/Models/DeviceShellScript.cs index 6074885c0ed..60b4dc26370 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceShellScript.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceShellScript.cs @@ -216,7 +216,7 @@ public byte[] ScriptContent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceShellScript CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceShellScript(); } /// @@ -251,7 +251,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteBoolValue("blockExecutionNotifications", BlockExecutionNotifications); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceShellScriptCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceShellScriptCollectionResponse.cs index 422563d1f83..d2d7011e78d 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceShellScriptCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceShellScriptCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceShellScriptCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceShellScriptCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceShellScriptCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DeviceTemplate.cs b/src/Microsoft.Graph/Generated/Models/DeviceTemplate.cs index 010ced3fffd..0dcdf2afc46 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceTemplate.cs @@ -154,7 +154,7 @@ public DeviceTemplate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceTemplate(); } /// @@ -181,7 +181,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceAuthority", DeviceAuthority); writer.WriteCollectionOfObjectValues("deviceInstances", DeviceInstances); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DeviceTemplateCollectionResponse.cs index 9addc503182..06edcb56723 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceTemplateCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DeviceTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DeviceTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DevicesFilter.cs b/src/Microsoft.Graph/Generated/Models/DevicesFilter.cs index 1fdd1a9f034..1805025aa15 100644 --- a/src/Microsoft.Graph/Generated/Models/DevicesFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/DevicesFilter.cs @@ -74,7 +74,7 @@ public DevicesFilter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DevicesFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DevicesFilter(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("mode", Mode); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("rule", Rule); diff --git a/src/Microsoft.Graph/Generated/Models/Dictionary.cs b/src/Microsoft.Graph/Generated/Models/Dictionary.cs index ce7cbfd22cf..5e623ca1080 100644 --- a/src/Microsoft.Graph/Generated/Models/Dictionary.cs +++ b/src/Microsoft.Graph/Generated/Models/Dictionary.cs @@ -54,7 +54,7 @@ public Dictionary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Dictionary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Dimension.cs b/src/Microsoft.Graph/Generated/Models/Dimension.cs index b36e54b11c7..cad6eb16d9a 100644 --- a/src/Microsoft.Graph/Generated/Models/Dimension.cs +++ b/src/Microsoft.Graph/Generated/Models/Dimension.cs @@ -112,7 +112,7 @@ public Dimension() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Dimension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Dimension(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteCollectionOfObjectValues("dimensionValues", DimensionValues); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/DimensionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DimensionCollectionResponse.cs index 5c0ee05b5fd..a8cbc69d57b 100644 --- a/src/Microsoft.Graph/Generated/Models/DimensionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DimensionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DimensionCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DimensionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DimensionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DimensionValue.cs b/src/Microsoft.Graph/Generated/Models/DimensionValue.cs index abc75bc3f9c..7a506ab459b 100644 --- a/src/Microsoft.Graph/Generated/Models/DimensionValue.cs +++ b/src/Microsoft.Graph/Generated/Models/DimensionValue.cs @@ -96,7 +96,7 @@ public DimensionValue() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DimensionValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DimensionValue(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("displayName", DisplayName); writer.WriteGuidValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/DimensionValueCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DimensionValueCollectionResponse.cs index a8225d7419c..be069061708 100644 --- a/src/Microsoft.Graph/Generated/Models/DimensionValueCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DimensionValueCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DimensionValueCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DimensionValueCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DimensionValueCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DirectSharingAbilities.cs b/src/Microsoft.Graph/Generated/Models/DirectSharingAbilities.cs index 1279f4286ef..22e9e452b89 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectSharingAbilities.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectSharingAbilities.cs @@ -116,7 +116,7 @@ public DirectSharingAbilities() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DirectSharingAbilities CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectSharingAbilities(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("addExistingExternalUsers", AddExistingExternalUsers); writer.WriteObjectValue("addInternalUsers", AddInternalUsers); writer.WriteObjectValue("addNewExternalUsers", AddNewExternalUsers); diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryAudit.cs b/src/Microsoft.Graph/Generated/Models/DirectoryAudit.cs index 18bd0eeee36..d0a5a4d6f17 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryAudit.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryAudit.cs @@ -191,7 +191,7 @@ public string UserAgent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectoryAudit CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectoryAudit(); } /// @@ -222,7 +222,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("activityDateTime", ActivityDateTime); writer.WriteStringValue("activityDisplayName", ActivityDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryAuditCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DirectoryAuditCollectionResponse.cs index eb50a19f398..68994cfade1 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryAuditCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryAuditCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DirectoryAuditCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectoryAuditCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectoryAuditCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryDefinition.cs b/src/Microsoft.Graph/Generated/Models/DirectoryDefinition.cs index c35c8db9f58..4a8529bb395 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryDefinition.cs @@ -85,7 +85,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectoryDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectoryDefinition(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("discoverabilities", Discoverabilities); writer.WriteDateTimeOffsetValue("discoveryDateTime", DiscoveryDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DirectoryDefinitionCollectionResponse.cs index b8b14274e3c..7b1a581aa56 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DirectoryDefinitionCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectoryDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectoryDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryObject.cs b/src/Microsoft.Graph/Generated/Models/DirectoryObject.cs index 5b7a69d286e..6c9a5dba2a7 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryObject.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryObject.cs @@ -25,7 +25,7 @@ public DateTimeOffset? DeletedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectoryObject CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("deletedDateTime", DeletedDateTime); } diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryObject1.cs b/src/Microsoft.Graph/Generated/Models/DirectoryObject1.cs index d9d044cd7c3..5e2940f4308 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryObject1.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryObject1.cs @@ -355,7 +355,7 @@ public partial class DirectoryObject1 : global::Microsoft.Graph.Beta.Models.Enti /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectoryObject1 CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectoryObject1(); } /// @@ -395,7 +395,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("administrativeUnits", AdministrativeUnits); writer.WriteCollectionOfObjectValues("attributeSets", AttributeSets); diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryObjectCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DirectoryObjectCollectionResponse.cs index 947e0699797..60c3ddbeae3 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryObjectCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryObjectCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DirectoryObjectCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectoryObjectCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectoryObjectCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryObjectPartnerReference.cs b/src/Microsoft.Graph/Generated/Models/DirectoryObjectPartnerReference.cs index 252a1328c0e..d65df5ef6dc 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryObjectPartnerReference.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryObjectPartnerReference.cs @@ -80,7 +80,7 @@ public DirectoryObjectPartnerReference() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectoryObjectPartnerReference CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectoryObjectPartnerReference(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryRole.cs b/src/Microsoft.Graph/Generated/Models/DirectoryRole.cs index 6454ed57e4b..fc707124593 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryRole.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryRole.cs @@ -106,7 +106,7 @@ public DirectoryRole() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectoryRole CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectoryRole(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryRoleAccessReviewPolicy.cs b/src/Microsoft.Graph/Generated/Models/DirectoryRoleAccessReviewPolicy.cs index 2b2bc6abf12..d94bbbb4628 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryRoleAccessReviewPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryRoleAccessReviewPolicy.cs @@ -35,7 +35,7 @@ public partial class DirectoryRoleAccessReviewPolicy : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectoryRoleAccessReviewPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectoryRoleAccessReviewPolicy(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("settings", Settings); } diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryRoleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DirectoryRoleCollectionResponse.cs index 0508d68a890..d4f6edc1a85 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryRoleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryRoleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DirectoryRoleCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectoryRoleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectoryRoleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryRoleTemplate.cs b/src/Microsoft.Graph/Generated/Models/DirectoryRoleTemplate.cs index 892cb6b7332..bc47dff8deb 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryRoleTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryRoleTemplate.cs @@ -58,7 +58,7 @@ public DirectoryRoleTemplate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectoryRoleTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectoryRoleTemplate(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryRoleTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DirectoryRoleTemplateCollectionResponse.cs index f456888f7e2..bf8e0856ddc 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryRoleTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryRoleTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DirectoryRoleTemplateCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectoryRoleTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectoryRoleTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DirectorySetting.cs b/src/Microsoft.Graph/Generated/Models/DirectorySetting.cs index 12a7ad450bf..6aac7062d30 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectorySetting.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectorySetting.cs @@ -67,7 +67,7 @@ public string TemplateId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectorySetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectorySetting(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("templateId", TemplateId); diff --git a/src/Microsoft.Graph/Generated/Models/DirectorySettingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DirectorySettingCollectionResponse.cs index 7745846b2ee..8e35aadf014 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectorySettingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectorySettingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DirectorySettingCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectorySettingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectorySettingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DirectorySettingTemplate.cs b/src/Microsoft.Graph/Generated/Models/DirectorySettingTemplate.cs index 591b2d5c259..3af7d8bff65 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectorySettingTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectorySettingTemplate.cs @@ -74,7 +74,7 @@ public DirectorySettingTemplate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectorySettingTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectorySettingTemplate(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/DirectorySettingTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DirectorySettingTemplateCollectionResponse.cs index d60db981ed1..00410873419 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectorySettingTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectorySettingTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DirectorySettingTemplateCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DirectorySettingTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectorySettingTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DirectorySizeQuota.cs b/src/Microsoft.Graph/Generated/Models/DirectorySizeQuota.cs index e49165e94bd..90c3b88b077 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectorySizeQuota.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectorySizeQuota.cs @@ -64,7 +64,7 @@ public DirectorySizeQuota() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DirectorySizeQuota CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DirectorySizeQuota(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("total", Total); writer.WriteIntValue("used", Used); diff --git a/src/Microsoft.Graph/Generated/Models/DisableAndDeleteUserApplyAction.cs b/src/Microsoft.Graph/Generated/Models/DisableAndDeleteUserApplyAction.cs index 0aa2795cdbc..0c6ba160743 100644 --- a/src/Microsoft.Graph/Generated/Models/DisableAndDeleteUserApplyAction.cs +++ b/src/Microsoft.Graph/Generated/Models/DisableAndDeleteUserApplyAction.cs @@ -26,7 +26,7 @@ public DisableAndDeleteUserApplyAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DisableAndDeleteUserApplyAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DisableAndDeleteUserApplyAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/DiscoveredSensitiveType.cs b/src/Microsoft.Graph/Generated/Models/DiscoveredSensitiveType.cs index 2472708569b..3b90cfabb0d 100644 --- a/src/Microsoft.Graph/Generated/Models/DiscoveredSensitiveType.cs +++ b/src/Microsoft.Graph/Generated/Models/DiscoveredSensitiveType.cs @@ -86,7 +86,7 @@ public DiscoveredSensitiveType() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DiscoveredSensitiveType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DiscoveredSensitiveType(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("classificationAttributes", ClassificationAttributes); writer.WriteIntValue("confidence", Confidence); writer.WriteIntValue("count", Count); diff --git a/src/Microsoft.Graph/Generated/Models/DisplayNameLocalization.cs b/src/Microsoft.Graph/Generated/Models/DisplayNameLocalization.cs index 4d270c58372..c4598d5e5da 100644 --- a/src/Microsoft.Graph/Generated/Models/DisplayNameLocalization.cs +++ b/src/Microsoft.Graph/Generated/Models/DisplayNameLocalization.cs @@ -84,7 +84,7 @@ public DisplayNameLocalization() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DisplayNameLocalization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DisplayNameLocalization(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("languageTag", LanguageTag); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DlpActionInfo.cs b/src/Microsoft.Graph/Generated/Models/DlpActionInfo.cs index ab064852616..2a4a1a8a84d 100644 --- a/src/Microsoft.Graph/Generated/Models/DlpActionInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/DlpActionInfo.cs @@ -58,7 +58,7 @@ public DlpActionInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DlpActionInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DlpEvaluatePoliciesJobResponse.cs b/src/Microsoft.Graph/Generated/Models/DlpEvaluatePoliciesJobResponse.cs index f288d668d43..0c7e96120f3 100644 --- a/src/Microsoft.Graph/Generated/Models/DlpEvaluatePoliciesJobResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DlpEvaluatePoliciesJobResponse.cs @@ -35,7 +35,7 @@ public partial class DlpEvaluatePoliciesJobResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DlpEvaluatePoliciesJobResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DlpEvaluatePoliciesJobResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("result", Result); } diff --git a/src/Microsoft.Graph/Generated/Models/DlpEvaluationInput.cs b/src/Microsoft.Graph/Generated/Models/DlpEvaluationInput.cs index 8debac50d52..fd0b7d9d641 100644 --- a/src/Microsoft.Graph/Generated/Models/DlpEvaluationInput.cs +++ b/src/Microsoft.Graph/Generated/Models/DlpEvaluationInput.cs @@ -84,7 +84,7 @@ public DlpEvaluationInput() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DlpEvaluationInput CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -111,7 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("currentLabel", CurrentLabel); writer.WriteCollectionOfObjectValues("discoveredSensitiveTypes", DiscoveredSensitiveTypes); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DlpEvaluationWindowsDevicesInput.cs b/src/Microsoft.Graph/Generated/Models/DlpEvaluationWindowsDevicesInput.cs index a96817b0845..bdf339b5b7e 100644 --- a/src/Microsoft.Graph/Generated/Models/DlpEvaluationWindowsDevicesInput.cs +++ b/src/Microsoft.Graph/Generated/Models/DlpEvaluationWindowsDevicesInput.cs @@ -58,7 +58,7 @@ public DlpEvaluationWindowsDevicesInput() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DlpEvaluationWindowsDevicesInput CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DlpEvaluationWindowsDevicesInput(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("contentProperties", ContentProperties); writer.WriteStringValue("sharedBy", SharedBy); diff --git a/src/Microsoft.Graph/Generated/Models/DlpNotification.cs b/src/Microsoft.Graph/Generated/Models/DlpNotification.cs index 7eab71c6af4..e3294f9e5bd 100644 --- a/src/Microsoft.Graph/Generated/Models/DlpNotification.cs +++ b/src/Microsoft.Graph/Generated/Models/DlpNotification.cs @@ -68,7 +68,7 @@ public DlpNotification() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DlpNotification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("author", Author); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/DlpPoliciesJobResult.cs b/src/Microsoft.Graph/Generated/Models/DlpPoliciesJobResult.cs index b2e0833e22c..eb30e34056d 100644 --- a/src/Microsoft.Graph/Generated/Models/DlpPoliciesJobResult.cs +++ b/src/Microsoft.Graph/Generated/Models/DlpPoliciesJobResult.cs @@ -90,7 +90,7 @@ public DlpPoliciesJobResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DlpPoliciesJobResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DlpPoliciesJobResult(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("auditCorrelationId", AuditCorrelationId); writer.WriteDateTimeOffsetValue("evaluationDateTime", EvaluationDateTime); writer.WriteCollectionOfObjectValues("matchingRules", MatchingRules); diff --git a/src/Microsoft.Graph/Generated/Models/DlpWindowsDevicesNotification.cs b/src/Microsoft.Graph/Generated/Models/DlpWindowsDevicesNotification.cs index ad98a708f8a..c5754a16ae1 100644 --- a/src/Microsoft.Graph/Generated/Models/DlpWindowsDevicesNotification.cs +++ b/src/Microsoft.Graph/Generated/Models/DlpWindowsDevicesNotification.cs @@ -58,7 +58,7 @@ public DlpWindowsDevicesNotification() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DlpWindowsDevicesNotification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DlpWindowsDevicesNotification(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contentName", ContentName); writer.WriteStringValue("lastModfiedBy", LastModfiedBy); diff --git a/src/Microsoft.Graph/Generated/Models/Document.cs b/src/Microsoft.Graph/Generated/Models/Document.cs index 89dcfa119dd..67bbec42d3a 100644 --- a/src/Microsoft.Graph/Generated/Models/Document.cs +++ b/src/Microsoft.Graph/Generated/Models/Document.cs @@ -35,7 +35,7 @@ public partial class Document : global::Microsoft.Graph.Beta.Models.Entity, IPar /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Document CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Document(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("comments", Comments); } diff --git a/src/Microsoft.Graph/Generated/Models/DocumentComment.cs b/src/Microsoft.Graph/Generated/Models/DocumentComment.cs index ab1cb0ebe09..70d03c266c0 100644 --- a/src/Microsoft.Graph/Generated/Models/DocumentComment.cs +++ b/src/Microsoft.Graph/Generated/Models/DocumentComment.cs @@ -51,7 +51,7 @@ public string Content /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DocumentComment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DocumentComment(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("content", Content); writer.WriteCollectionOfObjectValues("replies", Replies); diff --git a/src/Microsoft.Graph/Generated/Models/DocumentCommentReply.cs b/src/Microsoft.Graph/Generated/Models/DocumentCommentReply.cs index aa81beedf02..dba42fc0860 100644 --- a/src/Microsoft.Graph/Generated/Models/DocumentCommentReply.cs +++ b/src/Microsoft.Graph/Generated/Models/DocumentCommentReply.cs @@ -51,7 +51,7 @@ public string Location /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DocumentCommentReply CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DocumentCommentReply(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("content", Content); writer.WriteStringValue("location", Location); diff --git a/src/Microsoft.Graph/Generated/Models/DocumentProcessingJob.cs b/src/Microsoft.Graph/Generated/Models/DocumentProcessingJob.cs index f3df5f014dc..08c485bf627 100644 --- a/src/Microsoft.Graph/Generated/Models/DocumentProcessingJob.cs +++ b/src/Microsoft.Graph/Generated/Models/DocumentProcessingJob.cs @@ -53,7 +53,7 @@ public string ListItemUniqueId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DocumentProcessingJob CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DocumentProcessingJob(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteEnumValue("jobType", JobType); diff --git a/src/Microsoft.Graph/Generated/Models/DocumentProcessingJobCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DocumentProcessingJobCollectionResponse.cs index 52c44191bdd..368c2efc3ee 100644 --- a/src/Microsoft.Graph/Generated/Models/DocumentProcessingJobCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DocumentProcessingJobCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DocumentProcessingJobCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DocumentProcessingJobCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DocumentProcessingJobCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DocumentSet.cs b/src/Microsoft.Graph/Generated/Models/DocumentSet.cs index cffefe0c554..c3f0599275f 100644 --- a/src/Microsoft.Graph/Generated/Models/DocumentSet.cs +++ b/src/Microsoft.Graph/Generated/Models/DocumentSet.cs @@ -144,7 +144,7 @@ public DocumentSet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DocumentSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DocumentSet(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("allowedContentTypes", AllowedContentTypes); writer.WriteCollectionOfObjectValues("defaultContents", DefaultContents); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DocumentSetContent.cs b/src/Microsoft.Graph/Generated/Models/DocumentSetContent.cs index 9e92f93619b..9bae2e05676 100644 --- a/src/Microsoft.Graph/Generated/Models/DocumentSetContent.cs +++ b/src/Microsoft.Graph/Generated/Models/DocumentSetContent.cs @@ -100,7 +100,7 @@ public DocumentSetContent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DocumentSetContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DocumentSetContent(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentType", ContentType); writer.WriteStringValue("fileName", FileName); writer.WriteStringValue("folderName", FolderName); diff --git a/src/Microsoft.Graph/Generated/Models/DocumentSetVersion.cs b/src/Microsoft.Graph/Generated/Models/DocumentSetVersion.cs index 300630cb4db..c8648492ed2 100644 --- a/src/Microsoft.Graph/Generated/Models/DocumentSetVersion.cs +++ b/src/Microsoft.Graph/Generated/Models/DocumentSetVersion.cs @@ -86,7 +86,7 @@ public DocumentSetVersion() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DocumentSetVersion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DocumentSetVersion(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("comment", Comment); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/DocumentSetVersionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DocumentSetVersionCollectionResponse.cs index 39df653f734..3a3a5c03d35 100644 --- a/src/Microsoft.Graph/Generated/Models/DocumentSetVersionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DocumentSetVersionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DocumentSetVersionCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DocumentSetVersionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DocumentSetVersionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DocumentSetVersionItem.cs b/src/Microsoft.Graph/Generated/Models/DocumentSetVersionItem.cs index 8f0ad8eca49..303674b0a5d 100644 --- a/src/Microsoft.Graph/Generated/Models/DocumentSetVersionItem.cs +++ b/src/Microsoft.Graph/Generated/Models/DocumentSetVersionItem.cs @@ -100,7 +100,7 @@ public DocumentSetVersionItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DocumentSetVersionItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DocumentSetVersionItem(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("itemId", ItemId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("title", Title); diff --git a/src/Microsoft.Graph/Generated/Models/Domain.cs b/src/Microsoft.Graph/Generated/Models/Domain.cs index d869f51e8ac..cc161bdab32 100644 --- a/src/Microsoft.Graph/Generated/Models/Domain.cs +++ b/src/Microsoft.Graph/Generated/Models/Domain.cs @@ -221,7 +221,7 @@ public List SupportedServices /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Domain CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Domain(); } /// @@ -257,7 +257,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("authenticationType", AuthenticationType); writer.WriteStringValue("availabilityStatus", AvailabilityStatus); diff --git a/src/Microsoft.Graph/Generated/Models/DomainCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DomainCollectionResponse.cs index 0b319318bd8..4d69a7749dc 100644 --- a/src/Microsoft.Graph/Generated/Models/DomainCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DomainCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DomainCollectionResponse : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DomainCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DomainCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DomainDnsCnameRecord.cs b/src/Microsoft.Graph/Generated/Models/DomainDnsCnameRecord.cs index a334bf8bde0..bc2ded414a6 100644 --- a/src/Microsoft.Graph/Generated/Models/DomainDnsCnameRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/DomainDnsCnameRecord.cs @@ -35,7 +35,7 @@ public string CanonicalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DomainDnsCnameRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DomainDnsCnameRecord(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("canonicalName", CanonicalName); } diff --git a/src/Microsoft.Graph/Generated/Models/DomainDnsMxRecord.cs b/src/Microsoft.Graph/Generated/Models/DomainDnsMxRecord.cs index f940f3ed5e3..bf5d3ecff25 100644 --- a/src/Microsoft.Graph/Generated/Models/DomainDnsMxRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/DomainDnsMxRecord.cs @@ -41,7 +41,7 @@ public int? Preference /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DomainDnsMxRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DomainDnsMxRecord(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("mailExchange", MailExchange); writer.WriteIntValue("preference", Preference); diff --git a/src/Microsoft.Graph/Generated/Models/DomainDnsRecord.cs b/src/Microsoft.Graph/Generated/Models/DomainDnsRecord.cs index 11d4d232e26..c57b76425a9 100644 --- a/src/Microsoft.Graph/Generated/Models/DomainDnsRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/DomainDnsRecord.cs @@ -79,7 +79,7 @@ public int? Ttl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DomainDnsRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -112,7 +112,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isOptional", IsOptional); writer.WriteStringValue("label", Label); diff --git a/src/Microsoft.Graph/Generated/Models/DomainDnsRecordCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DomainDnsRecordCollectionResponse.cs index ec3c10549b7..1cbb2099256 100644 --- a/src/Microsoft.Graph/Generated/Models/DomainDnsRecordCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DomainDnsRecordCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DomainDnsRecordCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DomainDnsRecordCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DomainDnsRecordCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DomainDnsSrvRecord.cs b/src/Microsoft.Graph/Generated/Models/DomainDnsSrvRecord.cs index 281baea3ca4..8043465765a 100644 --- a/src/Microsoft.Graph/Generated/Models/DomainDnsSrvRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/DomainDnsSrvRecord.cs @@ -85,7 +85,7 @@ public int? Weight /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DomainDnsSrvRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DomainDnsSrvRecord(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("nameTarget", NameTarget); writer.WriteIntValue("port", Port); diff --git a/src/Microsoft.Graph/Generated/Models/DomainDnsTxtRecord.cs b/src/Microsoft.Graph/Generated/Models/DomainDnsTxtRecord.cs index 5f82b0e36bc..a72392dd5f0 100644 --- a/src/Microsoft.Graph/Generated/Models/DomainDnsTxtRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/DomainDnsTxtRecord.cs @@ -35,7 +35,7 @@ public string Text /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DomainDnsTxtRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DomainDnsTxtRecord(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("text", Text); } diff --git a/src/Microsoft.Graph/Generated/Models/DomainDnsUnavailableRecord.cs b/src/Microsoft.Graph/Generated/Models/DomainDnsUnavailableRecord.cs index 83ef52e8203..cebd88c494a 100644 --- a/src/Microsoft.Graph/Generated/Models/DomainDnsUnavailableRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/DomainDnsUnavailableRecord.cs @@ -35,7 +35,7 @@ public string Description /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DomainDnsUnavailableRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DomainDnsUnavailableRecord(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); } diff --git a/src/Microsoft.Graph/Generated/Models/DomainIdentitySource.cs b/src/Microsoft.Graph/Generated/Models/DomainIdentitySource.cs index 37ffddf4a20..13411c02c23 100644 --- a/src/Microsoft.Graph/Generated/Models/DomainIdentitySource.cs +++ b/src/Microsoft.Graph/Generated/Models/DomainIdentitySource.cs @@ -58,7 +58,7 @@ public DomainIdentitySource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DomainIdentitySource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DomainIdentitySource(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("domainName", DomainName); diff --git a/src/Microsoft.Graph/Generated/Models/DomainRegistrant.cs b/src/Microsoft.Graph/Generated/Models/DomainRegistrant.cs index a8e985ee8e0..0be27e1d295 100644 --- a/src/Microsoft.Graph/Generated/Models/DomainRegistrant.cs +++ b/src/Microsoft.Graph/Generated/Models/DomainRegistrant.cs @@ -116,7 +116,7 @@ public DomainRegistrant() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DomainRegistrant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DomainRegistrant(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("countryOrRegionCode", CountryOrRegionCode); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("organization", Organization); diff --git a/src/Microsoft.Graph/Generated/Models/DomainSecurityProfile.cs b/src/Microsoft.Graph/Generated/Models/DomainSecurityProfile.cs index 011addcc856..cda64bb3830 100644 --- a/src/Microsoft.Graph/Generated/Models/DomainSecurityProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/DomainSecurityProfile.cs @@ -193,7 +193,7 @@ public List Tags /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DomainSecurityProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DomainSecurityProfile(); } /// @@ -226,7 +226,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("activityGroupNames", ActivityGroupNames); writer.WriteStringValue("azureSubscriptionId", AzureSubscriptionId); diff --git a/src/Microsoft.Graph/Generated/Models/DomainSecurityProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DomainSecurityProfileCollectionResponse.cs index 4b24aeea3ba..0f810178a85 100644 --- a/src/Microsoft.Graph/Generated/Models/DomainSecurityProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DomainSecurityProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DomainSecurityProfileCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DomainSecurityProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DomainSecurityProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DomainState.cs b/src/Microsoft.Graph/Generated/Models/DomainState.cs index ab2008d056e..32846983a9f 100644 --- a/src/Microsoft.Graph/Generated/Models/DomainState.cs +++ b/src/Microsoft.Graph/Generated/Models/DomainState.cs @@ -90,7 +90,7 @@ public DomainState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DomainState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DomainState(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastActionDateTime", LastActionDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("operation", Operation); diff --git a/src/Microsoft.Graph/Generated/Models/DowngradeJustification.cs b/src/Microsoft.Graph/Generated/Models/DowngradeJustification.cs index d1d55b8bfad..490bbdb161d 100644 --- a/src/Microsoft.Graph/Generated/Models/DowngradeJustification.cs +++ b/src/Microsoft.Graph/Generated/Models/DowngradeJustification.cs @@ -74,7 +74,7 @@ public DowngradeJustification() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DowngradeJustification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DowngradeJustification(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isDowngradeJustified", IsDowngradeJustified); writer.WriteStringValue("justificationMessage", JustificationMessage); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DriftedProperty.cs b/src/Microsoft.Graph/Generated/Models/DriftedProperty.cs index cde98af9ce1..b52a018d035 100644 --- a/src/Microsoft.Graph/Generated/Models/DriftedProperty.cs +++ b/src/Microsoft.Graph/Generated/Models/DriftedProperty.cs @@ -100,7 +100,7 @@ public DriftedProperty() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DriftedProperty CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriftedProperty(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Drive.cs b/src/Microsoft.Graph/Generated/Models/Drive.cs index 399baaefe3e..e70a78421c1 100644 --- a/src/Microsoft.Graph/Generated/Models/Drive.cs +++ b/src/Microsoft.Graph/Generated/Models/Drive.cs @@ -218,7 +218,7 @@ public Drive() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Drive CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Drive(); } /// @@ -249,7 +249,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("activities", Activities); writer.WriteCollectionOfObjectValues("bundles", Bundles); diff --git a/src/Microsoft.Graph/Generated/Models/DriveCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DriveCollectionResponse.cs index 01da0d0ede3..b3a96cbaacc 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DriveCollectionResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DriveItem.cs b/src/Microsoft.Graph/Generated/Models/DriveItem.cs index 0816f95b6e5..8da3468ef6d 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveItem.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveItem.cs @@ -640,7 +640,7 @@ public DriveItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveItem(); } /// @@ -698,7 +698,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("activities", Activities); writer.WriteObjectValue("analytics", Analytics); diff --git a/src/Microsoft.Graph/Generated/Models/DriveItemAccessOperationsViewpoint.cs b/src/Microsoft.Graph/Generated/Models/DriveItemAccessOperationsViewpoint.cs index 1cb9a1a58fe..b184fcb0e1b 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveItemAccessOperationsViewpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveItemAccessOperationsViewpoint.cs @@ -94,7 +94,7 @@ public DriveItemAccessOperationsViewpoint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DriveItemAccessOperationsViewpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveItemAccessOperationsViewpoint(); } /// @@ -121,7 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("canComment", CanComment); writer.WriteBoolValue("canCreateFile", CanCreateFile); writer.WriteBoolValue("canCreateFolder", CanCreateFolder); diff --git a/src/Microsoft.Graph/Generated/Models/DriveItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DriveItemCollectionResponse.cs index 4a6701474d3..ee99f55c80e 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DriveItemCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DriveItemSource.cs b/src/Microsoft.Graph/Generated/Models/DriveItemSource.cs index 46d7d93809b..c895705f3f1 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveItemSource.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveItemSource.cs @@ -74,7 +74,7 @@ public DriveItemSource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DriveItemSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveItemSource(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("application", Application); writer.WriteStringValue("externalId", ExternalId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DriveItemUploadableProperties.cs b/src/Microsoft.Graph/Generated/Models/DriveItemUploadableProperties.cs index 5803fd36a26..a305b0fbb73 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveItemUploadableProperties.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveItemUploadableProperties.cs @@ -138,7 +138,7 @@ public DriveItemUploadableProperties() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DriveItemUploadableProperties CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveItemUploadableProperties(); } /// @@ -164,7 +164,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteObjectValue("driveItemSource", DriveItemSource); writer.WriteLongValue("fileSize", FileSize); diff --git a/src/Microsoft.Graph/Generated/Models/DriveItemVersion.cs b/src/Microsoft.Graph/Generated/Models/DriveItemVersion.cs index aa11c584afc..5b7272b2a97 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveItemVersion.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveItemVersion.cs @@ -48,7 +48,7 @@ public DriveItemVersion() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveItemVersion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveItemVersion(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); writer.WriteLongValue("size", Size); diff --git a/src/Microsoft.Graph/Generated/Models/DriveItemVersionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DriveItemVersionCollectionResponse.cs index 9f7139f33b2..0c052e36629 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveItemVersionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveItemVersionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DriveItemVersionCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveItemVersionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveItemVersionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DriveItemViewpoint.cs b/src/Microsoft.Graph/Generated/Models/DriveItemViewpoint.cs index 35397eedc4a..f8d425b727f 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveItemViewpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveItemViewpoint.cs @@ -84,7 +84,7 @@ public DriveItemViewpoint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DriveItemViewpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveItemViewpoint(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("accessOperations", AccessOperations); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("sharing", Sharing); diff --git a/src/Microsoft.Graph/Generated/Models/DriveProtectionRule.cs b/src/Microsoft.Graph/Generated/Models/DriveProtectionRule.cs index 48eb62e6587..f65e35eb991 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveProtectionRule.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveProtectionRule.cs @@ -42,7 +42,7 @@ public DriveProtectionRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveProtectionRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveProtectionRule(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("driveExpression", DriveExpression); } diff --git a/src/Microsoft.Graph/Generated/Models/DriveProtectionRuleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DriveProtectionRuleCollectionResponse.cs index 2937a14a11f..f601e1d91bc 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveProtectionRuleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveProtectionRuleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DriveProtectionRuleCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveProtectionRuleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveProtectionRuleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DriveProtectionUnit.cs b/src/Microsoft.Graph/Generated/Models/DriveProtectionUnit.cs index d076b8a5944..cfa60d82a3e 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveProtectionUnit.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveProtectionUnit.cs @@ -74,7 +74,7 @@ public DriveProtectionUnit() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveProtectionUnit CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveProtectionUnit(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("directoryObjectId", DirectoryObjectId); } diff --git a/src/Microsoft.Graph/Generated/Models/DriveProtectionUnitCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DriveProtectionUnitCollectionResponse.cs index 783e6c46123..d6b8f056225 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveProtectionUnitCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveProtectionUnitCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DriveProtectionUnitCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveProtectionUnitCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveProtectionUnitCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DriveProtectionUnitsBulkAdditionJob.cs b/src/Microsoft.Graph/Generated/Models/DriveProtectionUnitsBulkAdditionJob.cs index bbbd506d4b9..b83c50a96fc 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveProtectionUnitsBulkAdditionJob.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveProtectionUnitsBulkAdditionJob.cs @@ -58,7 +58,7 @@ public DriveProtectionUnitsBulkAdditionJob() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveProtectionUnitsBulkAdditionJob CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveProtectionUnitsBulkAdditionJob(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("directoryObjectIds", DirectoryObjectIds); writer.WriteCollectionOfPrimitiveValues("drives", Drives); diff --git a/src/Microsoft.Graph/Generated/Models/DriveProtectionUnitsBulkAdditionJobCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DriveProtectionUnitsBulkAdditionJobCollectionResponse.cs index e64a92a28c7..d58a022b9aa 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveProtectionUnitsBulkAdditionJobCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveProtectionUnitsBulkAdditionJobCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DriveProtectionUnitsBulkAdditionJobCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveProtectionUnitsBulkAdditionJobCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveProtectionUnitsBulkAdditionJobCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DriveRecipient.cs b/src/Microsoft.Graph/Generated/Models/DriveRecipient.cs index c55c89542d1..36ff0c3d6f5 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveRecipient.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveRecipient.cs @@ -100,7 +100,7 @@ public DriveRecipient() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.DriveRecipient CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveRecipient(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("alias", Alias); writer.WriteStringValue("email", Email); writer.WriteStringValue("objectId", ObjectId); diff --git a/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifact.cs b/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifact.cs index a164be5a931..4f49906394e 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifact.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifact.cs @@ -67,7 +67,7 @@ public string RestoredSiteWebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveRestoreArtifact CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveRestoreArtifact(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("restoredSiteId", RestoredSiteId); } diff --git a/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifactCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifactCollectionResponse.cs index 07ad1c81edb..71db282327d 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifactCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifactCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DriveRestoreArtifactCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveRestoreArtifactCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveRestoreArtifactCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifactsBulkAdditionRequest.cs b/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifactsBulkAdditionRequest.cs index af6e59e2ecc..8be13f8831c 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifactsBulkAdditionRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifactsBulkAdditionRequest.cs @@ -51,7 +51,7 @@ public List Drives /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveRestoreArtifactsBulkAdditionRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveRestoreArtifactsBulkAdditionRequest(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("directoryObjectIds", DirectoryObjectIds); writer.WriteCollectionOfPrimitiveValues("drives", Drives); diff --git a/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifactsBulkAdditionRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifactsBulkAdditionRequestCollectionResponse.cs index 77ee1b9371c..fd30c44a583 100644 --- a/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifactsBulkAdditionRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/DriveRestoreArtifactsBulkAdditionRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DriveRestoreArtifactsBulkAdditionRequestCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DriveRestoreArtifactsBulkAdditionRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DriveRestoreArtifactsBulkAdditionRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/DropInPlaceMode.cs b/src/Microsoft.Graph/Generated/Models/DropInPlaceMode.cs index 3eecfc97a03..6b52196b1b6 100644 --- a/src/Microsoft.Graph/Generated/Models/DropInPlaceMode.cs +++ b/src/Microsoft.Graph/Generated/Models/DropInPlaceMode.cs @@ -26,7 +26,7 @@ public DropInPlaceMode() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.DropInPlaceMode CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.DropInPlaceMode(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/EBookInstallSummary.cs b/src/Microsoft.Graph/Generated/Models/EBookInstallSummary.cs index 7bc8ea473be..5a9ce6ecc96 100644 --- a/src/Microsoft.Graph/Generated/Models/EBookInstallSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/EBookInstallSummary.cs @@ -56,7 +56,7 @@ public int? NotInstalledUserCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EBookInstallSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EBookInstallSummary(); } /// @@ -81,7 +81,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("failedDeviceCount", FailedDeviceCount); writer.WriteIntValue("failedUserCount", FailedUserCount); diff --git a/src/Microsoft.Graph/Generated/Models/EasEmailProfileConfigurationBase.cs b/src/Microsoft.Graph/Generated/Models/EasEmailProfileConfigurationBase.cs index c8d97e8030c..548a0686641 100644 --- a/src/Microsoft.Graph/Generated/Models/EasEmailProfileConfigurationBase.cs +++ b/src/Microsoft.Graph/Generated/Models/EasEmailProfileConfigurationBase.cs @@ -61,7 +61,7 @@ public EasEmailProfileConfigurationBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EasEmailProfileConfigurationBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -91,7 +91,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("customDomainName", CustomDomainName); writer.WriteEnumValue("userDomainNameSource", UserDomainNameSource); diff --git a/src/Microsoft.Graph/Generated/Models/EdIdentitySource.cs b/src/Microsoft.Graph/Generated/Models/EdIdentitySource.cs index 5f315c2e2b2..29dc01a9a01 100644 --- a/src/Microsoft.Graph/Generated/Models/EdIdentitySource.cs +++ b/src/Microsoft.Graph/Generated/Models/EdIdentitySource.cs @@ -26,7 +26,7 @@ public EdIdentitySource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EdIdentitySource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EdIdentitySource(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Edge.cs b/src/Microsoft.Graph/Generated/Models/Edge.cs index 7ffa802a6ce..78db5f3f89d 100644 --- a/src/Microsoft.Graph/Generated/Models/Edge.cs +++ b/src/Microsoft.Graph/Generated/Models/Edge.cs @@ -35,7 +35,7 @@ public partial class Edge : global::Microsoft.Graph.Beta.Models.Entity, IParsabl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Edge CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Edge(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("internetExplorerMode", InternetExplorerMode); } diff --git a/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonConfiguration.cs b/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonConfiguration.cs index 454873ce872..48a8d877677 100644 --- a/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonConfiguration.cs @@ -53,7 +53,7 @@ public EdgeHomeButtonConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EdgeHomeButtonConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -81,7 +81,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonHidden.cs b/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonHidden.cs index 4e0e7b3b3ac..a8ac5668a18 100644 --- a/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonHidden.cs +++ b/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonHidden.cs @@ -27,7 +27,7 @@ public EdgeHomeButtonHidden() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EdgeHomeButtonHidden CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EdgeHomeButtonHidden(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonLoadsStartPage.cs b/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonLoadsStartPage.cs index 9ee14ceb56c..602931929ab 100644 --- a/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonLoadsStartPage.cs +++ b/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonLoadsStartPage.cs @@ -27,7 +27,7 @@ public EdgeHomeButtonLoadsStartPage() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EdgeHomeButtonLoadsStartPage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EdgeHomeButtonLoadsStartPage(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonOpensCustomURL.cs b/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonOpensCustomURL.cs index 9d42ad65857..045caa7b991 100644 --- a/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonOpensCustomURL.cs +++ b/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonOpensCustomURL.cs @@ -43,7 +43,7 @@ public EdgeHomeButtonOpensCustomURL() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EdgeHomeButtonOpensCustomURL CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EdgeHomeButtonOpensCustomURL(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("homeButtonCustomURL", HomeButtonCustomURL); } diff --git a/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonOpensNewTab.cs b/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonOpensNewTab.cs index 4b2b579f88f..0541abfad97 100644 --- a/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonOpensNewTab.cs +++ b/src/Microsoft.Graph/Generated/Models/EdgeHomeButtonOpensNewTab.cs @@ -27,7 +27,7 @@ public EdgeHomeButtonOpensNewTab() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EdgeHomeButtonOpensNewTab CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EdgeHomeButtonOpensNewTab(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/EdgeSearchEngine.cs b/src/Microsoft.Graph/Generated/Models/EdgeSearchEngine.cs index 2444195f16c..21a20a2d06f 100644 --- a/src/Microsoft.Graph/Generated/Models/EdgeSearchEngine.cs +++ b/src/Microsoft.Graph/Generated/Models/EdgeSearchEngine.cs @@ -33,7 +33,7 @@ public EdgeSearchEngine() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EdgeSearchEngine CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EdgeSearchEngine(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("edgeSearchEngineType", EdgeSearchEngineType); } diff --git a/src/Microsoft.Graph/Generated/Models/EdgeSearchEngineBase.cs b/src/Microsoft.Graph/Generated/Models/EdgeSearchEngineBase.cs index ac1565f5dfe..78b0762d224 100644 --- a/src/Microsoft.Graph/Generated/Models/EdgeSearchEngineBase.cs +++ b/src/Microsoft.Graph/Generated/Models/EdgeSearchEngineBase.cs @@ -53,7 +53,7 @@ public EdgeSearchEngineBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EdgeSearchEngineBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/EdgeSearchEngineCustom.cs b/src/Microsoft.Graph/Generated/Models/EdgeSearchEngineCustom.cs index 825769ffb73..bb99947b6c3 100644 --- a/src/Microsoft.Graph/Generated/Models/EdgeSearchEngineCustom.cs +++ b/src/Microsoft.Graph/Generated/Models/EdgeSearchEngineCustom.cs @@ -43,7 +43,7 @@ public EdgeSearchEngineCustom() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EdgeSearchEngineCustom CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EdgeSearchEngineCustom(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("edgeSearchEngineOpenSearchXmlUrl", EdgeSearchEngineOpenSearchXmlUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/AddToReviewSetOperation.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/AddToReviewSetOperation.cs index 8cdfadd05f1..add54af2173 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/AddToReviewSetOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/AddToReviewSetOperation.cs @@ -51,7 +51,7 @@ public partial class AddToReviewSetOperation : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.AddToReviewSetOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.AddToReviewSetOperation(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("reviewSet", ReviewSet); writer.WriteObjectValue("sourceCollection", SourceCollection); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/Case.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/Case.cs index 403165bc56c..05e6c221013 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/Case.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/Case.cs @@ -251,7 +251,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.Case CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.Case(); } /// @@ -287,7 +287,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("closedBy", ClosedBy); writer.WriteDateTimeOffsetValue("closedDateTime", ClosedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseCollectionResponse.cs index 53c3e4ac9b0..d06d3a133f2 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CaseCollectionResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseExportOperation.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseExportOperation.cs index c41aa00a8c5..7eb2c3cfba5 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseExportOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseExportOperation.cs @@ -127,7 +127,7 @@ public string OutputName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseExportOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseExportOperation(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("azureBlobContainer", AzureBlobContainer); writer.WriteStringValue("azureBlobToken", AzureBlobToken); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseExportOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseExportOperationCollectionResponse.cs index c371c7d545d..e7605e54622 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseExportOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseExportOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CaseExportOperationCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseExportOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseExportOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseHoldOperation.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseHoldOperation.cs index 93be65464df..7de3dd4dc6a 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseHoldOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseHoldOperation.cs @@ -19,7 +19,7 @@ public partial class CaseHoldOperation : global::Microsoft.Graph.Beta.Models.Edi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseHoldOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseHoldOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseIndexOperation.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseIndexOperation.cs index db98dfdd76a..a11eeb42b00 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseIndexOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseIndexOperation.cs @@ -19,7 +19,7 @@ public partial class CaseIndexOperation : global::Microsoft.Graph.Beta.Models.Ed /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseIndexOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseIndexOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseOperation.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseOperation.cs index 6f7b1836936..d64ae6184bb 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseOperation.cs @@ -81,7 +81,7 @@ public int? PercentProgress /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -118,7 +118,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("action", Action); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseOperationCollectionResponse.cs index e0a104e9450..364e0710ea6 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CaseOperationCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseSettings.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseSettings.cs index a77f2b5f6d3..3c3f09ec0b6 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/CaseSettings.cs @@ -67,7 +67,7 @@ public partial class CaseSettings : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.CaseSettings(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("ocr", Ocr); writer.WriteObjectValue("redundancyDetection", RedundancyDetection); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/Custodian.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/Custodian.cs index c3f8d264bc3..a704017cb8d 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/Custodian.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/Custodian.cs @@ -102,7 +102,7 @@ public Custodian() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.Custodian CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.Custodian(); } /// @@ -127,7 +127,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("acknowledgedDateTime", AcknowledgedDateTime); writer.WriteBoolValue("applyHoldToSources", ApplyHoldToSources); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/CustodianCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/CustodianCollectionResponse.cs index 4b25a5c5c84..a8df25dc7d6 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/CustodianCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/CustodianCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CustodianCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.CustodianCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.CustodianCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/DataSource.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/DataSource.cs index dd5dcd0765b..0a78189072d 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/DataSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/DataSource.cs @@ -63,7 +63,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.DataSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/DataSourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/DataSourceCollectionResponse.cs index 93d2a86c00a..b4545211bda 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/DataSourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/DataSourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DataSourceCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.DataSourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.DataSourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/DataSourceContainer.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/DataSourceContainer.cs index a37e7f3340f..fd223a015eb 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/DataSourceContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/DataSourceContainer.cs @@ -81,7 +81,7 @@ public DateTimeOffset? ReleasedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.DataSourceContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/Ediscoveryroot.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/Ediscoveryroot.cs index c92fd89cd48..497ee0112ce 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/Ediscoveryroot.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/Ediscoveryroot.cs @@ -35,7 +35,7 @@ public partial class Ediscoveryroot : global::Microsoft.Graph.Beta.Models.Entity /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.Ediscoveryroot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.Ediscoveryroot(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("cases", Cases); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/EstimateStatisticsOperation.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/EstimateStatisticsOperation.cs index 7154bb61b50..9c95fd77f77 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/EstimateStatisticsOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/EstimateStatisticsOperation.cs @@ -71,7 +71,7 @@ public long? UnindexedItemsSize /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.EstimateStatisticsOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.EstimateStatisticsOperation(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("indexedItemCount", IndexedItemCount); writer.WriteLongValue("indexedItemsSize", IndexedItemsSize); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/LegalHold.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/LegalHold.cs index bf56e7f3b53..c9868dd38e3 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/LegalHold.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/LegalHold.cs @@ -187,7 +187,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.LegalHold CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.LegalHold(); } /// @@ -219,7 +219,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contentQuery", ContentQuery); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/LegalHoldCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/LegalHoldCollectionResponse.cs index 316e30b115c..fceb48c5067 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/LegalHoldCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/LegalHoldCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class LegalHoldCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.LegalHoldCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.LegalHoldCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/NoncustodialDataSource.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/NoncustodialDataSource.cs index 86857dc73b3..f5de04b6409 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/NoncustodialDataSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/NoncustodialDataSource.cs @@ -48,7 +48,7 @@ public NoncustodialDataSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.NoncustodialDataSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.NoncustodialDataSource(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("applyHoldToSource", ApplyHoldToSource); writer.WriteObjectValue("dataSource", DataSource); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/NoncustodialDataSourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/NoncustodialDataSourceCollectionResponse.cs index 64e7955c17f..249a6adcc0e 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/NoncustodialDataSourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/NoncustodialDataSourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class NoncustodialDataSourceCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.NoncustodialDataSourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.NoncustodialDataSourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/OcrSettings.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/OcrSettings.cs index c991190381a..9474eb9c0f2 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/OcrSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/OcrSettings.cs @@ -70,7 +70,7 @@ public OcrSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Ediscovery.OcrSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.OcrSettings(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isEnabled", IsEnabled); writer.WriteIntValue("maxImageSize", MaxImageSize); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/PurgeDataOperation.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/PurgeDataOperation.cs index cb4fa91fd3a..d96ea951634 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/PurgeDataOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/PurgeDataOperation.cs @@ -19,7 +19,7 @@ public partial class PurgeDataOperation : global::Microsoft.Graph.Beta.Models.Ed /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.PurgeDataOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.PurgeDataOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/RedundancyDetectionSettings.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/RedundancyDetectionSettings.cs index d7294360c08..b3c99568fcb 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/RedundancyDetectionSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/RedundancyDetectionSettings.cs @@ -76,7 +76,7 @@ public RedundancyDetectionSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Ediscovery.RedundancyDetectionSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.RedundancyDetectionSettings(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isEnabled", IsEnabled); writer.WriteIntValue("maxWords", MaxWords); writer.WriteIntValue("minWords", MinWords); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSet.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSet.cs index 1a37f14818c..95569879fe8 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSet.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSet.cs @@ -73,7 +73,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSet(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSetCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSetCollectionResponse.cs index 5851a880cee..65fdda1eeac 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSetCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSetCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ReviewSetCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSetCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSetCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSetQuery.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSetQuery.cs index 62fa84272d1..c55c4184639 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSetQuery.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSetQuery.cs @@ -95,7 +95,7 @@ public string Query /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSetQuery CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSetQuery(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSetQueryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSetQueryCollectionResponse.cs index 57cb7b700e2..22953c1b4b4 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSetQueryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/ReviewSetQueryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ReviewSetQueryCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSetQueryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.ReviewSetQueryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/SiteSource.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/SiteSource.cs index ea6efff8bbe..3ed498bb94e 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/SiteSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/SiteSource.cs @@ -42,7 +42,7 @@ public SiteSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.SiteSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.SiteSource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("site", Site); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/SiteSourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/SiteSourceCollectionResponse.cs index bfc0430df66..45a44e9f024 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/SiteSourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/SiteSourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SiteSourceCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.SiteSourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.SiteSourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/SourceCollection.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/SourceCollection.cs index acaf9c47dfb..42cbe305ce6 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/SourceCollection.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/SourceCollection.cs @@ -197,7 +197,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.SourceCollection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.SourceCollection(); } /// @@ -229,7 +229,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("additionalSources", AdditionalSources); writer.WriteObjectValue("addToReviewSetOperation", AddToReviewSetOperation); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/SourceCollectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/SourceCollectionCollectionResponse.cs index 20dd09fc80d..89b0db2e942 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/SourceCollectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/SourceCollectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SourceCollectionCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.SourceCollectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.SourceCollectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/Tag.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/Tag.cs index 4c0f4fefb37..fcdc8b60b3a 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/Tag.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/Tag.cs @@ -111,7 +111,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.Tag CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.Tag(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("childSelectability", ChildSelectability); writer.WriteCollectionOfObjectValues("childTags", ChildTags); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/TagCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/TagCollectionResponse.cs index 7cc93d715d5..a28a28219d4 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/TagCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/TagCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TagCollectionResponse : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.TagCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.TagCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/TagOperation.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/TagOperation.cs index 3415b6416e3..0b473f0442a 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/TagOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/TagOperation.cs @@ -19,7 +19,7 @@ public partial class TagOperation : global::Microsoft.Graph.Beta.Models.Ediscove /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.TagOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.TagOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/TopicModelingSettings.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/TopicModelingSettings.cs index 2e50cd20365..b639b5859c6 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/TopicModelingSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/TopicModelingSettings.cs @@ -76,7 +76,7 @@ public TopicModelingSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Ediscovery.TopicModelingSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.TopicModelingSettings(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("dynamicallyAdjustTopicCount", DynamicallyAdjustTopicCount); writer.WriteBoolValue("ignoreNumbers", IgnoreNumbers); writer.WriteBoolValue("isEnabled", IsEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/UnifiedGroupSource.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/UnifiedGroupSource.cs index b08c47fd83b..ef393ca4156 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/UnifiedGroupSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/UnifiedGroupSource.cs @@ -48,7 +48,7 @@ public UnifiedGroupSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.UnifiedGroupSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.UnifiedGroupSource(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("group", Group); writer.WriteEnumValue("includedSources", IncludedSources); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/UnifiedGroupSourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/UnifiedGroupSourceCollectionResponse.cs index facc31fb2dd..bf891bfca61 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/UnifiedGroupSourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/UnifiedGroupSourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedGroupSourceCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.UnifiedGroupSourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.UnifiedGroupSourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/UserSource.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/UserSource.cs index 33a8afcf33e..4e3695bfece 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/UserSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/UserSource.cs @@ -64,7 +64,7 @@ public UserSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.UserSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.UserSource(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("email", Email); writer.WriteEnumValue("includedSources", IncludedSources); diff --git a/src/Microsoft.Graph/Generated/Models/Ediscovery/UserSourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Ediscovery/UserSourceCollectionResponse.cs index c52f80dd31a..ca1f4facd96 100644 --- a/src/Microsoft.Graph/Generated/Models/Ediscovery/UserSourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Ediscovery/UserSourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserSourceCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Ediscovery.UserSourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Ediscovery.UserSourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EditAction.cs b/src/Microsoft.Graph/Generated/Models/EditAction.cs index b5f4da575cf..2f40e71d6ea 100644 --- a/src/Microsoft.Graph/Generated/Models/EditAction.cs +++ b/src/Microsoft.Graph/Generated/Models/EditAction.cs @@ -52,7 +52,7 @@ public EditAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EditAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EditAction(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/EditionUpgradeConfiguration.cs b/src/Microsoft.Graph/Generated/Models/EditionUpgradeConfiguration.cs index 7ca8fe7666e..5d18f7c6c43 100644 --- a/src/Microsoft.Graph/Generated/Models/EditionUpgradeConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/EditionUpgradeConfiguration.cs @@ -77,7 +77,7 @@ public EditionUpgradeConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EditionUpgradeConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EditionUpgradeConfiguration(); } /// @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("license", License); writer.WriteEnumValue("licenseType", LicenseType); diff --git a/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackAudienceEngagementSettings.cs b/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackAudienceEngagementSettings.cs index 7dcbda919f7..e462d467440 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackAudienceEngagementSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackAudienceEngagementSettings.cs @@ -70,7 +70,7 @@ public EducationAiFeedbackAudienceEngagementSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationAiFeedbackAudienceEngagementSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAiFeedbackAudienceEngagementSettings(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("areEngagementStrategiesEnabled", AreEngagementStrategiesEnabled); writer.WriteBoolValue("isCallToActionEnabled", IsCallToActionEnabled); writer.WriteBoolValue("isEmotionalAndIntellectualAppealEnabled", IsEmotionalAndIntellectualAppealEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackContentSettings.cs b/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackContentSettings.cs index f6d3943e18b..22e368a24d5 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackContentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackContentSettings.cs @@ -70,7 +70,7 @@ public EducationAiFeedbackContentSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationAiFeedbackContentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAiFeedbackContentSettings(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isMessageClarityEnabled", IsMessageClarityEnabled); writer.WriteBoolValue("isQualityOfInformationEnabled", IsQualityOfInformationEnabled); writer.WriteBoolValue("isSpeechOrganizationEnabled", IsSpeechOrganizationEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackCriteria.cs b/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackCriteria.cs index 88e8c62c696..d7ecc5be431 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackCriteria.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackCriteria.cs @@ -74,7 +74,7 @@ public EducationAiFeedbackCriteria() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationAiFeedbackCriteria CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAiFeedbackCriteria(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("aiFeedbackSettings", AiFeedbackSettings); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("speechType", SpeechType); diff --git a/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackDeliverySettings.cs b/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackDeliverySettings.cs index fce9412fba1..de884f24b7f 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackDeliverySettings.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackDeliverySettings.cs @@ -70,7 +70,7 @@ public EducationAiFeedbackDeliverySettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationAiFeedbackDeliverySettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAiFeedbackDeliverySettings(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("areRhetoricalTechniquesEnabled", AreRhetoricalTechniquesEnabled); writer.WriteBoolValue("isLanguageUseEnabled", IsLanguageUseEnabled); writer.WriteBoolValue("isStyleEnabled", IsStyleEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackSettings.cs b/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackSettings.cs index 1a0c879a6d9..60d31fc2623 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAiFeedbackSettings.cs @@ -100,7 +100,7 @@ public EducationAiFeedbackSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationAiFeedbackSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAiFeedbackSettings(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("audienceEngagementSettings", AudienceEngagementSettings); writer.WriteObjectValue("contentSettings", ContentSettings); writer.WriteObjectValue("deliverySettings", DeliverySettings); diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignment.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignment.cs index 8f2f45a80ad..e41be63e5c2 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignment.cs @@ -389,7 +389,7 @@ public string WebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAssignment(); } /// @@ -438,7 +438,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("addedStudentAction", AddedStudentAction); writer.WriteEnumValue("addToCalendarAction", AddToCalendarAction); diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignmentClassRecipient.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignmentClassRecipient.cs index e9e0578794d..b08b5f2acab 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignmentClassRecipient.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignmentClassRecipient.cs @@ -26,7 +26,7 @@ public EducationAssignmentClassRecipient() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationAssignmentClassRecipient CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAssignmentClassRecipient(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignmentCollectionResponse.cs index c0fb69714d4..12d05736a0e 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationAssignmentCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignmentDefaults.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignmentDefaults.cs index b2667e41220..fbba920cfa9 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignmentDefaults.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignmentDefaults.cs @@ -54,7 +54,7 @@ public string NotificationChannelUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationAssignmentDefaults CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAssignmentDefaults(); } /// @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("addedStudentAction", AddedStudentAction); writer.WriteEnumValue("addToCalendarAction", AddToCalendarAction); diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignmentGrade.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignmentGrade.cs index f026b072cf9..23b6aae38f1 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignmentGrade.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignmentGrade.cs @@ -74,7 +74,7 @@ public EducationAssignmentGrade() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationAssignmentGrade CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -101,7 +101,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("gradedBy", GradedBy); writer.WriteDateTimeOffsetValue("gradedDateTime", GradedDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignmentGradeType.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignmentGradeType.cs index 7bba551e8ba..4b072a83c2e 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignmentGradeType.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignmentGradeType.cs @@ -52,7 +52,7 @@ public EducationAssignmentGradeType() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationAssignmentGradeType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignmentGroupRecipient.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignmentGroupRecipient.cs index 2ac7f76c63d..2aa5528d831 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignmentGroupRecipient.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignmentGroupRecipient.cs @@ -26,7 +26,7 @@ public EducationAssignmentGroupRecipient() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationAssignmentGroupRecipient CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAssignmentGroupRecipient(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignmentIndividualRecipient.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignmentIndividualRecipient.cs index a3ab803eadc..ef178a6b833 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignmentIndividualRecipient.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignmentIndividualRecipient.cs @@ -42,7 +42,7 @@ public EducationAssignmentIndividualRecipient() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationAssignmentIndividualRecipient CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAssignmentIndividualRecipient(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("recipients", Recipients); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignmentPointsGrade.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignmentPointsGrade.cs index 47a8d3d6619..05a55d83225 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignmentPointsGrade.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignmentPointsGrade.cs @@ -48,7 +48,7 @@ public EducationAssignmentPointsGrade() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationAssignmentPointsGrade CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAssignmentPointsGrade(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("grade", Grade); writer.WriteFloatValue("points", Points); diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignmentPointsGradeType.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignmentPointsGradeType.cs index 313dbe88d55..984ec7b9980 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignmentPointsGradeType.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignmentPointsGradeType.cs @@ -32,7 +32,7 @@ public EducationAssignmentPointsGradeType() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationAssignmentPointsGradeType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAssignmentPointsGradeType(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteFloatValue("maxPoints", MaxPoints); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignmentRecipient.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignmentRecipient.cs index 2830dd495cc..32918373504 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignmentRecipient.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignmentRecipient.cs @@ -52,7 +52,7 @@ public EducationAssignmentRecipient() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationAssignmentRecipient CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignmentResource.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignmentResource.cs index f375d26eb5a..1046ec25cb6 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignmentResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignmentResource.cs @@ -57,7 +57,7 @@ public bool? DistributeForStudentWork /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationAssignmentResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAssignmentResource(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("dependentResources", DependentResources); writer.WriteBoolValue("distributeForStudentWork", DistributeForStudentWork); diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignmentResourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignmentResourceCollectionResponse.cs index 270cc9ce3d1..62757f2b681 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignmentResourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignmentResourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationAssignmentResourceCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationAssignmentResourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAssignmentResourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/EducationAssignmentSettings.cs index 972dccfaddc..6fb7c43bc4b 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationAssignmentSettings.cs @@ -73,7 +73,7 @@ public bool? SubmissionAnimationDisabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationAssignmentSettings(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("defaultGradingScheme", DefaultGradingScheme); writer.WriteCollectionOfObjectValues("gradingCategories", GradingCategories); diff --git a/src/Microsoft.Graph/Generated/Models/EducationCategory.cs b/src/Microsoft.Graph/Generated/Models/EducationCategory.cs index 5ea5939cf26..133d5476e79 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationCategory.cs @@ -35,7 +35,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationCategory(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationCategoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationCategoryCollectionResponse.cs index f7a93707461..a30d6aeaf6e 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationCategoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationCategoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationCategoryCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationCategoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationChannelResource.cs b/src/Microsoft.Graph/Generated/Models/EducationChannelResource.cs index b850456f9f0..6ef8cd5a8e4 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationChannelResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationChannelResource.cs @@ -42,7 +42,7 @@ public EducationChannelResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationChannelResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationChannelResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("url", Url); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationClass.cs b/src/Microsoft.Graph/Generated/Models/EducationClass.cs index 52e845097cd..9af33be9025 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationClass.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationClass.cs @@ -345,7 +345,7 @@ public string MailNickname /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationClass CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationClass(); } /// @@ -385,7 +385,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignmentCategories", AssignmentCategories); writer.WriteObjectValue("assignmentDefaults", AssignmentDefaults); diff --git a/src/Microsoft.Graph/Generated/Models/EducationClassCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationClassCollectionResponse.cs index 30b81179109..f4b2cb085a6 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationClassCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationClassCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationClassCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationClassCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationClassCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationCourse.cs b/src/Microsoft.Graph/Generated/Models/EducationCourse.cs index a00f0522598..89918dcb889 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationCourse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationCourse.cs @@ -132,7 +132,7 @@ public EducationCourse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationCourse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationCourse(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("courseNumber", CourseNumber); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/EducationExcelResource.cs b/src/Microsoft.Graph/Generated/Models/EducationExcelResource.cs index 9bf1bb3bc9f..0d75ccf0a8c 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationExcelResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationExcelResource.cs @@ -42,7 +42,7 @@ public EducationExcelResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationExcelResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationExcelResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fileUrl", FileUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationExternalResource.cs b/src/Microsoft.Graph/Generated/Models/EducationExternalResource.cs index 0dc91b236b2..3ff00ab15c0 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationExternalResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationExternalResource.cs @@ -42,7 +42,7 @@ public EducationExternalResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationExternalResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationExternalResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("webUrl", WebUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationFeedback.cs b/src/Microsoft.Graph/Generated/Models/EducationFeedback.cs index c6373dca437..9c268cad685 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationFeedback.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationFeedback.cs @@ -90,7 +90,7 @@ public EducationFeedback() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationFeedback CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationFeedback(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("feedbackBy", FeedbackBy); writer.WriteDateTimeOffsetValue("feedbackDateTime", FeedbackDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/EducationFeedbackOutcome.cs b/src/Microsoft.Graph/Generated/Models/EducationFeedbackOutcome.cs index 19b6339f4ee..51d1adef694 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationFeedbackOutcome.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationFeedbackOutcome.cs @@ -58,7 +58,7 @@ public EducationFeedbackOutcome() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationFeedbackOutcome CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationFeedbackOutcome(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("feedback", Feedback); writer.WriteObjectValue("publishedFeedback", PublishedFeedback); diff --git a/src/Microsoft.Graph/Generated/Models/EducationFeedbackResourceOutcome.cs b/src/Microsoft.Graph/Generated/Models/EducationFeedbackResourceOutcome.cs index 754cf14caff..912b470184e 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationFeedbackResourceOutcome.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationFeedbackResourceOutcome.cs @@ -48,7 +48,7 @@ public EducationFeedbackResourceOutcome() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationFeedbackResourceOutcome CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationFeedbackResourceOutcome(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("feedbackResource", FeedbackResource); writer.WriteEnumValue("resourceStatus", ResourceStatus); diff --git a/src/Microsoft.Graph/Generated/Models/EducationFileResource.cs b/src/Microsoft.Graph/Generated/Models/EducationFileResource.cs index f1221f2fa76..3b292fd27cd 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationFileResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationFileResource.cs @@ -42,7 +42,7 @@ public EducationFileResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationFileResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationFileResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fileUrl", FileUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationGradingCategory.cs b/src/Microsoft.Graph/Generated/Models/EducationGradingCategory.cs index 41d5773263e..459dccb6b8f 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationGradingCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationGradingCategory.cs @@ -41,7 +41,7 @@ public int? PercentageWeight /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationGradingCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationGradingCategory(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteIntValue("percentageWeight", PercentageWeight); diff --git a/src/Microsoft.Graph/Generated/Models/EducationGradingCategoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationGradingCategoryCollectionResponse.cs index ba464ab2c62..2b55aba7995 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationGradingCategoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationGradingCategoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationGradingCategoryCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationGradingCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationGradingCategoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationGradingScheme.cs b/src/Microsoft.Graph/Generated/Models/EducationGradingScheme.cs index 6fbd726c762..acfb789f4df 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationGradingScheme.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationGradingScheme.cs @@ -57,7 +57,7 @@ public bool? HidePointsDuringGrading /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationGradingScheme CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationGradingScheme(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfObjectValues("grades", Grades); diff --git a/src/Microsoft.Graph/Generated/Models/EducationGradingSchemeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationGradingSchemeCollectionResponse.cs index 556468ca687..cbf7518ae3b 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationGradingSchemeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationGradingSchemeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationGradingSchemeCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationGradingSchemeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationGradingSchemeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationGradingSchemeGrade.cs b/src/Microsoft.Graph/Generated/Models/EducationGradingSchemeGrade.cs index 662ad4d0c12..fb91c961451 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationGradingSchemeGrade.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationGradingSchemeGrade.cs @@ -80,7 +80,7 @@ public EducationGradingSchemeGrade() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationGradingSchemeGrade CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationGradingSchemeGrade(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteFloatValue("defaultPercentage", DefaultPercentage); writer.WriteStringValue("displayName", DisplayName); writer.WriteFloatValue("minPercentage", MinPercentage); diff --git a/src/Microsoft.Graph/Generated/Models/EducationItemBody.cs b/src/Microsoft.Graph/Generated/Models/EducationItemBody.cs index 711e5a0094a..24c0628c6ab 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationItemBody.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationItemBody.cs @@ -74,7 +74,7 @@ public EducationItemBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationItemBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationItemBody(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("content", Content); writer.WriteEnumValue("contentType", ContentType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/EducationLinkResource.cs b/src/Microsoft.Graph/Generated/Models/EducationLinkResource.cs index dc6b65be290..86810c738e1 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationLinkResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationLinkResource.cs @@ -42,7 +42,7 @@ public EducationLinkResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationLinkResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationLinkResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("link", Link); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationLinkedAssignmentResource.cs b/src/Microsoft.Graph/Generated/Models/EducationLinkedAssignmentResource.cs index d06453d6c92..7f4de5dc275 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationLinkedAssignmentResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationLinkedAssignmentResource.cs @@ -42,7 +42,7 @@ public EducationLinkedAssignmentResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationLinkedAssignmentResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationLinkedAssignmentResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("url", Url); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationMediaResource.cs b/src/Microsoft.Graph/Generated/Models/EducationMediaResource.cs index 142c4cb69a9..592f454a932 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationMediaResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationMediaResource.cs @@ -42,7 +42,7 @@ public EducationMediaResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationMediaResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationMediaResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fileUrl", FileUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationModule.cs b/src/Microsoft.Graph/Generated/Models/EducationModule.cs index 4eb6e6bdd89..365bb75efa2 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationModule.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationModule.cs @@ -155,7 +155,7 @@ public string ResourcesFolderUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationModule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationModule(); } /// @@ -185,7 +185,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/EducationModuleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationModuleCollectionResponse.cs index 1c15f32e1c9..51a0256939e 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationModuleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationModuleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationModuleCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationModuleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationModuleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationModuleResource.cs b/src/Microsoft.Graph/Generated/Models/EducationModuleResource.cs index a5689776eb3..5c4859b62fc 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationModuleResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationModuleResource.cs @@ -35,7 +35,7 @@ public partial class EducationModuleResource : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationModuleResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationModuleResource(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("resource", Resource); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationModuleResourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationModuleResourceCollectionResponse.cs index 6d4729b7299..4cf241df7dc 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationModuleResourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationModuleResourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationModuleResourceCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationModuleResourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationModuleResourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationOnPremisesInfo.cs b/src/Microsoft.Graph/Generated/Models/EducationOnPremisesInfo.cs index 65cc4199936..93bec5044fa 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationOnPremisesInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationOnPremisesInfo.cs @@ -68,7 +68,7 @@ public EducationOnPremisesInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationOnPremisesInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationOnPremisesInfo(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("immutableId", ImmutableId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/EducationOrganization.cs b/src/Microsoft.Graph/Generated/Models/EducationOrganization.cs index 7fa9872d4dd..6675fdaf2b9 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationOrganization.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationOrganization.cs @@ -73,7 +73,7 @@ public string ExternalSourceDetail /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationOrganization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/EducationOutcome.cs b/src/Microsoft.Graph/Generated/Models/EducationOutcome.cs index 388d29bd132..af01ebb2e2d 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationOutcome.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationOutcome.cs @@ -41,7 +41,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationOutcome CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("lastModifiedBy", LastModifiedBy); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/EducationOutcomeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationOutcomeCollectionResponse.cs index 3da8ab5be74..5145902d31d 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationOutcomeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationOutcomeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationOutcomeCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationOutcomeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationOutcomeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationPointsOutcome.cs b/src/Microsoft.Graph/Generated/Models/EducationPointsOutcome.cs index f13a17d179d..841cb04b5d3 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationPointsOutcome.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationPointsOutcome.cs @@ -58,7 +58,7 @@ public EducationPointsOutcome() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationPointsOutcome CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationPointsOutcome(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("points", Points); writer.WriteObjectValue("publishedPoints", PublishedPoints); diff --git a/src/Microsoft.Graph/Generated/Models/EducationPowerPointResource.cs b/src/Microsoft.Graph/Generated/Models/EducationPowerPointResource.cs index fd49537ac49..0d6956179b6 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationPowerPointResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationPowerPointResource.cs @@ -42,7 +42,7 @@ public EducationPowerPointResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationPowerPointResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationPowerPointResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fileUrl", FileUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationResource.cs b/src/Microsoft.Graph/Generated/Models/EducationResource.cs index a7fc0650800..8f32a059f78 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationResource.cs @@ -112,7 +112,7 @@ public EducationResource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -152,7 +152,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/EducationRoot.cs b/src/Microsoft.Graph/Generated/Models/EducationRoot.cs index 1f3b626c8d5..68f24da2eba 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationRoot.cs @@ -132,7 +132,7 @@ public EducationRoot() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationRoot(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("classes", Classes); writer.WriteObjectValue("me", Me); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/EducationRubric.cs b/src/Microsoft.Graph/Generated/Models/EducationRubric.cs index abf879aed93..106d4f92378 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationRubric.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationRubric.cs @@ -143,7 +143,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationRubric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationRubric(); } /// @@ -171,7 +171,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/EducationRubricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationRubricCollectionResponse.cs index f92264f2ed6..b36211540b8 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationRubricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationRubricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationRubricCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationRubricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationRubricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationRubricOutcome.cs b/src/Microsoft.Graph/Generated/Models/EducationRubricOutcome.cs index 23a9f926fd5..bf330a30bc2 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationRubricOutcome.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationRubricOutcome.cs @@ -90,7 +90,7 @@ public EducationRubricOutcome() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationRubricOutcome CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationRubricOutcome(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("publishedRubricQualityFeedback", PublishedRubricQualityFeedback); writer.WriteCollectionOfObjectValues("publishedRubricQualitySelectedLevels", PublishedRubricQualitySelectedLevels); diff --git a/src/Microsoft.Graph/Generated/Models/EducationSchool.cs b/src/Microsoft.Graph/Generated/Models/EducationSchool.cs index 9cc5e5ab4e2..15be0935782 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationSchool.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationSchool.cs @@ -250,7 +250,7 @@ public EducationSchool() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationSchool CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationSchool(); } /// @@ -283,7 +283,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("address", Address); writer.WriteObjectValue("administrativeUnit", AdministrativeUnit); diff --git a/src/Microsoft.Graph/Generated/Models/EducationSchoolCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationSchoolCollectionResponse.cs index 19b01cf9d60..386aa575b30 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationSchoolCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationSchoolCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationSchoolCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationSchoolCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationSchoolCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachAudienceEngagementSettings.cs b/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachAudienceEngagementSettings.cs index 1dba7515262..8795bfa2594 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachAudienceEngagementSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachAudienceEngagementSettings.cs @@ -58,7 +58,7 @@ public EducationSpeakerCoachAudienceEngagementSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationSpeakerCoachAudienceEngagementSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationSpeakerCoachAudienceEngagementSettings(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isBodyLanguageEnabled", IsBodyLanguageEnabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachContentSettings.cs b/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachContentSettings.cs index 52b0631d3d6..45dde7c99a9 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachContentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachContentSettings.cs @@ -64,7 +64,7 @@ public EducationSpeakerCoachContentSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationSpeakerCoachContentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationSpeakerCoachContentSettings(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isInclusivenessEnabled", IsInclusivenessEnabled); writer.WriteBoolValue("isRepetitiveLanguageEnabled", IsRepetitiveLanguageEnabled); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachDeliverySettings.cs b/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachDeliverySettings.cs index 54b9cac9437..217ed2d5bd2 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachDeliverySettings.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachDeliverySettings.cs @@ -76,7 +76,7 @@ public EducationSpeakerCoachDeliverySettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationSpeakerCoachDeliverySettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationSpeakerCoachDeliverySettings(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("areFillerWordsEnabled", AreFillerWordsEnabled); writer.WriteBoolValue("isPaceEnabled", IsPaceEnabled); writer.WriteBoolValue("isPitchEnabled", IsPitchEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachSettings.cs b/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachSettings.cs index e432bbb33d9..745123183f9 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationSpeakerCoachSettings.cs @@ -100,7 +100,7 @@ public EducationSpeakerCoachSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationSpeakerCoachSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationSpeakerCoachSettings(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("audienceEngagementSettings", AudienceEngagementSettings); writer.WriteObjectValue("contentSettings", ContentSettings); writer.WriteObjectValue("deliverySettings", DeliverySettings); diff --git a/src/Microsoft.Graph/Generated/Models/EducationSpeakerProgressResource.cs b/src/Microsoft.Graph/Generated/Models/EducationSpeakerProgressResource.cs index b8c525a7bcc..6661f849c71 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationSpeakerProgressResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationSpeakerProgressResource.cs @@ -120,7 +120,7 @@ public EducationSpeakerProgressResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationSpeakerProgressResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationSpeakerProgressResource(); } /// @@ -148,7 +148,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("aiFeedbackCriteria", AiFeedbackCriteria); writer.WriteBoolValue("isAiFeedbackEnabled", IsAiFeedbackEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/EducationStudent.cs b/src/Microsoft.Graph/Generated/Models/EducationStudent.cs index 3f6b2f75e3b..b9853fd226f 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationStudent.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationStudent.cs @@ -129,7 +129,7 @@ public EducationStudent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationStudent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationStudent(); } /// @@ -155,7 +155,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateValue("birthDate", BirthDate); writer.WriteStringValue("externalId", ExternalId); writer.WriteEnumValue("gender", Gender); diff --git a/src/Microsoft.Graph/Generated/Models/EducationSubmission.cs b/src/Microsoft.Graph/Generated/Models/EducationSubmission.cs index 211814718a8..383756feada 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationSubmission.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationSubmission.cs @@ -269,7 +269,7 @@ public string WebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationSubmission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationSubmission(); } /// @@ -308,7 +308,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("outcomes", Outcomes); writer.WriteObjectValue("recipient", Recipient); diff --git a/src/Microsoft.Graph/Generated/Models/EducationSubmissionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationSubmissionCollectionResponse.cs index 2a491bd6fe4..5cd25d4b762 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationSubmissionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationSubmissionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationSubmissionCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationSubmissionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationSubmissionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationSubmissionIndividualRecipient.cs b/src/Microsoft.Graph/Generated/Models/EducationSubmissionIndividualRecipient.cs index 4c306fdd096..50b9b74bf21 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationSubmissionIndividualRecipient.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationSubmissionIndividualRecipient.cs @@ -42,7 +42,7 @@ public EducationSubmissionIndividualRecipient() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationSubmissionIndividualRecipient CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationSubmissionIndividualRecipient(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userId", UserId); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationSubmissionRecipient.cs b/src/Microsoft.Graph/Generated/Models/EducationSubmissionRecipient.cs index 469f46040f5..c7a1e2c7c85 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationSubmissionRecipient.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationSubmissionRecipient.cs @@ -52,7 +52,7 @@ public EducationSubmissionRecipient() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationSubmissionRecipient CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationSubmissionResource.cs b/src/Microsoft.Graph/Generated/Models/EducationSubmissionResource.cs index d8603516920..4e7519b17da 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationSubmissionResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationSubmissionResource.cs @@ -67,7 +67,7 @@ public string AssignmentResourceUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationSubmissionResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationSubmissionResource(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assignmentResourceUrl", AssignmentResourceUrl); writer.WriteCollectionOfObjectValues("dependentResources", DependentResources); diff --git a/src/Microsoft.Graph/Generated/Models/EducationSubmissionResourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationSubmissionResourceCollectionResponse.cs index 5f923d89189..5ec52645a0f 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationSubmissionResourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationSubmissionResourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationSubmissionResourceCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationSubmissionResourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationSubmissionResourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationTeacher.cs b/src/Microsoft.Graph/Generated/Models/EducationTeacher.cs index 114cf1cfc01..adce6e98bd0 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationTeacher.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationTeacher.cs @@ -84,7 +84,7 @@ public EducationTeacher() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationTeacher CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationTeacher(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("externalId", ExternalId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("teacherNumber", TeacherNumber); diff --git a/src/Microsoft.Graph/Generated/Models/EducationTeamsAppResource.cs b/src/Microsoft.Graph/Generated/Models/EducationTeamsAppResource.cs index 9a0d92df0bc..2e09b825af4 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationTeamsAppResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationTeamsAppResource.cs @@ -90,7 +90,7 @@ public EducationTeamsAppResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationTeamsAppResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationTeamsAppResource(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appIconWebUrl", AppIconWebUrl); writer.WriteStringValue("appId", AppId); diff --git a/src/Microsoft.Graph/Generated/Models/EducationTerm.cs b/src/Microsoft.Graph/Generated/Models/EducationTerm.cs index 94ca6c97063..c29fecaa010 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationTerm.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationTerm.cs @@ -97,7 +97,7 @@ public EducationTerm() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationTerm CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationTerm(); } /// @@ -121,7 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateValue("endDate", EndDate); writer.WriteStringValue("externalId", ExternalId); diff --git a/src/Microsoft.Graph/Generated/Models/EducationUser.cs b/src/Microsoft.Graph/Generated/Models/EducationUser.cs index 44d3b694b93..11525329185 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationUser.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationUser.cs @@ -577,7 +577,7 @@ public string UserType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationUser(); } /// @@ -634,7 +634,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("accountEnabled", AccountEnabled); writer.WriteCollectionOfObjectValues("assignedLicenses", AssignedLicenses); diff --git a/src/Microsoft.Graph/Generated/Models/EducationUserCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationUserCollectionResponse.cs index f5d486e6c0a..e0b8b6bde0b 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationUserCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationUserCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationUserCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationUserCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationUserCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationWordResource.cs b/src/Microsoft.Graph/Generated/Models/EducationWordResource.cs index 14cf5652951..022eeeb6b92 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationWordResource.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationWordResource.cs @@ -42,7 +42,7 @@ public EducationWordResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationWordResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationWordResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fileUrl", FileUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationalActivity.cs b/src/Microsoft.Graph/Generated/Models/EducationalActivity.cs index 4185fe68a2c..61f081ad3d5 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationalActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationalActivity.cs @@ -77,7 +77,7 @@ public EducationalActivity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationalActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationalActivity(); } /// @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateValue("completionMonthYear", CompletionMonthYear); writer.WriteDateValue("endMonthYear", EndMonthYear); diff --git a/src/Microsoft.Graph/Generated/Models/EducationalActivityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EducationalActivityCollectionResponse.cs index b6236655366..2b35c03f87a 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationalActivityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationalActivityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EducationalActivityCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EducationalActivityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationalActivityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EducationalActivityDetail.cs b/src/Microsoft.Graph/Generated/Models/EducationalActivityDetail.cs index b76767c3919..c5edb2702b3 100644 --- a/src/Microsoft.Graph/Generated/Models/EducationalActivityDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/EducationalActivityDetail.cs @@ -196,7 +196,7 @@ public EducationalActivityDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EducationalActivityDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EducationalActivityDetail(); } /// @@ -225,7 +225,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("abbreviation", Abbreviation); writer.WriteCollectionOfPrimitiveValues("activities", Activities); writer.WriteCollectionOfPrimitiveValues("awards", Awards); diff --git a/src/Microsoft.Graph/Generated/Models/ElevationRequestApplicationDetail.cs b/src/Microsoft.Graph/Generated/Models/ElevationRequestApplicationDetail.cs index 90c74c7df99..9c92f1458af 100644 --- a/src/Microsoft.Graph/Generated/Models/ElevationRequestApplicationDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/ElevationRequestApplicationDetail.cs @@ -197,7 +197,7 @@ public ElevationRequestApplicationDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ElevationRequestApplicationDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ElevationRequestApplicationDetail(); } /// @@ -226,7 +226,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("fileDescription", FileDescription); writer.WriteStringValue("fileHash", FileHash); writer.WriteStringValue("fileName", FileName); diff --git a/src/Microsoft.Graph/Generated/Models/EmailActivityStatistics.cs b/src/Microsoft.Graph/Generated/Models/EmailActivityStatistics.cs index 2235af21c08..b9378f2291f 100644 --- a/src/Microsoft.Graph/Generated/Models/EmailActivityStatistics.cs +++ b/src/Microsoft.Graph/Generated/Models/EmailActivityStatistics.cs @@ -44,7 +44,7 @@ public EmailActivityStatistics() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmailActivityStatistics CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmailActivityStatistics(); } /// @@ -66,7 +66,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeSpanValue("afterHours", AfterHours); writer.WriteTimeSpanValue("readEmail", ReadEmail); diff --git a/src/Microsoft.Graph/Generated/Models/EmailAddress.cs b/src/Microsoft.Graph/Generated/Models/EmailAddress.cs index 340e0d2724f..cf193926b5d 100644 --- a/src/Microsoft.Graph/Generated/Models/EmailAddress.cs +++ b/src/Microsoft.Graph/Generated/Models/EmailAddress.cs @@ -84,7 +84,7 @@ public EmailAddress() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EmailAddress CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -111,7 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("address", Address); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/EmailAuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/EmailAuthenticationMethod.cs index 3b59d48c5bb..49a7900a65d 100644 --- a/src/Microsoft.Graph/Generated/Models/EmailAuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/EmailAuthenticationMethod.cs @@ -42,7 +42,7 @@ public EmailAuthenticationMethod() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmailAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmailAuthenticationMethod(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("emailAddress", EmailAddress); } diff --git a/src/Microsoft.Graph/Generated/Models/EmailAuthenticationMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EmailAuthenticationMethodCollectionResponse.cs index f908b689bd1..e805a66beab 100644 --- a/src/Microsoft.Graph/Generated/Models/EmailAuthenticationMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EmailAuthenticationMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EmailAuthenticationMethodCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmailAuthenticationMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmailAuthenticationMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EmailAuthenticationMethodConfiguration.cs b/src/Microsoft.Graph/Generated/Models/EmailAuthenticationMethodConfiguration.cs index c7f43f6abbf..bf0142f1ff0 100644 --- a/src/Microsoft.Graph/Generated/Models/EmailAuthenticationMethodConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/EmailAuthenticationMethodConfiguration.cs @@ -48,7 +48,7 @@ public EmailAuthenticationMethodConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmailAuthenticationMethodConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmailAuthenticationMethodConfiguration(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("allowExternalIdToUseEmailOtp", AllowExternalIdToUseEmailOtp); writer.WriteCollectionOfObjectValues("includeTargets", IncludeTargets); diff --git a/src/Microsoft.Graph/Generated/Models/EmailFileAssessmentRequest.cs b/src/Microsoft.Graph/Generated/Models/EmailFileAssessmentRequest.cs index 6d7ee2212b1..05f184e0c3a 100644 --- a/src/Microsoft.Graph/Generated/Models/EmailFileAssessmentRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/EmailFileAssessmentRequest.cs @@ -64,7 +64,7 @@ public EmailFileAssessmentRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmailFileAssessmentRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmailFileAssessmentRequest(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contentData", ContentData); writer.WriteEnumValue("destinationRoutingReason", DestinationRoutingReason); diff --git a/src/Microsoft.Graph/Generated/Models/EmailIdentity.cs b/src/Microsoft.Graph/Generated/Models/EmailIdentity.cs index 97d8ee8f86c..0064bcb04c0 100644 --- a/src/Microsoft.Graph/Generated/Models/EmailIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/EmailIdentity.cs @@ -42,7 +42,7 @@ public EmailIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmailIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmailIdentity(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("email", Email); } diff --git a/src/Microsoft.Graph/Generated/Models/EmailNotificationsSetting.cs b/src/Microsoft.Graph/Generated/Models/EmailNotificationsSetting.cs index 7071fa9f2d7..baf99e1b72e 100644 --- a/src/Microsoft.Graph/Generated/Models/EmailNotificationsSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/EmailNotificationsSetting.cs @@ -47,7 +47,7 @@ public bool? IsEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmailNotificationsSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmailNotificationsSetting(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("additionalEvents", AdditionalEvents); writer.WriteBoolValue("isEnabled", IsEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/EmailPayloadDetail.cs b/src/Microsoft.Graph/Generated/Models/EmailPayloadDetail.cs index 63035fd6c12..8b2eb198e8e 100644 --- a/src/Microsoft.Graph/Generated/Models/EmailPayloadDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/EmailPayloadDetail.cs @@ -80,7 +80,7 @@ public EmailPayloadDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmailPayloadDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmailPayloadDetail(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fromEmail", FromEmail); writer.WriteStringValue("fromName", FromName); diff --git a/src/Microsoft.Graph/Generated/Models/EmailSettings.cs b/src/Microsoft.Graph/Generated/Models/EmailSettings.cs index 65ef81a5a14..42d2daaa2a4 100644 --- a/src/Microsoft.Graph/Generated/Models/EmailSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/EmailSettings.cs @@ -74,7 +74,7 @@ public EmailSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EmailSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmailSettings(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("senderDomain", SenderDomain); writer.WriteBoolValue("useCompanyBranding", UseCompanyBranding); diff --git a/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCode.cs b/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCode.cs index 88ab7e19392..35130dea207 100644 --- a/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCode.cs +++ b/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCode.cs @@ -101,7 +101,7 @@ public EmbeddedSIMActivationCode() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCode CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCode(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("integratedCircuitCardIdentifier", IntegratedCircuitCardIdentifier); writer.WriteStringValue("matchingIdentifier", MatchingIdentifier); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePool.cs b/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePool.cs index a8f7fb98ea3..3c9b07f59fe 100644 --- a/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePool.cs +++ b/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePool.cs @@ -102,7 +102,7 @@ public DateTimeOffset? ModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePool CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePool(); } /// @@ -128,7 +128,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activationCodeCount", ActivationCodeCount); writer.WriteCollectionOfObjectValues("activationCodes", ActivationCodes); diff --git a/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePoolAssignment.cs b/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePoolAssignment.cs index d3584f3fb4b..7895a54d920 100644 --- a/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePoolAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePoolAssignment.cs @@ -36,7 +36,7 @@ public partial class EmbeddedSIMActivationCodePoolAssignment : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePoolAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePoolAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePoolAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePoolAssignmentCollectionResponse.cs index c06e1ce26c0..479b1987279 100644 --- a/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePoolAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePoolAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EmbeddedSIMActivationCodePoolAssignmentCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePoolAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePoolAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePoolCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePoolCollectionResponse.cs index dd63602da5e..d1f1b05b61b 100644 --- a/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePoolCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EmbeddedSIMActivationCodePoolCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EmbeddedSIMActivationCodePoolCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePoolCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmbeddedSIMActivationCodePoolCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EmbeddedSIMDeviceState.cs b/src/Microsoft.Graph/Generated/Models/EmbeddedSIMDeviceState.cs index 680eb842439..60932686c34 100644 --- a/src/Microsoft.Graph/Generated/Models/EmbeddedSIMDeviceState.cs +++ b/src/Microsoft.Graph/Generated/Models/EmbeddedSIMDeviceState.cs @@ -108,7 +108,7 @@ public string UserName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmbeddedSIMDeviceState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmbeddedSIMDeviceState(); } /// @@ -135,7 +135,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("deviceName", DeviceName); diff --git a/src/Microsoft.Graph/Generated/Models/EmbeddedSIMDeviceStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EmbeddedSIMDeviceStateCollectionResponse.cs index d9be87e9c5c..b7d086f78e2 100644 --- a/src/Microsoft.Graph/Generated/Models/EmbeddedSIMDeviceStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EmbeddedSIMDeviceStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EmbeddedSIMDeviceStateCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmbeddedSIMDeviceStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmbeddedSIMDeviceStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EmergencyCallEvent.cs b/src/Microsoft.Graph/Generated/Models/EmergencyCallEvent.cs index 4089420c66f..8a9e9e07a7e 100644 --- a/src/Microsoft.Graph/Generated/Models/EmergencyCallEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/EmergencyCallEvent.cs @@ -67,7 +67,7 @@ public string PolicyName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmergencyCallEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmergencyCallEvent(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("callerInfo", CallerInfo); writer.WriteStringValue("emergencyNumberDialed", EmergencyNumberDialed); diff --git a/src/Microsoft.Graph/Generated/Models/EmergencyCallerInfo.cs b/src/Microsoft.Graph/Generated/Models/EmergencyCallerInfo.cs index 894991c44b2..2ea130ce51c 100644 --- a/src/Microsoft.Graph/Generated/Models/EmergencyCallerInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/EmergencyCallerInfo.cs @@ -132,7 +132,7 @@ public EmergencyCallerInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EmergencyCallerInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmergencyCallerInfo(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteObjectValue("location", Location); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Employee.cs b/src/Microsoft.Graph/Generated/Models/Employee.cs index ff585ca85d7..baf92b46490 100644 --- a/src/Microsoft.Graph/Generated/Models/Employee.cs +++ b/src/Microsoft.Graph/Generated/Models/Employee.cs @@ -307,7 +307,7 @@ public Employee() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Employee CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Employee(); } /// @@ -346,7 +346,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("address", Address); writer.WriteDateValue("birthDate", BirthDate); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/EmployeeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EmployeeCollectionResponse.cs index 564cdaa7ba9..5d6379cb17b 100644 --- a/src/Microsoft.Graph/Generated/Models/EmployeeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EmployeeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EmployeeCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmployeeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmployeeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EmployeeExperience.cs b/src/Microsoft.Graph/Generated/Models/EmployeeExperience.cs index b068ec01d7f..1baa39da75f 100644 --- a/src/Microsoft.Graph/Generated/Models/EmployeeExperience.cs +++ b/src/Microsoft.Graph/Generated/Models/EmployeeExperience.cs @@ -149,7 +149,7 @@ public EmployeeExperience() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EmployeeExperience CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmployeeExperience(); } /// @@ -175,7 +175,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("communities", Communities); writer.WriteCollectionOfObjectValues("engagementAsyncOperations", EngagementAsyncOperations); writer.WriteObjectValue("goals", Goals); diff --git a/src/Microsoft.Graph/Generated/Models/EmployeeExperienceUser.cs b/src/Microsoft.Graph/Generated/Models/EmployeeExperienceUser.cs index 2f97f432884..76c4a5c38ee 100644 --- a/src/Microsoft.Graph/Generated/Models/EmployeeExperienceUser.cs +++ b/src/Microsoft.Graph/Generated/Models/EmployeeExperienceUser.cs @@ -52,7 +52,7 @@ public partial class EmployeeExperienceUser : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EmployeeExperienceUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmployeeExperienceUser(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignedRoles", AssignedRoles); writer.WriteCollectionOfObjectValues("learningCourseActivities", LearningCourseActivities); diff --git a/src/Microsoft.Graph/Generated/Models/EmployeeOrgData.cs b/src/Microsoft.Graph/Generated/Models/EmployeeOrgData.cs index 074ea2341a1..526a7578306 100644 --- a/src/Microsoft.Graph/Generated/Models/EmployeeOrgData.cs +++ b/src/Microsoft.Graph/Generated/Models/EmployeeOrgData.cs @@ -84,7 +84,7 @@ public EmployeeOrgData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EmployeeOrgData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EmployeeOrgData(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("costCenter", CostCenter); writer.WriteStringValue("division", Division); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/EncryptContent.cs b/src/Microsoft.Graph/Generated/Models/EncryptContent.cs index 34edfc926d7..b0ab33d3bbc 100644 --- a/src/Microsoft.Graph/Generated/Models/EncryptContent.cs +++ b/src/Microsoft.Graph/Generated/Models/EncryptContent.cs @@ -32,7 +32,7 @@ public EncryptContent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EncryptContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -58,7 +58,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("encryptWith", EncryptWith); } diff --git a/src/Microsoft.Graph/Generated/Models/EncryptWithTemplate.cs b/src/Microsoft.Graph/Generated/Models/EncryptWithTemplate.cs index d5ba6117b62..c999d27ad02 100644 --- a/src/Microsoft.Graph/Generated/Models/EncryptWithTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/EncryptWithTemplate.cs @@ -48,7 +48,7 @@ public EncryptWithTemplate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EncryptWithTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EncryptWithTemplate(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("availableForEncryption", AvailableForEncryption); writer.WriteStringValue("templateId", TemplateId); diff --git a/src/Microsoft.Graph/Generated/Models/EncryptWithUserDefinedRights.cs b/src/Microsoft.Graph/Generated/Models/EncryptWithUserDefinedRights.cs index b538bb8ea98..908fa2af20d 100644 --- a/src/Microsoft.Graph/Generated/Models/EncryptWithUserDefinedRights.cs +++ b/src/Microsoft.Graph/Generated/Models/EncryptWithUserDefinedRights.cs @@ -54,7 +54,7 @@ public EncryptWithUserDefinedRights() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EncryptWithUserDefinedRights CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EncryptWithUserDefinedRights(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowAdHocPermissions", AllowAdHocPermissions); writer.WriteBoolValue("allowMailForwarding", AllowMailForwarding); diff --git a/src/Microsoft.Graph/Generated/Models/EncryptedAwsStorageBucketFinding.cs b/src/Microsoft.Graph/Generated/Models/EncryptedAwsStorageBucketFinding.cs index 5445b2f5a10..fe31bb98bf6 100644 --- a/src/Microsoft.Graph/Generated/Models/EncryptedAwsStorageBucketFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/EncryptedAwsStorageBucketFinding.cs @@ -41,7 +41,7 @@ public partial class EncryptedAwsStorageBucketFinding : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EncryptedAwsStorageBucketFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EncryptedAwsStorageBucketFinding(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessibility", Accessibility); writer.WriteObjectValue("storageBucket", StorageBucket); diff --git a/src/Microsoft.Graph/Generated/Models/EncryptedAzureStorageAccountFinding.cs b/src/Microsoft.Graph/Generated/Models/EncryptedAzureStorageAccountFinding.cs index fcfad744669..bf84e910bf7 100644 --- a/src/Microsoft.Graph/Generated/Models/EncryptedAzureStorageAccountFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/EncryptedAzureStorageAccountFinding.cs @@ -41,7 +41,7 @@ public partial class EncryptedAzureStorageAccountFinding : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EncryptedAzureStorageAccountFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EncryptedAzureStorageAccountFinding(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("encryptionManagedBy", EncryptionManagedBy); writer.WriteObjectValue("storageAccount", StorageAccount); diff --git a/src/Microsoft.Graph/Generated/Models/EncryptedGcpStorageBucketFinding.cs b/src/Microsoft.Graph/Generated/Models/EncryptedGcpStorageBucketFinding.cs index 38cd4f7f019..0d69fe6ae66 100644 --- a/src/Microsoft.Graph/Generated/Models/EncryptedGcpStorageBucketFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/EncryptedGcpStorageBucketFinding.cs @@ -47,7 +47,7 @@ public partial class EncryptedGcpStorageBucketFinding : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EncryptedGcpStorageBucketFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EncryptedGcpStorageBucketFinding(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessibility", Accessibility); writer.WriteEnumValue("encryptionManagedBy", EncryptionManagedBy); diff --git a/src/Microsoft.Graph/Generated/Models/EncryptionReportPolicyDetails.cs b/src/Microsoft.Graph/Generated/Models/EncryptionReportPolicyDetails.cs index 8c1b7fd01fe..e2d39810761 100644 --- a/src/Microsoft.Graph/Generated/Models/EncryptionReportPolicyDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/EncryptionReportPolicyDetails.cs @@ -85,7 +85,7 @@ public EncryptionReportPolicyDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EncryptionReportPolicyDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EncryptionReportPolicyDetails(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("policyId", PolicyId); writer.WriteStringValue("policyName", PolicyName); diff --git a/src/Microsoft.Graph/Generated/Models/EndUserNotification.cs b/src/Microsoft.Graph/Generated/Models/EndUserNotification.cs index cec4a5ce2a2..358f05ab6df 100644 --- a/src/Microsoft.Graph/Generated/Models/EndUserNotification.cs +++ b/src/Microsoft.Graph/Generated/Models/EndUserNotification.cs @@ -145,7 +145,7 @@ public List SupportedLocales /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EndUserNotification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EndUserNotification(); } /// @@ -175,7 +175,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/EndUserNotificationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EndUserNotificationCollectionResponse.cs index d1a13da9c22..7a7726acb2f 100644 --- a/src/Microsoft.Graph/Generated/Models/EndUserNotificationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EndUserNotificationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EndUserNotificationCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EndUserNotificationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EndUserNotificationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EndUserNotificationDetail.cs b/src/Microsoft.Graph/Generated/Models/EndUserNotificationDetail.cs index 2654eda2e74..e5d74601e66 100644 --- a/src/Microsoft.Graph/Generated/Models/EndUserNotificationDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/EndUserNotificationDetail.cs @@ -105,7 +105,7 @@ public string Subject /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EndUserNotificationDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EndUserNotificationDetail(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("emailContent", EmailContent); writer.WriteBoolValue("isDefaultLangauge", IsDefaultLangauge); diff --git a/src/Microsoft.Graph/Generated/Models/EndUserNotificationDetailCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EndUserNotificationDetailCollectionResponse.cs index d0446c8cca3..ca83fa4afe4 100644 --- a/src/Microsoft.Graph/Generated/Models/EndUserNotificationDetailCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EndUserNotificationDetailCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EndUserNotificationDetailCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EndUserNotificationDetailCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EndUserNotificationDetailCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EndUserNotificationSetting.cs b/src/Microsoft.Graph/Generated/Models/EndUserNotificationSetting.cs index 45148a5e839..297d6801fa4 100644 --- a/src/Microsoft.Graph/Generated/Models/EndUserNotificationSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/EndUserNotificationSetting.cs @@ -80,7 +80,7 @@ public EndUserNotificationSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EndUserNotificationSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -109,7 +109,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("notificationPreference", NotificationPreference); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("positiveReinforcement", PositiveReinforcement); diff --git a/src/Microsoft.Graph/Generated/Models/Endpoint.cs b/src/Microsoft.Graph/Generated/Models/Endpoint.cs index 56680ac8d48..cbcaffcd3ac 100644 --- a/src/Microsoft.Graph/Generated/Models/Endpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/Endpoint.cs @@ -106,7 +106,7 @@ public Endpoint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Endpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Endpoint(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("capability", Capability); writer.WriteStringValue("providerId", ProviderId); diff --git a/src/Microsoft.Graph/Generated/Models/EndpointCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EndpointCollectionResponse.cs index 4d81aa1f0aa..fbd538bfd47 100644 --- a/src/Microsoft.Graph/Generated/Models/EndpointCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EndpointCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EndpointCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EndpointCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EndpointCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EndpointPrivilegeManagementProvisioningStatus.cs b/src/Microsoft.Graph/Generated/Models/EndpointPrivilegeManagementProvisioningStatus.cs index 7c8dd79ed43..4a9264618cb 100644 --- a/src/Microsoft.Graph/Generated/Models/EndpointPrivilegeManagementProvisioningStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/EndpointPrivilegeManagementProvisioningStatus.cs @@ -32,7 +32,7 @@ public bool? OnboardedToMicrosoftManagedPlatform /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EndpointPrivilegeManagementProvisioningStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EndpointPrivilegeManagementProvisioningStatus(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("licenseType", LicenseType); writer.WriteBoolValue("onboardedToMicrosoftManagedPlatform", OnboardedToMicrosoftManagedPlatform); diff --git a/src/Microsoft.Graph/Generated/Models/EndsWithTransformation.cs b/src/Microsoft.Graph/Generated/Models/EndsWithTransformation.cs index bc4d5236b81..5a9175da6c3 100644 --- a/src/Microsoft.Graph/Generated/Models/EndsWithTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/EndsWithTransformation.cs @@ -58,7 +58,7 @@ public EndsWithTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EndsWithTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EndsWithTransformation(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("output", Output); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/EnforceAppPIN.cs b/src/Microsoft.Graph/Generated/Models/EnforceAppPIN.cs index 970d20589f0..bc4f7eb4c5b 100644 --- a/src/Microsoft.Graph/Generated/Models/EnforceAppPIN.cs +++ b/src/Microsoft.Graph/Generated/Models/EnforceAppPIN.cs @@ -84,7 +84,7 @@ public EnforceAppPIN() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EnforceAppPIN CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnforceAppPIN(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("excludeTargets", ExcludeTargets); writer.WriteCollectionOfObjectValues("includeTargets", IncludeTargets); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/EngagementAsyncOperation.cs b/src/Microsoft.Graph/Generated/Models/EngagementAsyncOperation.cs index 5682798b33e..e4d58885f83 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementAsyncOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementAsyncOperation.cs @@ -42,7 +42,7 @@ public string ResourceId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementAsyncOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EngagementAsyncOperation(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("operationType", OperationType); writer.WriteStringValue("resourceId", ResourceId); diff --git a/src/Microsoft.Graph/Generated/Models/EngagementAsyncOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EngagementAsyncOperationCollectionResponse.cs index d61349462f8..f1cbd959218 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementAsyncOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementAsyncOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EngagementAsyncOperationCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementAsyncOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EngagementAsyncOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EngagementConversation.cs b/src/Microsoft.Graph/Generated/Models/EngagementConversation.cs index 73e0b585fe4..a25b9f6b86a 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementConversation.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementConversation.cs @@ -74,7 +74,7 @@ public string StarterId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementConversation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -102,7 +102,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("creationMode", CreationMode); writer.WriteCollectionOfObjectValues("messages", Messages); diff --git a/src/Microsoft.Graph/Generated/Models/EngagementConversationDiscussionMessage.cs b/src/Microsoft.Graph/Generated/Models/EngagementConversationDiscussionMessage.cs index ef5fce1f3f4..6dd81c96283 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementConversationDiscussionMessage.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementConversationDiscussionMessage.cs @@ -27,7 +27,7 @@ public EngagementConversationDiscussionMessage() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementConversationDiscussionMessage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EngagementConversationDiscussionMessage(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/EngagementConversationMessage.cs b/src/Microsoft.Graph/Generated/Models/EngagementConversationMessage.cs index 30e1d45cd45..9c723708a9c 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementConversationMessage.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementConversationMessage.cs @@ -150,7 +150,7 @@ public string ReplyToId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementConversationMessage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -186,7 +186,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("body", Body); writer.WriteObjectValue("conversation", Conversation); diff --git a/src/Microsoft.Graph/Generated/Models/EngagementConversationMessageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EngagementConversationMessageCollectionResponse.cs index 0c17ad5065d..fce0e0abac3 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementConversationMessageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementConversationMessageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EngagementConversationMessageCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementConversationMessageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EngagementConversationMessageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EngagementConversationMessageReaction.cs b/src/Microsoft.Graph/Generated/Models/EngagementConversationMessageReaction.cs index 6878d76d4f3..aea16d43d60 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementConversationMessageReaction.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementConversationMessageReaction.cs @@ -48,7 +48,7 @@ public DateTimeOffset? CreatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReaction(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("reactionBy", ReactionBy); writer.WriteEnumValue("reactionType", ReactionType); diff --git a/src/Microsoft.Graph/Generated/Models/EngagementConversationMessageReactionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EngagementConversationMessageReactionCollectionResponse.cs index 85aba5ab455..ff4144c27e0 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementConversationMessageReactionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementConversationMessageReactionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EngagementConversationMessageReactionCollectionResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReactionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EngagementConversationMessageReactionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EngagementConversationQuestionMessage.cs b/src/Microsoft.Graph/Generated/Models/EngagementConversationQuestionMessage.cs index c370da4ea3f..8fd971a884a 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementConversationQuestionMessage.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementConversationQuestionMessage.cs @@ -43,7 +43,7 @@ public EngagementConversationQuestionMessage() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementConversationQuestionMessage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EngagementConversationQuestionMessage(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("title", Title); } diff --git a/src/Microsoft.Graph/Generated/Models/EngagementConversationSystemMessage.cs b/src/Microsoft.Graph/Generated/Models/EngagementConversationSystemMessage.cs index dc2ed0b9aab..34314c19614 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementConversationSystemMessage.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementConversationSystemMessage.cs @@ -27,7 +27,7 @@ public EngagementConversationSystemMessage() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementConversationSystemMessage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EngagementConversationSystemMessage(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/EngagementIdentitySet.cs b/src/Microsoft.Graph/Generated/Models/EngagementIdentitySet.cs index 8ec5394bf0e..69d99e4aa2b 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementIdentitySet.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementIdentitySet.cs @@ -59,7 +59,7 @@ public EngagementIdentitySet() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EngagementIdentitySet(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("audience", Audience); writer.WriteObjectValue("group", Group); diff --git a/src/Microsoft.Graph/Generated/Models/EngagementRole.cs b/src/Microsoft.Graph/Generated/Models/EngagementRole.cs index ce2c17ffa7f..30675989499 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementRole.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementRole.cs @@ -52,7 +52,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementRole CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EngagementRole(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfObjectValues("members", Members); diff --git a/src/Microsoft.Graph/Generated/Models/EngagementRoleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EngagementRoleCollectionResponse.cs index b8acaa3164a..d1ade47aee4 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementRoleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementRoleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EngagementRoleCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementRoleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EngagementRoleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EngagementRoleMember.cs b/src/Microsoft.Graph/Generated/Models/EngagementRoleMember.cs index ddca59edd6f..85d1b0bf179 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementRoleMember.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementRoleMember.cs @@ -58,7 +58,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementRoleMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EngagementRoleMember(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("user", User); } diff --git a/src/Microsoft.Graph/Generated/Models/EngagementRoleMemberCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EngagementRoleMemberCollectionResponse.cs index d343319e707..c466c05373d 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementRoleMemberCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementRoleMemberCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EngagementRoleMemberCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementRoleMemberCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EngagementRoleMemberCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EngagementUploadSession.cs b/src/Microsoft.Graph/Generated/Models/EngagementUploadSession.cs index ce0351f15ff..551c613891e 100644 --- a/src/Microsoft.Graph/Generated/Models/EngagementUploadSession.cs +++ b/src/Microsoft.Graph/Generated/Models/EngagementUploadSession.cs @@ -36,7 +36,7 @@ public string Id /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EngagementUploadSession CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EngagementUploadSession(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("id", Id); } diff --git a/src/Microsoft.Graph/Generated/Models/EnhancedPersonalizationSetting.cs b/src/Microsoft.Graph/Generated/Models/EnhancedPersonalizationSetting.cs index c942c52ca89..293a3040554 100644 --- a/src/Microsoft.Graph/Generated/Models/EnhancedPersonalizationSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/EnhancedPersonalizationSetting.cs @@ -41,7 +41,7 @@ public bool? IsEnabledInOrganization /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnhancedPersonalizationSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnhancedPersonalizationSetting(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("disabledForGroup", DisabledForGroup); writer.WriteBoolValue("isEnabledInOrganization", IsEnabledInOrganization); diff --git a/src/Microsoft.Graph/Generated/Models/EnrollmentConfigurationAssignment.cs b/src/Microsoft.Graph/Generated/Models/EnrollmentConfigurationAssignment.cs index 45ed9224174..bc45b3a3c4c 100644 --- a/src/Microsoft.Graph/Generated/Models/EnrollmentConfigurationAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/EnrollmentConfigurationAssignment.cs @@ -58,7 +58,7 @@ public string SourceId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnrollmentConfigurationAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnrollmentConfigurationAssignment(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("source", Source); writer.WriteStringValue("sourceId", SourceId); diff --git a/src/Microsoft.Graph/Generated/Models/EnrollmentConfigurationAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EnrollmentConfigurationAssignmentCollectionResponse.cs index 5ca3d774280..aafb1742fe0 100644 --- a/src/Microsoft.Graph/Generated/Models/EnrollmentConfigurationAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EnrollmentConfigurationAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EnrollmentConfigurationAssignmentCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnrollmentConfigurationAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnrollmentConfigurationAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EnrollmentProfile.cs b/src/Microsoft.Graph/Generated/Models/EnrollmentProfile.cs index 8b4962eb1f2..6a35d408d16 100644 --- a/src/Microsoft.Graph/Generated/Models/EnrollmentProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/EnrollmentProfile.cs @@ -86,7 +86,7 @@ public bool? RequiresUserAuthentication /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnrollmentProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("configurationEndpointUrl", ConfigurationEndpointUrl); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/EnrollmentProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EnrollmentProfileCollectionResponse.cs index 251d03bf3c6..098a58aeebe 100644 --- a/src/Microsoft.Graph/Generated/Models/EnrollmentProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EnrollmentProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EnrollmentProfileCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnrollmentProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnrollmentProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EnrollmentRestrictionsConfigurationPolicySetItem.cs b/src/Microsoft.Graph/Generated/Models/EnrollmentRestrictionsConfigurationPolicySetItem.cs index ec6bfab1c02..d8e4ceb2267 100644 --- a/src/Microsoft.Graph/Generated/Models/EnrollmentRestrictionsConfigurationPolicySetItem.cs +++ b/src/Microsoft.Graph/Generated/Models/EnrollmentRestrictionsConfigurationPolicySetItem.cs @@ -39,7 +39,7 @@ public EnrollmentRestrictionsConfigurationPolicySetItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnrollmentRestrictionsConfigurationPolicySetItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnrollmentRestrictionsConfigurationPolicySetItem(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("limit", Limit); writer.WriteIntValue("priority", Priority); diff --git a/src/Microsoft.Graph/Generated/Models/EnrollmentTimeDeviceMembershipTarget.cs b/src/Microsoft.Graph/Generated/Models/EnrollmentTimeDeviceMembershipTarget.cs index b66b5bbd472..d41c8696a48 100644 --- a/src/Microsoft.Graph/Generated/Models/EnrollmentTimeDeviceMembershipTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/EnrollmentTimeDeviceMembershipTarget.cs @@ -75,7 +75,7 @@ public EnrollmentTimeDeviceMembershipTarget() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EnrollmentTimeDeviceMembershipTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnrollmentTimeDeviceMembershipTarget(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("targetId", TargetId); writer.WriteEnumValue("targetType", TargetType); diff --git a/src/Microsoft.Graph/Generated/Models/EnrollmentTimeDeviceMembershipTargetResult.cs b/src/Microsoft.Graph/Generated/Models/EnrollmentTimeDeviceMembershipTargetResult.cs index 8fefe48d6c0..df41dc0885b 100644 --- a/src/Microsoft.Graph/Generated/Models/EnrollmentTimeDeviceMembershipTargetResult.cs +++ b/src/Microsoft.Graph/Generated/Models/EnrollmentTimeDeviceMembershipTargetResult.cs @@ -75,7 +75,7 @@ public EnrollmentTimeDeviceMembershipTargetResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EnrollmentTimeDeviceMembershipTargetResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnrollmentTimeDeviceMembershipTargetResult(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("enrollmentTimeDeviceMembershipTargetValidationStatuses", EnrollmentTimeDeviceMembershipTargetValidationStatuses); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("validationSucceeded", ValidationSucceeded); diff --git a/src/Microsoft.Graph/Generated/Models/EnrollmentTimeDeviceMembershipTargetStatus.cs b/src/Microsoft.Graph/Generated/Models/EnrollmentTimeDeviceMembershipTargetStatus.cs index 34d1255211d..98c2bdff805 100644 --- a/src/Microsoft.Graph/Generated/Models/EnrollmentTimeDeviceMembershipTargetStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/EnrollmentTimeDeviceMembershipTargetStatus.cs @@ -75,7 +75,7 @@ public EnrollmentTimeDeviceMembershipTargetStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EnrollmentTimeDeviceMembershipTargetStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnrollmentTimeDeviceMembershipTargetStatus(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("targetId", TargetId); writer.WriteEnumValue("targetValidationErrorCode", TargetValidationErrorCode); diff --git a/src/Microsoft.Graph/Generated/Models/EnrollmentTroubleshootingEvent.cs b/src/Microsoft.Graph/Generated/Models/EnrollmentTroubleshootingEvent.cs index 85b7243197c..6dd6bfed200 100644 --- a/src/Microsoft.Graph/Generated/Models/EnrollmentTroubleshootingEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/EnrollmentTroubleshootingEvent.cs @@ -128,7 +128,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnrollmentTroubleshootingEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnrollmentTroubleshootingEvent(); } /// @@ -155,7 +155,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceId", DeviceId); writer.WriteEnumValue("enrollmentType", EnrollmentType); diff --git a/src/Microsoft.Graph/Generated/Models/EnterpriseCodeSigningCertificate.cs b/src/Microsoft.Graph/Generated/Models/EnterpriseCodeSigningCertificate.cs index fb86152a679..4c731172dcf 100644 --- a/src/Microsoft.Graph/Generated/Models/EnterpriseCodeSigningCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/EnterpriseCodeSigningCertificate.cs @@ -117,7 +117,7 @@ public DateTimeOffset? UploadDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnterpriseCodeSigningCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnterpriseCodeSigningCertificate(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/EnterpriseCodeSigningCertificateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EnterpriseCodeSigningCertificateCollectionResponse.cs index cf0878bea65..847c80b6537 100644 --- a/src/Microsoft.Graph/Generated/Models/EnterpriseCodeSigningCertificateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EnterpriseCodeSigningCertificateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EnterpriseCodeSigningCertificateCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnterpriseCodeSigningCertificateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnterpriseCodeSigningCertificateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EntitlementManagement.cs b/src/Microsoft.Graph/Generated/Models/EntitlementManagement.cs index 4a7c4333e49..b144bc4be76 100644 --- a/src/Microsoft.Graph/Generated/Models/EntitlementManagement.cs +++ b/src/Microsoft.Graph/Generated/Models/EntitlementManagement.cs @@ -259,7 +259,7 @@ public partial class EntitlementManagement : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EntitlementManagement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EntitlementManagement(); } /// @@ -293,7 +293,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("accessPackageAssignmentApprovals", AccessPackageAssignmentApprovals); writer.WriteCollectionOfObjectValues("accessPackageAssignmentPolicies", AccessPackageAssignmentPolicies); diff --git a/src/Microsoft.Graph/Generated/Models/EntitlementManagementSettings.cs b/src/Microsoft.Graph/Generated/Models/EntitlementManagementSettings.cs index d8f91d136a6..4081c3f363c 100644 --- a/src/Microsoft.Graph/Generated/Models/EntitlementManagementSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/EntitlementManagementSettings.cs @@ -41,7 +41,7 @@ public string ExternalUserLifecycleAction /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EntitlementManagementSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EntitlementManagementSettings(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("daysUntilExternalUserDeletedAfterBlocked", DaysUntilExternalUserDeletedAfterBlocked); writer.WriteStringValue("externalUserLifecycleAction", ExternalUserLifecycleAction); diff --git a/src/Microsoft.Graph/Generated/Models/EntitlementsDataCollection.cs b/src/Microsoft.Graph/Generated/Models/EntitlementsDataCollection.cs index 4afe0b8d417..bd4379f8ec7 100644 --- a/src/Microsoft.Graph/Generated/Models/EntitlementsDataCollection.cs +++ b/src/Microsoft.Graph/Generated/Models/EntitlementsDataCollection.cs @@ -44,7 +44,7 @@ public EntitlementsDataCollection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EntitlementsDataCollection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EntitlementsDataCollection(); } /// @@ -66,7 +66,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("lastCollectionDateTime", LastCollectionDateTime); writer.WriteEnumValue("permissionsModificationCapability", PermissionsModificationCapability); diff --git a/src/Microsoft.Graph/Generated/Models/EntitlementsDataCollectionInfo.cs b/src/Microsoft.Graph/Generated/Models/EntitlementsDataCollectionInfo.cs index 5dd0536ac57..72211ea8357 100644 --- a/src/Microsoft.Graph/Generated/Models/EntitlementsDataCollectionInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/EntitlementsDataCollectionInfo.cs @@ -52,7 +52,7 @@ public EntitlementsDataCollectionInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EntitlementsDataCollectionInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Entity.cs b/src/Microsoft.Graph/Generated/Models/Entity.cs index c3becbfbe25..018a89cd4b1 100644 --- a/src/Microsoft.Graph/Generated/Models/Entity.cs +++ b/src/Microsoft.Graph/Generated/Models/Entity.cs @@ -86,7 +86,7 @@ public Entity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Entity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -475,6 +475,7 @@ public Entity() "#microsoft.graph.copilotAdmin" => new global::Microsoft.Graph.Beta.Models.CopilotAdmin(), "#microsoft.graph.copilotAdminLimitedMode" => new global::Microsoft.Graph.Beta.Models.CopilotAdminLimitedMode(), "#microsoft.graph.copilotAdminSetting" => new global::Microsoft.Graph.Beta.Models.CopilotAdminSetting(), + "#microsoft.graph.copilotCommunicationsRoot" => new global::Microsoft.Graph.Beta.Models.CopilotCommunicationsRoot(), "#microsoft.graph.copilotPeopleAdminSetting" => new global::Microsoft.Graph.Beta.Models.CopilotPeopleAdminSetting(), "#microsoft.graph.copilotSetting" => new global::Microsoft.Graph.Beta.Models.CopilotSetting(), "#microsoft.graph.corsConfiguration_v2" => new global::Microsoft.Graph.Beta.Models.CorsConfiguration_v2(), @@ -1214,6 +1215,7 @@ public Entity() "#microsoft.graph.monthlyInactiveUsersByApplicationMetric" => new global::Microsoft.Graph.Beta.Models.MonthlyInactiveUsersByApplicationMetric(), "#microsoft.graph.monthlyInactiveUsersMetric" => new global::Microsoft.Graph.Beta.Models.MonthlyInactiveUsersMetric(), "#microsoft.graph.monthlyUserInsightMetricsRoot" => new global::Microsoft.Graph.Beta.Models.MonthlyUserInsightMetricsRoot(), + "#microsoft.graph.multiActivitySubscription" => new global::Microsoft.Graph.Beta.Models.MultiActivitySubscription(), "#microsoft.graph.multiTenantOrganization" => new global::Microsoft.Graph.Beta.Models.MultiTenantOrganization(), "#microsoft.graph.multiTenantOrganizationIdentitySyncPolicyTemplate" => new global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationIdentitySyncPolicyTemplate(), "#microsoft.graph.multiTenantOrganizationJoinRequestRecord" => new global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationJoinRequestRecord(), @@ -1508,6 +1510,9 @@ public Entity() "#microsoft.graph.rbacApplicationMultiple" => new global::Microsoft.Graph.Beta.Models.RbacApplicationMultiple(), "#microsoft.graph.readingAssignmentSubmission" => new global::Microsoft.Graph.Beta.Models.ReadingAssignmentSubmission(), "#microsoft.graph.readingCoachPassage" => new global::Microsoft.Graph.Beta.Models.ReadingCoachPassage(), + "#microsoft.graph.realtimeActivityFeedRoot" => new global::Microsoft.Graph.Beta.Models.RealtimeActivityFeedRoot(), + "#microsoft.graph.realtimeActivityMeeting" => new global::Microsoft.Graph.Beta.Models.RealtimeActivityMeeting(), + "#microsoft.graph.realTimeTranscript" => new global::Microsoft.Graph.Beta.Models.RealTimeTranscript(), "#microsoft.graph.recommendation" => new global::Microsoft.Graph.Beta.Models.Recommendation(), "#microsoft.graph.recommendationBase" => new global::Microsoft.Graph.Beta.Models.RecommendationBase(), "#microsoft.graph.recommendationConfiguration" => new global::Microsoft.Graph.Beta.Models.RecommendationConfiguration(), @@ -2234,7 +2239,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Entra.cs b/src/Microsoft.Graph/Generated/Models/Entra.cs index 20a8449786d..b705f2461aa 100644 --- a/src/Microsoft.Graph/Generated/Models/Entra.cs +++ b/src/Microsoft.Graph/Generated/Models/Entra.cs @@ -35,7 +35,7 @@ public partial class Entra : global::Microsoft.Graph.Beta.Models.Entity, IParsab /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Entra CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Entra(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("uxSetting", UxSetting); } diff --git a/src/Microsoft.Graph/Generated/Models/EnumeratedAccountsWithAccess.cs b/src/Microsoft.Graph/Generated/Models/EnumeratedAccountsWithAccess.cs index 10d751f7da2..bd43568114a 100644 --- a/src/Microsoft.Graph/Generated/Models/EnumeratedAccountsWithAccess.cs +++ b/src/Microsoft.Graph/Generated/Models/EnumeratedAccountsWithAccess.cs @@ -42,7 +42,7 @@ public EnumeratedAccountsWithAccess() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnumeratedAccountsWithAccess CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnumeratedAccountsWithAccess(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("accounts", Accounts); } diff --git a/src/Microsoft.Graph/Generated/Models/EnumeratedDeviceRegistrationMembership.cs b/src/Microsoft.Graph/Generated/Models/EnumeratedDeviceRegistrationMembership.cs index 196429a6e50..106f04b7544 100644 --- a/src/Microsoft.Graph/Generated/Models/EnumeratedDeviceRegistrationMembership.cs +++ b/src/Microsoft.Graph/Generated/Models/EnumeratedDeviceRegistrationMembership.cs @@ -58,7 +58,7 @@ public EnumeratedDeviceRegistrationMembership() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnumeratedDeviceRegistrationMembership CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnumeratedDeviceRegistrationMembership(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("groups", Groups); writer.WriteCollectionOfPrimitiveValues("users", Users); diff --git a/src/Microsoft.Graph/Generated/Models/EnumeratedDomains.cs b/src/Microsoft.Graph/Generated/Models/EnumeratedDomains.cs index 7bb8c296a80..b3b62bd7157 100644 --- a/src/Microsoft.Graph/Generated/Models/EnumeratedDomains.cs +++ b/src/Microsoft.Graph/Generated/Models/EnumeratedDomains.cs @@ -42,7 +42,7 @@ public EnumeratedDomains() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnumeratedDomains CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnumeratedDomains(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("domainNames", DomainNames); } diff --git a/src/Microsoft.Graph/Generated/Models/EnumeratedInboundPorts.cs b/src/Microsoft.Graph/Generated/Models/EnumeratedInboundPorts.cs index d72667178c9..91d8215452a 100644 --- a/src/Microsoft.Graph/Generated/Models/EnumeratedInboundPorts.cs +++ b/src/Microsoft.Graph/Generated/Models/EnumeratedInboundPorts.cs @@ -42,7 +42,7 @@ public EnumeratedInboundPorts() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnumeratedInboundPorts CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnumeratedInboundPorts(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("ports", Ports); } diff --git a/src/Microsoft.Graph/Generated/Models/EnumeratedPreApprovedPermissions.cs b/src/Microsoft.Graph/Generated/Models/EnumeratedPreApprovedPermissions.cs index 8f0e388a9d0..c80d6429beb 100644 --- a/src/Microsoft.Graph/Generated/Models/EnumeratedPreApprovedPermissions.cs +++ b/src/Microsoft.Graph/Generated/Models/EnumeratedPreApprovedPermissions.cs @@ -58,7 +58,7 @@ public EnumeratedPreApprovedPermissions() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnumeratedPreApprovedPermissions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnumeratedPreApprovedPermissions(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("permissionIds", PermissionIds); writer.WriteStringValue("resourceApplicationId", ResourceApplicationId); diff --git a/src/Microsoft.Graph/Generated/Models/EnumeratedScopeSensitivityLabels.cs b/src/Microsoft.Graph/Generated/Models/EnumeratedScopeSensitivityLabels.cs index 55f144e4a56..e5b60811ead 100644 --- a/src/Microsoft.Graph/Generated/Models/EnumeratedScopeSensitivityLabels.cs +++ b/src/Microsoft.Graph/Generated/Models/EnumeratedScopeSensitivityLabels.cs @@ -42,7 +42,7 @@ public EnumeratedScopeSensitivityLabels() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EnumeratedScopeSensitivityLabels CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EnumeratedScopeSensitivityLabels(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("sensitivityLabels", SensitivityLabels); } diff --git a/src/Microsoft.Graph/Generated/Models/ErrorDetail.cs b/src/Microsoft.Graph/Generated/Models/ErrorDetail.cs index 47014916514..2f17243bb40 100644 --- a/src/Microsoft.Graph/Generated/Models/ErrorDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/ErrorDetail.cs @@ -100,7 +100,7 @@ public ErrorDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ErrorDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ErrorDetail(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/EvaluateDynamicMembershipResult.cs b/src/Microsoft.Graph/Generated/Models/EvaluateDynamicMembershipResult.cs index 25944ac5750..c1ca7dc512e 100644 --- a/src/Microsoft.Graph/Generated/Models/EvaluateDynamicMembershipResult.cs +++ b/src/Microsoft.Graph/Generated/Models/EvaluateDynamicMembershipResult.cs @@ -90,7 +90,7 @@ public EvaluateDynamicMembershipResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EvaluateDynamicMembershipResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EvaluateDynamicMembershipResult(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("membershipRule", MembershipRule); writer.WriteObjectValue("membershipRuleEvaluationDetails", MembershipRuleEvaluationDetails); writer.WriteBoolValue("membershipRuleEvaluationResult", MembershipRuleEvaluationResult); diff --git a/src/Microsoft.Graph/Generated/Models/EvaluateLabelJobResponse.cs b/src/Microsoft.Graph/Generated/Models/EvaluateLabelJobResponse.cs index a736b1bf0c2..3075929908e 100644 --- a/src/Microsoft.Graph/Generated/Models/EvaluateLabelJobResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EvaluateLabelJobResponse.cs @@ -35,7 +35,7 @@ public partial class EvaluateLabelJobResponse : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EvaluateLabelJobResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EvaluateLabelJobResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("result", Result); } diff --git a/src/Microsoft.Graph/Generated/Models/EvaluateLabelJobResult.cs b/src/Microsoft.Graph/Generated/Models/EvaluateLabelJobResult.cs index c1f4db0f187..855ce884ad0 100644 --- a/src/Microsoft.Graph/Generated/Models/EvaluateLabelJobResult.cs +++ b/src/Microsoft.Graph/Generated/Models/EvaluateLabelJobResult.cs @@ -100,7 +100,7 @@ public EvaluateLabelJobResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EvaluateLabelJobResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EvaluateLabelJobResult(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("responsiblePolicy", ResponsiblePolicy); writer.WriteCollectionOfObjectValues("responsibleSensitiveTypes", ResponsibleSensitiveTypes); diff --git a/src/Microsoft.Graph/Generated/Models/EvaluateLabelJobResultGroup.cs b/src/Microsoft.Graph/Generated/Models/EvaluateLabelJobResultGroup.cs index 91a3385cbce..1f3672d0712 100644 --- a/src/Microsoft.Graph/Generated/Models/EvaluateLabelJobResultGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/EvaluateLabelJobResultGroup.cs @@ -84,7 +84,7 @@ public EvaluateLabelJobResultGroup() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EvaluateLabelJobResultGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EvaluateLabelJobResultGroup(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("automatic", Automatic); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("recommended", Recommended); diff --git a/src/Microsoft.Graph/Generated/Models/Event.cs b/src/Microsoft.Graph/Generated/Models/Event.cs index 0041340f01d..6c6de330a0b 100644 --- a/src/Microsoft.Graph/Generated/Models/Event.cs +++ b/src/Microsoft.Graph/Generated/Models/Event.cs @@ -592,7 +592,7 @@ public Event() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Event CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Event(); } /// @@ -657,7 +657,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowNewTimeProposals", AllowNewTimeProposals); writer.WriteCollectionOfObjectValues("attachments", Attachments); diff --git a/src/Microsoft.Graph/Generated/Models/EventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/EventCollectionResponse.cs index 2e2e59d30a5..acd809a521b 100644 --- a/src/Microsoft.Graph/Generated/Models/EventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EventCollectionResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/EventMessage.cs b/src/Microsoft.Graph/Generated/Models/EventMessage.cs index 38129b36f15..676de9db794 100644 --- a/src/Microsoft.Graph/Generated/Models/EventMessage.cs +++ b/src/Microsoft.Graph/Generated/Models/EventMessage.cs @@ -136,7 +136,7 @@ public EventMessage() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EventMessage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -171,7 +171,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("endDateTime", EndDateTime); writer.WriteObjectValue("event", Event); diff --git a/src/Microsoft.Graph/Generated/Models/EventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/EventMessageDetail.cs index af9d3c091d8..11e4a95cc2d 100644 --- a/src/Microsoft.Graph/Generated/Models/EventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/EventMessageDetail.cs @@ -52,7 +52,7 @@ public EventMessageDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.EventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/EventMessageRequest.cs b/src/Microsoft.Graph/Generated/Models/EventMessageRequest.cs index affdf65a536..4f3715d6795 100644 --- a/src/Microsoft.Graph/Generated/Models/EventMessageRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/EventMessageRequest.cs @@ -92,7 +92,7 @@ public EventMessageRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EventMessageRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EventMessageRequest(); } /// @@ -117,7 +117,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowNewTimeProposals", AllowNewTimeProposals); writer.WriteEnumValue("meetingRequestType", MeetingRequestType); diff --git a/src/Microsoft.Graph/Generated/Models/EventMessageResponse.cs b/src/Microsoft.Graph/Generated/Models/EventMessageResponse.cs index 5b44c960bf9..62a9697716d 100644 --- a/src/Microsoft.Graph/Generated/Models/EventMessageResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/EventMessageResponse.cs @@ -48,7 +48,7 @@ public EventMessageResponse() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.EventMessageResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.EventMessageResponse(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("proposedNewTime", ProposedNewTime); writer.WriteEnumValue("responseType", ResponseType); diff --git a/src/Microsoft.Graph/Generated/Models/ExactDataMatchStoreColumn.cs b/src/Microsoft.Graph/Generated/Models/ExactDataMatchStoreColumn.cs index fd55432b107..f7706cdf62d 100644 --- a/src/Microsoft.Graph/Generated/Models/ExactDataMatchStoreColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/ExactDataMatchStoreColumn.cs @@ -96,7 +96,7 @@ public ExactDataMatchStoreColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExactDataMatchStoreColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExactDataMatchStoreColumn(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ignoredDelimiters", IgnoredDelimiters); writer.WriteBoolValue("isCaseInsensitive", IsCaseInsensitive); writer.WriteBoolValue("isSearchable", IsSearchable); diff --git a/src/Microsoft.Graph/Generated/Models/ExactMatchClassificationResult.cs b/src/Microsoft.Graph/Generated/Models/ExactMatchClassificationResult.cs index 9581f27eabd..3f97ddfc4fa 100644 --- a/src/Microsoft.Graph/Generated/Models/ExactMatchClassificationResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ExactMatchClassificationResult.cs @@ -84,7 +84,7 @@ public ExactMatchClassificationResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExactMatchClassificationResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExactMatchClassificationResult(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("classification", Classification); writer.WriteCollectionOfObjectValues("errors", Errors); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ExactMatchDataStore.cs b/src/Microsoft.Graph/Generated/Models/ExactMatchDataStore.cs index 95ee9282999..0e50f648ef0 100644 --- a/src/Microsoft.Graph/Generated/Models/ExactMatchDataStore.cs +++ b/src/Microsoft.Graph/Generated/Models/ExactMatchDataStore.cs @@ -35,7 +35,7 @@ public partial class ExactMatchDataStore : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExactMatchDataStore CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExactMatchDataStore(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("sessions", Sessions); } diff --git a/src/Microsoft.Graph/Generated/Models/ExactMatchDataStoreBase.cs b/src/Microsoft.Graph/Generated/Models/ExactMatchDataStoreBase.cs index c7874a786ac..b3eb9af4547 100644 --- a/src/Microsoft.Graph/Generated/Models/ExactMatchDataStoreBase.cs +++ b/src/Microsoft.Graph/Generated/Models/ExactMatchDataStoreBase.cs @@ -73,7 +73,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExactMatchDataStoreBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("columns", Columns); writer.WriteDateTimeOffsetValue("dataLastUpdatedDateTime", DataLastUpdatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ExactMatchDataStoreCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExactMatchDataStoreCollectionResponse.cs index e2fadbdf5ff..8265512a266 100644 --- a/src/Microsoft.Graph/Generated/Models/ExactMatchDataStoreCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExactMatchDataStoreCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExactMatchDataStoreCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExactMatchDataStoreCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExactMatchDataStoreCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExactMatchDetectedSensitiveContent.cs b/src/Microsoft.Graph/Generated/Models/ExactMatchDetectedSensitiveContent.cs index 9dab044121c..e1d001e16b1 100644 --- a/src/Microsoft.Graph/Generated/Models/ExactMatchDetectedSensitiveContent.cs +++ b/src/Microsoft.Graph/Generated/Models/ExactMatchDetectedSensitiveContent.cs @@ -35,7 +35,7 @@ public partial class ExactMatchDetectedSensitiveContent : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExactMatchDetectedSensitiveContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExactMatchDetectedSensitiveContent(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("matches", Matches); } diff --git a/src/Microsoft.Graph/Generated/Models/ExactMatchJobBase.cs b/src/Microsoft.Graph/Generated/Models/ExactMatchJobBase.cs index 26198e32ddf..5b8d25c7a87 100644 --- a/src/Microsoft.Graph/Generated/Models/ExactMatchJobBase.cs +++ b/src/Microsoft.Graph/Generated/Models/ExactMatchJobBase.cs @@ -59,7 +59,7 @@ public DateTimeOffset? StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExactMatchJobBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completionDateTime", CompletionDateTime); writer.WriteDateTimeOffsetValue("creationDateTime", CreationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ExactMatchLookupJob.cs b/src/Microsoft.Graph/Generated/Models/ExactMatchLookupJob.cs index 2fcb7f92ada..2f200192ec5 100644 --- a/src/Microsoft.Graph/Generated/Models/ExactMatchLookupJob.cs +++ b/src/Microsoft.Graph/Generated/Models/ExactMatchLookupJob.cs @@ -58,7 +58,7 @@ public ExactMatchLookupJob() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExactMatchLookupJob CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExactMatchLookupJob(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("matchingRows", MatchingRows); writer.WriteStringValue("state", State); diff --git a/src/Microsoft.Graph/Generated/Models/ExactMatchSession.cs b/src/Microsoft.Graph/Generated/Models/ExactMatchSession.cs index 548edf9c4e5..41e70c1f1d5 100644 --- a/src/Microsoft.Graph/Generated/Models/ExactMatchSession.cs +++ b/src/Microsoft.Graph/Generated/Models/ExactMatchSession.cs @@ -137,7 +137,7 @@ public string UploadAgentId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExactMatchSession CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExactMatchSession(); } /// @@ -164,7 +164,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("checksum", Checksum); writer.WriteStringValue("dataUploadURI", DataUploadURI); diff --git a/src/Microsoft.Graph/Generated/Models/ExactMatchSessionBase.cs b/src/Microsoft.Graph/Generated/Models/ExactMatchSessionBase.cs index 7f4d8b4918c..d393c81aeb2 100644 --- a/src/Microsoft.Graph/Generated/Models/ExactMatchSessionBase.cs +++ b/src/Microsoft.Graph/Generated/Models/ExactMatchSessionBase.cs @@ -94,7 +94,7 @@ public ExactMatchSessionBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExactMatchSessionBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -126,7 +126,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("dataStoreId", DataStoreId); writer.WriteDateTimeOffsetValue("processingCompletionDateTime", ProcessingCompletionDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ExactMatchSessionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExactMatchSessionCollectionResponse.cs index 8713a9af560..f761687cbbf 100644 --- a/src/Microsoft.Graph/Generated/Models/ExactMatchSessionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExactMatchSessionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExactMatchSessionCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExactMatchSessionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExactMatchSessionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExactMatchUploadAgent.cs b/src/Microsoft.Graph/Generated/Models/ExactMatchUploadAgent.cs index 6b4f11e1f00..4ea9346b1d0 100644 --- a/src/Microsoft.Graph/Generated/Models/ExactMatchUploadAgent.cs +++ b/src/Microsoft.Graph/Generated/Models/ExactMatchUploadAgent.cs @@ -41,7 +41,7 @@ public string Description /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExactMatchUploadAgent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExactMatchUploadAgent(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("creationDateTime", CreationDateTime); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/ExactMatchUploadAgentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExactMatchUploadAgentCollectionResponse.cs index efd8d58a4a3..83896f15021 100644 --- a/src/Microsoft.Graph/Generated/Models/ExactMatchUploadAgentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExactMatchUploadAgentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExactMatchUploadAgentCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExactMatchUploadAgentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExactMatchUploadAgentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExchangeAdmin.cs b/src/Microsoft.Graph/Generated/Models/ExchangeAdmin.cs index b6de2ebcbba..0d81f0cb1c4 100644 --- a/src/Microsoft.Graph/Generated/Models/ExchangeAdmin.cs +++ b/src/Microsoft.Graph/Generated/Models/ExchangeAdmin.cs @@ -51,7 +51,7 @@ public partial class ExchangeAdmin : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExchangeAdmin CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExchangeAdmin(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("mailboxes", Mailboxes); writer.WriteCollectionOfObjectValues("messageTraces", MessageTraces); diff --git a/src/Microsoft.Graph/Generated/Models/ExchangeProtectionPolicy.cs b/src/Microsoft.Graph/Generated/Models/ExchangeProtectionPolicy.cs index f68d845ac54..cfef318979d 100644 --- a/src/Microsoft.Graph/Generated/Models/ExchangeProtectionPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/ExchangeProtectionPolicy.cs @@ -74,7 +74,7 @@ public ExchangeProtectionPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExchangeProtectionPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExchangeProtectionPolicy(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("mailboxInclusionRules", MailboxInclusionRules); writer.WriteCollectionOfObjectValues("mailboxProtectionUnits", MailboxProtectionUnits); diff --git a/src/Microsoft.Graph/Generated/Models/ExchangeProtectionPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExchangeProtectionPolicyCollectionResponse.cs index 9f0c46d0a43..6823934a5ae 100644 --- a/src/Microsoft.Graph/Generated/Models/ExchangeProtectionPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExchangeProtectionPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExchangeProtectionPolicyCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExchangeProtectionPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExchangeProtectionPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExchangeRestoreSession.cs b/src/Microsoft.Graph/Generated/Models/ExchangeRestoreSession.cs index 1582c057b00..93389d3d436 100644 --- a/src/Microsoft.Graph/Generated/Models/ExchangeRestoreSession.cs +++ b/src/Microsoft.Graph/Generated/Models/ExchangeRestoreSession.cs @@ -74,7 +74,7 @@ public ExchangeRestoreSession() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExchangeRestoreSession CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExchangeRestoreSession(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("granularMailboxRestoreArtifacts", GranularMailboxRestoreArtifacts); writer.WriteCollectionOfObjectValues("mailboxRestoreArtifacts", MailboxRestoreArtifacts); diff --git a/src/Microsoft.Graph/Generated/Models/ExchangeRestoreSessionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExchangeRestoreSessionCollectionResponse.cs index 16711c91dc8..f33abb970bf 100644 --- a/src/Microsoft.Graph/Generated/Models/ExchangeRestoreSessionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExchangeRestoreSessionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExchangeRestoreSessionCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExchangeRestoreSessionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExchangeRestoreSessionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExchangeSettings.cs b/src/Microsoft.Graph/Generated/Models/ExchangeSettings.cs index 21ffd04e15b..cb2a6ee8f19 100644 --- a/src/Microsoft.Graph/Generated/Models/ExchangeSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/ExchangeSettings.cs @@ -51,7 +51,7 @@ public string PrimaryMailboxId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExchangeSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExchangeSettings(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("inPlaceArchiveMailboxId", InPlaceArchiveMailboxId); writer.WriteStringValue("primaryMailboxId", PrimaryMailboxId); diff --git a/src/Microsoft.Graph/Generated/Models/ExcludeTarget.cs b/src/Microsoft.Graph/Generated/Models/ExcludeTarget.cs index b7d892fe5fb..9ed68794fa9 100644 --- a/src/Microsoft.Graph/Generated/Models/ExcludeTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/ExcludeTarget.cs @@ -74,7 +74,7 @@ public ExcludeTarget() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExcludeTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExcludeTarget(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("targetType", TargetType); diff --git a/src/Microsoft.Graph/Generated/Models/ExcludedApps.cs b/src/Microsoft.Graph/Generated/Models/ExcludedApps.cs index 648746cd1a6..37d54c4f8d0 100644 --- a/src/Microsoft.Graph/Generated/Models/ExcludedApps.cs +++ b/src/Microsoft.Graph/Generated/Models/ExcludedApps.cs @@ -143,7 +143,7 @@ public ExcludedApps() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExcludedApps CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExcludedApps(); } /// @@ -178,7 +178,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("access", Access); writer.WriteBoolValue("bing", Bing); writer.WriteBoolValue("excel", Excel); diff --git a/src/Microsoft.Graph/Generated/Models/ExclusionGroupAssignmentTarget.cs b/src/Microsoft.Graph/Generated/Models/ExclusionGroupAssignmentTarget.cs index 0bd853f3be6..2655dad89f5 100644 --- a/src/Microsoft.Graph/Generated/Models/ExclusionGroupAssignmentTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/ExclusionGroupAssignmentTarget.cs @@ -27,7 +27,7 @@ public ExclusionGroupAssignmentTarget() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExclusionGroupAssignmentTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExclusionGroupAssignmentTarget(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ExpeditedWindowsQualityUpdateSettings.cs b/src/Microsoft.Graph/Generated/Models/ExpeditedWindowsQualityUpdateSettings.cs index d915150b709..6604c9d824a 100644 --- a/src/Microsoft.Graph/Generated/Models/ExpeditedWindowsQualityUpdateSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/ExpeditedWindowsQualityUpdateSettings.cs @@ -75,7 +75,7 @@ public ExpeditedWindowsQualityUpdateSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExpeditedWindowsQualityUpdateSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExpeditedWindowsQualityUpdateSettings(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("daysUntilForcedReboot", DaysUntilForcedReboot); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("qualityUpdateRelease", QualityUpdateRelease); diff --git a/src/Microsoft.Graph/Generated/Models/ExpirationPattern.cs b/src/Microsoft.Graph/Generated/Models/ExpirationPattern.cs index d21b793e2a1..f1fe6278fc5 100644 --- a/src/Microsoft.Graph/Generated/Models/ExpirationPattern.cs +++ b/src/Microsoft.Graph/Generated/Models/ExpirationPattern.cs @@ -70,7 +70,7 @@ public ExpirationPattern() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExpirationPattern CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExpirationPattern(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteTimeSpanValue("duration", Duration); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ExportItemResponse.cs b/src/Microsoft.Graph/Generated/Models/ExportItemResponse.cs index 5641fdaedf1..43a3638c249 100644 --- a/src/Microsoft.Graph/Generated/Models/ExportItemResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExportItemResponse.cs @@ -116,7 +116,7 @@ public ExportItemResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExportItemResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExportItemResponse(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("changeKey", ChangeKey); writer.WriteByteArrayValue("data", Data); writer.WriteObjectValue("error", Error); diff --git a/src/Microsoft.Graph/Generated/Models/ExpressionEvaluationDetails.cs b/src/Microsoft.Graph/Generated/Models/ExpressionEvaluationDetails.cs index 4c10dd45a68..520ea07d431 100644 --- a/src/Microsoft.Graph/Generated/Models/ExpressionEvaluationDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/ExpressionEvaluationDetails.cs @@ -106,7 +106,7 @@ public ExpressionEvaluationDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExpressionEvaluationDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExpressionEvaluationDetails(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("expression", Expression); writer.WriteCollectionOfObjectValues("expressionEvaluationDetails", ExpressionEvaluationDetailsProp); writer.WriteBoolValue("expressionResult", ExpressionResult); diff --git a/src/Microsoft.Graph/Generated/Models/ExpressionInputObject.cs b/src/Microsoft.Graph/Generated/Models/ExpressionInputObject.cs index eb317870d08..56989e8fe18 100644 --- a/src/Microsoft.Graph/Generated/Models/ExpressionInputObject.cs +++ b/src/Microsoft.Graph/Generated/Models/ExpressionInputObject.cs @@ -84,7 +84,7 @@ public ExpressionInputObject() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExpressionInputObject CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExpressionInputObject(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("definition", Definition); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("properties", Properties); diff --git a/src/Microsoft.Graph/Generated/Models/ExtendedKeyUsage.cs b/src/Microsoft.Graph/Generated/Models/ExtendedKeyUsage.cs index c707acecbac..3795120fe8f 100644 --- a/src/Microsoft.Graph/Generated/Models/ExtendedKeyUsage.cs +++ b/src/Microsoft.Graph/Generated/Models/ExtendedKeyUsage.cs @@ -85,7 +85,7 @@ public ExtendedKeyUsage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExtendedKeyUsage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExtendedKeyUsage(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("objectIdentifier", ObjectIdentifier); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Extension.cs b/src/Microsoft.Graph/Generated/Models/Extension.cs index f73f2949e5e..f0867fab9d1 100644 --- a/src/Microsoft.Graph/Generated/Models/Extension.cs +++ b/src/Microsoft.Graph/Generated/Models/Extension.cs @@ -19,7 +19,7 @@ public partial class Extension : global::Microsoft.Graph.Beta.Models.Entity, IPa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Extension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -44,7 +44,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ExtensionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExtensionCollectionResponse.cs index d950e379064..8f76f68beaf 100644 --- a/src/Microsoft.Graph/Generated/Models/ExtensionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExtensionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExtensionCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExtensionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExtensionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExtensionProperty.cs b/src/Microsoft.Graph/Generated/Models/ExtensionProperty.cs index 04caa4f4023..f2d17724754 100644 --- a/src/Microsoft.Graph/Generated/Models/ExtensionProperty.cs +++ b/src/Microsoft.Graph/Generated/Models/ExtensionProperty.cs @@ -102,7 +102,7 @@ public ExtensionProperty() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExtensionProperty CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExtensionProperty(); } /// @@ -127,7 +127,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appDisplayName", AppDisplayName); writer.WriteStringValue("dataType", DataType); diff --git a/src/Microsoft.Graph/Generated/Models/ExtensionPropertyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExtensionPropertyCollectionResponse.cs index 3084e3a5d47..65abcf33588 100644 --- a/src/Microsoft.Graph/Generated/Models/ExtensionPropertyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExtensionPropertyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExtensionPropertyCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExtensionPropertyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExtensionPropertyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExtensionSchemaProperty.cs b/src/Microsoft.Graph/Generated/Models/ExtensionSchemaProperty.cs index 1f086b2491c..042130f3f02 100644 --- a/src/Microsoft.Graph/Generated/Models/ExtensionSchemaProperty.cs +++ b/src/Microsoft.Graph/Generated/Models/ExtensionSchemaProperty.cs @@ -84,7 +84,7 @@ public ExtensionSchemaProperty() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExtensionSchemaProperty CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExtensionSchemaProperty(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/Models/External.cs b/src/Microsoft.Graph/Generated/Models/External.cs index 49cd64398cb..6d421de4ea5 100644 --- a/src/Microsoft.Graph/Generated/Models/External.cs +++ b/src/Microsoft.Graph/Generated/Models/External.cs @@ -35,7 +35,7 @@ public partial class External : global::Microsoft.Graph.Beta.Models.Entity, IPar /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.External CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.External(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("connections", Connections); } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalAuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/ExternalAuthenticationMethod.cs index 0170bf14935..a553084cde5 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalAuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalAuthenticationMethod.cs @@ -58,7 +58,7 @@ public ExternalAuthenticationMethod() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalAuthenticationMethod(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("configurationId", ConfigurationId); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalAuthenticationMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExternalAuthenticationMethodCollectionResponse.cs index 0d9b206fb9c..23a3b27d6ba 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalAuthenticationMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalAuthenticationMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExternalAuthenticationMethodCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalAuthenticationMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalAuthenticationMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalAuthenticationMethodConfiguration.cs b/src/Microsoft.Graph/Generated/Models/ExternalAuthenticationMethodConfiguration.cs index 7a4c933bf20..1ed2ad40ecb 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalAuthenticationMethodConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalAuthenticationMethodConfiguration.cs @@ -90,7 +90,7 @@ public ExternalAuthenticationMethodConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalAuthenticationMethodConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalAuthenticationMethodConfiguration(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnection.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnection.cs index 6c247135107..937b15de65f 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnection.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnection.cs @@ -137,7 +137,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnection(); } /// @@ -164,7 +164,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("configuration", Configuration); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Acl.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Acl.cs index 055994c7739..cd2818508dc 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Acl.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Acl.cs @@ -86,7 +86,7 @@ public Acl() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalConnectors.Acl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.Acl(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("accessType", AccessType); writer.WriteEnumValue("identitySource", IdentitySource); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ActivitySettings.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ActivitySettings.cs index 3449548f0fe..62a6c63f9c2 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ActivitySettings.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ActivitySettings.cs @@ -68,7 +68,7 @@ public ActivitySettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalConnectors.ActivitySettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ActivitySettings(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("urlToItemResolvers", UrlToItemResolvers); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ComplianceSettings.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ComplianceSettings.cs index 3472d298425..23ce11b8db8 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ComplianceSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ComplianceSettings.cs @@ -68,7 +68,7 @@ public ComplianceSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalConnectors.ComplianceSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ComplianceSettings(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("eDiscoveryResultTemplates", EDiscoveryResultTemplates); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Configuration.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Configuration.cs index b5ad49c5a1c..3105f203f53 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Configuration.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Configuration.cs @@ -68,7 +68,7 @@ public Configuration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalConnectors.Configuration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.Configuration(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("authorizedAppIds", AuthorizedAppIds); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ConnectionOperation.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ConnectionOperation.cs index bfe763a81e7..da47b8dfd6b 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ConnectionOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ConnectionOperation.cs @@ -41,7 +41,7 @@ public partial class ConnectionOperation : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionOperation(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("error", Error); writer.WriteEnumValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ConnectionOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ConnectionOperationCollectionResponse.cs index da251aecfdf..7f7e1a31329 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ConnectionOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ConnectionOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConnectionOperationCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ConnectionQuota.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ConnectionQuota.cs index 0880abd61c7..376744c6679 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ConnectionQuota.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ConnectionQuota.cs @@ -25,7 +25,7 @@ public long? ItemsRemaining /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionQuota CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ConnectionQuota(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("itemsRemaining", ItemsRemaining); } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/DisplayTemplate.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/DisplayTemplate.cs index 21731fba431..c8b53c3d811 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/DisplayTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/DisplayTemplate.cs @@ -106,7 +106,7 @@ public DisplayTemplate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalConnectors.DisplayTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.DisplayTemplate(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteObjectValue("layout", Layout); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/External.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/External.cs index 51a432247da..3ac4c60fa7b 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/External.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/External.cs @@ -101,7 +101,7 @@ public External() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalConnectors.External CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.External(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("authorizationSystems", AuthorizationSystems); writer.WriteCollectionOfObjectValues("connections", Connections); writer.WriteObjectValue("industryData", IndustryData); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalActivity.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalActivity.cs index f779bad1bc1..0b6eb4db223 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalActivity.cs @@ -47,7 +47,7 @@ public DateTimeOffset? StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -74,7 +74,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("performedBy", PerformedBy); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalActivityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalActivityCollectionResponse.cs index 00115a56bb7..57eab03fee8 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalActivityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalActivityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExternalActivityCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalActivityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalActivityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalActivityResult.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalActivityResult.cs index f42326416e1..f53a5645e5f 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalActivityResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalActivityResult.cs @@ -35,7 +35,7 @@ public partial class ExternalActivityResult : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalActivityResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalActivityResult(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("error", Error); } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalConnection.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalConnection.cs index b097f15e764..0f1e09fc504 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalConnection.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalConnection.cs @@ -229,7 +229,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalConnection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalConnection(); } /// @@ -263,7 +263,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("activitySettings", ActivitySettings); writer.WriteObjectValue("complianceSettings", ComplianceSettings); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalConnectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalConnectionCollectionResponse.cs index 58c94677c86..9fbcf161370 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalConnectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalConnectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExternalConnectionCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalConnectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalConnectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalGroup.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalGroup.cs index 9837a92c88b..8859e9e0e86 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalGroup.cs @@ -67,7 +67,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalGroup(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalGroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalGroupCollectionResponse.cs index 2ca12bd5849..c29968930d1 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalGroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalGroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExternalGroupCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalGroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalGroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalItem.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalItem.cs index 747c514273f..b273ccf427b 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalItem.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalItem.cs @@ -83,7 +83,7 @@ public partial class ExternalItem : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItem(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("acl", Acl); writer.WriteCollectionOfObjectValues("activities", Activities); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalItemCollectionResponse.cs index a0045d2cfc3..58e9066f92a 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExternalItemCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalItemContent.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalItemContent.cs index a10bb6679ff..7e9423b8eb3 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalItemContent.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ExternalItemContent.cs @@ -74,7 +74,7 @@ public ExternalItemContent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItemContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ExternalItemContent(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("type", Type); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Identity.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Identity.cs index c0bc329bb5a..d2585b3de3d 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Identity.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Identity.cs @@ -25,7 +25,7 @@ public partial class Identity : global::Microsoft.Graph.Beta.Models.Entity, IPar /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.Identity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.Identity(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("type", Type); } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/IdentityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/IdentityCollectionResponse.cs index d17a04372e7..1ba4b502e2f 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/IdentityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/IdentityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IdentityCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.IdentityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.IdentityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ItemIdResolver.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ItemIdResolver.cs index d66002a4c0b..c0f4fe0a6f2 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ItemIdResolver.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/ItemIdResolver.cs @@ -58,7 +58,7 @@ public ItemIdResolver() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ItemIdResolver CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.ItemIdResolver(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("itemId", ItemId); writer.WriteObjectValue("urlMatchInfo", UrlMatchInfo); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Properties.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Properties.cs index 1a6e0f6a775..cffc643e549 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Properties.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Properties.cs @@ -52,7 +52,7 @@ public Properties() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalConnectors.Properties CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.Properties(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Property.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Property.cs index a6a1112f518..648e7ba6e5a 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Property.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Property.cs @@ -152,7 +152,7 @@ public Property() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalConnectors.Property CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.Property(); } /// @@ -182,7 +182,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("aliases", Aliases); writer.WriteBoolValue("isExactMatchRequired", IsExactMatchRequired); writer.WriteBoolValue("isQueryable", IsQueryable); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/PropertyRule.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/PropertyRule.cs index 034cc19e833..d0a0677488f 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/PropertyRule.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/PropertyRule.cs @@ -96,7 +96,7 @@ public PropertyRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalConnectors.PropertyRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.PropertyRule(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("operation", Operation); writer.WriteStringValue("property", Property); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/RankingHint.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/RankingHint.cs index b9853b5c14e..7ed3a2e101f 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/RankingHint.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/RankingHint.cs @@ -58,7 +58,7 @@ public RankingHint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalConnectors.RankingHint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.RankingHint(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("importanceScore", ImportanceScore); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Schema.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Schema.cs index 52ceeb2a4ed..fca92a6267d 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Schema.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/Schema.cs @@ -51,7 +51,7 @@ public string BaseType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalConnectors.Schema CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.Schema(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("baseType", BaseType); writer.WriteCollectionOfObjectValues("properties", Properties); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/SearchSettings.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/SearchSettings.cs index 4afdd30f7b2..87b1790225c 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/SearchSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/SearchSettings.cs @@ -68,7 +68,7 @@ public SearchSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalConnectors.SearchSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.SearchSettings(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("searchResultTemplates", SearchResultTemplates); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/UrlMatchInfo.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/UrlMatchInfo.cs index 65494c4cd18..c36ba9be5ab 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/UrlMatchInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/UrlMatchInfo.cs @@ -84,7 +84,7 @@ public UrlMatchInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalConnectors.UrlMatchInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalConnectors.UrlMatchInfo(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("baseUrls", BaseUrls); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("urlPattern", UrlPattern); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/UrlToItemResolverBase.cs b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/UrlToItemResolverBase.cs index d0a20309662..27c2cc531bf 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalConnectors/UrlToItemResolverBase.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalConnectors/UrlToItemResolverBase.cs @@ -58,7 +58,7 @@ public UrlToItemResolverBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalConnectors.UrlToItemResolverBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -84,7 +84,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("priority", Priority); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalDomainFederation.cs b/src/Microsoft.Graph/Generated/Models/ExternalDomainFederation.cs index 48bf36750e5..0cdafebadf2 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalDomainFederation.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalDomainFederation.cs @@ -74,7 +74,7 @@ public ExternalDomainFederation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalDomainFederation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalDomainFederation(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("domainName", DomainName); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalDomainName.cs b/src/Microsoft.Graph/Generated/Models/ExternalDomainName.cs index 1e16668abac..29b2586d33b 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalDomainName.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalDomainName.cs @@ -19,7 +19,7 @@ public partial class ExternalDomainName : global::Microsoft.Graph.Beta.Models.En /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalDomainName CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalDomainName(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalGroup.cs b/src/Microsoft.Graph/Generated/Models/ExternalGroup.cs index 72c890965c6..8b95658dc4b 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalGroup.cs @@ -51,7 +51,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalGroup(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalIdentitiesPolicy.cs b/src/Microsoft.Graph/Generated/Models/ExternalIdentitiesPolicy.cs index e7e954ee36a..02d91676eca 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalIdentitiesPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalIdentitiesPolicy.cs @@ -38,7 +38,7 @@ public ExternalIdentitiesPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalIdentitiesPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalIdentitiesPolicy(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowDeletedIdentitiesDataRemoval", AllowDeletedIdentitiesDataRemoval); writer.WriteBoolValue("allowExternalIdentitiesToLeave", AllowExternalIdentitiesToLeave); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalItem.cs b/src/Microsoft.Graph/Generated/Models/ExternalItem.cs index d3d70580d8c..680382c8f59 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalItem.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalItem.cs @@ -67,7 +67,7 @@ public partial class ExternalItem : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalItem(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("acl", Acl); writer.WriteObjectValue("content", Content); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalItemContent.cs b/src/Microsoft.Graph/Generated/Models/ExternalItemContent.cs index c4d969ffe37..8cfac9f7e4e 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalItemContent.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalItemContent.cs @@ -74,7 +74,7 @@ public ExternalItemContent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalItemContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalItemContent(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("type", Type); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalLink.cs b/src/Microsoft.Graph/Generated/Models/ExternalLink.cs index 067f1d08f5f..859943c1af4 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalLink.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalLink.cs @@ -68,7 +68,7 @@ public ExternalLink() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExternalLink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalLink(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("href", Href); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalMeetingRegistrant.cs b/src/Microsoft.Graph/Generated/Models/ExternalMeetingRegistrant.cs index 6ba37de0005..3737f130aac 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalMeetingRegistrant.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalMeetingRegistrant.cs @@ -58,7 +58,7 @@ public ExternalMeetingRegistrant() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalMeetingRegistrant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalMeetingRegistrant(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("tenantId", TenantId); writer.WriteStringValue("userId", UserId); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalMeetingRegistration.cs b/src/Microsoft.Graph/Generated/Models/ExternalMeetingRegistration.cs index 8aa02a552e6..a083eb09170 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalMeetingRegistration.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalMeetingRegistration.cs @@ -26,7 +26,7 @@ public ExternalMeetingRegistration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalMeetingRegistration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalMeetingRegistration(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalProfile.cs b/src/Microsoft.Graph/Generated/Models/ExternalProfile.cs index 431c1b7bf09..8bc27d4daa0 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalProfile.cs @@ -172,7 +172,7 @@ public ExternalProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -208,7 +208,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("address", Address); writer.WriteStringValue("companyName", CompanyName); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalSponsors.cs b/src/Microsoft.Graph/Generated/Models/ExternalSponsors.cs index 952b55e9377..6d09f9b4ed4 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalSponsors.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalSponsors.cs @@ -26,7 +26,7 @@ public ExternalSponsors() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalSponsors CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalSponsors(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalUserProfile.cs b/src/Microsoft.Graph/Generated/Models/ExternalUserProfile.cs index 241711742be..d9b356d0670 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalUserProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalUserProfile.cs @@ -26,7 +26,7 @@ public ExternalUserProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalUserProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalUserProfile(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalUserProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExternalUserProfileCollectionResponse.cs index 230f44758e4..1407d054a4e 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalUserProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalUserProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExternalUserProfileCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalUserProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalUserProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExternalUsersSelfServiceSignUpEventsFlow.cs b/src/Microsoft.Graph/Generated/Models/ExternalUsersSelfServiceSignUpEventsFlow.cs index 98685a2be11..915bb16a6b0 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalUsersSelfServiceSignUpEventsFlow.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalUsersSelfServiceSignUpEventsFlow.cs @@ -122,7 +122,7 @@ public ExternalUsersSelfServiceSignUpEventsFlow() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalUsersSelfServiceSignUpEventsFlow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalUsersSelfServiceSignUpEventsFlow(); } /// @@ -147,7 +147,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("onAttributeCollection", OnAttributeCollection); writer.WriteObjectValue("onAttributeCollectionStart", OnAttributeCollectionStart); diff --git a/src/Microsoft.Graph/Generated/Models/ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse.cs index e3a85b06252..4930b2a1b52 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ExternallyAccessibleAwsStorageBucketFinding.cs b/src/Microsoft.Graph/Generated/Models/ExternallyAccessibleAwsStorageBucketFinding.cs index 804ef500925..d3900927722 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternallyAccessibleAwsStorageBucketFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternallyAccessibleAwsStorageBucketFinding.cs @@ -57,7 +57,7 @@ public partial class ExternallyAccessibleAwsStorageBucketFinding : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternallyAccessibleAwsStorageBucketFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternallyAccessibleAwsStorageBucketFinding(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessibility", Accessibility); writer.WriteObjectValue("accountsWithAccess", AccountsWithAccess); diff --git a/src/Microsoft.Graph/Generated/Models/ExternallyAccessibleAzureBlobContainerFinding.cs b/src/Microsoft.Graph/Generated/Models/ExternallyAccessibleAzureBlobContainerFinding.cs index 9200ff69218..6ee82d62c29 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternallyAccessibleAzureBlobContainerFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternallyAccessibleAzureBlobContainerFinding.cs @@ -47,7 +47,7 @@ public partial class ExternallyAccessibleAzureBlobContainerFinding : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternallyAccessibleAzureBlobContainerFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternallyAccessibleAzureBlobContainerFinding(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessibility", Accessibility); writer.WriteEnumValue("encryptionManagedBy", EncryptionManagedBy); diff --git a/src/Microsoft.Graph/Generated/Models/ExternallyAccessibleGcpStorageBucketFinding.cs b/src/Microsoft.Graph/Generated/Models/ExternallyAccessibleGcpStorageBucketFinding.cs index 2be34808f41..0460647cabc 100644 --- a/src/Microsoft.Graph/Generated/Models/ExternallyAccessibleGcpStorageBucketFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/ExternallyAccessibleGcpStorageBucketFinding.cs @@ -47,7 +47,7 @@ public partial class ExternallyAccessibleGcpStorageBucketFinding : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExternallyAccessibleGcpStorageBucketFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExternallyAccessibleGcpStorageBucketFinding(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessibility", Accessibility); writer.WriteEnumValue("encryptionManagedBy", EncryptionManagedBy); diff --git a/src/Microsoft.Graph/Generated/Models/ExtractAlphaTransformation.cs b/src/Microsoft.Graph/Generated/Models/ExtractAlphaTransformation.cs index 0fea35eb71c..f62f41752b2 100644 --- a/src/Microsoft.Graph/Generated/Models/ExtractAlphaTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ExtractAlphaTransformation.cs @@ -32,7 +32,7 @@ public ExtractAlphaTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExtractAlphaTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExtractAlphaTransformation(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("type", Type); } diff --git a/src/Microsoft.Graph/Generated/Models/ExtractMailPrefixTransformation.cs b/src/Microsoft.Graph/Generated/Models/ExtractMailPrefixTransformation.cs index 68ead28f580..95866ce3af2 100644 --- a/src/Microsoft.Graph/Generated/Models/ExtractMailPrefixTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ExtractMailPrefixTransformation.cs @@ -26,7 +26,7 @@ public ExtractMailPrefixTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExtractMailPrefixTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExtractMailPrefixTransformation(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ExtractNumberTransformation.cs b/src/Microsoft.Graph/Generated/Models/ExtractNumberTransformation.cs index cc97476a21c..3b0a497ad85 100644 --- a/src/Microsoft.Graph/Generated/Models/ExtractNumberTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ExtractNumberTransformation.cs @@ -32,7 +32,7 @@ public ExtractNumberTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExtractNumberTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExtractNumberTransformation(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("type", Type); } diff --git a/src/Microsoft.Graph/Generated/Models/ExtractSensitivityLabelsResult.cs b/src/Microsoft.Graph/Generated/Models/ExtractSensitivityLabelsResult.cs index 89e1247e9f9..b174345f1c2 100644 --- a/src/Microsoft.Graph/Generated/Models/ExtractSensitivityLabelsResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ExtractSensitivityLabelsResult.cs @@ -68,7 +68,7 @@ public ExtractSensitivityLabelsResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ExtractSensitivityLabelsResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExtractSensitivityLabelsResult(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("labels", Labels); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ExtractTransformation.cs b/src/Microsoft.Graph/Generated/Models/ExtractTransformation.cs index 72a98b6121d..29aa68d8a60 100644 --- a/src/Microsoft.Graph/Generated/Models/ExtractTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ExtractTransformation.cs @@ -74,7 +74,7 @@ public ExtractTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ExtractTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ExtractTransformation(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("type", Type); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/FallbackToMicrosoftProviderOnError.cs b/src/Microsoft.Graph/Generated/Models/FallbackToMicrosoftProviderOnError.cs index 246c0ca5cd1..f96f9932d60 100644 --- a/src/Microsoft.Graph/Generated/Models/FallbackToMicrosoftProviderOnError.cs +++ b/src/Microsoft.Graph/Generated/Models/FallbackToMicrosoftProviderOnError.cs @@ -26,7 +26,7 @@ public FallbackToMicrosoftProviderOnError() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FallbackToMicrosoftProviderOnError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FallbackToMicrosoftProviderOnError(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/FeatureRolloutPolicy.cs b/src/Microsoft.Graph/Generated/Models/FeatureRolloutPolicy.cs index 604f0114b83..bcbd2296c4a 100644 --- a/src/Microsoft.Graph/Generated/Models/FeatureRolloutPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/FeatureRolloutPolicy.cs @@ -85,7 +85,7 @@ public bool? IsEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FeatureRolloutPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FeatureRolloutPolicy(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("appliesTo", AppliesTo); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/FeatureRolloutPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/FeatureRolloutPolicyCollectionResponse.cs index 664bc546f91..c06d1e37677 100644 --- a/src/Microsoft.Graph/Generated/Models/FeatureRolloutPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/FeatureRolloutPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class FeatureRolloutPolicyCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FeatureRolloutPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FeatureRolloutPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/FeatureTarget.cs b/src/Microsoft.Graph/Generated/Models/FeatureTarget.cs index 63aba3ba31a..fcf3feef10c 100644 --- a/src/Microsoft.Graph/Generated/Models/FeatureTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/FeatureTarget.cs @@ -74,7 +74,7 @@ public FeatureTarget() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FeatureTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FeatureTarget(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("targetType", TargetType); diff --git a/src/Microsoft.Graph/Generated/Models/FederatedIdentityCredential.cs b/src/Microsoft.Graph/Generated/Models/FederatedIdentityCredential.cs index 9d0ea6d6b26..0d46dfe063b 100644 --- a/src/Microsoft.Graph/Generated/Models/FederatedIdentityCredential.cs +++ b/src/Microsoft.Graph/Generated/Models/FederatedIdentityCredential.cs @@ -115,7 +115,7 @@ public string Subject /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FederatedIdentityCredential CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FederatedIdentityCredential(); } /// @@ -140,7 +140,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("audiences", Audiences); writer.WriteObjectValue("claimsMatchingExpression", ClaimsMatchingExpression); diff --git a/src/Microsoft.Graph/Generated/Models/FederatedIdentityCredentialCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/FederatedIdentityCredentialCollectionResponse.cs index 3e459c44c7b..833fd4945be 100644 --- a/src/Microsoft.Graph/Generated/Models/FederatedIdentityCredentialCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/FederatedIdentityCredentialCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class FederatedIdentityCredentialCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FederatedIdentityCredentialCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FederatedIdentityCredentialCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/FederatedIdentityExpression.cs b/src/Microsoft.Graph/Generated/Models/FederatedIdentityExpression.cs index 394fe1ffcd6..f7b2d438900 100644 --- a/src/Microsoft.Graph/Generated/Models/FederatedIdentityExpression.cs +++ b/src/Microsoft.Graph/Generated/Models/FederatedIdentityExpression.cs @@ -74,7 +74,7 @@ public FederatedIdentityExpression() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FederatedIdentityExpression CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FederatedIdentityExpression(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("languageVersion", LanguageVersion); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/FederatedTokenValidationPolicy.cs b/src/Microsoft.Graph/Generated/Models/FederatedTokenValidationPolicy.cs index 8939ba7e6fb..415e60b0285 100644 --- a/src/Microsoft.Graph/Generated/Models/FederatedTokenValidationPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/FederatedTokenValidationPolicy.cs @@ -42,7 +42,7 @@ public FederatedTokenValidationPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FederatedTokenValidationPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FederatedTokenValidationPolicy(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("validatingDomains", ValidatingDomains); } diff --git a/src/Microsoft.Graph/Generated/Models/Fido2AuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/Fido2AuthenticationMethod.cs index d4530a360fd..4851db1147f 100644 --- a/src/Microsoft.Graph/Generated/Models/Fido2AuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/Fido2AuthenticationMethod.cs @@ -112,7 +112,7 @@ public Fido2AuthenticationMethod() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Fido2AuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Fido2AuthenticationMethod(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("aaGuid", AaGuid); writer.WriteCollectionOfPrimitiveValues("attestationCertificates", AttestationCertificates); diff --git a/src/Microsoft.Graph/Generated/Models/Fido2AuthenticationMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Fido2AuthenticationMethodCollectionResponse.cs index 47a5a3aca5c..054f05a524b 100644 --- a/src/Microsoft.Graph/Generated/Models/Fido2AuthenticationMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Fido2AuthenticationMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class Fido2AuthenticationMethodCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Fido2AuthenticationMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Fido2AuthenticationMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Fido2AuthenticationMethodConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Fido2AuthenticationMethodConfiguration.cs index 21de733eb08..bd95643518e 100644 --- a/src/Microsoft.Graph/Generated/Models/Fido2AuthenticationMethodConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Fido2AuthenticationMethodConfiguration.cs @@ -70,7 +70,7 @@ public Fido2AuthenticationMethodConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Fido2AuthenticationMethodConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Fido2AuthenticationMethodConfiguration(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("includeTargets", IncludeTargets); writer.WriteBoolValue("isAttestationEnforced", IsAttestationEnforced); diff --git a/src/Microsoft.Graph/Generated/Models/Fido2CombinationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Fido2CombinationConfiguration.cs index 50cc54dcdfe..5ca155ccab2 100644 --- a/src/Microsoft.Graph/Generated/Models/Fido2CombinationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Fido2CombinationConfiguration.cs @@ -42,7 +42,7 @@ public Fido2CombinationConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Fido2CombinationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Fido2CombinationConfiguration(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("allowedAAGUIDs", AllowedAAGUIDs); } diff --git a/src/Microsoft.Graph/Generated/Models/Fido2KeyRestrictions.cs b/src/Microsoft.Graph/Generated/Models/Fido2KeyRestrictions.cs index 15d12127ab2..0bc18b21e9c 100644 --- a/src/Microsoft.Graph/Generated/Models/Fido2KeyRestrictions.cs +++ b/src/Microsoft.Graph/Generated/Models/Fido2KeyRestrictions.cs @@ -80,7 +80,7 @@ public Fido2KeyRestrictions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Fido2KeyRestrictions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Fido2KeyRestrictions(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("aaGuids", AaGuids); writer.WriteEnumValue("enforcementType", EnforcementType); writer.WriteBoolValue("isEnforced", IsEnforced); diff --git a/src/Microsoft.Graph/Generated/Models/FieldValueSet.cs b/src/Microsoft.Graph/Generated/Models/FieldValueSet.cs index cfedf403415..10fa956a48c 100644 --- a/src/Microsoft.Graph/Generated/Models/FieldValueSet.cs +++ b/src/Microsoft.Graph/Generated/Models/FieldValueSet.cs @@ -19,7 +19,7 @@ public partial class FieldValueSet : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FieldValueSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FieldValueSet(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/FileAssessmentRequest.cs b/src/Microsoft.Graph/Generated/Models/FileAssessmentRequest.cs index e0eb676ae99..567500719c2 100644 --- a/src/Microsoft.Graph/Generated/Models/FileAssessmentRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/FileAssessmentRequest.cs @@ -58,7 +58,7 @@ public FileAssessmentRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FileAssessmentRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileAssessmentRequest(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contentData", ContentData); writer.WriteStringValue("fileName", FileName); diff --git a/src/Microsoft.Graph/Generated/Models/FileAttachment.cs b/src/Microsoft.Graph/Generated/Models/FileAttachment.cs index 5ba6c579dba..da4b2a3112a 100644 --- a/src/Microsoft.Graph/Generated/Models/FileAttachment.cs +++ b/src/Microsoft.Graph/Generated/Models/FileAttachment.cs @@ -74,7 +74,7 @@ public FileAttachment() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FileAttachment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileAttachment(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("contentBytes", ContentBytes); writer.WriteStringValue("contentId", ContentId); diff --git a/src/Microsoft.Graph/Generated/Models/FileClassificationRequest.cs b/src/Microsoft.Graph/Generated/Models/FileClassificationRequest.cs index 9c6c4d6a63d..b12b1225a60 100644 --- a/src/Microsoft.Graph/Generated/Models/FileClassificationRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/FileClassificationRequest.cs @@ -51,7 +51,7 @@ public List SensitiveTypeIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FileClassificationRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileClassificationRequest(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("file", File); writer.WriteCollectionOfPrimitiveValues("sensitiveTypeIds", SensitiveTypeIds); diff --git a/src/Microsoft.Graph/Generated/Models/FileEncryptionInfo.cs b/src/Microsoft.Graph/Generated/Models/FileEncryptionInfo.cs index 351d81a245f..1ca0e0be55a 100644 --- a/src/Microsoft.Graph/Generated/Models/FileEncryptionInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/FileEncryptionInfo.cs @@ -165,7 +165,7 @@ public FileEncryptionInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FileEncryptionInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileEncryptionInfo(); } /// @@ -192,7 +192,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("encryptionKey", EncryptionKey); writer.WriteByteArrayValue("fileDigest", FileDigest); writer.WriteStringValue("fileDigestAlgorithm", FileDigestAlgorithm); diff --git a/src/Microsoft.Graph/Generated/Models/FileHash.cs b/src/Microsoft.Graph/Generated/Models/FileHash.cs index 6f5de47ac02..f3b3d7d40a5 100644 --- a/src/Microsoft.Graph/Generated/Models/FileHash.cs +++ b/src/Microsoft.Graph/Generated/Models/FileHash.cs @@ -74,7 +74,7 @@ public FileHash() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FileHash CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileHash(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("hashType", HashType); writer.WriteStringValue("hashValue", HashValue); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/FileObject.cs b/src/Microsoft.Graph/Generated/Models/FileObject.cs index 0ce7dc77288..e3a9e77f0cb 100644 --- a/src/Microsoft.Graph/Generated/Models/FileObject.cs +++ b/src/Microsoft.Graph/Generated/Models/FileObject.cs @@ -90,7 +90,7 @@ public FileObject() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FileObject CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileObject(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("hashes", Hashes); writer.WriteStringValue("mimeType", MimeType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/FileSecurityProfile.cs b/src/Microsoft.Graph/Generated/Models/FileSecurityProfile.cs index c0bb7b307f6..49e2319882a 100644 --- a/src/Microsoft.Graph/Generated/Models/FileSecurityProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/FileSecurityProfile.cs @@ -245,7 +245,7 @@ public List Tags /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FileSecurityProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileSecurityProfile(); } /// @@ -280,7 +280,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("activityGroupNames", ActivityGroupNames); writer.WriteStringValue("azureSubscriptionId", AzureSubscriptionId); diff --git a/src/Microsoft.Graph/Generated/Models/FileSecurityProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/FileSecurityProfileCollectionResponse.cs index 904dd6575ab..7a42b96f46e 100644 --- a/src/Microsoft.Graph/Generated/Models/FileSecurityProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/FileSecurityProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class FileSecurityProfileCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FileSecurityProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileSecurityProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/FileSecurityState.cs b/src/Microsoft.Graph/Generated/Models/FileSecurityState.cs index b9c1827d4ea..63b06df12a4 100644 --- a/src/Microsoft.Graph/Generated/Models/FileSecurityState.cs +++ b/src/Microsoft.Graph/Generated/Models/FileSecurityState.cs @@ -116,7 +116,7 @@ public FileSecurityState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FileSecurityState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileSecurityState(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fileHash", FileHash); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/FileStorage.cs b/src/Microsoft.Graph/Generated/Models/FileStorage.cs index 1046eb837bf..97ab5d0cdd6 100644 --- a/src/Microsoft.Graph/Generated/Models/FileStorage.cs +++ b/src/Microsoft.Graph/Generated/Models/FileStorage.cs @@ -83,7 +83,7 @@ public partial class FileStorage : global::Microsoft.Graph.Beta.Models.Entity, I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FileStorage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileStorage(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("containers", Containers); writer.WriteCollectionOfObjectValues("containerTypeRegistrations", ContainerTypeRegistrations); diff --git a/src/Microsoft.Graph/Generated/Models/FileStorageContainer.cs b/src/Microsoft.Graph/Generated/Models/FileStorageContainer.cs index 13680c17ed0..aede29bd801 100644 --- a/src/Microsoft.Graph/Generated/Models/FileStorageContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/FileStorageContainer.cs @@ -297,7 +297,7 @@ public long? StorageUsedInBytes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FileStorageContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileStorageContainer(); } /// @@ -339,7 +339,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("archivalDetails", ArchivalDetails); writer.WriteObjectValue("assignedSensitivityLabel", AssignedSensitivityLabel); diff --git a/src/Microsoft.Graph/Generated/Models/FileStorageContainerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/FileStorageContainerCollectionResponse.cs index b61cc13fa36..0acccac846c 100644 --- a/src/Microsoft.Graph/Generated/Models/FileStorageContainerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/FileStorageContainerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class FileStorageContainerCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FileStorageContainerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileStorageContainerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/FileStorageContainerCustomPropertyDictionary.cs b/src/Microsoft.Graph/Generated/Models/FileStorageContainerCustomPropertyDictionary.cs index 25738bbd5c6..62e7082fd4d 100644 --- a/src/Microsoft.Graph/Generated/Models/FileStorageContainerCustomPropertyDictionary.cs +++ b/src/Microsoft.Graph/Generated/Models/FileStorageContainerCustomPropertyDictionary.cs @@ -19,7 +19,7 @@ public partial class FileStorageContainerCustomPropertyDictionary : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FileStorageContainerCustomPropertyDictionary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileStorageContainerCustomPropertyDictionary(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/FileStorageContainerSettings.cs b/src/Microsoft.Graph/Generated/Models/FileStorageContainerSettings.cs index 2c21d3e8c4d..5c618d3b467 100644 --- a/src/Microsoft.Graph/Generated/Models/FileStorageContainerSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/FileStorageContainerSettings.cs @@ -70,7 +70,7 @@ public FileStorageContainerSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FileStorageContainerSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileStorageContainerSettings(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isItemVersioningEnabled", IsItemVersioningEnabled); writer.WriteBoolValue("isOcrEnabled", IsOcrEnabled); writer.WriteIntValue("itemMajorVersionLimit", ItemMajorVersionLimit); diff --git a/src/Microsoft.Graph/Generated/Models/FileStorageContainerType.cs b/src/Microsoft.Graph/Generated/Models/FileStorageContainerType.cs index d0faa73ec7c..cd939764e04 100644 --- a/src/Microsoft.Graph/Generated/Models/FileStorageContainerType.cs +++ b/src/Microsoft.Graph/Generated/Models/FileStorageContainerType.cs @@ -97,7 +97,7 @@ public Guid? OwningAppId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FileStorageContainerType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileStorageContainerType(); } /// @@ -124,7 +124,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("billingClassification", BillingClassification); writer.WriteEnumValue("billingStatus", BillingStatus); diff --git a/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeAppPermissionGrant.cs b/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeAppPermissionGrant.cs index 9ce435b5a2b..e7e7decf2a2 100644 --- a/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeAppPermissionGrant.cs +++ b/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeAppPermissionGrant.cs @@ -100,7 +100,7 @@ public FileStorageContainerTypeAppPermissionGrant() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FileStorageContainerTypeAppPermissionGrant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileStorageContainerTypeAppPermissionGrant(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appId", AppId); writer.WriteCollectionOfEnumValues("applicationPermissions", ApplicationPermissions); writer.WriteCollectionOfEnumValues("delegatedPermissions", DelegatedPermissions); diff --git a/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeAppPermissionGrantCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeAppPermissionGrantCollectionResponse.cs index 4d6ea2e90fc..32a34333925 100644 --- a/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeAppPermissionGrantCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeAppPermissionGrantCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class FileStorageContainerTypeAppPermissionGrantCollectionRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FileStorageContainerTypeAppPermissionGrantCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileStorageContainerTypeAppPermissionGrantCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeCollectionResponse.cs index 6b25aa8aa44..51e57fcc9ee 100644 --- a/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class FileStorageContainerTypeCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FileStorageContainerTypeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileStorageContainerTypeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeRegistration.cs b/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeRegistration.cs index be995a834fd..aaaba257952 100644 --- a/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeRegistration.cs +++ b/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeRegistration.cs @@ -113,7 +113,7 @@ public DateTimeOffset? RegisteredDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FileStorageContainerTypeRegistration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileStorageContainerTypeRegistration(); } /// @@ -141,7 +141,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("applicationPermissionGrants", ApplicationPermissionGrants); writer.WriteEnumValue("billingClassification", BillingClassification); diff --git a/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeRegistrationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeRegistrationCollectionResponse.cs index dd56fa021e5..4fcb29b1a07 100644 --- a/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeRegistrationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeRegistrationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class FileStorageContainerTypeRegistrationCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FileStorageContainerTypeRegistrationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileStorageContainerTypeRegistrationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeRegistrationSettings.cs b/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeRegistrationSettings.cs index 61cbab65050..22c1322e435 100644 --- a/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeRegistrationSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeRegistrationSettings.cs @@ -110,7 +110,7 @@ public FileStorageContainerTypeRegistrationSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FileStorageContainerTypeRegistrationSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileStorageContainerTypeRegistrationSettings(); } /// @@ -138,7 +138,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isDiscoverabilityEnabled", IsDiscoverabilityEnabled); writer.WriteBoolValue("isItemVersioningEnabled", IsItemVersioningEnabled); writer.WriteBoolValue("isSearchEnabled", IsSearchEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeSettings.cs b/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeSettings.cs index e63b163dbfd..f27354502a8 100644 --- a/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/FileStorageContainerTypeSettings.cs @@ -116,7 +116,7 @@ public FileStorageContainerTypeSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FileStorageContainerTypeSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileStorageContainerTypeSettings(); } /// @@ -145,7 +145,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("consumingTenantOverridables", ConsumingTenantOverridables); writer.WriteBoolValue("isDiscoverabilityEnabled", IsDiscoverabilityEnabled); writer.WriteBoolValue("isItemVersioningEnabled", IsItemVersioningEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/FileStorageContainerViewpoint.cs b/src/Microsoft.Graph/Generated/Models/FileStorageContainerViewpoint.cs index f185599927e..dc7b40d122b 100644 --- a/src/Microsoft.Graph/Generated/Models/FileStorageContainerViewpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/FileStorageContainerViewpoint.cs @@ -68,7 +68,7 @@ public FileStorageContainerViewpoint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FileStorageContainerViewpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileStorageContainerViewpoint(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("effectiveRole", EffectiveRole); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/FileSystemInfo.cs b/src/Microsoft.Graph/Generated/Models/FileSystemInfo.cs index 1abcdfde2b6..d996d5b0b84 100644 --- a/src/Microsoft.Graph/Generated/Models/FileSystemInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/FileSystemInfo.cs @@ -70,7 +70,7 @@ public FileSystemInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FileSystemInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FileSystemInfo(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("lastAccessedDateTime", LastAccessedDateTime); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Filter.cs b/src/Microsoft.Graph/Generated/Models/Filter.cs index 1ecf28ff2eb..37d9d334358 100644 --- a/src/Microsoft.Graph/Generated/Models/Filter.cs +++ b/src/Microsoft.Graph/Generated/Models/Filter.cs @@ -100,7 +100,7 @@ public Filter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Filter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Filter(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("categoryFilterGroups", CategoryFilterGroups); writer.WriteCollectionOfObjectValues("groups", Groups); writer.WriteCollectionOfObjectValues("inputFilterGroups", InputFilterGroups); diff --git a/src/Microsoft.Graph/Generated/Models/FilterClause.cs b/src/Microsoft.Graph/Generated/Models/FilterClause.cs index a20d8389c81..ffdc66bb6ee 100644 --- a/src/Microsoft.Graph/Generated/Models/FilterClause.cs +++ b/src/Microsoft.Graph/Generated/Models/FilterClause.cs @@ -100,7 +100,7 @@ public FilterClause() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FilterClause CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FilterClause(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("operatorName", OperatorName); writer.WriteStringValue("sourceOperandName", SourceOperandName); diff --git a/src/Microsoft.Graph/Generated/Models/FilterGroup.cs b/src/Microsoft.Graph/Generated/Models/FilterGroup.cs index d4e97261581..f5c7741ec51 100644 --- a/src/Microsoft.Graph/Generated/Models/FilterGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/FilterGroup.cs @@ -84,7 +84,7 @@ public FilterGroup() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FilterGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FilterGroup(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("clauses", Clauses); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/FilterOperand.cs b/src/Microsoft.Graph/Generated/Models/FilterOperand.cs index ed8b479e184..095c427ae2b 100644 --- a/src/Microsoft.Graph/Generated/Models/FilterOperand.cs +++ b/src/Microsoft.Graph/Generated/Models/FilterOperand.cs @@ -68,7 +68,7 @@ public FilterOperand() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FilterOperand CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FilterOperand(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("values", Values); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/FilterOperatorSchema.cs b/src/Microsoft.Graph/Generated/Models/FilterOperatorSchema.cs index fd53454059d..9ae844523e3 100644 --- a/src/Microsoft.Graph/Generated/Models/FilterOperatorSchema.cs +++ b/src/Microsoft.Graph/Generated/Models/FilterOperatorSchema.cs @@ -47,7 +47,7 @@ public partial class FilterOperatorSchema : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FilterOperatorSchema CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FilterOperatorSchema(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("arity", Arity); writer.WriteEnumValue("multivaluedComparisonType", MultivaluedComparisonType); diff --git a/src/Microsoft.Graph/Generated/Models/FilterOperatorSchemaCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/FilterOperatorSchemaCollectionResponse.cs index db249ff5833..90b1ecc4be1 100644 --- a/src/Microsoft.Graph/Generated/Models/FilterOperatorSchemaCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/FilterOperatorSchemaCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class FilterOperatorSchemaCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FilterOperatorSchemaCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FilterOperatorSchemaCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Financials.cs b/src/Microsoft.Graph/Generated/Models/Financials.cs index c06f2b8a94e..1c9936b7951 100644 --- a/src/Microsoft.Graph/Generated/Models/Financials.cs +++ b/src/Microsoft.Graph/Generated/Models/Financials.cs @@ -74,7 +74,7 @@ public Financials() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Financials CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Financials(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("companies", Companies); writer.WriteGuidValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Finding.cs b/src/Microsoft.Graph/Generated/Models/Finding.cs index ff22f8a9ef5..75f74641989 100644 --- a/src/Microsoft.Graph/Generated/Models/Finding.cs +++ b/src/Microsoft.Graph/Generated/Models/Finding.cs @@ -25,7 +25,7 @@ public DateTimeOffset? CreatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Finding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -98,7 +98,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); } diff --git a/src/Microsoft.Graph/Generated/Models/FindingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/FindingCollectionResponse.cs index 6d89a4a5c92..b731830c9c5 100644 --- a/src/Microsoft.Graph/Generated/Models/FindingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/FindingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class FindingCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FindingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FindingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Floor.cs b/src/Microsoft.Graph/Generated/Models/Floor.cs index cb4b3ca36ce..3861ea8d171 100644 --- a/src/Microsoft.Graph/Generated/Models/Floor.cs +++ b/src/Microsoft.Graph/Generated/Models/Floor.cs @@ -32,7 +32,7 @@ public Floor() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Floor CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Floor(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("sortOrder", SortOrder); } diff --git a/src/Microsoft.Graph/Generated/Models/FocusActivityStatistics.cs b/src/Microsoft.Graph/Generated/Models/FocusActivityStatistics.cs index 38a87d084bf..1466a9bd315 100644 --- a/src/Microsoft.Graph/Generated/Models/FocusActivityStatistics.cs +++ b/src/Microsoft.Graph/Generated/Models/FocusActivityStatistics.cs @@ -26,7 +26,7 @@ public FocusActivityStatistics() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.FocusActivityStatistics CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FocusActivityStatistics(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Folder.cs b/src/Microsoft.Graph/Generated/Models/Folder.cs index fb0578d6335..06fbbf13523 100644 --- a/src/Microsoft.Graph/Generated/Models/Folder.cs +++ b/src/Microsoft.Graph/Generated/Models/Folder.cs @@ -74,7 +74,7 @@ public Folder() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Folder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Folder(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("childCount", ChildCount); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("view", View); diff --git a/src/Microsoft.Graph/Generated/Models/FolderView.cs b/src/Microsoft.Graph/Generated/Models/FolderView.cs index 69fb6538693..e314c6bb7ad 100644 --- a/src/Microsoft.Graph/Generated/Models/FolderView.cs +++ b/src/Microsoft.Graph/Generated/Models/FolderView.cs @@ -100,7 +100,7 @@ public FolderView() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FolderView CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FolderView(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("sortBy", SortBy); writer.WriteStringValue("sortOrder", SortOrder); diff --git a/src/Microsoft.Graph/Generated/Models/FollowupFlag.cs b/src/Microsoft.Graph/Generated/Models/FollowupFlag.cs index 10be2fd98af..7f81df384e5 100644 --- a/src/Microsoft.Graph/Generated/Models/FollowupFlag.cs +++ b/src/Microsoft.Graph/Generated/Models/FollowupFlag.cs @@ -106,7 +106,7 @@ public FollowupFlag() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FollowupFlag CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FollowupFlag(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("completedDateTime", CompletedDateTime); writer.WriteObjectValue("dueDateTime", DueDateTime); writer.WriteEnumValue("flagStatus", FlagStatus); diff --git a/src/Microsoft.Graph/Generated/Models/FormsSettings.cs b/src/Microsoft.Graph/Generated/Models/FormsSettings.cs index 19e1257f260..8494acd5068 100644 --- a/src/Microsoft.Graph/Generated/Models/FormsSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/FormsSettings.cs @@ -94,7 +94,7 @@ public FormsSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FormsSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FormsSettings(); } /// @@ -121,7 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isBingImageSearchEnabled", IsBingImageSearchEnabled); writer.WriteBoolValue("isExternalSendFormEnabled", IsExternalSendFormEnabled); writer.WriteBoolValue("isExternalShareCollaborationEnabled", IsExternalShareCollaborationEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/ForwardToChatResult.cs b/src/Microsoft.Graph/Generated/Models/ForwardToChatResult.cs index 7f5df24b4d9..36f42a68f94 100644 --- a/src/Microsoft.Graph/Generated/Models/ForwardToChatResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ForwardToChatResult.cs @@ -58,7 +58,7 @@ public ForwardToChatResult() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ForwardToChatResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ForwardToChatResult(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("forwardedMessageId", ForwardedMessageId); writer.WriteStringValue("targetChatId", TargetChatId); diff --git a/src/Microsoft.Graph/Generated/Models/FreeBusyError.cs b/src/Microsoft.Graph/Generated/Models/FreeBusyError.cs index fd6b0d8753a..5236da95b4d 100644 --- a/src/Microsoft.Graph/Generated/Models/FreeBusyError.cs +++ b/src/Microsoft.Graph/Generated/Models/FreeBusyError.cs @@ -84,7 +84,7 @@ public FreeBusyError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.FreeBusyError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.FreeBusyError(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("message", Message); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("responseCode", ResponseCode); diff --git a/src/Microsoft.Graph/Generated/Models/GcpActionPermissionsDefinitionAction.cs b/src/Microsoft.Graph/Generated/Models/GcpActionPermissionsDefinitionAction.cs index 65d04dd637a..7cbb7482a48 100644 --- a/src/Microsoft.Graph/Generated/Models/GcpActionPermissionsDefinitionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/GcpActionPermissionsDefinitionAction.cs @@ -42,7 +42,7 @@ public GcpActionPermissionsDefinitionAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GcpActionPermissionsDefinitionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GcpActionPermissionsDefinitionAction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("actions", Actions); } diff --git a/src/Microsoft.Graph/Generated/Models/GcpAssociatedIdentities.cs b/src/Microsoft.Graph/Generated/Models/GcpAssociatedIdentities.cs index 13d17e71c88..f45931bc04d 100644 --- a/src/Microsoft.Graph/Generated/Models/GcpAssociatedIdentities.cs +++ b/src/Microsoft.Graph/Generated/Models/GcpAssociatedIdentities.cs @@ -100,7 +100,7 @@ public GcpAssociatedIdentities() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GcpAssociatedIdentities CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GcpAssociatedIdentities(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("all", All); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("serviceAccounts", ServiceAccounts); diff --git a/src/Microsoft.Graph/Generated/Models/GcpAuthorizationSystem.cs b/src/Microsoft.Graph/Generated/Models/GcpAuthorizationSystem.cs index 4d03843165d..e28f0220b84 100644 --- a/src/Microsoft.Graph/Generated/Models/GcpAuthorizationSystem.cs +++ b/src/Microsoft.Graph/Generated/Models/GcpAuthorizationSystem.cs @@ -106,7 +106,7 @@ public GcpAuthorizationSystem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GcpAuthorizationSystem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GcpAuthorizationSystem(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("actions", Actions); writer.WriteObjectValue("associatedIdentities", AssociatedIdentities); diff --git a/src/Microsoft.Graph/Generated/Models/GcpAuthorizationSystemResource.cs b/src/Microsoft.Graph/Generated/Models/GcpAuthorizationSystemResource.cs index 01af60cc534..cfd6bb6da12 100644 --- a/src/Microsoft.Graph/Generated/Models/GcpAuthorizationSystemResource.cs +++ b/src/Microsoft.Graph/Generated/Models/GcpAuthorizationSystemResource.cs @@ -42,7 +42,7 @@ public GcpAuthorizationSystemResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GcpAuthorizationSystemResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GcpAuthorizationSystemResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("service", Service); } diff --git a/src/Microsoft.Graph/Generated/Models/GcpAuthorizationSystemTypeAction.cs b/src/Microsoft.Graph/Generated/Models/GcpAuthorizationSystemTypeAction.cs index cf32b4f744a..531b76bb86a 100644 --- a/src/Microsoft.Graph/Generated/Models/GcpAuthorizationSystemTypeAction.cs +++ b/src/Microsoft.Graph/Generated/Models/GcpAuthorizationSystemTypeAction.cs @@ -35,7 +35,7 @@ public partial class GcpAuthorizationSystemTypeAction : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GcpAuthorizationSystemTypeAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GcpAuthorizationSystemTypeAction(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("service", Service); } diff --git a/src/Microsoft.Graph/Generated/Models/GcpCloudFunction.cs b/src/Microsoft.Graph/Generated/Models/GcpCloudFunction.cs index 77b1e9e9b66..94ae40b36fe 100644 --- a/src/Microsoft.Graph/Generated/Models/GcpCloudFunction.cs +++ b/src/Microsoft.Graph/Generated/Models/GcpCloudFunction.cs @@ -42,7 +42,7 @@ public GcpCloudFunction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GcpCloudFunction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GcpCloudFunction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("resource", Resource); } diff --git a/src/Microsoft.Graph/Generated/Models/GcpGroup.cs b/src/Microsoft.Graph/Generated/Models/GcpGroup.cs index b65a6e1bff7..4b490c54598 100644 --- a/src/Microsoft.Graph/Generated/Models/GcpGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/GcpGroup.cs @@ -26,7 +26,7 @@ public GcpGroup() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GcpGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GcpGroup(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/GcpIdentity.cs b/src/Microsoft.Graph/Generated/Models/GcpIdentity.cs index d09a31548a8..da68b06280c 100644 --- a/src/Microsoft.Graph/Generated/Models/GcpIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/GcpIdentity.cs @@ -26,7 +26,7 @@ public GcpIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GcpIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/GcpPermissionsDefinitionAction.cs b/src/Microsoft.Graph/Generated/Models/GcpPermissionsDefinitionAction.cs index 906d1e7cb15..6ea374cc442 100644 --- a/src/Microsoft.Graph/Generated/Models/GcpPermissionsDefinitionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/GcpPermissionsDefinitionAction.cs @@ -26,7 +26,7 @@ public GcpPermissionsDefinitionAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GcpPermissionsDefinitionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -51,7 +51,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/GcpRole.cs b/src/Microsoft.Graph/Generated/Models/GcpRole.cs index 3c9097eb317..23ce77aaf7c 100644 --- a/src/Microsoft.Graph/Generated/Models/GcpRole.cs +++ b/src/Microsoft.Graph/Generated/Models/GcpRole.cs @@ -73,7 +73,7 @@ public string ExternalId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GcpRole CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GcpRole(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("externalId", ExternalId); diff --git a/src/Microsoft.Graph/Generated/Models/GcpRolePermissionsDefinitionAction.cs b/src/Microsoft.Graph/Generated/Models/GcpRolePermissionsDefinitionAction.cs index c7fb936a414..a8846463021 100644 --- a/src/Microsoft.Graph/Generated/Models/GcpRolePermissionsDefinitionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/GcpRolePermissionsDefinitionAction.cs @@ -42,7 +42,7 @@ public GcpRolePermissionsDefinitionAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GcpRolePermissionsDefinitionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GcpRolePermissionsDefinitionAction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("roles", Roles); } diff --git a/src/Microsoft.Graph/Generated/Models/GcpScope.cs b/src/Microsoft.Graph/Generated/Models/GcpScope.cs index 33d7d69f941..5ec213c4ac5 100644 --- a/src/Microsoft.Graph/Generated/Models/GcpScope.cs +++ b/src/Microsoft.Graph/Generated/Models/GcpScope.cs @@ -84,7 +84,7 @@ public GcpScope() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GcpScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GcpScope(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("resourceType", ResourceType); writer.WriteObjectValue("service", Service); diff --git a/src/Microsoft.Graph/Generated/Models/GcpServiceAccount.cs b/src/Microsoft.Graph/Generated/Models/GcpServiceAccount.cs index 12bf10a247d..f6b23b5fc5f 100644 --- a/src/Microsoft.Graph/Generated/Models/GcpServiceAccount.cs +++ b/src/Microsoft.Graph/Generated/Models/GcpServiceAccount.cs @@ -26,7 +26,7 @@ public GcpServiceAccount() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GcpServiceAccount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GcpServiceAccount(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/GcpUser.cs b/src/Microsoft.Graph/Generated/Models/GcpUser.cs index f4fea2de647..059da27952c 100644 --- a/src/Microsoft.Graph/Generated/Models/GcpUser.cs +++ b/src/Microsoft.Graph/Generated/Models/GcpUser.cs @@ -26,7 +26,7 @@ public GcpUser() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GcpUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GcpUser(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/GeneralLedgerEntry.cs b/src/Microsoft.Graph/Generated/Models/GeneralLedgerEntry.cs index 0fbe529b97b..00e3ce6cc22 100644 --- a/src/Microsoft.Graph/Generated/Models/GeneralLedgerEntry.cs +++ b/src/Microsoft.Graph/Generated/Models/GeneralLedgerEntry.cs @@ -169,7 +169,7 @@ public GeneralLedgerEntry() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GeneralLedgerEntry CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GeneralLedgerEntry(); } /// @@ -200,7 +200,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("account", Account); writer.WriteGuidValue("accountId", AccountId); writer.WriteStringValue("accountNumber", AccountNumber); diff --git a/src/Microsoft.Graph/Generated/Models/GeneralLedgerEntryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GeneralLedgerEntryCollectionResponse.cs index 399f0e9371a..64fc7f0b8e0 100644 --- a/src/Microsoft.Graph/Generated/Models/GeneralLedgerEntryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GeneralLedgerEntryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GeneralLedgerEntryCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GeneralLedgerEntryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GeneralLedgerEntryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GenericError.cs b/src/Microsoft.Graph/Generated/Models/GenericError.cs index c01f2497c10..59b06343e07 100644 --- a/src/Microsoft.Graph/Generated/Models/GenericError.cs +++ b/src/Microsoft.Graph/Generated/Models/GenericError.cs @@ -84,7 +84,7 @@ public GenericError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GenericError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -111,7 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/GeoCoordinates.cs b/src/Microsoft.Graph/Generated/Models/GeoCoordinates.cs index cfa32ef4235..e97c1e88cf1 100644 --- a/src/Microsoft.Graph/Generated/Models/GeoCoordinates.cs +++ b/src/Microsoft.Graph/Generated/Models/GeoCoordinates.cs @@ -70,7 +70,7 @@ public GeoCoordinates() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GeoCoordinates CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GeoCoordinates(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDoubleValue("altitude", Altitude); writer.WriteDoubleValue("latitude", Latitude); writer.WriteDoubleValue("longitude", Longitude); diff --git a/src/Microsoft.Graph/Generated/Models/GeolocationColumn.cs b/src/Microsoft.Graph/Generated/Models/GeolocationColumn.cs index 62e501e3ba0..59d014adb01 100644 --- a/src/Microsoft.Graph/Generated/Models/GeolocationColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/GeolocationColumn.cs @@ -52,7 +52,7 @@ public GeolocationColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GeolocationColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GeolocationColumn(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/GlobalSecureAccessFilteringProfileSessionControl.cs b/src/Microsoft.Graph/Generated/Models/GlobalSecureAccessFilteringProfileSessionControl.cs index 2e8387c9250..1d80ef51e49 100644 --- a/src/Microsoft.Graph/Generated/Models/GlobalSecureAccessFilteringProfileSessionControl.cs +++ b/src/Microsoft.Graph/Generated/Models/GlobalSecureAccessFilteringProfileSessionControl.cs @@ -42,7 +42,7 @@ public GlobalSecureAccessFilteringProfileSessionControl() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GlobalSecureAccessFilteringProfileSessionControl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GlobalSecureAccessFilteringProfileSessionControl(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("profileId", ProfileId); } diff --git a/src/Microsoft.Graph/Generated/Models/Goals.cs b/src/Microsoft.Graph/Generated/Models/Goals.cs index 678b38910e5..e32b7310cbf 100644 --- a/src/Microsoft.Graph/Generated/Models/Goals.cs +++ b/src/Microsoft.Graph/Generated/Models/Goals.cs @@ -35,7 +35,7 @@ public partial class Goals : global::Microsoft.Graph.Beta.Models.Entity, IParsab /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Goals CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Goals(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("exportJobs", ExportJobs); } diff --git a/src/Microsoft.Graph/Generated/Models/GoalsExportJob.cs b/src/Microsoft.Graph/Generated/Models/GoalsExportJob.cs index f7e7ca826bd..ef9b3b057c4 100644 --- a/src/Microsoft.Graph/Generated/Models/GoalsExportJob.cs +++ b/src/Microsoft.Graph/Generated/Models/GoalsExportJob.cs @@ -74,7 +74,7 @@ public string GoalsOrganizationId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GoalsExportJob CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GoalsExportJob(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/GoalsExportJobCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GoalsExportJobCollectionResponse.cs index 7c1810c4de6..b4eccf4d64d 100644 --- a/src/Microsoft.Graph/Generated/Models/GoalsExportJobCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GoalsExportJobCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GoalsExportJobCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GoalsExportJobCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GoalsExportJobCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceCriteria.cs b/src/Microsoft.Graph/Generated/Models/GovernanceCriteria.cs index f2178bee7e7..d8171278f3b 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceCriteria.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceCriteria.cs @@ -52,7 +52,7 @@ public GovernanceCriteria() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GovernanceCriteria CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceInsight.cs b/src/Microsoft.Graph/Generated/Models/GovernanceInsight.cs index e65ddb65f9e..2ad566b8576 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceInsight.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceInsight.cs @@ -25,7 +25,7 @@ public DateTimeOffset? InsightCreatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernanceInsight CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -51,7 +51,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("insightCreatedDateTime", InsightCreatedDateTime); } diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceInsightCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GovernanceInsightCollectionResponse.cs index 2ee6064d02f..74300d829eb 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceInsightCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceInsightCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GovernanceInsightCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernanceInsightCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceInsightCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceNotificationPolicy.cs b/src/Microsoft.Graph/Generated/Models/GovernanceNotificationPolicy.cs index 63cad743f69..f3f5c38f586 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceNotificationPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceNotificationPolicy.cs @@ -84,7 +84,7 @@ public GovernanceNotificationPolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GovernanceNotificationPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceNotificationPolicy(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("enabledTemplateTypes", EnabledTemplateTypes); writer.WriteCollectionOfObjectValues("notificationTemplates", NotificationTemplates); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceNotificationTemplate.cs b/src/Microsoft.Graph/Generated/Models/GovernanceNotificationTemplate.cs index 121b236e3e2..d5b66360e70 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceNotificationTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceNotificationTemplate.cs @@ -132,7 +132,7 @@ public GovernanceNotificationTemplate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GovernanceNotificationTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceNotificationTemplate(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("culture", Culture); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/GovernancePolicy.cs b/src/Microsoft.Graph/Generated/Models/GovernancePolicy.cs index b114eb7114f..f94541d9430 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernancePolicy.cs @@ -84,7 +84,7 @@ public GovernancePolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GovernancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernancePolicy(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("decisionMakerCriteria", DecisionMakerCriteria); writer.WriteObjectValue("notificationPolicy", NotificationPolicy); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/GovernancePolicyTemplate.cs b/src/Microsoft.Graph/Generated/Models/GovernancePolicyTemplate.cs index 794f6478f13..d72261e9cbb 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernancePolicyTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernancePolicyTemplate.cs @@ -67,7 +67,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernancePolicyTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernancePolicyTemplate(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteObjectValue("policy", Policy); diff --git a/src/Microsoft.Graph/Generated/Models/GovernancePolicyTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GovernancePolicyTemplateCollectionResponse.cs index 78cdd9efc85..28cf37793e2 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernancePolicyTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernancePolicyTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GovernancePolicyTemplateCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernancePolicyTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernancePolicyTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceResource.cs b/src/Microsoft.Graph/Generated/Models/GovernanceResource.cs index 749773cdffd..5f2462bdf89 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceResource.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceResource.cs @@ -185,7 +185,7 @@ public string Type /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernanceResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceResource(); } /// @@ -215,7 +215,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("externalId", ExternalId); diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceResourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GovernanceResourceCollectionResponse.cs index 5ef9fece6da..42fe2128839 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceResourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceResourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GovernanceResourceCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernanceResourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceResourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignment.cs b/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignment.cs index aeea16e1aa3..6eb8825941f 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignment.cs @@ -223,7 +223,7 @@ public string SubjectId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment(); } /// @@ -256,7 +256,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assignmentState", AssignmentState); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentCollectionResponse.cs index 344dab8fdb1..d698043bf8a 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GovernanceRoleAssignmentCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentRequest.cs b/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentRequest.cs index 5e879a45911..ca0a6342a90 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentRequest.cs @@ -217,7 +217,7 @@ public string Type /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest(); } /// @@ -249,7 +249,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assignmentState", AssignmentState); writer.WriteStringValue("linkedEligibleRoleAssignmentId", LinkedEligibleRoleAssignmentId); diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentRequestCollectionResponse.cs index a67eab82243..59a7847b89b 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GovernanceRoleAssignmentRequestCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentRequestStatus.cs b/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentRequestStatus.cs index 43595df4c19..e1da0505fa4 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentRequestStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceRoleAssignmentRequestStatus.cs @@ -100,7 +100,7 @@ public GovernanceRoleAssignmentRequestStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequestStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequestStatus(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("status", Status); writer.WriteCollectionOfObjectValues("statusDetails", StatusDetails); diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceRoleDefinition.cs b/src/Microsoft.Graph/Generated/Models/GovernanceRoleDefinition.cs index 52e01e26741..e4ed28f5530 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceRoleDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceRoleDefinition.cs @@ -115,7 +115,7 @@ public string TemplateId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition(); } /// @@ -140,7 +140,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("externalId", ExternalId); diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceRoleDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GovernanceRoleDefinitionCollectionResponse.cs index 38275485849..b2b4d830876 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceRoleDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceRoleDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GovernanceRoleDefinitionCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceRoleSetting.cs b/src/Microsoft.Graph/Generated/Models/GovernanceRoleSetting.cs index 561e50a5730..143ef9ce8f7 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceRoleSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceRoleSetting.cs @@ -175,7 +175,7 @@ public string RoleDefinitionId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting(); } /// @@ -205,7 +205,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("adminEligibleSettings", AdminEligibleSettings); writer.WriteCollectionOfObjectValues("adminMemberSettings", AdminMemberSettings); diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceRoleSettingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GovernanceRoleSettingCollectionResponse.cs index 420b1632421..dd853124cfc 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceRoleSettingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceRoleSettingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GovernanceRoleSettingCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernanceRoleSettingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceRoleSettingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceRuleSetting.cs b/src/Microsoft.Graph/Generated/Models/GovernanceRuleSetting.cs index e496cd78f59..1441f3dab74 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceRuleSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceRuleSetting.cs @@ -84,7 +84,7 @@ public GovernanceRuleSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GovernanceRuleSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceRuleSetting(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("ruleIdentifier", RuleIdentifier); writer.WriteStringValue("setting", Setting); diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceSchedule.cs b/src/Microsoft.Graph/Generated/Models/GovernanceSchedule.cs index 41ac92f8fa6..3efb1b36463 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceSchedule.cs @@ -86,7 +86,7 @@ public GovernanceSchedule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GovernanceSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceSchedule(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteTimeSpanValue("duration", Duration); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceSubject.cs b/src/Microsoft.Graph/Generated/Models/GovernanceSubject.cs index 0859543db39..06d17a93974 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceSubject.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceSubject.cs @@ -83,7 +83,7 @@ public string Type /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernanceSubject CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceSubject(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("email", Email); diff --git a/src/Microsoft.Graph/Generated/Models/GovernanceSubjectCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GovernanceSubjectCollectionResponse.cs index 69831f808f9..9cdf77b7377 100644 --- a/src/Microsoft.Graph/Generated/Models/GovernanceSubjectCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GovernanceSubjectCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GovernanceSubjectCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GovernanceSubjectCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GovernanceSubjectCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GranularMailboxRestoreArtifact.cs b/src/Microsoft.Graph/Generated/Models/GranularMailboxRestoreArtifact.cs index 30c8422b1ee..2a454c8be11 100644 --- a/src/Microsoft.Graph/Generated/Models/GranularMailboxRestoreArtifact.cs +++ b/src/Microsoft.Graph/Generated/Models/GranularMailboxRestoreArtifact.cs @@ -41,7 +41,7 @@ public string SearchResponseId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GranularMailboxRestoreArtifact CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GranularMailboxRestoreArtifact(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("artifactCount", ArtifactCount); writer.WriteStringValue("searchResponseId", SearchResponseId); diff --git a/src/Microsoft.Graph/Generated/Models/GranularMailboxRestoreArtifactCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GranularMailboxRestoreArtifactCollectionResponse.cs index 1407bc3f0b7..1a4bf8e4dcb 100644 --- a/src/Microsoft.Graph/Generated/Models/GranularMailboxRestoreArtifactCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GranularMailboxRestoreArtifactCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GranularMailboxRestoreArtifactCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GranularMailboxRestoreArtifactCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GranularMailboxRestoreArtifactCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Group.cs b/src/Microsoft.Graph/Generated/Models/Group.cs index 1cd0c86c4b2..104b870864e 100644 --- a/src/Microsoft.Graph/Generated/Models/Group.cs +++ b/src/Microsoft.Graph/Generated/Models/Group.cs @@ -1130,7 +1130,7 @@ public Group() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Group CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Group(); } /// @@ -1231,7 +1231,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("acceptedSenders", AcceptedSenders); writer.WriteEnumValue("accessType", AccessType); diff --git a/src/Microsoft.Graph/Generated/Models/GroupAssignmentTarget.cs b/src/Microsoft.Graph/Generated/Models/GroupAssignmentTarget.cs index 8c9e17def03..34bcf574d6d 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupAssignmentTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupAssignmentTarget.cs @@ -43,7 +43,7 @@ public GroupAssignmentTarget() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupAssignmentTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -68,7 +68,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("groupId", GroupId); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupChatTeamsAppInstallationScopeInfo.cs b/src/Microsoft.Graph/Generated/Models/GroupChatTeamsAppInstallationScopeInfo.cs index 0d93e26be8d..98b1e5363c0 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupChatTeamsAppInstallationScopeInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupChatTeamsAppInstallationScopeInfo.cs @@ -42,7 +42,7 @@ public GroupChatTeamsAppInstallationScopeInfo() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupChatTeamsAppInstallationScopeInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupChatTeamsAppInstallationScopeInfo(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("chatId", ChatId); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupCollectionResponse.cs index 12000da188b..aaea06d5f0c 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupCollectionResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupFilter.cs b/src/Microsoft.Graph/Generated/Models/GroupFilter.cs index b01a8605dca..1bf87c1730c 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupFilter.cs @@ -68,7 +68,7 @@ public GroupFilter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GroupFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupFilter(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("includedGroups", IncludedGroups); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/GroupLifecyclePolicy.cs b/src/Microsoft.Graph/Generated/Models/GroupLifecyclePolicy.cs index 49499a6fa23..b2e4282c774 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupLifecyclePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupLifecyclePolicy.cs @@ -57,7 +57,7 @@ public string ManagedGroupTypes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupLifecyclePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupLifecyclePolicy(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("alternateNotificationEmails", AlternateNotificationEmails); writer.WriteIntValue("groupLifetimeInDays", GroupLifetimeInDays); diff --git a/src/Microsoft.Graph/Generated/Models/GroupLifecyclePolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupLifecyclePolicyCollectionResponse.cs index 74806d79c54..267b7d37b24 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupLifecyclePolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupLifecyclePolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupLifecyclePolicyCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupLifecyclePolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupLifecyclePolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupMembers.cs b/src/Microsoft.Graph/Generated/Models/GroupMembers.cs index a7a08b8b927..aa74ca7bdda 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupMembers.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupMembers.cs @@ -58,7 +58,7 @@ public GroupMembers() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupMembers CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupMembers(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/GroupMembershipGovernanceCriteria.cs b/src/Microsoft.Graph/Generated/Models/GroupMembershipGovernanceCriteria.cs index ec65449723f..371e33ae7e8 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupMembershipGovernanceCriteria.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupMembershipGovernanceCriteria.cs @@ -42,7 +42,7 @@ public GroupMembershipGovernanceCriteria() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupMembershipGovernanceCriteria CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupMembershipGovernanceCriteria(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("groupId", GroupId); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPeerOutlierRecommendationInsightSettings.cs b/src/Microsoft.Graph/Generated/Models/GroupPeerOutlierRecommendationInsightSettings.cs index 7a060557ba7..8115f45636e 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPeerOutlierRecommendationInsightSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPeerOutlierRecommendationInsightSettings.cs @@ -26,7 +26,7 @@ public GroupPeerOutlierRecommendationInsightSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPeerOutlierRecommendationInsightSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPeerOutlierRecommendationInsightSettings(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyCategory.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyCategory.cs index c919c74e185..195a2deba71 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyCategory.cs @@ -118,7 +118,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyCategory(); } /// @@ -145,7 +145,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("children", Children); writer.WriteObjectValue("definitionFile", DefinitionFile); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyCategoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyCategoryCollectionResponse.cs index f69b701b93a..834217435c3 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyCategoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyCategoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupPolicyCategoryCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyCategoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyConfiguration.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyConfiguration.cs index 47caa1a79a7..3809b604a31 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyConfiguration.cs @@ -118,7 +118,7 @@ public List RoleScopeTagIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyConfiguration(); } /// @@ -145,7 +145,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyConfigurationAssignment.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyConfigurationAssignment.cs index 96d781c6858..4b7fde497b6 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyConfigurationAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyConfigurationAssignment.cs @@ -42,7 +42,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyConfigurationAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyConfigurationAssignment(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteObjectValue("target", Target); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyConfigurationAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyConfigurationAssignmentCollectionResponse.cs index c3dffd50dd8..eed9621a4ff 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyConfigurationAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyConfigurationAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupPolicyConfigurationAssignmentCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyConfigurationAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyConfigurationAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyConfigurationCollectionResponse.cs index 58e7c89f7c6..4adbf6f5a18 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupPolicyConfigurationCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinition.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinition.cs index 046cedada06..68fa912fc20 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinition.cs @@ -242,7 +242,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyDefinition(); } /// @@ -278,7 +278,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("category", Category); writer.WriteStringValue("categoryPath", CategoryPath); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionCollectionResponse.cs index 1f7507e7d76..cf63d60c1b7 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupPolicyDefinitionCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionFile.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionFile.cs index 2b18bc7cb92..071102b4d88 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionFile.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionFile.cs @@ -160,7 +160,7 @@ public string TargetPrefix /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionFile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -194,7 +194,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("definitions", Definitions); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionFileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionFileCollectionResponse.cs index 98c9dca9108..4f7f7df7623 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionFileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionFileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupPolicyDefinitionFileCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionFileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionFileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionValue.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionValue.cs index ef72ea37a52..346818f3a3c 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionValue.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionValue.cs @@ -76,7 +76,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionValue(); } /// @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("configurationType", ConfigurationType); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionValueCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionValueCollectionResponse.cs index 6c028d1130a..561a225a39b 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionValueCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyDefinitionValueCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupPolicyDefinitionValueCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionValueCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyDefinitionValueCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyMigrationReport.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyMigrationReport.cs index a75a68c71f0..6addd10b237 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyMigrationReport.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyMigrationReport.cs @@ -160,7 +160,7 @@ public int? TotalSettingsCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyMigrationReport CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyMigrationReport(); } /// @@ -194,7 +194,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyMigrationReportCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyMigrationReportCollectionResponse.cs index d7ee90c61d1..24a4523b318 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyMigrationReportCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyMigrationReportCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupPolicyMigrationReportCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyMigrationReportCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyMigrationReportCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyObjectFile.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyObjectFile.cs index c888df4c084..8183af36eee 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyObjectFile.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyObjectFile.cs @@ -86,7 +86,7 @@ public List RoleScopeTagIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyObjectFile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyObjectFile(); } /// @@ -111,7 +111,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("content", Content); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyObjectFileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyObjectFileCollectionResponse.cs index 44b48efdafa..2a0eb3a570c 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyObjectFileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyObjectFileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupPolicyObjectFileCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyObjectFileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyObjectFileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyOperation.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyOperation.cs index d08c57cb701..38d66081d8c 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyOperation.cs @@ -54,7 +54,7 @@ public string StatusDetails /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyOperation(); } /// @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteEnumValue("operationStatus", OperationStatus); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyOperationCollectionResponse.cs index cc9d9229612..c16eaee1e6f 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupPolicyOperationCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentation.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentation.cs index 67a488d427e..2fa84bcc2fc 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentation.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentation.cs @@ -58,7 +58,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("definition", Definition); writer.WriteStringValue("label", Label); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationCheckBox.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationCheckBox.cs index 00fe5927b88..6be705b5665 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationCheckBox.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationCheckBox.cs @@ -33,7 +33,7 @@ public GroupPolicyPresentationCheckBox() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationCheckBox CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationCheckBox(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("defaultChecked", DefaultChecked); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationCollectionResponse.cs index 6ecc9bd98a7..d801c14da73 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupPolicyPresentationCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationComboBox.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationComboBox.cs index dd40de28583..40ca978d94c 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationComboBox.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationComboBox.cs @@ -71,7 +71,7 @@ public GroupPolicyPresentationComboBox() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationComboBox CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationComboBox(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("defaultValue", DefaultValue); writer.WriteLongValue("maxLength", MaxLength); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationDecimalTextBox.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationDecimalTextBox.cs index ad53d631502..57ee94c38f4 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationDecimalTextBox.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationDecimalTextBox.cs @@ -63,7 +63,7 @@ public GroupPolicyPresentationDecimalTextBox() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationDecimalTextBox CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationDecimalTextBox(); } /// @@ -88,7 +88,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("defaultValue", DefaultValue); writer.WriteLongValue("maxValue", MaxValue); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationDropdownList.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationDropdownList.cs index e52a6a3c03b..a4b4cd7b27e 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationDropdownList.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationDropdownList.cs @@ -65,7 +65,7 @@ public GroupPolicyPresentationDropdownList() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationDropdownList CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationDropdownList(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("defaultItem", DefaultItem); writer.WriteCollectionOfObjectValues("items", Items); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationDropdownListItem.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationDropdownListItem.cs index e75f530576c..8e8e50b27b4 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationDropdownListItem.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationDropdownListItem.cs @@ -84,7 +84,7 @@ public GroupPolicyPresentationDropdownListItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationDropdownListItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationDropdownListItem(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationListBox.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationListBox.cs index a6e2ae104a1..bf9be0d645b 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationListBox.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationListBox.cs @@ -49,7 +49,7 @@ public GroupPolicyPresentationListBox() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationListBox CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationListBox(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("explicitValue", ExplicitValue); writer.WriteStringValue("valuePrefix", ValuePrefix); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationLongDecimalTextBox.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationLongDecimalTextBox.cs index 3f889ed1366..69d2af069b7 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationLongDecimalTextBox.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationLongDecimalTextBox.cs @@ -63,7 +63,7 @@ public GroupPolicyPresentationLongDecimalTextBox() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationLongDecimalTextBox CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationLongDecimalTextBox(); } /// @@ -88,7 +88,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("defaultValue", DefaultValue); writer.WriteLongValue("maxValue", MaxValue); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationMultiTextBox.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationMultiTextBox.cs index 451b827d7b0..9b335a50166 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationMultiTextBox.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationMultiTextBox.cs @@ -45,7 +45,7 @@ public GroupPolicyPresentationMultiTextBox() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationMultiTextBox CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationMultiTextBox(); } /// @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("maxLength", MaxLength); writer.WriteLongValue("maxStrings", MaxStrings); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationText.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationText.cs index 6facb9877fb..7cca915d9c2 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationText.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationText.cs @@ -27,7 +27,7 @@ public GroupPolicyPresentationText() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationText CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationText(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationTextBox.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationTextBox.cs index 56313e5422e..143c311696b 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationTextBox.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationTextBox.cs @@ -55,7 +55,7 @@ public GroupPolicyPresentationTextBox() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationTextBox CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationTextBox(); } /// @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("defaultValue", DefaultValue); writer.WriteLongValue("maxLength", MaxLength); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValue.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValue.cs index 2a2ed0e8fbb..2915b89e279 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValue.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValue.cs @@ -64,7 +64,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteObjectValue("definitionValue", DefinitionValue); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueBoolean.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueBoolean.cs index 4f937369c2c..e87d98a3645 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueBoolean.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueBoolean.cs @@ -26,7 +26,7 @@ public bool? Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValueBoolean CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValueBoolean(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueCollectionResponse.cs index 522e729d574..1d9f0384e09 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupPolicyPresentationValueCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValueCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValueCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueDecimal.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueDecimal.cs index 3f89c539f49..a668817652f 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueDecimal.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueDecimal.cs @@ -26,7 +26,7 @@ public long? Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValueDecimal CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValueDecimal(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueList.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueList.cs index 2affd730fd9..8e35cfdcc27 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueList.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueList.cs @@ -36,7 +36,7 @@ public partial class GroupPolicyPresentationValueList : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValueList CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValueList(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("values", Values); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueLongDecimal.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueLongDecimal.cs index 0dcb9f38b93..e841366e71a 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueLongDecimal.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueLongDecimal.cs @@ -26,7 +26,7 @@ public long? Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValueLongDecimal CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValueLongDecimal(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueMultiText.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueMultiText.cs index 828e701c447..388eb5b3cb4 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueMultiText.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueMultiText.cs @@ -36,7 +36,7 @@ public List Values /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValueMultiText CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValueMultiText(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("values", Values); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueText.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueText.cs index b36b2281790..0de4cd9f6f5 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueText.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyPresentationValueText.cs @@ -36,7 +36,7 @@ public string Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValueText CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyPresentationValueText(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicySettingMapping.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicySettingMapping.cs index 8761c61b5be..5c13580f018 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicySettingMapping.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicySettingMapping.cs @@ -290,7 +290,7 @@ public string SettingValueType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicySettingMapping CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicySettingMapping(); } /// @@ -329,7 +329,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("admxSettingDefinitionId", AdmxSettingDefinitionId); writer.WriteCollectionOfPrimitiveValues("childIdList", ChildIdList); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicySettingMappingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicySettingMappingCollectionResponse.cs index 3988b221dfb..fa2534965b4 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicySettingMappingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicySettingMappingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupPolicySettingMappingCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicySettingMappingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicySettingMappingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedDefinitionFile.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedDefinitionFile.cs index 041325382dc..deee4387757 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedDefinitionFile.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedDefinitionFile.cs @@ -103,7 +103,7 @@ public GroupPolicyUploadedDefinitionFile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyUploadedDefinitionFile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyUploadedDefinitionFile(); } /// @@ -128,7 +128,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); writer.WriteStringValue("defaultLanguageCode", DefaultLanguageCode); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedDefinitionFileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedDefinitionFileCollectionResponse.cs index c9b81fe9dc4..5226e807fac 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedDefinitionFileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedDefinitionFileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupPolicyUploadedDefinitionFileCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyUploadedDefinitionFileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyUploadedDefinitionFileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedLanguageFile.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedLanguageFile.cs index 54f997f670f..99fa6a9be53 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedLanguageFile.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedLanguageFile.cs @@ -123,7 +123,7 @@ public GroupPolicyUploadedLanguageFile() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.GroupPolicyUploadedLanguageFile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupPolicyUploadedLanguageFile(); } /// @@ -148,7 +148,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("content", Content); writer.WriteStringValue("fileName", FileName); writer.WriteStringValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedPresentation.cs b/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedPresentation.cs index f2b57f5c29b..491f315f10b 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedPresentation.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupPolicyUploadedPresentation.cs @@ -27,7 +27,7 @@ public GroupPolicyUploadedPresentation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupPolicyUploadedPresentation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/GroupScope.cs b/src/Microsoft.Graph/Generated/Models/GroupScope.cs index 7c31be350ff..f3ada683fca 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupScope.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupScope.cs @@ -26,7 +26,7 @@ public GroupScope() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupScope(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/GroupWritebackConfiguration.cs b/src/Microsoft.Graph/Generated/Models/GroupWritebackConfiguration.cs index 7f179e6475e..1bd13aff6ed 100644 --- a/src/Microsoft.Graph/Generated/Models/GroupWritebackConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/GroupWritebackConfiguration.cs @@ -35,7 +35,7 @@ public string OnPremisesGroupType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GroupWritebackConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GroupWritebackConfiguration(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("onPremisesGroupType", OnPremisesGroupType); } diff --git a/src/Microsoft.Graph/Generated/Models/GsuiteSource.cs b/src/Microsoft.Graph/Generated/Models/GsuiteSource.cs index fb8a7d13c3e..b04a45e8137 100644 --- a/src/Microsoft.Graph/Generated/Models/GsuiteSource.cs +++ b/src/Microsoft.Graph/Generated/Models/GsuiteSource.cs @@ -42,7 +42,7 @@ public GsuiteSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.GsuiteSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.GsuiteSource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("domain", Domain); } diff --git a/src/Microsoft.Graph/Generated/Models/HardwareConfiguration.cs b/src/Microsoft.Graph/Generated/Models/HardwareConfiguration.cs index f1bbb84663f..f5d03066c19 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareConfiguration.cs @@ -194,7 +194,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwareConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareConfiguration(); } /// @@ -227,7 +227,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteByteArrayValue("configurationFileContent", ConfigurationFileContent); diff --git a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationAssignment.cs b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationAssignment.cs index e303618685b..ab286a666ef 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationAssignment.cs @@ -36,7 +36,7 @@ public partial class HardwareConfigurationAssignment : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwareConfigurationAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareConfigurationAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationAssignmentCollectionResponse.cs index 8ea115a78cb..fc5d50b7d0e 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HardwareConfigurationAssignmentCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwareConfigurationAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareConfigurationAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationCollectionResponse.cs index 8c0187730fc..3835223300f 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HardwareConfigurationCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwareConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationDeviceState.cs b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationDeviceState.cs index b3d0d1eaa6c..1dc84662141 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationDeviceState.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationDeviceState.cs @@ -150,7 +150,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwareConfigurationDeviceState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareConfigurationDeviceState(); } /// @@ -179,7 +179,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assignmentFilterIds", AssignmentFilterIds); writer.WriteStringValue("configurationError", ConfigurationError); diff --git a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationDeviceStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationDeviceStateCollectionResponse.cs index 189fc2404b3..35b18cd98fd 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationDeviceStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationDeviceStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HardwareConfigurationDeviceStateCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwareConfigurationDeviceStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareConfigurationDeviceStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationRunSummary.cs b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationRunSummary.cs index ceaa41d65e3..a8b8dcb0ac1 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationRunSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationRunSummary.cs @@ -98,7 +98,7 @@ public int? UnknownUserCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwareConfigurationRunSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareConfigurationRunSummary(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("errorDeviceCount", ErrorDeviceCount); writer.WriteIntValue("errorUserCount", ErrorUserCount); diff --git a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationUserState.cs b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationUserState.cs index af965d83ce5..fc43ffd1a92 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationUserState.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationUserState.cs @@ -110,7 +110,7 @@ public string UserName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwareConfigurationUserState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareConfigurationUserState(); } /// @@ -139,7 +139,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("errorDeviceCount", ErrorDeviceCount); writer.WriteIntValue("failedDeviceCount", FailedDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationUserStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationUserStateCollectionResponse.cs index d530ea64e3d..5146cac1f0b 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareConfigurationUserStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareConfigurationUserStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HardwareConfigurationUserStateCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwareConfigurationUserStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareConfigurationUserStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/HardwareInformation.cs b/src/Microsoft.Graph/Generated/Models/HardwareInformation.cs index db6ba6f5722..b37164249e3 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareInformation.cs @@ -543,7 +543,7 @@ public HardwareInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.HardwareInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareInformation(); } /// @@ -603,7 +603,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("batteryChargeCycles", BatteryChargeCycles); writer.WriteIntValue("batteryHealthPercentage", BatteryHealthPercentage); writer.WriteDoubleValue("batteryLevelPercentage", BatteryLevelPercentage); diff --git a/src/Microsoft.Graph/Generated/Models/HardwareOathAuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/HardwareOathAuthenticationMethod.cs index 2d15537ec03..4e9bb778cfd 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareOathAuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareOathAuthenticationMethod.cs @@ -42,7 +42,7 @@ public HardwareOathAuthenticationMethod() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwareOathAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareOathAuthenticationMethod(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("device", Device); } diff --git a/src/Microsoft.Graph/Generated/Models/HardwareOathAuthenticationMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/HardwareOathAuthenticationMethodCollectionResponse.cs index eff66db56a3..344a44fe0c2 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareOathAuthenticationMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareOathAuthenticationMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HardwareOathAuthenticationMethodCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwareOathAuthenticationMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareOathAuthenticationMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/HardwareOathAuthenticationMethodConfiguration.cs b/src/Microsoft.Graph/Generated/Models/HardwareOathAuthenticationMethodConfiguration.cs index f813de88d7f..409ea654d63 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareOathAuthenticationMethodConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareOathAuthenticationMethodConfiguration.cs @@ -42,7 +42,7 @@ public HardwareOathAuthenticationMethodConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwareOathAuthenticationMethodConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareOathAuthenticationMethodConfiguration(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("includeTargets", IncludeTargets); } diff --git a/src/Microsoft.Graph/Generated/Models/HardwareOathTokenAuthenticationMethodDevice.cs b/src/Microsoft.Graph/Generated/Models/HardwareOathTokenAuthenticationMethodDevice.cs index 47c551a2ac8..cf566ffd906 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareOathTokenAuthenticationMethodDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareOathTokenAuthenticationMethodDevice.cs @@ -140,7 +140,7 @@ public HardwareOathTokenAuthenticationMethodDevice() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDevice(); } /// @@ -168,7 +168,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("assignedTo", AssignedTo); writer.WriteObjectValue("assignTo", AssignTo); diff --git a/src/Microsoft.Graph/Generated/Models/HardwareOathTokenAuthenticationMethodDeviceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/HardwareOathTokenAuthenticationMethodDeviceCollectionResponse.cs index 7d5a5b87d4d..243a083dd0d 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwareOathTokenAuthenticationMethodDeviceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwareOathTokenAuthenticationMethodDeviceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HardwareOathTokenAuthenticationMethodDeviceCollectionRespon /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwareOathTokenAuthenticationMethodDeviceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/HardwarePasswordDetail.cs b/src/Microsoft.Graph/Generated/Models/HardwarePasswordDetail.cs index 7017e9cc0f1..713d1e6dd25 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwarePasswordDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwarePasswordDetail.cs @@ -68,7 +68,7 @@ public string SerialNumber /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwarePasswordDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwarePasswordDetail(); } /// @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("serialNumber", SerialNumber); } diff --git a/src/Microsoft.Graph/Generated/Models/HardwarePasswordDetailCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/HardwarePasswordDetailCollectionResponse.cs index a7f8eb54a2c..fa9fb30bb2c 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwarePasswordDetailCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwarePasswordDetailCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HardwarePasswordDetailCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwarePasswordDetailCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwarePasswordDetailCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/HardwarePasswordInfo.cs b/src/Microsoft.Graph/Generated/Models/HardwarePasswordInfo.cs index e97e4852c3f..0a5b7715dce 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwarePasswordInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwarePasswordInfo.cs @@ -68,7 +68,7 @@ public string SerialNumber /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwarePasswordInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwarePasswordInfo(); } /// @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("serialNumber", SerialNumber); } diff --git a/src/Microsoft.Graph/Generated/Models/HardwarePasswordInfoCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/HardwarePasswordInfoCollectionResponse.cs index bf052a6634b..b8e948cb530 100644 --- a/src/Microsoft.Graph/Generated/Models/HardwarePasswordInfoCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/HardwarePasswordInfoCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HardwarePasswordInfoCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HardwarePasswordInfoCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HardwarePasswordInfoCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/HasPayloadLinkResultItem.cs b/src/Microsoft.Graph/Generated/Models/HasPayloadLinkResultItem.cs index 2fff5c5e5be..fd3b0f33109 100644 --- a/src/Microsoft.Graph/Generated/Models/HasPayloadLinkResultItem.cs +++ b/src/Microsoft.Graph/Generated/Models/HasPayloadLinkResultItem.cs @@ -107,7 +107,7 @@ public HasPayloadLinkResultItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.HasPayloadLinkResultItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HasPayloadLinkResultItem(); } /// @@ -131,7 +131,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("error", Error); writer.WriteBoolValue("hasLink", HasLink); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Hashes.cs b/src/Microsoft.Graph/Generated/Models/Hashes.cs index ce3868e4887..242a403b560 100644 --- a/src/Microsoft.Graph/Generated/Models/Hashes.cs +++ b/src/Microsoft.Graph/Generated/Models/Hashes.cs @@ -116,7 +116,7 @@ public Hashes() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Hashes CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Hashes(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("crc32Hash", Crc32Hash); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("quickXorHash", QuickXorHash); diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Alert.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Alert.cs index 6e4b751dab0..4298f44c426 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Alert.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Alert.cs @@ -97,7 +97,7 @@ public DateTimeOffset? CreatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.Alert CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.Alert(); } /// @@ -124,7 +124,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("alertType", AlertType); writer.WriteEnumValue("category", Category); diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/AlertCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/AlertCollectionResponse.cs index 5009df5b79e..c852d71df5e 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/AlertCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/AlertCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AlertCollectionResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.AlertCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.AlertCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/AlertConfiguration.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/AlertConfiguration.cs index c3d9225274f..25166bc68b9 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/AlertConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/AlertConfiguration.cs @@ -35,7 +35,7 @@ public partial class AlertConfiguration : global::Microsoft.Graph.Beta.Models.En /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.AlertConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.AlertConfiguration(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("emailNotificationConfigurations", EmailNotificationConfigurations); } diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/AlertConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/AlertConfigurationCollectionResponse.cs index d9ac1539f4a..0a0defec0de 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/AlertConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/AlertConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AlertConfigurationCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.AlertConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.AlertConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/ApplicationImpactSummary.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/ApplicationImpactSummary.cs index a2e4c1113f6..4287479343f 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/ApplicationImpactSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/ApplicationImpactSummary.cs @@ -26,7 +26,7 @@ public ApplicationImpactSummary() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.ApplicationImpactSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.ApplicationImpactSummary(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/DeviceImpactSummary.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/DeviceImpactSummary.cs index 6f994f584dc..4145b115912 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/DeviceImpactSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/DeviceImpactSummary.cs @@ -26,7 +26,7 @@ public DeviceImpactSummary() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.DeviceImpactSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.DeviceImpactSummary(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Dictionary.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Dictionary.cs index 5832ce6262d..535489088fa 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Dictionary.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Dictionary.cs @@ -52,7 +52,7 @@ public Dictionary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.HealthMonitoring.Dictionary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/DirectoryObjectImpactSummary.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/DirectoryObjectImpactSummary.cs index ebf20ca63d1..a06c0ac7ebf 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/DirectoryObjectImpactSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/DirectoryObjectImpactSummary.cs @@ -42,7 +42,7 @@ public DirectoryObjectImpactSummary() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.DirectoryObjectImpactSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -71,7 +71,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("resourceSampling", ResourceSampling); } diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Documentation.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Documentation.cs index 6482a6b3ad7..c9e2a8dc3d6 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Documentation.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Documentation.cs @@ -19,7 +19,7 @@ public partial class Documentation : global::Microsoft.Graph.Beta.Models.HealthM /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.Documentation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.Documentation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/EmailNotificationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/EmailNotificationConfiguration.cs index e9671d722f8..4f27a7e637c 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/EmailNotificationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/EmailNotificationConfiguration.cs @@ -74,7 +74,7 @@ public EmailNotificationConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.HealthMonitoring.EmailNotificationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.EmailNotificationConfiguration(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("groupId", GroupId); writer.WriteBoolValue("isEnabled", IsEnabled); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Enrichment.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Enrichment.cs index 45c132b9187..9af80b85e6e 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Enrichment.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Enrichment.cs @@ -90,7 +90,7 @@ public Enrichment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.HealthMonitoring.Enrichment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.Enrichment(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("impacts", Impacts); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("state", State); diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/GroupImpactSummary.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/GroupImpactSummary.cs index 09ad7aad3d3..dc190ae8a44 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/GroupImpactSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/GroupImpactSummary.cs @@ -26,7 +26,7 @@ public GroupImpactSummary() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.GroupImpactSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.GroupImpactSummary(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/HealthMonitoringDictionary.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/HealthMonitoringDictionary.cs index d227ca900aa..02987f388f3 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/HealthMonitoringDictionary.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/HealthMonitoringDictionary.cs @@ -19,7 +19,7 @@ public partial class HealthMonitoringDictionary : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.HealthMonitoringDictionary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/HealthMonitoringRoot.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/HealthMonitoringRoot.cs index c095c342255..97adbd697b3 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/HealthMonitoringRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/HealthMonitoringRoot.cs @@ -51,7 +51,7 @@ public partial class HealthMonitoringRoot : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.HealthMonitoringRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.HealthMonitoringRoot(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("alertConfigurations", AlertConfigurations); writer.WriteCollectionOfObjectValues("alerts", Alerts); diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/ResourceImpactSummary.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/ResourceImpactSummary.cs index 72d535d1aba..98dc5a8a5c5 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/ResourceImpactSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/ResourceImpactSummary.cs @@ -90,7 +90,7 @@ public ResourceImpactSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.HealthMonitoring.ResourceImpactSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("impactedCount", ImpactedCount); writer.WriteBoolValue("impactedCountLimitExceeded", ImpactedCountLimitExceeded); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/ServicePrincipalImpactSummary.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/ServicePrincipalImpactSummary.cs index c653f16a585..a0765329c12 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/ServicePrincipalImpactSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/ServicePrincipalImpactSummary.cs @@ -26,7 +26,7 @@ public ServicePrincipalImpactSummary() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.ServicePrincipalImpactSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.ServicePrincipalImpactSummary(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Signals.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Signals.cs index a0173ac0e16..5c01feb6932 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Signals.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/Signals.cs @@ -19,7 +19,7 @@ public partial class Signals : global::Microsoft.Graph.Beta.Models.HealthMonitor /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.Signals CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.Signals(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/SupportingData.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/SupportingData.cs index 7540600b225..9c346c5c8d1 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/SupportingData.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/SupportingData.cs @@ -19,7 +19,7 @@ public partial class SupportingData : global::Microsoft.Graph.Beta.Models.Health /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.SupportingData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.SupportingData(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/UserImpactSummary.cs b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/UserImpactSummary.cs index 11700fe8db6..d36dd0e8e24 100644 --- a/src/Microsoft.Graph/Generated/Models/HealthMonitoring/UserImpactSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/HealthMonitoring/UserImpactSummary.cs @@ -26,7 +26,7 @@ public UserImpactSummary() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HealthMonitoring.UserImpactSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HealthMonitoring.UserImpactSummary(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/HomeRealmDiscoveryPolicy.cs b/src/Microsoft.Graph/Generated/Models/HomeRealmDiscoveryPolicy.cs index 7b01b050acf..411abc7bae1 100644 --- a/src/Microsoft.Graph/Generated/Models/HomeRealmDiscoveryPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/HomeRealmDiscoveryPolicy.cs @@ -26,7 +26,7 @@ public HomeRealmDiscoveryPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HomeRealmDiscoveryPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HomeRealmDiscoveryPolicy(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/HomeRealmDiscoveryPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/HomeRealmDiscoveryPolicyCollectionResponse.cs index 9ff17b3885f..a30d7ec5bb3 100644 --- a/src/Microsoft.Graph/Generated/Models/HomeRealmDiscoveryPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/HomeRealmDiscoveryPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HomeRealmDiscoveryPolicyCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HomeRealmDiscoveryPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HomeRealmDiscoveryPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/HorizontalSection.cs b/src/Microsoft.Graph/Generated/Models/HorizontalSection.cs index f50b1b7a45b..92b21cedc58 100644 --- a/src/Microsoft.Graph/Generated/Models/HorizontalSection.cs +++ b/src/Microsoft.Graph/Generated/Models/HorizontalSection.cs @@ -47,7 +47,7 @@ public partial class HorizontalSection : global::Microsoft.Graph.Beta.Models.Ent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HorizontalSection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HorizontalSection(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("columns", Columns); writer.WriteEnumValue("emphasis", Emphasis); diff --git a/src/Microsoft.Graph/Generated/Models/HorizontalSectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/HorizontalSectionCollectionResponse.cs index d13b47d0b15..36d1dc060e6 100644 --- a/src/Microsoft.Graph/Generated/Models/HorizontalSectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/HorizontalSectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HorizontalSectionCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HorizontalSectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HorizontalSectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/HorizontalSectionColumn.cs b/src/Microsoft.Graph/Generated/Models/HorizontalSectionColumn.cs index a60d32cbbcc..c823dbef355 100644 --- a/src/Microsoft.Graph/Generated/Models/HorizontalSectionColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/HorizontalSectionColumn.cs @@ -41,7 +41,7 @@ public int? Width /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HorizontalSectionColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HorizontalSectionColumn(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("webparts", Webparts); writer.WriteIntValue("width", Width); diff --git a/src/Microsoft.Graph/Generated/Models/HorizontalSectionColumnCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/HorizontalSectionColumnCollectionResponse.cs index ef214c4c9f4..d33cc83794b 100644 --- a/src/Microsoft.Graph/Generated/Models/HorizontalSectionColumnCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/HorizontalSectionColumnCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HorizontalSectionColumnCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HorizontalSectionColumnCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HorizontalSectionColumnCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/HostSecurityProfile.cs b/src/Microsoft.Graph/Generated/Models/HostSecurityProfile.cs index a96dcf69ecf..034bdee067d 100644 --- a/src/Microsoft.Graph/Generated/Models/HostSecurityProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/HostSecurityProfile.cs @@ -257,7 +257,7 @@ public List Tags /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HostSecurityProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HostSecurityProfile(); } /// @@ -294,7 +294,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("azureSubscriptionId", AzureSubscriptionId); writer.WriteStringValue("azureTenantId", AzureTenantId); diff --git a/src/Microsoft.Graph/Generated/Models/HostSecurityProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/HostSecurityProfileCollectionResponse.cs index ec03ff2b9ff..5b51f446875 100644 --- a/src/Microsoft.Graph/Generated/Models/HostSecurityProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/HostSecurityProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HostSecurityProfileCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HostSecurityProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HostSecurityProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/HostSecurityState.cs b/src/Microsoft.Graph/Generated/Models/HostSecurityState.cs index 31be64f48a9..1578dd76a00 100644 --- a/src/Microsoft.Graph/Generated/Models/HostSecurityState.cs +++ b/src/Microsoft.Graph/Generated/Models/HostSecurityState.cs @@ -166,7 +166,7 @@ public HostSecurityState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.HostSecurityState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HostSecurityState(); } /// @@ -195,7 +195,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("fqdn", Fqdn); writer.WriteBoolValue("isAzureAdJoined", IsAzureAdJoined); writer.WriteBoolValue("isAzureAdRegistered", IsAzureAdRegistered); diff --git a/src/Microsoft.Graph/Generated/Models/HttpRequestEndpoint.cs b/src/Microsoft.Graph/Generated/Models/HttpRequestEndpoint.cs index 41912865992..8a79406ccdf 100644 --- a/src/Microsoft.Graph/Generated/Models/HttpRequestEndpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/HttpRequestEndpoint.cs @@ -42,7 +42,7 @@ public HttpRequestEndpoint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.HttpRequestEndpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HttpRequestEndpoint(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("targetUrl", TargetUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/HybridAgentUpdaterConfiguration.cs b/src/Microsoft.Graph/Generated/Models/HybridAgentUpdaterConfiguration.cs index 2ed7477042c..3f58d281c99 100644 --- a/src/Microsoft.Graph/Generated/Models/HybridAgentUpdaterConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/HybridAgentUpdaterConfiguration.cs @@ -80,7 +80,7 @@ public HybridAgentUpdaterConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.HybridAgentUpdaterConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HybridAgentUpdaterConfiguration(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowUpdateConfigurationOverride", AllowUpdateConfigurationOverride); writer.WriteDateTimeOffsetValue("deferUpdateDateTime", DeferUpdateDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/HyperlinkOrPictureColumn.cs b/src/Microsoft.Graph/Generated/Models/HyperlinkOrPictureColumn.cs index 0589abfdccb..c5eeee0a694 100644 --- a/src/Microsoft.Graph/Generated/Models/HyperlinkOrPictureColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/HyperlinkOrPictureColumn.cs @@ -58,7 +58,7 @@ public HyperlinkOrPictureColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.HyperlinkOrPictureColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.HyperlinkOrPictureColumn(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isPicture", IsPicture); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/IPv4CidrRange.cs b/src/Microsoft.Graph/Generated/Models/IPv4CidrRange.cs index 895f83a011b..b5470144be1 100644 --- a/src/Microsoft.Graph/Generated/Models/IPv4CidrRange.cs +++ b/src/Microsoft.Graph/Generated/Models/IPv4CidrRange.cs @@ -43,7 +43,7 @@ public IPv4CidrRange() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IPv4CidrRange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IPv4CidrRange(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("cidrAddress", CidrAddress); } diff --git a/src/Microsoft.Graph/Generated/Models/IPv4Range.cs b/src/Microsoft.Graph/Generated/Models/IPv4Range.cs index 98be3ad8fc0..431e65364ac 100644 --- a/src/Microsoft.Graph/Generated/Models/IPv4Range.cs +++ b/src/Microsoft.Graph/Generated/Models/IPv4Range.cs @@ -59,7 +59,7 @@ public IPv4Range() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IPv4Range CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IPv4Range(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("lowerAddress", LowerAddress); writer.WriteStringValue("upperAddress", UpperAddress); diff --git a/src/Microsoft.Graph/Generated/Models/IPv6CidrRange.cs b/src/Microsoft.Graph/Generated/Models/IPv6CidrRange.cs index 3fc888e790b..7768aa796a6 100644 --- a/src/Microsoft.Graph/Generated/Models/IPv6CidrRange.cs +++ b/src/Microsoft.Graph/Generated/Models/IPv6CidrRange.cs @@ -43,7 +43,7 @@ public IPv6CidrRange() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IPv6CidrRange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IPv6CidrRange(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("cidrAddress", CidrAddress); } diff --git a/src/Microsoft.Graph/Generated/Models/IPv6Range.cs b/src/Microsoft.Graph/Generated/Models/IPv6Range.cs index f8ff8709618..307acda77f4 100644 --- a/src/Microsoft.Graph/Generated/Models/IPv6Range.cs +++ b/src/Microsoft.Graph/Generated/Models/IPv6Range.cs @@ -59,7 +59,7 @@ public IPv6Range() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IPv6Range CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IPv6Range(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("lowerAddress", LowerAddress); writer.WriteStringValue("upperAddress", UpperAddress); diff --git a/src/Microsoft.Graph/Generated/Models/IdentifierUriConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IdentifierUriConfiguration.cs index 0d75f7e35b7..a84187436c9 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentifierUriConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentifierUriConfiguration.cs @@ -84,7 +84,7 @@ public IdentifierUriConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentifierUriConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentifierUriConfiguration(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("nonDefaultUriAddition", NonDefaultUriAddition); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("uriAdditionWithoutUniqueTenantIdentifier", UriAdditionWithoutUniqueTenantIdentifier); diff --git a/src/Microsoft.Graph/Generated/Models/IdentifierUriRestriction.cs b/src/Microsoft.Graph/Generated/Models/IdentifierUriRestriction.cs index 5cae7fe3d75..345d07701c6 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentifierUriRestriction.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentifierUriRestriction.cs @@ -98,7 +98,7 @@ public IdentifierUriRestriction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentifierUriRestriction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentifierUriRestriction(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("excludeActors", ExcludeActors); writer.WriteBoolValue("excludeAppsReceivingV2Tokens", ExcludeAppsReceivingV2Tokens); writer.WriteBoolValue("excludeSaml", ExcludeSaml); diff --git a/src/Microsoft.Graph/Generated/Models/Identity.cs b/src/Microsoft.Graph/Generated/Models/Identity.cs index 9d31146a14d..0302987f2a6 100644 --- a/src/Microsoft.Graph/Generated/Models/Identity.cs +++ b/src/Microsoft.Graph/Generated/Models/Identity.cs @@ -23,7 +23,7 @@ public IDictionary AdditionalData } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// The display name of the identity. This property is read-only. + /// The display name of the identity. For drive items, the display name might not always be available or up to date. For example, if a user changes their display name the API might show the new value in a future response, but the items associated with the user don't show up as changed when using delta. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DisplayName @@ -39,7 +39,7 @@ public string DisplayName set { BackingStore?.Set("displayName", value); } } #endif - /// The identifier of the identity. This property is read-only. + /// Unique identifier for the identity or actor. For example, in the access reviews decisions API, this property might record the id of the principal, that is, the group, user, or application that's subject to review. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Id @@ -86,7 +86,7 @@ public Identity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Identity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityApiConnector.cs b/src/Microsoft.Graph/Generated/Models/IdentityApiConnector.cs index b3f772635e4..5a3a4ef2104 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityApiConnector.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityApiConnector.cs @@ -67,7 +67,7 @@ public string TargetUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityApiConnector CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityApiConnector(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("authenticationConfiguration", AuthenticationConfiguration); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityApiConnectorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityApiConnectorCollectionResponse.cs index 4ebd161e053..09e9542271a 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityApiConnectorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityApiConnectorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IdentityApiConnectorCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityApiConnectorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityApiConnectorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityBuiltInUserFlowAttribute.cs b/src/Microsoft.Graph/Generated/Models/IdentityBuiltInUserFlowAttribute.cs index b4f696e3b9f..99937a76b19 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityBuiltInUserFlowAttribute.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityBuiltInUserFlowAttribute.cs @@ -26,7 +26,7 @@ public IdentityBuiltInUserFlowAttribute() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityBuiltInUserFlowAttribute CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityBuiltInUserFlowAttribute(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityContainer.cs b/src/Microsoft.Graph/Generated/Models/IdentityContainer.cs index c89a6d4009c..727a6450547 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityContainer.cs @@ -228,7 +228,7 @@ public IdentityContainer() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityContainer(); } /// @@ -259,7 +259,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("apiConnectors", ApiConnectors); writer.WriteCollectionOfObjectValues("authenticationEventListeners", AuthenticationEventListeners); writer.WriteCollectionOfObjectValues("authenticationEventsFlows", AuthenticationEventsFlows); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityCustomUserFlowAttribute.cs b/src/Microsoft.Graph/Generated/Models/IdentityCustomUserFlowAttribute.cs index 6d476f70ed1..94894cc281e 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityCustomUserFlowAttribute.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityCustomUserFlowAttribute.cs @@ -26,7 +26,7 @@ public IdentityCustomUserFlowAttribute() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityCustomUserFlowAttribute CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityCustomUserFlowAttribute(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityDetails.cs b/src/Microsoft.Graph/Generated/Models/IdentityDetails.cs index 5027041f002..70752757242 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityDetails.cs @@ -64,7 +64,7 @@ public IdentityDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityDetails(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("lastActiveDateTime", LastActiveDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityFinding.cs b/src/Microsoft.Graph/Generated/Models/IdentityFinding.cs index 873679c00b6..7ec076d44ad 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityFinding.cs @@ -83,7 +83,7 @@ public partial class IdentityFinding : global::Microsoft.Graph.Beta.Models.Findi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -129,7 +129,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("actionSummary", ActionSummary); writer.WriteObjectValue("identity", Identity); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/AttributeChangeTrigger.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/AttributeChangeTrigger.cs index 2a671b244fc..e40dc718fc3 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/AttributeChangeTrigger.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/AttributeChangeTrigger.cs @@ -42,7 +42,7 @@ public AttributeChangeTrigger() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.AttributeChangeTrigger CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.AttributeChangeTrigger(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("triggerAttributes", TriggerAttributes); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtension.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtension.cs index cfa4830d452..a6d9ec6f614 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtension.cs @@ -86,7 +86,7 @@ public CustomTaskExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.CustomTaskExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.CustomTaskExtension(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("callbackConfiguration", CallbackConfiguration); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCallbackConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCallbackConfiguration.cs index 674cd496bfe..e10e83b375c 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCallbackConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCallbackConfiguration.cs @@ -42,7 +42,7 @@ public CustomTaskExtensionCallbackConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.CustomTaskExtensionCallbackConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.CustomTaskExtensionCallbackConfiguration(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("authorizedApps", AuthorizedApps); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCallbackData.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCallbackData.cs index 8a3d8932ccf..f9ff8bdfef6 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCallbackData.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCallbackData.cs @@ -32,7 +32,7 @@ public CustomTaskExtensionCallbackData() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.CustomTaskExtensionCallbackData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.CustomTaskExtensionCallbackData(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("operationStatus", OperationStatus); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCalloutData.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCalloutData.cs index 86981ad5adb..579d52fed0c 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCalloutData.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCalloutData.cs @@ -90,7 +90,7 @@ public CustomTaskExtensionCalloutData() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.CustomTaskExtensionCalloutData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.CustomTaskExtensionCalloutData(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("subject", Subject); writer.WriteObjectValue("task", Task); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCollectionResponse.cs index e040e9ca3f6..6311469ba7c 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/CustomTaskExtensionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CustomTaskExtensionCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.CustomTaskExtensionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.CustomTaskExtensionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/GroupBasedSubjectSet.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/GroupBasedSubjectSet.cs index c62f2e1280a..e4f5b0bf40d 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/GroupBasedSubjectSet.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/GroupBasedSubjectSet.cs @@ -42,7 +42,7 @@ public GroupBasedSubjectSet() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.GroupBasedSubjectSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.GroupBasedSubjectSet(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("groups", Groups); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/IdentityGovernance.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/IdentityGovernance.cs index a29c94ee9fe..cf1ee5b7f82 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/IdentityGovernance.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/IdentityGovernance.cs @@ -196,7 +196,7 @@ public IdentityGovernance() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityGovernance.IdentityGovernance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.IdentityGovernance(); } /// @@ -225,7 +225,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("accessReviews", AccessReviews); writer.WriteObjectValue("appConsent", AppConsent); writer.WriteObjectValue("entitlementManagement", EntitlementManagement); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Insights.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Insights.cs index a43bb105b03..ee750a44577 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Insights.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Insights.cs @@ -19,7 +19,7 @@ public partial class Insights : global::Microsoft.Graph.Beta.Models.Entity, IPar /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.Insights CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.Insights(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/LifecycleManagementSettings.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/LifecycleManagementSettings.cs index d2cc17bd697..dae33c39cba 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/LifecycleManagementSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/LifecycleManagementSettings.cs @@ -41,7 +41,7 @@ public int? WorkflowScheduleIntervalInHours /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.LifecycleManagementSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.LifecycleManagementSettings(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("emailSettings", EmailSettings); writer.WriteIntValue("workflowScheduleIntervalInHours", WorkflowScheduleIntervalInHours); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/LifecycleWorkflowsContainer.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/LifecycleWorkflowsContainer.cs index 34f2ac60ec5..4f989808434 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/LifecycleWorkflowsContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/LifecycleWorkflowsContainer.cs @@ -131,7 +131,7 @@ public partial class LifecycleWorkflowsContainer : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.LifecycleWorkflowsContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.LifecycleWorkflowsContainer(); } /// @@ -157,7 +157,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("customTaskExtensions", CustomTaskExtensions); writer.WriteObjectValue("deletedItems", DeletedItems); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/MembershipChangeTrigger.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/MembershipChangeTrigger.cs index 892a080f2bc..35108ccc6e2 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/MembershipChangeTrigger.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/MembershipChangeTrigger.cs @@ -32,7 +32,7 @@ public MembershipChangeTrigger() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.MembershipChangeTrigger CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.MembershipChangeTrigger(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("changeType", ChangeType); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/OnDemandExecutionOnly.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/OnDemandExecutionOnly.cs index c22f6144141..fac75cdf376 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/OnDemandExecutionOnly.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/OnDemandExecutionOnly.cs @@ -26,7 +26,7 @@ public OnDemandExecutionOnly() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.OnDemandExecutionOnly CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.OnDemandExecutionOnly(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Parameter.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Parameter.cs index 29af5f5df05..14e7214a0d0 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Parameter.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Parameter.cs @@ -90,7 +90,7 @@ public Parameter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityGovernance.Parameter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.Parameter(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("values", Values); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/RuleBasedSubjectSet.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/RuleBasedSubjectSet.cs index 194038f7a03..d98a4c4eae3 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/RuleBasedSubjectSet.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/RuleBasedSubjectSet.cs @@ -42,7 +42,7 @@ public RuleBasedSubjectSet() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.RuleBasedSubjectSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.RuleBasedSubjectSet(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("rule", Rule); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Run.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Run.cs index 4842d291137..770f7c9ee03 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Run.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Run.cs @@ -123,7 +123,7 @@ public int? TotalUsersCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.Run CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.Run(); } /// @@ -156,7 +156,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); writer.WriteIntValue("failedTasksCount", FailedTasksCount); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/RunCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/RunCollectionResponse.cs index bbd58e9f95e..85b21964620 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/RunCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/RunCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RunCollectionResponse : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.RunCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.RunCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/RunSummary.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/RunSummary.cs index 54632106f17..0281dd20966 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/RunSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/RunSummary.cs @@ -88,7 +88,7 @@ public RunSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityGovernance.RunSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.RunSummary(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("failedRuns", FailedRuns); writer.WriteIntValue("failedTasks", FailedTasks); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskCollectionResponse.cs index d6e0ce55f10..54348fe7cc5 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TaskCollectionResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskDefinition.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskDefinition.cs index 17d5b5174da..66b6058a345 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskDefinition.cs @@ -85,7 +85,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskDefinition(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("category", Category); writer.WriteBoolValue("continueOnError", ContinueOnError); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskDefinitionCollectionResponse.cs index 90c612ec549..d956dd5c25b 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TaskDefinitionCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskObject.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskObject.cs index 18c2a65ee05..6da08ce837f 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskObject.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskObject.cs @@ -123,7 +123,7 @@ public string TaskDefinitionId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskObject(); } /// @@ -151,7 +151,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("arguments", Arguments); writer.WriteEnumValue("category", Category); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskProcessingResult.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskProcessingResult.cs index a74c5df3431..695e42b0f1c 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskProcessingResult.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskProcessingResult.cs @@ -91,7 +91,7 @@ public DateTimeOffset? StartedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskProcessingResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskProcessingResult(); } /// @@ -117,7 +117,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskProcessingResultCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskProcessingResultCollectionResponse.cs index f17f4e8809d..e8412dcd462 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskProcessingResultCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskProcessingResultCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TaskProcessingResultCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskProcessingResultCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskProcessingResultCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskReport.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskReport.cs index 634c6d21cec..0426a841bd5 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskReport.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskReport.cs @@ -131,7 +131,7 @@ public int? UnprocessedUsersCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskReport CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskReport(); } /// @@ -162,7 +162,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); writer.WriteIntValue("failedUsersCount", FailedUsersCount); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskReportCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskReportCollectionResponse.cs index bd1d184d81b..757ada4c4f5 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskReportCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskReportCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TaskReportCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskReportCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskReportCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskReportSummary.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskReportSummary.cs index 0ce8e5d16dc..2ffff7eac1f 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskReportSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TaskReportSummary.cs @@ -76,7 +76,7 @@ public TaskReportSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskReportSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TaskReportSummary(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("failedTasks", FailedTasks); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("successfulTasks", SuccessfulTasks); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TimeBasedAttributeTrigger.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TimeBasedAttributeTrigger.cs index 41b493c80ef..4a5ba45efe8 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TimeBasedAttributeTrigger.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TimeBasedAttributeTrigger.cs @@ -38,7 +38,7 @@ public TimeBasedAttributeTrigger() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TimeBasedAttributeTrigger CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TimeBasedAttributeTrigger(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("offsetInDays", OffsetInDays); writer.WriteEnumValue("timeBasedAttribute", TimeBasedAttribute); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TopTasksInsightsSummary.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TopTasksInsightsSummary.cs index 5054b1de509..a5bd56685b6 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TopTasksInsightsSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TopTasksInsightsSummary.cs @@ -120,7 +120,7 @@ public TopTasksInsightsSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityGovernance.TopTasksInsightsSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TopTasksInsightsSummary(); } /// @@ -148,7 +148,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("failedTasks", FailedTasks); writer.WriteIntValue("failedUsers", FailedUsers); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TopWorkflowsInsightsSummary.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TopWorkflowsInsightsSummary.cs index 2ab174227e3..e09459e2c0c 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TopWorkflowsInsightsSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TopWorkflowsInsightsSummary.cs @@ -132,7 +132,7 @@ public TopWorkflowsInsightsSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityGovernance.TopWorkflowsInsightsSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TopWorkflowsInsightsSummary(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("failedRuns", FailedRuns); writer.WriteIntValue("failedUsers", FailedUsers); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TriggerAndScopeBasedConditions.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TriggerAndScopeBasedConditions.cs index 16642e9c89b..36f1d082c52 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TriggerAndScopeBasedConditions.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TriggerAndScopeBasedConditions.cs @@ -58,7 +58,7 @@ public TriggerAndScopeBasedConditions() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TriggerAndScopeBasedConditions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TriggerAndScopeBasedConditions(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("scope", Scope); writer.WriteObjectValue("trigger", Trigger); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TriggerAttribute.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TriggerAttribute.cs index 89a2d11fb80..2a41405224b 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TriggerAttribute.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/TriggerAttribute.cs @@ -68,7 +68,7 @@ public TriggerAttribute() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityGovernance.TriggerAttribute CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.TriggerAttribute(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/UserProcessingResult.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/UserProcessingResult.cs index 7f368948c91..d430d25e47d 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/UserProcessingResult.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/UserProcessingResult.cs @@ -105,7 +105,7 @@ public int? WorkflowVersion /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.UserProcessingResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.UserProcessingResult(); } /// @@ -135,7 +135,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); writer.WriteIntValue("failedTasksCount", FailedTasksCount); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/UserProcessingResultCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/UserProcessingResultCollectionResponse.cs index cb125280ade..d77e13d0f23 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/UserProcessingResultCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/UserProcessingResultCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserProcessingResultCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.UserProcessingResultCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.UserProcessingResultCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/UserSummary.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/UserSummary.cs index f386111dd32..a8e36465f17 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/UserSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/UserSummary.cs @@ -82,7 +82,7 @@ public UserSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityGovernance.UserSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.UserSummary(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("failedTasks", FailedTasks); writer.WriteIntValue("failedUsers", FailedUsers); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Workflow.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Workflow.cs index 06f941d8611..a3154da8f05 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Workflow.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/Workflow.cs @@ -140,7 +140,7 @@ public Workflow() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.Workflow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.Workflow(); } /// @@ -168,7 +168,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("deletedDateTime", DeletedDateTime); writer.WriteCollectionOfObjectValues("executionScope", ExecutionScope); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowBase.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowBase.cs index 4b097ad6c72..f96be54dab1 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowBase.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowBase.cs @@ -178,7 +178,7 @@ public WorkflowBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -215,7 +215,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("category", Category); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowCollectionResponse.cs index 541390c68e0..e0a124b6f36 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkflowCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowExecutionConditions.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowExecutionConditions.cs index ffaafb70bff..e4871006c85 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowExecutionConditions.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowExecutionConditions.cs @@ -52,7 +52,7 @@ public WorkflowExecutionConditions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowExecutionConditions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowExecutionTrigger.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowExecutionTrigger.cs index 2e06dca9ccd..86881c5ed3f 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowExecutionTrigger.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowExecutionTrigger.cs @@ -52,7 +52,7 @@ public WorkflowExecutionTrigger() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowExecutionTrigger CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowTemplate.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowTemplate.cs index cd1b3a74868..3c49faeba2e 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowTemplate.cs @@ -89,7 +89,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowTemplate(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("category", Category); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowTemplateCollectionResponse.cs index 7f9e354a207..42ad91097ec 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkflowTemplateCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowVersion.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowVersion.cs index 130f8f1ce8d..e0ec42be4c3 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowVersion.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowVersion.cs @@ -32,7 +32,7 @@ public WorkflowVersion() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowVersion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowVersion(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("versionNumber", VersionNumber); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowVersionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowVersionCollectionResponse.cs index 76cd1057fc7..13116996c40 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowVersionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowVersionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkflowVersionCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowVersionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowVersionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowsInsightsByCategory.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowsInsightsByCategory.cs index 0d97cee4f95..2101633c49e 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowsInsightsByCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowsInsightsByCategory.cs @@ -106,7 +106,7 @@ public WorkflowsInsightsByCategory() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowsInsightsByCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowsInsightsByCategory(); } /// @@ -135,7 +135,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("failedJoinerRuns", FailedJoinerRuns); writer.WriteIntValue("failedLeaverRuns", FailedLeaverRuns); writer.WriteIntValue("failedMoverRuns", FailedMoverRuns); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowsInsightsSummary.cs b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowsInsightsSummary.cs index 2d201d20d69..e2a6dd8ea7c 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowsInsightsSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityGovernance/WorkflowsInsightsSummary.cs @@ -106,7 +106,7 @@ public WorkflowsInsightsSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowsInsightsSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityGovernance.WorkflowsInsightsSummary(); } /// @@ -135,7 +135,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("failedRuns", FailedRuns); writer.WriteIntValue("failedTasks", FailedTasks); writer.WriteIntValue("failedUsers", FailedUsers); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityProtectionRoot.cs b/src/Microsoft.Graph/Generated/Models/IdentityProtectionRoot.cs index 6d67d42686e..5e2291a7a86 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityProtectionRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityProtectionRoot.cs @@ -116,7 +116,7 @@ public IdentityProtectionRoot() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentityProtectionRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityProtectionRoot(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("riskDetections", RiskDetections); writer.WriteCollectionOfObjectValues("riskyServicePrincipals", RiskyServicePrincipals); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityProvider.cs b/src/Microsoft.Graph/Generated/Models/IdentityProvider.cs index b518e1fde38..0f5a1ff45d5 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityProvider.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityProvider.cs @@ -83,7 +83,7 @@ public string Type /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityProvider CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -111,7 +111,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("clientId", ClientId); writer.WriteStringValue("clientSecret", ClientSecret); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityProviderBase.cs b/src/Microsoft.Graph/Generated/Models/IdentityProviderBase.cs index 30298dd2bdc..680991ecb67 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityProviderBase.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityProviderBase.cs @@ -35,7 +35,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityProviderBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityProviderBaseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityProviderBaseCollectionResponse.cs index bb77f718387..719eddb3ce3 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityProviderBaseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityProviderBaseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IdentityProviderBaseCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityProviderBaseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityProviderBaseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityProviderCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityProviderCollectionResponse.cs index b3e23c267f4..7fea9b0b0e5 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityProviderCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityProviderCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IdentityProviderCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityProviderCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityProviderCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentitySecurityDefaultsEnforcementPolicy.cs b/src/Microsoft.Graph/Generated/Models/IdentitySecurityDefaultsEnforcementPolicy.cs index 57b06102604..c9c6e1ad7fe 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentitySecurityDefaultsEnforcementPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentitySecurityDefaultsEnforcementPolicy.cs @@ -32,7 +32,7 @@ public IdentitySecurityDefaultsEnforcementPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentitySecurityDefaultsEnforcementPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentitySecurityDefaultsEnforcementPolicy(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isEnabled", IsEnabled); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentitySet.cs b/src/Microsoft.Graph/Generated/Models/IdentitySet.cs index 6246f1a8514..68bcfc70c5e 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentitySet.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentitySet.cs @@ -100,7 +100,7 @@ public IdentitySet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -135,7 +135,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("application", Application); writer.WriteObjectValue("device", Device); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IdentitySource.cs b/src/Microsoft.Graph/Generated/Models/IdentitySource.cs index 356d02c0920..27b1ddd8357 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentitySource.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentitySource.cs @@ -52,7 +52,7 @@ public IdentitySource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdentitySource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -81,7 +81,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityUserFlow.cs b/src/Microsoft.Graph/Generated/Models/IdentityUserFlow.cs index e24a41c1482..1c0979093f4 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityUserFlow.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityUserFlow.cs @@ -31,7 +31,7 @@ public float? UserFlowTypeVersion /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityUserFlow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -58,7 +58,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("userFlowType", UserFlowType); writer.WriteFloatValue("userFlowTypeVersion", UserFlowTypeVersion); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttribute.cs b/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttribute.cs index 70d80a35729..b50e313e17e 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttribute.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttribute.cs @@ -63,7 +63,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttribute CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -92,7 +92,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("dataType", DataType); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttributeAssignment.cs b/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttributeAssignment.cs index 252fda6c4e7..72f0d737355 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttributeAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttributeAssignment.cs @@ -85,7 +85,7 @@ public bool? RequiresVerification /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttributeAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttributeAssignment(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteBoolValue("isOptional", IsOptional); diff --git a/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttributeAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttributeAssignmentCollectionResponse.cs index d23b87793ff..d1b409f1653 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttributeAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttributeAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IdentityUserFlowAttributeAssignmentCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttributeAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttributeAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttributeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttributeCollectionResponse.cs index 9f32d020c98..e62cfb122b0 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttributeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityUserFlowAttributeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IdentityUserFlowAttributeCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttributeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityUserFlowAttributeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdentityUserFlowCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IdentityUserFlowCollectionResponse.cs index 5b212720c53..1738ebb792b 100644 --- a/src/Microsoft.Graph/Generated/Models/IdentityUserFlowCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IdentityUserFlowCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IdentityUserFlowCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IdentityUserFlowCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdentityUserFlowCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IdleSessionSignOut.cs b/src/Microsoft.Graph/Generated/Models/IdleSessionSignOut.cs index f4969c6dcb7..0fea454062d 100644 --- a/src/Microsoft.Graph/Generated/Models/IdleSessionSignOut.cs +++ b/src/Microsoft.Graph/Generated/Models/IdleSessionSignOut.cs @@ -70,7 +70,7 @@ public IdleSessionSignOut() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IdleSessionSignOut CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IdleSessionSignOut(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isEnabled", IsEnabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("signOutAfterInSeconds", SignOutAfterInSeconds); diff --git a/src/Microsoft.Graph/Generated/Models/IfEmptyTransformation.cs b/src/Microsoft.Graph/Generated/Models/IfEmptyTransformation.cs index de08527d257..29dd1785142 100644 --- a/src/Microsoft.Graph/Generated/Models/IfEmptyTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/IfEmptyTransformation.cs @@ -42,7 +42,7 @@ public IfEmptyTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IfEmptyTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IfEmptyTransformation(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("output", Output); } diff --git a/src/Microsoft.Graph/Generated/Models/IfNotEmptyTransformation.cs b/src/Microsoft.Graph/Generated/Models/IfNotEmptyTransformation.cs index 9ead4583e1a..2d22fc60cc8 100644 --- a/src/Microsoft.Graph/Generated/Models/IfNotEmptyTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/IfNotEmptyTransformation.cs @@ -42,7 +42,7 @@ public IfNotEmptyTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IfNotEmptyTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IfNotEmptyTransformation(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("output", Output); } diff --git a/src/Microsoft.Graph/Generated/Models/Image.cs b/src/Microsoft.Graph/Generated/Models/Image.cs index c7b7f494a38..e50fb1619da 100644 --- a/src/Microsoft.Graph/Generated/Models/Image.cs +++ b/src/Microsoft.Graph/Generated/Models/Image.cs @@ -64,7 +64,7 @@ public Image() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Image CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Image(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("height", Height); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("width", Width); diff --git a/src/Microsoft.Graph/Generated/Models/ImageInfo.cs b/src/Microsoft.Graph/Generated/Models/ImageInfo.cs index b2206bd0b73..dec96d53a9b 100644 --- a/src/Microsoft.Graph/Generated/Models/ImageInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ImageInfo.cs @@ -106,7 +106,7 @@ public ImageInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ImageInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ImageInfo(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("addImageQuery", AddImageQuery); writer.WriteStringValue("alternateText", AlternateText); writer.WriteStringValue("alternativeText", AlternativeText); diff --git a/src/Microsoft.Graph/Generated/Models/ImpactedResource.cs b/src/Microsoft.Graph/Generated/Models/ImpactedResource.cs index 8bd87c9a1fb..4fd192cd7e6 100644 --- a/src/Microsoft.Graph/Generated/Models/ImpactedResource.cs +++ b/src/Microsoft.Graph/Generated/Models/ImpactedResource.cs @@ -203,7 +203,7 @@ public string SubjectId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ImpactedResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ImpactedResource(); } /// @@ -236,7 +236,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("addedDateTime", AddedDateTime); writer.WriteCollectionOfObjectValues("additionalDetails", AdditionalDetails); diff --git a/src/Microsoft.Graph/Generated/Models/ImpactedResourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ImpactedResourceCollectionResponse.cs index 3c0d076edcd..f7d91f12ed1 100644 --- a/src/Microsoft.Graph/Generated/Models/ImpactedResourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ImpactedResourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ImpactedResourceCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ImpactedResourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ImpactedResourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ImplicitGrantSettings.cs b/src/Microsoft.Graph/Generated/Models/ImplicitGrantSettings.cs index 2e64b7be0b6..35284a64e13 100644 --- a/src/Microsoft.Graph/Generated/Models/ImplicitGrantSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/ImplicitGrantSettings.cs @@ -64,7 +64,7 @@ public ImplicitGrantSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ImplicitGrantSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ImplicitGrantSettings(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("enableAccessTokenIssuance", EnableAccessTokenIssuance); writer.WriteBoolValue("enableIdTokenIssuance", EnableIdTokenIssuance); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ImportedAppleDeviceIdentity.cs b/src/Microsoft.Graph/Generated/Models/ImportedAppleDeviceIdentity.cs index 2032c272a66..a96876999be 100644 --- a/src/Microsoft.Graph/Generated/Models/ImportedAppleDeviceIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/ImportedAppleDeviceIdentity.cs @@ -116,7 +116,7 @@ public string SerialNumber /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ImportedAppleDeviceIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -151,7 +151,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/ImportedAppleDeviceIdentityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ImportedAppleDeviceIdentityCollectionResponse.cs index c8d3675c73c..47245fe0640 100644 --- a/src/Microsoft.Graph/Generated/Models/ImportedAppleDeviceIdentityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ImportedAppleDeviceIdentityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ImportedAppleDeviceIdentityCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ImportedAppleDeviceIdentityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ImportedAppleDeviceIdentityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ImportedAppleDeviceIdentityResult.cs b/src/Microsoft.Graph/Generated/Models/ImportedAppleDeviceIdentityResult.cs index f0da8a0e257..cb0dd6f72d6 100644 --- a/src/Microsoft.Graph/Generated/Models/ImportedAppleDeviceIdentityResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ImportedAppleDeviceIdentityResult.cs @@ -26,7 +26,7 @@ public bool? Status /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ImportedAppleDeviceIdentityResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ImportedAppleDeviceIdentityResult(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("status", Status); } diff --git a/src/Microsoft.Graph/Generated/Models/ImportedDeviceIdentity.cs b/src/Microsoft.Graph/Generated/Models/ImportedDeviceIdentity.cs index dd25335a4b7..2f0d27511b2 100644 --- a/src/Microsoft.Graph/Generated/Models/ImportedDeviceIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/ImportedDeviceIdentity.cs @@ -88,7 +88,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ImportedDeviceIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/ImportedDeviceIdentityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ImportedDeviceIdentityCollectionResponse.cs index b74d361cd49..95290e70b5d 100644 --- a/src/Microsoft.Graph/Generated/Models/ImportedDeviceIdentityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ImportedDeviceIdentityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ImportedDeviceIdentityCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ImportedDeviceIdentityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ImportedDeviceIdentityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ImportedDeviceIdentityResult.cs b/src/Microsoft.Graph/Generated/Models/ImportedDeviceIdentityResult.cs index 02408bc1926..f9a098a46d8 100644 --- a/src/Microsoft.Graph/Generated/Models/ImportedDeviceIdentityResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ImportedDeviceIdentityResult.cs @@ -26,7 +26,7 @@ public bool? Status /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ImportedDeviceIdentityResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ImportedDeviceIdentityResult(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("status", Status); } diff --git a/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentity.cs b/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentity.cs index c1a577d5957..c8dec9fc665 100644 --- a/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentity.cs @@ -132,7 +132,7 @@ public string SerialNumber /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ImportedWindowsAutopilotDeviceIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ImportedWindowsAutopilotDeviceIdentity(); } /// @@ -158,7 +158,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assignedUserPrincipalName", AssignedUserPrincipalName); writer.WriteStringValue("groupTag", GroupTag); diff --git a/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentityCollectionResponse.cs index 327ed0ccd5c..de03275f4c8 100644 --- a/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ImportedWindowsAutopilotDeviceIdentityCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ImportedWindowsAutopilotDeviceIdentityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ImportedWindowsAutopilotDeviceIdentityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentityState.cs b/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentityState.cs index e09aaf6052d..644092b8296 100644 --- a/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentityState.cs +++ b/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentityState.cs @@ -96,7 +96,7 @@ public ImportedWindowsAutopilotDeviceIdentityState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ImportedWindowsAutopilotDeviceIdentityState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ImportedWindowsAutopilotDeviceIdentityState(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("deviceErrorCode", DeviceErrorCode); writer.WriteStringValue("deviceErrorName", DeviceErrorName); writer.WriteEnumValue("deviceImportStatus", DeviceImportStatus); diff --git a/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentityUpload.cs b/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentityUpload.cs index 95e2de3ec7a..4fe41133c61 100644 --- a/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentityUpload.cs +++ b/src/Microsoft.Graph/Generated/Models/ImportedWindowsAutopilotDeviceIdentityUpload.cs @@ -48,7 +48,7 @@ public DateTimeOffset? CreatedDateTimeUtc /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ImportedWindowsAutopilotDeviceIdentityUpload CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ImportedWindowsAutopilotDeviceIdentityUpload(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTimeUtc", CreatedDateTimeUtc); writer.WriteCollectionOfObjectValues("deviceIdentities", DeviceIdentities); diff --git a/src/Microsoft.Graph/Generated/Models/InactiveAwsResourceFinding.cs b/src/Microsoft.Graph/Generated/Models/InactiveAwsResourceFinding.cs index 7a64550ca8a..da7f4b3606b 100644 --- a/src/Microsoft.Graph/Generated/Models/InactiveAwsResourceFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/InactiveAwsResourceFinding.cs @@ -19,7 +19,7 @@ public partial class InactiveAwsResourceFinding : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InactiveAwsResourceFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InactiveAwsResourceFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/InactiveAwsRoleFinding.cs b/src/Microsoft.Graph/Generated/Models/InactiveAwsRoleFinding.cs index eb8d7edb136..1fbb693e4dc 100644 --- a/src/Microsoft.Graph/Generated/Models/InactiveAwsRoleFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/InactiveAwsRoleFinding.cs @@ -19,7 +19,7 @@ public partial class InactiveAwsRoleFinding : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InactiveAwsRoleFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InactiveAwsRoleFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/InactiveAzureServicePrincipalFinding.cs b/src/Microsoft.Graph/Generated/Models/InactiveAzureServicePrincipalFinding.cs index c8dac5e88ac..96107ee1873 100644 --- a/src/Microsoft.Graph/Generated/Models/InactiveAzureServicePrincipalFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/InactiveAzureServicePrincipalFinding.cs @@ -19,7 +19,7 @@ public partial class InactiveAzureServicePrincipalFinding : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InactiveAzureServicePrincipalFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InactiveAzureServicePrincipalFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/InactiveGcpServiceAccountFinding.cs b/src/Microsoft.Graph/Generated/Models/InactiveGcpServiceAccountFinding.cs index ac3429e1b90..b043749731d 100644 --- a/src/Microsoft.Graph/Generated/Models/InactiveGcpServiceAccountFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/InactiveGcpServiceAccountFinding.cs @@ -19,7 +19,7 @@ public partial class InactiveGcpServiceAccountFinding : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InactiveGcpServiceAccountFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InactiveGcpServiceAccountFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/InactiveGroupFinding.cs b/src/Microsoft.Graph/Generated/Models/InactiveGroupFinding.cs index 466883cd7e4..bf6d6696c6e 100644 --- a/src/Microsoft.Graph/Generated/Models/InactiveGroupFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/InactiveGroupFinding.cs @@ -67,7 +67,7 @@ public partial class InactiveGroupFinding : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InactiveGroupFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InactiveGroupFinding(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("actionSummary", ActionSummary); writer.WriteObjectValue("group", Group); diff --git a/src/Microsoft.Graph/Generated/Models/InactiveServerlessFunctionFinding.cs b/src/Microsoft.Graph/Generated/Models/InactiveServerlessFunctionFinding.cs index 4b1932a1b3e..84bc45a2e35 100644 --- a/src/Microsoft.Graph/Generated/Models/InactiveServerlessFunctionFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/InactiveServerlessFunctionFinding.cs @@ -19,7 +19,7 @@ public partial class InactiveServerlessFunctionFinding : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InactiveServerlessFunctionFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InactiveServerlessFunctionFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/InactiveUserFinding.cs b/src/Microsoft.Graph/Generated/Models/InactiveUserFinding.cs index 405568e6ee1..bba39a60f5d 100644 --- a/src/Microsoft.Graph/Generated/Models/InactiveUserFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/InactiveUserFinding.cs @@ -19,7 +19,7 @@ public partial class InactiveUserFinding : global::Microsoft.Graph.Beta.Models.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InactiveUserFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InactiveUserFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/InactiveUsersByApplicationMetricBase.cs b/src/Microsoft.Graph/Generated/Models/InactiveUsersByApplicationMetricBase.cs index 0b83a7d9d9a..8f623801be8 100644 --- a/src/Microsoft.Graph/Generated/Models/InactiveUsersByApplicationMetricBase.cs +++ b/src/Microsoft.Graph/Generated/Models/InactiveUsersByApplicationMetricBase.cs @@ -60,7 +60,7 @@ public long? Inactive90DayCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InactiveUsersByApplicationMetricBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteDateValue("factDate", FactDate); diff --git a/src/Microsoft.Graph/Generated/Models/InactiveUsersMetricBase.cs b/src/Microsoft.Graph/Generated/Models/InactiveUsersMetricBase.cs index 0c5b1b6ce81..343f68a2221 100644 --- a/src/Microsoft.Graph/Generated/Models/InactiveUsersMetricBase.cs +++ b/src/Microsoft.Graph/Generated/Models/InactiveUsersMetricBase.cs @@ -60,7 +60,7 @@ public long? Inactive90DayCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InactiveUsersMetricBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteDateValue("factDate", FactDate); diff --git a/src/Microsoft.Graph/Generated/Models/InboundOutboundPolicyConfiguration.cs b/src/Microsoft.Graph/Generated/Models/InboundOutboundPolicyConfiguration.cs index cf6b52c1d77..4c072edde66 100644 --- a/src/Microsoft.Graph/Generated/Models/InboundOutboundPolicyConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/InboundOutboundPolicyConfiguration.cs @@ -64,7 +64,7 @@ public InboundOutboundPolicyConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InboundOutboundPolicyConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InboundOutboundPolicyConfiguration(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("inboundAllowed", InboundAllowed); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("outboundAllowed", OutboundAllowed); diff --git a/src/Microsoft.Graph/Generated/Models/InboundPorts.cs b/src/Microsoft.Graph/Generated/Models/InboundPorts.cs index f7a01b39fba..cfb55953c16 100644 --- a/src/Microsoft.Graph/Generated/Models/InboundPorts.cs +++ b/src/Microsoft.Graph/Generated/Models/InboundPorts.cs @@ -52,7 +52,7 @@ public InboundPorts() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InboundPorts CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/InboundSharedUserProfile.cs b/src/Microsoft.Graph/Generated/Models/InboundSharedUserProfile.cs index 9a8fc8fa96e..4595226e7ec 100644 --- a/src/Microsoft.Graph/Generated/Models/InboundSharedUserProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/InboundSharedUserProfile.cs @@ -116,7 +116,7 @@ public InboundSharedUserProfile() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InboundSharedUserProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InboundSharedUserProfile(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("homeTenantId", HomeTenantId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/InboundSharedUserProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/InboundSharedUserProfileCollectionResponse.cs index 2b5e0fbc6d7..e76d014fd58 100644 --- a/src/Microsoft.Graph/Generated/Models/InboundSharedUserProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/InboundSharedUserProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class InboundSharedUserProfileCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InboundSharedUserProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InboundSharedUserProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IncludeAllAccountTargetContent.cs b/src/Microsoft.Graph/Generated/Models/IncludeAllAccountTargetContent.cs index b19dec87309..141dfac6b2d 100644 --- a/src/Microsoft.Graph/Generated/Models/IncludeAllAccountTargetContent.cs +++ b/src/Microsoft.Graph/Generated/Models/IncludeAllAccountTargetContent.cs @@ -26,7 +26,7 @@ public IncludeAllAccountTargetContent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IncludeAllAccountTargetContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IncludeAllAccountTargetContent(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IncludeTarget.cs b/src/Microsoft.Graph/Generated/Models/IncludeTarget.cs index 46eb2e3dc41..1239cbcd1e3 100644 --- a/src/Microsoft.Graph/Generated/Models/IncludeTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/IncludeTarget.cs @@ -74,7 +74,7 @@ public IncludeTarget() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IncludeTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IncludeTarget(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("targetType", TargetType); diff --git a/src/Microsoft.Graph/Generated/Models/IncomingCallOptions.cs b/src/Microsoft.Graph/Generated/Models/IncomingCallOptions.cs index fb1115430c7..4bde241cffb 100644 --- a/src/Microsoft.Graph/Generated/Models/IncomingCallOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/IncomingCallOptions.cs @@ -26,7 +26,7 @@ public IncomingCallOptions() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IncomingCallOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IncomingCallOptions(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IncomingContext.cs b/src/Microsoft.Graph/Generated/Models/IncomingContext.cs index 71f073be058..1aba85a6cf9 100644 --- a/src/Microsoft.Graph/Generated/Models/IncomingContext.cs +++ b/src/Microsoft.Graph/Generated/Models/IncomingContext.cs @@ -116,7 +116,7 @@ public IncomingContext() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IncomingContext CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IncomingContext(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("observedParticipantId", ObservedParticipantId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("onBehalfOf", OnBehalfOf); diff --git a/src/Microsoft.Graph/Generated/Models/IncompleteData.cs b/src/Microsoft.Graph/Generated/Models/IncompleteData.cs index 8a78e874a76..23b000a8701 100644 --- a/src/Microsoft.Graph/Generated/Models/IncompleteData.cs +++ b/src/Microsoft.Graph/Generated/Models/IncompleteData.cs @@ -64,7 +64,7 @@ public IncompleteData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IncompleteData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IncompleteData(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("missingDataBeforeDateTime", MissingDataBeforeDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("wasThrottled", WasThrottled); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/AdditionalClassGroupOptions.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/AdditionalClassGroupOptions.cs index b545b02fd8d..5c41553c845 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/AdditionalClassGroupOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/AdditionalClassGroupOptions.cs @@ -64,7 +64,7 @@ public AdditionalClassGroupOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.AdditionalClassGroupOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.AdditionalClassGroupOptions(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("createTeam", CreateTeam); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("writeDisplayNameOnCreateOnly", WriteDisplayNameOnCreateOnly); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/AdditionalUserOptions.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/AdditionalUserOptions.cs index 181ff9dee7c..ed4a7a78222 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/AdditionalUserOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/AdditionalUserOptions.cs @@ -70,7 +70,7 @@ public AdditionalUserOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.AdditionalUserOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.AdditionalUserOptions(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowStudentContactAssociation", AllowStudentContactAssociation); writer.WriteBoolValue("markAllStudentsAsMinors", MarkAllStudentsAsMinors); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/AdminUnitCreationOptions.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/AdminUnitCreationOptions.cs index 9f25f092128..a2ca773b12b 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/AdminUnitCreationOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/AdminUnitCreationOptions.cs @@ -64,7 +64,7 @@ public AdminUnitCreationOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.AdminUnitCreationOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.AdminUnitCreationOptions(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("createBasedOnOrg", CreateBasedOnOrg); writer.WriteBoolValue("createBasedOnOrgPlusRoleGroup", CreateBasedOnOrgPlusRoleGroup); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/AdministrativeUnitProvisioningFlow.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/AdministrativeUnitProvisioningFlow.cs index 4bd5e63f428..73feabdb91b 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/AdministrativeUnitProvisioningFlow.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/AdministrativeUnitProvisioningFlow.cs @@ -42,7 +42,7 @@ public AdministrativeUnitProvisioningFlow() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.AdministrativeUnitProvisioningFlow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.AdministrativeUnitProvisioningFlow(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("creationOptions", CreationOptions); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/AggregatedInboundStatistics.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/AggregatedInboundStatistics.cs index 4578d5e96b9..ce7e93396ec 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/AggregatedInboundStatistics.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/AggregatedInboundStatistics.cs @@ -120,7 +120,7 @@ public AggregatedInboundStatistics() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.AggregatedInboundStatistics CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.AggregatedInboundStatistics(); } /// @@ -148,7 +148,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ApiDataConnector.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ApiDataConnector.cs index 46fab923d37..4a7e67ba078 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/ApiDataConnector.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ApiDataConnector.cs @@ -64,7 +64,7 @@ public ApiDataConnector() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.ApiDataConnector CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -91,7 +91,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("apiFormat", ApiFormat); writer.WriteStringValue("baseUrl", BaseUrl); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/AzureDataLakeConnector.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/AzureDataLakeConnector.cs index 075516a5a92..3cc3e8808b0 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/AzureDataLakeConnector.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/AzureDataLakeConnector.cs @@ -42,7 +42,7 @@ public AzureDataLakeConnector() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.AzureDataLakeConnector CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.AzureDataLakeConnector(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("fileFormat", FileFormat); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/BasicFilter.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/BasicFilter.cs index f871420a7e2..fb707dc5e5e 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/BasicFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/BasicFilter.cs @@ -48,7 +48,7 @@ public BasicFilter() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.BasicFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.BasicFilter(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("attribute", Attribute); writer.WriteCollectionOfPrimitiveValues("in", In); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ClassGroupConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ClassGroupConfiguration.cs index 3f123db2f69..13e269a1e1c 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/ClassGroupConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ClassGroupConfiguration.cs @@ -100,7 +100,7 @@ public ClassGroupConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.ClassGroupConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.ClassGroupConfiguration(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfEnumValues("additionalAttributes", AdditionalAttributes); writer.WriteObjectValue("additionalOptions", AdditionalOptions); writer.WriteObjectValue("enrollmentMappings", EnrollmentMappings); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ClassGroupProvisioningFlow.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ClassGroupProvisioningFlow.cs index 8e1cd48c042..e19b609f3eb 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/ClassGroupProvisioningFlow.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ClassGroupProvisioningFlow.cs @@ -42,7 +42,7 @@ public ClassGroupProvisioningFlow() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.ClassGroupProvisioningFlow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.ClassGroupProvisioningFlow(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("configuration", Configuration); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/Credential.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/Credential.cs index 5ebeefdae0c..7e3c9cdeb54 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/Credential.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/Credential.cs @@ -80,7 +80,7 @@ public Credential() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.Credential CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/EnrollmentMappings.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/EnrollmentMappings.cs index 5ecc694003a..bb2dc01a7c7 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/EnrollmentMappings.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/EnrollmentMappings.cs @@ -84,7 +84,7 @@ public EnrollmentMappings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.EnrollmentMappings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.EnrollmentMappings(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("memberEnrollmentMappings", MemberEnrollmentMappings); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("ownerEnrollmentMappings", OwnerEnrollmentMappings); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/FileDataConnector.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/FileDataConnector.cs index dbc75ba73e1..8e57bee8334 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/FileDataConnector.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/FileDataConnector.cs @@ -26,7 +26,7 @@ public FileDataConnector() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.FileDataConnector CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -50,7 +50,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/FileFormatReferenceValue.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/FileFormatReferenceValue.cs index ec3576ad81e..1340437ca12 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/FileFormatReferenceValue.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/FileFormatReferenceValue.cs @@ -26,7 +26,7 @@ public FileFormatReferenceValue() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.FileFormatReferenceValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.FileFormatReferenceValue(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/FileValidateOperation.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/FileValidateOperation.cs index 926bd09dbd6..38448c52a7e 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/FileValidateOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/FileValidateOperation.cs @@ -43,7 +43,7 @@ public FileValidateOperation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.FileValidateOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.FileValidateOperation(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/Filter.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/Filter.cs index 16add5de6a0..022722333f6 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/Filter.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/Filter.cs @@ -52,7 +52,7 @@ public Filter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.Filter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IdentifierTypeReferenceValue.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IdentifierTypeReferenceValue.cs index 3995acacafa..26d75034bc8 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/IdentifierTypeReferenceValue.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IdentifierTypeReferenceValue.cs @@ -26,7 +26,7 @@ public IdentifierTypeReferenceValue() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.IdentifierTypeReferenceValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.IdentifierTypeReferenceValue(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundActivityResults.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundActivityResults.cs index 52de9707e6c..d243dfbfe91 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundActivityResults.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundActivityResults.cs @@ -134,7 +134,7 @@ public InboundActivityResults() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.InboundActivityResults CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.InboundActivityResults(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundApiFlow.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundApiFlow.cs index 8864f9f8be5..4865c9bd390 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundApiFlow.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundApiFlow.cs @@ -26,7 +26,7 @@ public InboundApiFlow() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.InboundApiFlow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.InboundApiFlow(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFileFlow.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFileFlow.cs index c33337c3e30..e33be3e36be 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFileFlow.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFileFlow.cs @@ -26,7 +26,7 @@ public InboundFileFlow() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.InboundFileFlow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.InboundFileFlow(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlow.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlow.cs index 6c015640b28..e3ef8bcd69d 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlow.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlow.cs @@ -76,7 +76,7 @@ public InboundFlow() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.InboundFlow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("dataConnector", DataConnector); writer.WriteEnumValue("dataDomain", DataDomain); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowActivity.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowActivity.cs index 942e9624e04..b717eea2296 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowActivity.cs @@ -26,7 +26,7 @@ public InboundFlowActivity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.InboundFlowActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.InboundFlowActivity(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowCollectionResponse.cs index 37fc76c3843..3878e3e860b 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/InboundFlowCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class InboundFlowCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.InboundFlowCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.InboundFlowCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivity.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivity.cs index 464fec9c432..73eb5c9a12e 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivity.cs @@ -41,7 +41,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteEnumValue("readinessStatus", ReadinessStatus); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivityStatistics.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivityStatistics.cs index cab331e45ff..eb8e3f3b5ef 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivityStatistics.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataActivityStatistics.cs @@ -90,7 +90,7 @@ public IndustryDataActivityStatistics() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataActivityStatistics CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -118,7 +118,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("status", Status); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataConnector.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataConnector.cs index 9255783d6a3..c5c845fd3f2 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataConnector.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataConnector.cs @@ -51,7 +51,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataConnector CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteObjectValue("sourceSystem", SourceSystem); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataConnectorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataConnectorCollectionResponse.cs index ad2cd3d3d2d..8e796b5c4bd 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataConnectorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataConnectorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IndustryDataConnectorCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataConnectorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataConnectorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRoot.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRoot.cs index 84320484c73..accf3026218 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRoot.cs @@ -163,7 +163,7 @@ public partial class IndustryDataRoot : global::Microsoft.Graph.Beta.Models.Enti /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRoot(); } /// @@ -191,7 +191,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("dataConnectors", DataConnectors); writer.WriteCollectionOfObjectValues("inboundFlows", InboundFlows); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRun.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRun.cs index f6ec83b3bee..dfdfd3939da 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRun.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRun.cs @@ -85,7 +85,7 @@ public DateTimeOffset? StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRun CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRun(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("activities", Activities); writer.WriteEnumValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunActivity.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunActivity.cs index 707f75cc46e..dee0cda1919 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunActivity.cs @@ -73,7 +73,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRunActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -102,7 +102,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("activity", Activity); writer.WriteEnumValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunActivityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunActivityCollectionResponse.cs index 30dbd678033..90bd9dcb3f6 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunActivityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunActivityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IndustryDataRunActivityCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRunActivityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRunActivityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunCollectionResponse.cs index 902f959642b..853d95efad1 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IndustryDataRunCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRunCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRunCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunEntityCountMetric.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunEntityCountMetric.cs index ebf66c0e8db..f4484c58129 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunEntityCountMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunEntityCountMetric.cs @@ -70,7 +70,7 @@ public IndustryDataRunEntityCountMetric() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRunEntityCountMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRunEntityCountMetric(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunRoleCountMetric.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunRoleCountMetric.cs index f1e9a725fdd..906cf77d86a 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunRoleCountMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunRoleCountMetric.cs @@ -74,7 +74,7 @@ public IndustryDataRunRoleCountMetric() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRunRoleCountMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRunRoleCountMetric(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunStatistics.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunStatistics.cs index 01bbb793b3f..312a1f5a9c0 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunStatistics.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/IndustryDataRunStatistics.cs @@ -106,7 +106,7 @@ public IndustryDataRunStatistics() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRunStatistics CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.IndustryDataRunStatistics(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("status", Status); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/OAuth1ClientCredential.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/OAuth1ClientCredential.cs index 6358892f1c8..161428dcd8a 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/OAuth1ClientCredential.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/OAuth1ClientCredential.cs @@ -26,7 +26,7 @@ public OAuth1ClientCredential() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.OAuth1ClientCredential CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.OAuth1ClientCredential(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/OAuth2ClientCredential.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/OAuth2ClientCredential.cs index f045c61504c..2cd96ac71b0 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/OAuth2ClientCredential.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/OAuth2ClientCredential.cs @@ -58,7 +58,7 @@ public OAuth2ClientCredential() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.OAuth2ClientCredential CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.OAuth2ClientCredential(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("scope", Scope); writer.WriteStringValue("tokenUrl", TokenUrl); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/OAuthClientCredential.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/OAuthClientCredential.cs index f64e38d09c8..3a0e8a61eda 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/OAuthClientCredential.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/OAuthClientCredential.cs @@ -58,7 +58,7 @@ public OAuthClientCredential() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.OAuthClientCredential CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -85,7 +85,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("clientId", ClientId); writer.WriteStringValue("clientSecret", ClientSecret); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/OneRosterApiDataConnector.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/OneRosterApiDataConnector.cs index 2338f72e644..909cee02f43 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/OneRosterApiDataConnector.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/OneRosterApiDataConnector.cs @@ -60,7 +60,7 @@ public OneRosterApiDataConnector() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.OneRosterApiDataConnector CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.OneRosterApiDataConnector(); } /// @@ -83,7 +83,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("apiVersion", ApiVersion); writer.WriteBoolValue("isContactsEnabled", IsContactsEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundFlowActivity.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundFlowActivity.cs index dcf0bab1399..6ca344d3737 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundFlowActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundFlowActivity.cs @@ -26,7 +26,7 @@ public OutboundFlowActivity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.OutboundFlowActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.OutboundFlowActivity(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundProvisioningFlowSet.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundProvisioningFlowSet.cs index 01d9a7cf8e7..70e62a92529 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundProvisioningFlowSet.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundProvisioningFlowSet.cs @@ -79,7 +79,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.OutboundProvisioningFlowSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.OutboundProvisioningFlowSet(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteObjectValue("filter", Filter); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundProvisioningFlowSetCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundProvisioningFlowSetCollectionResponse.cs index 63ef2cd7aef..13069b694b1 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundProvisioningFlowSetCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/OutboundProvisioningFlowSetCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OutboundProvisioningFlowSetCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.OutboundProvisioningFlowSetCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.OutboundProvisioningFlowSetCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/PasswordSettings.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/PasswordSettings.cs index e8f7acf73c7..d819e461f5b 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/PasswordSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/PasswordSettings.cs @@ -52,7 +52,7 @@ public PasswordSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.PasswordSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ProvisioningFlow.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ProvisioningFlow.cs index 32f48f06c94..66e6ce19340 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/ProvisioningFlow.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ProvisioningFlow.cs @@ -37,7 +37,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.ProvisioningFlow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ProvisioningFlowCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ProvisioningFlowCollectionResponse.cs index a5948748f38..ebf4d964436 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/ProvisioningFlowCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ProvisioningFlowCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProvisioningFlowCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.ProvisioningFlowCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.ProvisioningFlowCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceDefinition.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceDefinition.cs index 4a8c4f667b0..fe51b61fd84 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceDefinition.cs @@ -107,7 +107,7 @@ public string Source /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.ReferenceDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.ReferenceDefinition(); } /// @@ -134,7 +134,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("code", Code); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceDefinitionCollectionResponse.cs index 61cf5c3c900..65cbf5e7262 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ReferenceDefinitionCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.ReferenceDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.ReferenceDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceValue.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceValue.cs index 77f77718c83..d3397b093aa 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceValue.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ReferenceValue.cs @@ -84,7 +84,7 @@ public ReferenceValue() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.ReferenceValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -116,7 +116,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/RoleGroup.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/RoleGroup.cs index 502f667f611..cd56b75ee00 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/RoleGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/RoleGroup.cs @@ -51,7 +51,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.RoleGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.RoleGroup(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfObjectValues("roles", Roles); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/RoleGroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/RoleGroupCollectionResponse.cs index 2881a3b7045..9107e0287ab 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/RoleGroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/RoleGroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RoleGroupCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.RoleGroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.RoleGroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/RoleReferenceValue.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/RoleReferenceValue.cs index fe82b8d0ebc..9fa39c26a9f 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/RoleReferenceValue.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/RoleReferenceValue.cs @@ -26,7 +26,7 @@ public RoleReferenceValue() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.RoleReferenceValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.RoleReferenceValue(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/SectionRoleReferenceValue.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/SectionRoleReferenceValue.cs index 6ad38e1ef66..8c9ef476105 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/SectionRoleReferenceValue.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/SectionRoleReferenceValue.cs @@ -26,7 +26,7 @@ public SectionRoleReferenceValue() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.SectionRoleReferenceValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.SectionRoleReferenceValue(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/SecurityGroupCreationOptions.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/SecurityGroupCreationOptions.cs index 762dcc5ddd2..8aeb4399d2a 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/SecurityGroupCreationOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/SecurityGroupCreationOptions.cs @@ -64,7 +64,7 @@ public SecurityGroupCreationOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.SecurityGroupCreationOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.SecurityGroupCreationOptions(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("createBasedOnOrgPlusRoleGroup", CreateBasedOnOrgPlusRoleGroup); writer.WriteBoolValue("createBasedOnRoleGroup", CreateBasedOnRoleGroup); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/SecurityGroupProvisioningFlow.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/SecurityGroupProvisioningFlow.cs index ba7b47bb3b5..674eb2643be 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/SecurityGroupProvisioningFlow.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/SecurityGroupProvisioningFlow.cs @@ -42,7 +42,7 @@ public SecurityGroupProvisioningFlow() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.SecurityGroupProvisioningFlow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.SecurityGroupProvisioningFlow(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("creationOptions", CreationOptions); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/SimplePasswordSettings.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/SimplePasswordSettings.cs index 30400385376..659372e4eea 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/SimplePasswordSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/SimplePasswordSettings.cs @@ -42,7 +42,7 @@ public SimplePasswordSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.SimplePasswordSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.SimplePasswordSettings(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("password", Password); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/SourceSystemDefinition.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/SourceSystemDefinition.cs index b8528994807..04a21a35e47 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/SourceSystemDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/SourceSystemDefinition.cs @@ -67,7 +67,7 @@ public string Vendor /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.SourceSystemDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.SourceSystemDefinition(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfObjectValues("userMatchingSettings", UserMatchingSettings); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/SourceSystemDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/SourceSystemDefinitionCollectionResponse.cs index 9a38ffb5088..502b17264f4 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/SourceSystemDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/SourceSystemDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SourceSystemDefinitionCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.SourceSystemDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.SourceSystemDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/UserConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/UserConfiguration.cs index 1a80452b79a..38a8e931dbd 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/UserConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/UserConfiguration.cs @@ -100,7 +100,7 @@ public UserConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.UserConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.UserConfiguration(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("defaultPasswordSettings", DefaultPasswordSettings); writer.WriteCollectionOfPrimitiveValues("licenseSkus", LicenseSkus); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/UserCreationOptions.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/UserCreationOptions.cs index 148187371cb..bcc3f2b49a3 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/UserCreationOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/UserCreationOptions.cs @@ -68,7 +68,7 @@ public UserCreationOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.UserCreationOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.UserCreationOptions(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("configurations", Configurations); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/UserManagementOptions.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/UserManagementOptions.cs index d88802a9da0..27b3a2826a7 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/UserManagementOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/UserManagementOptions.cs @@ -84,7 +84,7 @@ public UserManagementOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.UserManagementOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.UserManagementOptions(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfEnumValues("additionalAttributes", AdditionalAttributes); writer.WriteObjectValue("additionalOptions", AdditionalOptions); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchTargetReferenceValue.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchTargetReferenceValue.cs index d6b1caae3ac..056bdc721e2 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchTargetReferenceValue.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchTargetReferenceValue.cs @@ -26,7 +26,7 @@ public UserMatchTargetReferenceValue() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.UserMatchTargetReferenceValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.UserMatchTargetReferenceValue(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchingSetting.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchingSetting.cs index 8ddda6aadf4..2cf0ce8c7e9 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchingSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/UserMatchingSetting.cs @@ -106,7 +106,7 @@ public UserMatchingSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IndustryData.UserMatchingSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.UserMatchingSetting(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("matchTarget", MatchTarget); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("priorityOrder", PriorityOrder); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/UserProvisioningFlow.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/UserProvisioningFlow.cs index 5c4e4aef945..67bd2283447 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/UserProvisioningFlow.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/UserProvisioningFlow.cs @@ -64,7 +64,7 @@ public UserProvisioningFlow() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.UserProvisioningFlow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.UserProvisioningFlow(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("createUnmatchedUsers", CreateUnmatchedUsers); writer.WriteObjectValue("creationOptions", CreationOptions); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/ValidateOperation.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/ValidateOperation.cs index 7549ba87a07..1ca04571dd8 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/ValidateOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/ValidateOperation.cs @@ -52,7 +52,7 @@ public partial class ValidateOperation : global::Microsoft.Graph.Beta.Models.Lon /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.ValidateOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/YearReferenceValue.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/YearReferenceValue.cs index 35d9d7f8d05..bf919801523 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/YearReferenceValue.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/YearReferenceValue.cs @@ -26,7 +26,7 @@ public YearReferenceValue() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.YearReferenceValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.YearReferenceValue(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/YearTimePeriodDefinition.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/YearTimePeriodDefinition.cs index 489bfcf732b..978165f9fa6 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/YearTimePeriodDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/YearTimePeriodDefinition.cs @@ -64,7 +64,7 @@ public Date? StartDate /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.YearTimePeriodDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.YearTimePeriodDefinition(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateValue("endDate", EndDate); diff --git a/src/Microsoft.Graph/Generated/Models/IndustryData/YearTimePeriodDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IndustryData/YearTimePeriodDefinitionCollectionResponse.cs index 54f13371f62..3eee8d6ac3d 100644 --- a/src/Microsoft.Graph/Generated/Models/IndustryData/YearTimePeriodDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IndustryData/YearTimePeriodDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class YearTimePeriodDefinitionCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IndustryData.YearTimePeriodDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IndustryData.YearTimePeriodDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/InferenceClassification.cs b/src/Microsoft.Graph/Generated/Models/InferenceClassification.cs index d36a573c3b6..f95fa47d874 100644 --- a/src/Microsoft.Graph/Generated/Models/InferenceClassification.cs +++ b/src/Microsoft.Graph/Generated/Models/InferenceClassification.cs @@ -35,7 +35,7 @@ public partial class InferenceClassification : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InferenceClassification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InferenceClassification(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("overrides", Overrides); } diff --git a/src/Microsoft.Graph/Generated/Models/InferenceClassificationOverride.cs b/src/Microsoft.Graph/Generated/Models/InferenceClassificationOverride.cs index 667ecc24ed2..542308d4835 100644 --- a/src/Microsoft.Graph/Generated/Models/InferenceClassificationOverride.cs +++ b/src/Microsoft.Graph/Generated/Models/InferenceClassificationOverride.cs @@ -41,7 +41,7 @@ public partial class InferenceClassificationOverride : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InferenceClassificationOverride CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InferenceClassificationOverride(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("classifyAs", ClassifyAs); writer.WriteObjectValue("senderEmailAddress", SenderEmailAddress); diff --git a/src/Microsoft.Graph/Generated/Models/InferenceClassificationOverrideCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/InferenceClassificationOverrideCollectionResponse.cs index 5f882eb6b2f..82ca5def57c 100644 --- a/src/Microsoft.Graph/Generated/Models/InferenceClassificationOverrideCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/InferenceClassificationOverrideCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class InferenceClassificationOverrideCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InferenceClassificationOverrideCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InferenceClassificationOverrideCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/InferenceData.cs b/src/Microsoft.Graph/Generated/Models/InferenceData.cs index e0e18780648..fa3c325214f 100644 --- a/src/Microsoft.Graph/Generated/Models/InferenceData.cs +++ b/src/Microsoft.Graph/Generated/Models/InferenceData.cs @@ -64,7 +64,7 @@ public InferenceData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InferenceData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InferenceData(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDoubleValue("confidenceScore", ConfidenceScore); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("userHasVerifiedAccuracy", UserHasVerifiedAccuracy); diff --git a/src/Microsoft.Graph/Generated/Models/InformationProtection.cs b/src/Microsoft.Graph/Generated/Models/InformationProtection.cs index df409016d83..63d24c09d1f 100644 --- a/src/Microsoft.Graph/Generated/Models/InformationProtection.cs +++ b/src/Microsoft.Graph/Generated/Models/InformationProtection.cs @@ -115,7 +115,7 @@ public partial class InformationProtection : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InformationProtection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InformationProtection(); } /// @@ -140,7 +140,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("bitlocker", Bitlocker); writer.WriteCollectionOfObjectValues("dataLossPreventionPolicies", DataLossPreventionPolicies); diff --git a/src/Microsoft.Graph/Generated/Models/InformationProtectionAction.cs b/src/Microsoft.Graph/Generated/Models/InformationProtectionAction.cs index 31814ac1846..c4713079558 100644 --- a/src/Microsoft.Graph/Generated/Models/InformationProtectionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/InformationProtectionAction.cs @@ -52,7 +52,7 @@ public InformationProtectionAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InformationProtectionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -91,7 +91,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/InformationProtectionContentLabel.cs b/src/Microsoft.Graph/Generated/Models/InformationProtectionContentLabel.cs index 5b6de635e20..d042a4208fd 100644 --- a/src/Microsoft.Graph/Generated/Models/InformationProtectionContentLabel.cs +++ b/src/Microsoft.Graph/Generated/Models/InformationProtectionContentLabel.cs @@ -80,7 +80,7 @@ public InformationProtectionContentLabel() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InformationProtectionContentLabel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InformationProtectionContentLabel(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("assignmentMethod", AssignmentMethod); writer.WriteDateTimeOffsetValue("creationDateTime", CreationDateTime); writer.WriteObjectValue("label", Label); diff --git a/src/Microsoft.Graph/Generated/Models/InformationProtectionLabel.cs b/src/Microsoft.Graph/Generated/Models/InformationProtectionLabel.cs index 208055ef2da..98c11e4b252 100644 --- a/src/Microsoft.Graph/Generated/Models/InformationProtectionLabel.cs +++ b/src/Microsoft.Graph/Generated/Models/InformationProtectionLabel.cs @@ -111,7 +111,7 @@ public string Tooltip /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InformationProtectionLabel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InformationProtectionLabel(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("color", Color); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/InformationProtectionLabelCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/InformationProtectionLabelCollectionResponse.cs index d5f2cb4c030..4a4b9d60015 100644 --- a/src/Microsoft.Graph/Generated/Models/InformationProtectionLabelCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/InformationProtectionLabelCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class InformationProtectionLabelCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InformationProtectionLabelCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InformationProtectionLabelCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/InformationProtectionPolicy.cs b/src/Microsoft.Graph/Generated/Models/InformationProtectionPolicy.cs index 350056f4c3d..5d3c0b494a0 100644 --- a/src/Microsoft.Graph/Generated/Models/InformationProtectionPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/InformationProtectionPolicy.cs @@ -35,7 +35,7 @@ public partial class InformationProtectionPolicy : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InformationProtectionPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InformationProtectionPolicy(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("labels", Labels); } diff --git a/src/Microsoft.Graph/Generated/Models/InformationalUrl.cs b/src/Microsoft.Graph/Generated/Models/InformationalUrl.cs index 7ced5ea0e6f..ee5f49d0f96 100644 --- a/src/Microsoft.Graph/Generated/Models/InformationalUrl.cs +++ b/src/Microsoft.Graph/Generated/Models/InformationalUrl.cs @@ -132,7 +132,7 @@ public InformationalUrl() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InformationalUrl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InformationalUrl(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("logoUrl", LogoUrl); writer.WriteStringValue("marketingUrl", MarketingUrl); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/InformationalUrls.cs b/src/Microsoft.Graph/Generated/Models/InformationalUrls.cs index 41d37a3c36b..f26ecaec479 100644 --- a/src/Microsoft.Graph/Generated/Models/InformationalUrls.cs +++ b/src/Microsoft.Graph/Generated/Models/InformationalUrls.cs @@ -84,7 +84,7 @@ public InformationalUrls() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InformationalUrls CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InformationalUrls(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appSignUpUrl", AppSignUpUrl); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("singleSignOnDocumentationUrl", SingleSignOnDocumentationUrl); diff --git a/src/Microsoft.Graph/Generated/Models/Initiator.cs b/src/Microsoft.Graph/Generated/Models/Initiator.cs index 239a1390bc0..716a404b14b 100644 --- a/src/Microsoft.Graph/Generated/Models/Initiator.cs +++ b/src/Microsoft.Graph/Generated/Models/Initiator.cs @@ -32,7 +32,7 @@ public Initiator() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Initiator CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Initiator(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("initiatorType", InitiatorType); } diff --git a/src/Microsoft.Graph/Generated/Models/InsightIdentity.cs b/src/Microsoft.Graph/Generated/Models/InsightIdentity.cs index f740359f521..b3482b1c5c5 100644 --- a/src/Microsoft.Graph/Generated/Models/InsightIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/InsightIdentity.cs @@ -100,7 +100,7 @@ public InsightIdentity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InsightIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InsightIdentity(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("address", Address); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/InsightSummary.cs b/src/Microsoft.Graph/Generated/Models/InsightSummary.cs index 8dc659da1c4..ebdec4582d5 100644 --- a/src/Microsoft.Graph/Generated/Models/InsightSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/InsightSummary.cs @@ -100,7 +100,7 @@ public long? SecurityVoiceRequests /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InsightSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InsightSummary(); } /// @@ -129,7 +129,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("activeUsers", ActiveUsers); writer.WriteStringValue("appId", AppId); diff --git a/src/Microsoft.Graph/Generated/Models/InsightSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/InsightSummaryCollectionResponse.cs index b3fb1bddbc7..1fda7bec8fb 100644 --- a/src/Microsoft.Graph/Generated/Models/InsightSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/InsightSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class InsightSummaryCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InsightSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InsightSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/InsightValueDouble.cs b/src/Microsoft.Graph/Generated/Models/InsightValueDouble.cs index e1601168fdb..d3e1151ee5e 100644 --- a/src/Microsoft.Graph/Generated/Models/InsightValueDouble.cs +++ b/src/Microsoft.Graph/Generated/Models/InsightValueDouble.cs @@ -33,7 +33,7 @@ public InsightValueDouble() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InsightValueDouble CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InsightValueDouble(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDoubleValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/InsightValueInt.cs b/src/Microsoft.Graph/Generated/Models/InsightValueInt.cs index ed4c05c1424..b95d1159838 100644 --- a/src/Microsoft.Graph/Generated/Models/InsightValueInt.cs +++ b/src/Microsoft.Graph/Generated/Models/InsightValueInt.cs @@ -33,7 +33,7 @@ public InsightValueInt() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InsightValueInt CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InsightValueInt(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/InsightsSettings.cs b/src/Microsoft.Graph/Generated/Models/InsightsSettings.cs index 4273d45a768..9bb200dd859 100644 --- a/src/Microsoft.Graph/Generated/Models/InsightsSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/InsightsSettings.cs @@ -41,7 +41,7 @@ public bool? IsEnabledInOrganization /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InsightsSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InsightsSettings(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("disabledForGroup", DisabledForGroup); writer.WriteBoolValue("isEnabledInOrganization", IsEnabledInOrganization); diff --git a/src/Microsoft.Graph/Generated/Models/InstitutionData.cs b/src/Microsoft.Graph/Generated/Models/InstitutionData.cs index 1bb35ceaeb3..9246b91aa66 100644 --- a/src/Microsoft.Graph/Generated/Models/InstitutionData.cs +++ b/src/Microsoft.Graph/Generated/Models/InstitutionData.cs @@ -116,7 +116,7 @@ public InstitutionData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InstitutionData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InstitutionData(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteObjectValue("location", Location); diff --git a/src/Microsoft.Graph/Generated/Models/IntegerRange.cs b/src/Microsoft.Graph/Generated/Models/IntegerRange.cs index 04068c2a5b1..ea3a81b373b 100644 --- a/src/Microsoft.Graph/Generated/Models/IntegerRange.cs +++ b/src/Microsoft.Graph/Generated/Models/IntegerRange.cs @@ -76,7 +76,7 @@ public IntegerRange() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IntegerRange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IntegerRange(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("end", End); writer.WriteLongValue("maximum", Maximum); writer.WriteLongValue("minimum", Minimum); diff --git a/src/Microsoft.Graph/Generated/Models/IntegratedApplicationMetadata.cs b/src/Microsoft.Graph/Generated/Models/IntegratedApplicationMetadata.cs index 42d940eb888..5b0c28869bf 100644 --- a/src/Microsoft.Graph/Generated/Models/IntegratedApplicationMetadata.cs +++ b/src/Microsoft.Graph/Generated/Models/IntegratedApplicationMetadata.cs @@ -84,7 +84,7 @@ public IntegratedApplicationMetadata() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IntegratedApplicationMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -111,7 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("version", Version); diff --git a/src/Microsoft.Graph/Generated/Models/InternalDomainFederation.cs b/src/Microsoft.Graph/Generated/Models/InternalDomainFederation.cs index 7a03cd3789a..ba7cfa12456 100644 --- a/src/Microsoft.Graph/Generated/Models/InternalDomainFederation.cs +++ b/src/Microsoft.Graph/Generated/Models/InternalDomainFederation.cs @@ -172,7 +172,7 @@ public InternalDomainFederation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InternalDomainFederation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InternalDomainFederation(); } /// @@ -202,7 +202,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("activeSignInUri", ActiveSignInUri); writer.WriteStringValue("defaultInteractiveAuthenticationMethod", DefaultInteractiveAuthenticationMethod); diff --git a/src/Microsoft.Graph/Generated/Models/InternalDomainFederationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/InternalDomainFederationCollectionResponse.cs index 4e9529d71ba..2c36cfa6cee 100644 --- a/src/Microsoft.Graph/Generated/Models/InternalDomainFederationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/InternalDomainFederationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class InternalDomainFederationCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InternalDomainFederationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InternalDomainFederationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/InternalSponsors.cs b/src/Microsoft.Graph/Generated/Models/InternalSponsors.cs index 7a2e17f77de..2dc06c5d9a1 100644 --- a/src/Microsoft.Graph/Generated/Models/InternalSponsors.cs +++ b/src/Microsoft.Graph/Generated/Models/InternalSponsors.cs @@ -26,7 +26,7 @@ public InternalSponsors() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InternalSponsors CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InternalSponsors(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/InternetExplorerMode.cs b/src/Microsoft.Graph/Generated/Models/InternetExplorerMode.cs index a0da989e6f5..92b5a30a20f 100644 --- a/src/Microsoft.Graph/Generated/Models/InternetExplorerMode.cs +++ b/src/Microsoft.Graph/Generated/Models/InternetExplorerMode.cs @@ -35,7 +35,7 @@ public partial class InternetExplorerMode : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InternetExplorerMode CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InternetExplorerMode(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("siteLists", SiteLists); } diff --git a/src/Microsoft.Graph/Generated/Models/InternetMessageHeader.cs b/src/Microsoft.Graph/Generated/Models/InternetMessageHeader.cs index 65382026622..8f6382a1c56 100644 --- a/src/Microsoft.Graph/Generated/Models/InternetMessageHeader.cs +++ b/src/Microsoft.Graph/Generated/Models/InternetMessageHeader.cs @@ -84,7 +84,7 @@ public InternetMessageHeader() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InternetMessageHeader CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InternetMessageHeader(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/IntuneBrand.cs b/src/Microsoft.Graph/Generated/Models/IntuneBrand.cs index c42c4e56c2c..804842d233e 100644 --- a/src/Microsoft.Graph/Generated/Models/IntuneBrand.cs +++ b/src/Microsoft.Graph/Generated/Models/IntuneBrand.cs @@ -397,7 +397,7 @@ public IntuneBrand() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IntuneBrand CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IntuneBrand(); } /// @@ -446,7 +446,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("companyPortalBlockedActions", CompanyPortalBlockedActions); writer.WriteStringValue("contactITEmailAddress", ContactITEmailAddress); writer.WriteStringValue("contactITName", ContactITName); diff --git a/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfile.cs b/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfile.cs index b9726cbe847..6a37e594e95 100644 --- a/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfile.cs @@ -424,7 +424,7 @@ public bool? ShowOfficeWebApps /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IntuneBrandingProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IntuneBrandingProfile(); } /// @@ -477,7 +477,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteCollectionOfObjectValues("companyPortalBlockedActions", CompanyPortalBlockedActions); diff --git a/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfileAssignment.cs b/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfileAssignment.cs index 38f8f4e1ba6..ea038ea4aa1 100644 --- a/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfileAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfileAssignment.cs @@ -36,7 +36,7 @@ public partial class IntuneBrandingProfileAssignment : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IntuneBrandingProfileAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IntuneBrandingProfileAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfileAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfileAssignmentCollectionResponse.cs index 13e1a6f04f0..12c6386024f 100644 --- a/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfileAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfileAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IntuneBrandingProfileAssignmentCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IntuneBrandingProfileAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IntuneBrandingProfileAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfileCollectionResponse.cs index bf57214060d..e53b6593efd 100644 --- a/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IntuneBrandingProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IntuneBrandingProfileCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IntuneBrandingProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IntuneBrandingProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/InvalidLicenseAlertConfiguration.cs b/src/Microsoft.Graph/Generated/Models/InvalidLicenseAlertConfiguration.cs index 5237a6e5235..56e248b4903 100644 --- a/src/Microsoft.Graph/Generated/Models/InvalidLicenseAlertConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/InvalidLicenseAlertConfiguration.cs @@ -26,7 +26,7 @@ public InvalidLicenseAlertConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InvalidLicenseAlertConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InvalidLicenseAlertConfiguration(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/InvalidLicenseAlertIncident.cs b/src/Microsoft.Graph/Generated/Models/InvalidLicenseAlertIncident.cs index 2d401855868..e87c7e2eece 100644 --- a/src/Microsoft.Graph/Generated/Models/InvalidLicenseAlertIncident.cs +++ b/src/Microsoft.Graph/Generated/Models/InvalidLicenseAlertIncident.cs @@ -42,7 +42,7 @@ public InvalidLicenseAlertIncident() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InvalidLicenseAlertIncident CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InvalidLicenseAlertIncident(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("tenantLicenseStatus", TenantLicenseStatus); } diff --git a/src/Microsoft.Graph/Generated/Models/InvestigationSecurityState.cs b/src/Microsoft.Graph/Generated/Models/InvestigationSecurityState.cs index b55cab1f556..51d757f4941 100644 --- a/src/Microsoft.Graph/Generated/Models/InvestigationSecurityState.cs +++ b/src/Microsoft.Graph/Generated/Models/InvestigationSecurityState.cs @@ -84,7 +84,7 @@ public InvestigationSecurityState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InvestigationSecurityState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InvestigationSecurityState(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/Invitation.cs b/src/Microsoft.Graph/Generated/Models/Invitation.cs index 6ed37f6d64d..1a67cbe628d 100644 --- a/src/Microsoft.Graph/Generated/Models/Invitation.cs +++ b/src/Microsoft.Graph/Generated/Models/Invitation.cs @@ -175,7 +175,7 @@ public string Status /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Invitation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Invitation(); } /// @@ -205,7 +205,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("invitedUser", InvitedUser); writer.WriteStringValue("invitedUserDisplayName", InvitedUserDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/InvitationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/InvitationCollectionResponse.cs index 88492c96104..e2ed7bdd479 100644 --- a/src/Microsoft.Graph/Generated/Models/InvitationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/InvitationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class InvitationCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InvitationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InvitationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/InvitationParticipantInfo.cs b/src/Microsoft.Graph/Generated/Models/InvitationParticipantInfo.cs index 3d0b89f5821..01c109b4388 100644 --- a/src/Microsoft.Graph/Generated/Models/InvitationParticipantInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/InvitationParticipantInfo.cs @@ -118,7 +118,7 @@ public InvitationParticipantInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InvitationParticipantInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InvitationParticipantInfo(); } /// @@ -144,7 +144,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("endpointType", EndpointType); writer.WriteBoolValue("hidden", Hidden); writer.WriteObjectValue("identity", Identity); diff --git a/src/Microsoft.Graph/Generated/Models/InvitationRedemptionIdentityProviderConfiguration.cs b/src/Microsoft.Graph/Generated/Models/InvitationRedemptionIdentityProviderConfiguration.cs index 7cf573f3d94..5eb8cf79a63 100644 --- a/src/Microsoft.Graph/Generated/Models/InvitationRedemptionIdentityProviderConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/InvitationRedemptionIdentityProviderConfiguration.cs @@ -74,7 +74,7 @@ public InvitationRedemptionIdentityProviderConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InvitationRedemptionIdentityProviderConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -101,7 +101,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("fallbackIdentityProvider", FallbackIdentityProvider); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfEnumValues("primaryIdentityProviderPrecedenceOrder", PrimaryIdentityProviderPrecedenceOrder); diff --git a/src/Microsoft.Graph/Generated/Models/InviteParticipantsOperation.cs b/src/Microsoft.Graph/Generated/Models/InviteParticipantsOperation.cs index 1a72a3067ca..a0d27069a57 100644 --- a/src/Microsoft.Graph/Generated/Models/InviteParticipantsOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/InviteParticipantsOperation.cs @@ -35,7 +35,7 @@ public partial class InviteParticipantsOperation : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InviteParticipantsOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InviteParticipantsOperation(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("participants", Participants); } diff --git a/src/Microsoft.Graph/Generated/Models/InvitedUserMessageInfo.cs b/src/Microsoft.Graph/Generated/Models/InvitedUserMessageInfo.cs index 255551fa235..5ea02137e7c 100644 --- a/src/Microsoft.Graph/Generated/Models/InvitedUserMessageInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/InvitedUserMessageInfo.cs @@ -100,7 +100,7 @@ public InvitedUserMessageInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.InvitedUserMessageInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InvitedUserMessageInfo(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("ccRecipients", CcRecipients); writer.WriteStringValue("customizedMessageBody", CustomizedMessageBody); writer.WriteStringValue("messageLanguage", MessageLanguage); diff --git a/src/Microsoft.Graph/Generated/Models/InvokeUserFlowListener.cs b/src/Microsoft.Graph/Generated/Models/InvokeUserFlowListener.cs index d74a10aed96..662b9afda3c 100644 --- a/src/Microsoft.Graph/Generated/Models/InvokeUserFlowListener.cs +++ b/src/Microsoft.Graph/Generated/Models/InvokeUserFlowListener.cs @@ -42,7 +42,7 @@ public InvokeUserFlowListener() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.InvokeUserFlowListener CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.InvokeUserFlowListener(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("userFlow", UserFlow); } diff --git a/src/Microsoft.Graph/Generated/Models/IosAvailableUpdateVersion.cs b/src/Microsoft.Graph/Generated/Models/IosAvailableUpdateVersion.cs index 0e3e8716135..f076cb7a5bd 100644 --- a/src/Microsoft.Graph/Generated/Models/IosAvailableUpdateVersion.cs +++ b/src/Microsoft.Graph/Generated/Models/IosAvailableUpdateVersion.cs @@ -97,7 +97,7 @@ public IosAvailableUpdateVersion() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IosAvailableUpdateVersion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosAvailableUpdateVersion(); } /// @@ -121,7 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("postingDateTime", PostingDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/IosAzureAdSingleSignOnExtension.cs b/src/Microsoft.Graph/Generated/Models/IosAzureAdSingleSignOnExtension.cs index 1784e7cae1e..ff3896bf11e 100644 --- a/src/Microsoft.Graph/Generated/Models/IosAzureAdSingleSignOnExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/IosAzureAdSingleSignOnExtension.cs @@ -65,7 +65,7 @@ public IosAzureAdSingleSignOnExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosAzureAdSingleSignOnExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosAzureAdSingleSignOnExtension(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("bundleIdAccessControlList", BundleIdAccessControlList); writer.WriteCollectionOfObjectValues("configurations", Configurations); diff --git a/src/Microsoft.Graph/Generated/Models/IosBookmark.cs b/src/Microsoft.Graph/Generated/Models/IosBookmark.cs index 85d90630207..567508a836b 100644 --- a/src/Microsoft.Graph/Generated/Models/IosBookmark.cs +++ b/src/Microsoft.Graph/Generated/Models/IosBookmark.cs @@ -101,7 +101,7 @@ public IosBookmark() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IosBookmark CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosBookmark(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("bookmarkFolder", BookmarkFolder); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IosCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/IosCertificateProfile.cs index e3f245fd109..75f65d102d8 100644 --- a/src/Microsoft.Graph/Generated/Models/IosCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/IosCertificateProfile.cs @@ -27,7 +27,7 @@ public IosCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -54,7 +54,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IosCertificateProfileBase.cs b/src/Microsoft.Graph/Generated/Models/IosCertificateProfileBase.cs index 9f79b446965..852dd0ba64a 100644 --- a/src/Microsoft.Graph/Generated/Models/IosCertificateProfileBase.cs +++ b/src/Microsoft.Graph/Generated/Models/IosCertificateProfileBase.cs @@ -57,7 +57,7 @@ public IosCertificateProfileBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosCertificateProfileBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateValidityPeriodScale", CertificateValidityPeriodScale); writer.WriteIntValue("certificateValidityPeriodValue", CertificateValidityPeriodValue); diff --git a/src/Microsoft.Graph/Generated/Models/IosCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/IosCompliancePolicy.cs index 5a246020ec8..828cf3cee34 100644 --- a/src/Microsoft.Graph/Generated/Models/IosCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/IosCompliancePolicy.cs @@ -191,7 +191,7 @@ public IosCompliancePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosCompliancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosCompliancePolicy(); } /// @@ -229,7 +229,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("advancedThreatProtectionRequiredSecurityLevel", AdvancedThreatProtectionRequiredSecurityLevel); writer.WriteBoolValue("deviceThreatProtectionEnabled", DeviceThreatProtectionEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/IosCredentialSingleSignOnExtension.cs b/src/Microsoft.Graph/Generated/Models/IosCredentialSingleSignOnExtension.cs index 8e52df71966..9fdb707a470 100644 --- a/src/Microsoft.Graph/Generated/Models/IosCredentialSingleSignOnExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/IosCredentialSingleSignOnExtension.cs @@ -107,7 +107,7 @@ public IosCredentialSingleSignOnExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosCredentialSingleSignOnExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosCredentialSingleSignOnExtension(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("configurations", Configurations); writer.WriteCollectionOfPrimitiveValues("domains", Domains); diff --git a/src/Microsoft.Graph/Generated/Models/IosCustomConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosCustomConfiguration.cs index b938eca4e13..ddde1724b9a 100644 --- a/src/Microsoft.Graph/Generated/Models/IosCustomConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosCustomConfiguration.cs @@ -75,7 +75,7 @@ public IosCustomConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosCustomConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosCustomConfiguration(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("payload", Payload); writer.WriteStringValue("payloadFileName", PayloadFileName); diff --git a/src/Microsoft.Graph/Generated/Models/IosDdmLobAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/IosDdmLobAppAssignmentSettings.cs index 56dd3156c03..849f8a9268d 100644 --- a/src/Microsoft.Graph/Generated/Models/IosDdmLobAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/IosDdmLobAppAssignmentSettings.cs @@ -77,7 +77,7 @@ public IosDdmLobAppAssignmentSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosDdmLobAppAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosDdmLobAppAssignmentSettings(); } /// @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("associatedDomains", AssociatedDomains); writer.WriteBoolValue("associatedDomainsDirectDownloadAllowed", AssociatedDomainsDirectDownloadAllowed); diff --git a/src/Microsoft.Graph/Generated/Models/IosDerivedCredentialAuthenticationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosDerivedCredentialAuthenticationConfiguration.cs index 95938d333ea..a5e9fe47f9a 100644 --- a/src/Microsoft.Graph/Generated/Models/IosDerivedCredentialAuthenticationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosDerivedCredentialAuthenticationConfiguration.cs @@ -43,7 +43,7 @@ public IosDerivedCredentialAuthenticationConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosDerivedCredentialAuthenticationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosDerivedCredentialAuthenticationConfiguration(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("derivedCredentialSettings", DerivedCredentialSettings); } diff --git a/src/Microsoft.Graph/Generated/Models/IosDeviceFeaturesConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosDeviceFeaturesConfiguration.cs index 66dd0c22efe..97000b8032a 100644 --- a/src/Microsoft.Graph/Generated/Models/IosDeviceFeaturesConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosDeviceFeaturesConfiguration.cs @@ -237,7 +237,7 @@ public IosDeviceFeaturesConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosDeviceFeaturesConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosDeviceFeaturesConfiguration(); } /// @@ -271,7 +271,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assetTagTemplate", AssetTagTemplate); writer.WriteObjectValue("contentFilterSettings", ContentFilterSettings); diff --git a/src/Microsoft.Graph/Generated/Models/IosDeviceType.cs b/src/Microsoft.Graph/Generated/Models/IosDeviceType.cs index b8bc538a04e..a9c1150a260 100644 --- a/src/Microsoft.Graph/Generated/Models/IosDeviceType.cs +++ b/src/Microsoft.Graph/Generated/Models/IosDeviceType.cs @@ -65,7 +65,7 @@ public IosDeviceType() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IosDeviceType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosDeviceType(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("iPad", IPad); writer.WriteBoolValue("iPhoneAndIPod", IPhoneAndIPod); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IosEasEmailProfileConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosEasEmailProfileConfiguration.cs index ad49a183e50..782363c2a5a 100644 --- a/src/Microsoft.Graph/Generated/Models/IosEasEmailProfileConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosEasEmailProfileConfiguration.cs @@ -259,7 +259,7 @@ public IosEasEmailProfileConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosEasEmailProfileConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosEasEmailProfileConfiguration(); } /// @@ -305,7 +305,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("accountName", AccountName); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); diff --git a/src/Microsoft.Graph/Generated/Models/IosEduCertificateSettings.cs b/src/Microsoft.Graph/Generated/Models/IosEduCertificateSettings.cs index 958570979ae..333139c9408 100644 --- a/src/Microsoft.Graph/Generated/Models/IosEduCertificateSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/IosEduCertificateSettings.cs @@ -151,7 +151,7 @@ public IosEduCertificateSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IosEduCertificateSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosEduCertificateSettings(); } /// @@ -179,7 +179,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("certFileName", CertFileName); writer.WriteStringValue("certificateTemplateName", CertificateTemplateName); writer.WriteEnumValue("certificateValidityPeriodScale", CertificateValidityPeriodScale); diff --git a/src/Microsoft.Graph/Generated/Models/IosEduDeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosEduDeviceConfiguration.cs index 32602c736e1..3f30226fe71 100644 --- a/src/Microsoft.Graph/Generated/Models/IosEduDeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosEduDeviceConfiguration.cs @@ -75,7 +75,7 @@ public IosEduDeviceConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosEduDeviceConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosEduDeviceConfiguration(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("deviceCertificateSettings", DeviceCertificateSettings); writer.WriteObjectValue("studentCertificateSettings", StudentCertificateSettings); diff --git a/src/Microsoft.Graph/Generated/Models/IosEducationDeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosEducationDeviceConfiguration.cs index 097e370c205..e6efe5e1db2 100644 --- a/src/Microsoft.Graph/Generated/Models/IosEducationDeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosEducationDeviceConfiguration.cs @@ -27,7 +27,7 @@ public IosEducationDeviceConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosEducationDeviceConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosEducationDeviceConfiguration(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IosEnterpriseWiFiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosEnterpriseWiFiConfiguration.cs index 19c6af0a920..5cdb7479ce0 100644 --- a/src/Microsoft.Graph/Generated/Models/IosEnterpriseWiFiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosEnterpriseWiFiConfiguration.cs @@ -163,7 +163,7 @@ public IosEnterpriseWiFiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosEnterpriseWiFiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosEnterpriseWiFiConfiguration(); } /// @@ -193,7 +193,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteObjectValue("derivedCredentialSettings", DerivedCredentialSettings); diff --git a/src/Microsoft.Graph/Generated/Models/IosExpeditedCheckinConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosExpeditedCheckinConfiguration.cs index 229b1c16ff6..3fe834cb584 100644 --- a/src/Microsoft.Graph/Generated/Models/IosExpeditedCheckinConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosExpeditedCheckinConfiguration.cs @@ -27,7 +27,7 @@ public IosExpeditedCheckinConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosExpeditedCheckinConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosExpeditedCheckinConfiguration(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IosGeneralDeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosGeneralDeviceConfiguration.cs index 6dbb6f676b0..f7bada7145a 100644 --- a/src/Microsoft.Graph/Generated/Models/IosGeneralDeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosGeneralDeviceConfiguration.cs @@ -1339,7 +1339,7 @@ public IosGeneralDeviceConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosGeneralDeviceConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosGeneralDeviceConfiguration(); } /// @@ -1545,7 +1545,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("accountBlockModification", AccountBlockModification); writer.WriteBoolValue("activationLockAllowWhenSupervised", ActivationLockAllowWhenSupervised); diff --git a/src/Microsoft.Graph/Generated/Models/IosHomeScreenApp.cs b/src/Microsoft.Graph/Generated/Models/IosHomeScreenApp.cs index cc3f71b3ea3..7ce12695a46 100644 --- a/src/Microsoft.Graph/Generated/Models/IosHomeScreenApp.cs +++ b/src/Microsoft.Graph/Generated/Models/IosHomeScreenApp.cs @@ -49,7 +49,7 @@ public IosHomeScreenApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosHomeScreenApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosHomeScreenApp(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("bundleID", BundleID); writer.WriteBoolValue("isWebClip", IsWebClip); diff --git a/src/Microsoft.Graph/Generated/Models/IosHomeScreenFolder.cs b/src/Microsoft.Graph/Generated/Models/IosHomeScreenFolder.cs index dbe60ebf45f..833622726dd 100644 --- a/src/Microsoft.Graph/Generated/Models/IosHomeScreenFolder.cs +++ b/src/Microsoft.Graph/Generated/Models/IosHomeScreenFolder.cs @@ -43,7 +43,7 @@ public IosHomeScreenFolder() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosHomeScreenFolder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosHomeScreenFolder(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("pages", Pages); } diff --git a/src/Microsoft.Graph/Generated/Models/IosHomeScreenFolderPage.cs b/src/Microsoft.Graph/Generated/Models/IosHomeScreenFolderPage.cs index df466708a60..131cf1260c6 100644 --- a/src/Microsoft.Graph/Generated/Models/IosHomeScreenFolderPage.cs +++ b/src/Microsoft.Graph/Generated/Models/IosHomeScreenFolderPage.cs @@ -85,7 +85,7 @@ public IosHomeScreenFolderPage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IosHomeScreenFolderPage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosHomeScreenFolderPage(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("apps", Apps); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IosHomeScreenItem.cs b/src/Microsoft.Graph/Generated/Models/IosHomeScreenItem.cs index 75673eeba0c..ec4dc71376b 100644 --- a/src/Microsoft.Graph/Generated/Models/IosHomeScreenItem.cs +++ b/src/Microsoft.Graph/Generated/Models/IosHomeScreenItem.cs @@ -69,7 +69,7 @@ public IosHomeScreenItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IosHomeScreenItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/IosHomeScreenPage.cs b/src/Microsoft.Graph/Generated/Models/IosHomeScreenPage.cs index 5aef5421377..f58ce51a607 100644 --- a/src/Microsoft.Graph/Generated/Models/IosHomeScreenPage.cs +++ b/src/Microsoft.Graph/Generated/Models/IosHomeScreenPage.cs @@ -85,7 +85,7 @@ public IosHomeScreenPage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IosHomeScreenPage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosHomeScreenPage(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfObjectValues("icons", Icons); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IosImportedPFXCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/IosImportedPFXCertificateProfile.cs index 561076d397a..6a9e6fe3e24 100644 --- a/src/Microsoft.Graph/Generated/Models/IosImportedPFXCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/IosImportedPFXCertificateProfile.cs @@ -49,7 +49,7 @@ public IosImportedPFXCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosImportedPFXCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosImportedPFXCertificateProfile(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("intendedPurpose", IntendedPurpose); writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", ManagedDeviceCertificateStates); diff --git a/src/Microsoft.Graph/Generated/Models/IosKerberosSingleSignOnExtension.cs b/src/Microsoft.Graph/Generated/Models/IosKerberosSingleSignOnExtension.cs index b1944a4b00a..9ccb3203f71 100644 --- a/src/Microsoft.Graph/Generated/Models/IosKerberosSingleSignOnExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/IosKerberosSingleSignOnExtension.cs @@ -265,7 +265,7 @@ public IosKerberosSingleSignOnExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosKerberosSingleSignOnExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosKerberosSingleSignOnExtension(); } /// @@ -307,7 +307,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("activeDirectorySiteCode", ActiveDirectorySiteCode); writer.WriteBoolValue("blockActiveDirectorySiteAutoDiscovery", BlockActiveDirectorySiteAutoDiscovery); diff --git a/src/Microsoft.Graph/Generated/Models/IosLobApp.cs b/src/Microsoft.Graph/Generated/Models/IosLobApp.cs index 09fa843e147..251b6c2614c 100644 --- a/src/Microsoft.Graph/Generated/Models/IosLobApp.cs +++ b/src/Microsoft.Graph/Generated/Models/IosLobApp.cs @@ -113,7 +113,7 @@ public IosLobApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosLobApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosLobApp(); } /// @@ -138,7 +138,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("applicableDeviceType", ApplicableDeviceType); writer.WriteStringValue("buildNumber", BuildNumber); diff --git a/src/Microsoft.Graph/Generated/Models/IosLobAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/IosLobAppAssignmentSettings.cs index 366bd296b97..d9e86038781 100644 --- a/src/Microsoft.Graph/Generated/Models/IosLobAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/IosLobAppAssignmentSettings.cs @@ -61,7 +61,7 @@ public IosLobAppAssignmentSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosLobAppAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosLobAppAssignmentSettings(); } /// @@ -84,7 +84,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isRemovable", IsRemovable); writer.WriteBoolValue("preventManagedAppBackup", PreventManagedAppBackup); diff --git a/src/Microsoft.Graph/Generated/Models/IosLobAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IosLobAppCollectionResponse.cs index c00528b60f5..312eedcfe5a 100644 --- a/src/Microsoft.Graph/Generated/Models/IosLobAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IosLobAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IosLobAppCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosLobAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosLobAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfiguration.cs index e9016e01e01..6b745a592e8 100644 --- a/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfiguration.cs @@ -13,7 +13,7 @@ namespace Microsoft.Graph.Beta.Models [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class IosLobAppProvisioningConfiguration : global::Microsoft.Graph.Beta.Models.Entity, IParsable { - /// The associated group assignments for IosLobAppProvisioningConfiguration, this determines which devices/users the IOS LOB app provisioning conifguration will be targeted to. + /// The associated group assignments for IosLobAppProvisioningConfiguration. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? Assignments @@ -83,7 +83,7 @@ public string DisplayName set { BackingStore?.Set("displayName", value); } } #endif - /// Optional profile expiration date and time. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 would look like this: '2014-01-01T00:00:00Z'. Returned by default. + /// Optional profile expiration date and time. public DateTimeOffset? ExpirationDateTime { get { return BackingStore?.Get("expirationDateTime"); } @@ -188,7 +188,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfiguration(); } /// @@ -220,7 +220,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationAssignment.cs b/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationAssignment.cs index e4f84ef1bc9..49e9c4cc12d 100644 --- a/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationAssignment.cs @@ -36,7 +36,7 @@ public partial class IosLobAppProvisioningConfigurationAssignment : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfigurationAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfigurationAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationAssignmentCollectionResponse.cs index 14471c8b59c..16e66d580af 100644 --- a/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IosLobAppProvisioningConfigurationAssignmentCollectionRespo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfigurationAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfigurationAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationCollectionResponse.cs index d5b95fb6610..7bad5ae7057 100644 --- a/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IosLobAppProvisioningConfigurationCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationPolicySetItem.cs b/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationPolicySetItem.cs index 550798a0277..5d274409e43 100644 --- a/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationPolicySetItem.cs +++ b/src/Microsoft.Graph/Generated/Models/IosLobAppProvisioningConfigurationPolicySetItem.cs @@ -27,7 +27,7 @@ public IosLobAppProvisioningConfigurationPolicySetItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfigurationPolicySetItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosLobAppProvisioningConfigurationPolicySetItem(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IosManagedAppProtection.cs b/src/Microsoft.Graph/Generated/Models/IosManagedAppProtection.cs index e9699db5bff..b2ae62df9de 100644 --- a/src/Microsoft.Graph/Generated/Models/IosManagedAppProtection.cs +++ b/src/Microsoft.Graph/Generated/Models/IosManagedAppProtection.cs @@ -69,7 +69,7 @@ public bool? AllowWidgetContentSync set { BackingStore?.Set("apps", value); } } #endif - /// A custom browser protocol to open weblink on iOS. When this property is configured, ManagedBrowserToOpenLinksRequired should be true. + /// A custom browser protocol to open weblink on iOS. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? CustomBrowserProtocol @@ -297,7 +297,7 @@ public IosManagedAppProtection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosManagedAppProtection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosManagedAppProtection(); } /// @@ -341,7 +341,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("allowedIosDeviceModels", AllowedIosDeviceModels); writer.WriteBoolValue("allowWidgetContentSync", AllowWidgetContentSync); diff --git a/src/Microsoft.Graph/Generated/Models/IosManagedAppProtectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IosManagedAppProtectionCollectionResponse.cs index 80c36114219..2348e92d667 100644 --- a/src/Microsoft.Graph/Generated/Models/IosManagedAppProtectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IosManagedAppProtectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IosManagedAppProtectionCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosManagedAppProtectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosManagedAppProtectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IosManagedAppRegistration.cs b/src/Microsoft.Graph/Generated/Models/IosManagedAppRegistration.cs index 42174053f79..b1afb3bd45e 100644 --- a/src/Microsoft.Graph/Generated/Models/IosManagedAppRegistration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosManagedAppRegistration.cs @@ -27,7 +27,7 @@ public IosManagedAppRegistration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosManagedAppRegistration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosManagedAppRegistration(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IosMinimumOperatingSystem.cs b/src/Microsoft.Graph/Generated/Models/IosMinimumOperatingSystem.cs index f3685b10a78..7b3c0f367d8 100644 --- a/src/Microsoft.Graph/Generated/Models/IosMinimumOperatingSystem.cs +++ b/src/Microsoft.Graph/Generated/Models/IosMinimumOperatingSystem.cs @@ -119,7 +119,7 @@ public IosMinimumOperatingSystem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IosMinimumOperatingSystem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosMinimumOperatingSystem(); } /// @@ -150,7 +150,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("v10_0", V100); writer.WriteBoolValue("v11_0", V110); diff --git a/src/Microsoft.Graph/Generated/Models/IosMobileAppConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosMobileAppConfiguration.cs index c9876f81fe3..48739b37649 100644 --- a/src/Microsoft.Graph/Generated/Models/IosMobileAppConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosMobileAppConfiguration.cs @@ -59,7 +59,7 @@ public IosMobileAppConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosMobileAppConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosMobileAppConfiguration(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("encodedSettingXml", EncodedSettingXml); writer.WriteCollectionOfObjectValues("settings", Settings); diff --git a/src/Microsoft.Graph/Generated/Models/IosMobileAppIdentifier.cs b/src/Microsoft.Graph/Generated/Models/IosMobileAppIdentifier.cs index a9bf15cfba4..0d9c9294046 100644 --- a/src/Microsoft.Graph/Generated/Models/IosMobileAppIdentifier.cs +++ b/src/Microsoft.Graph/Generated/Models/IosMobileAppIdentifier.cs @@ -43,7 +43,7 @@ public IosMobileAppIdentifier() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosMobileAppIdentifier CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosMobileAppIdentifier(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("bundleId", BundleId); } diff --git a/src/Microsoft.Graph/Generated/Models/IosNetworkUsageRule.cs b/src/Microsoft.Graph/Generated/Models/IosNetworkUsageRule.cs index 362a4f5e350..c0aab47c8bf 100644 --- a/src/Microsoft.Graph/Generated/Models/IosNetworkUsageRule.cs +++ b/src/Microsoft.Graph/Generated/Models/IosNetworkUsageRule.cs @@ -81,7 +81,7 @@ public IosNetworkUsageRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IosNetworkUsageRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosNetworkUsageRule(); } /// @@ -104,7 +104,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("cellularDataBlocked", CellularDataBlocked); writer.WriteBoolValue("cellularDataBlockWhenRoaming", CellularDataBlockWhenRoaming); writer.WriteCollectionOfObjectValues("managedApps", ManagedApps); diff --git a/src/Microsoft.Graph/Generated/Models/IosNotificationSettings.cs b/src/Microsoft.Graph/Generated/Models/IosNotificationSettings.cs index 44b6ec4e3ff..9f6be7c9499 100644 --- a/src/Microsoft.Graph/Generated/Models/IosNotificationSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/IosNotificationSettings.cs @@ -143,7 +143,7 @@ public IosNotificationSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IosNotificationSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosNotificationSettings(); } /// @@ -173,7 +173,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("alertType", AlertType); writer.WriteStringValue("appName", AppName); writer.WriteBoolValue("badgesEnabled", BadgesEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/IosPkcsCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/IosPkcsCertificateProfile.cs index bca1d676710..1848c335336 100644 --- a/src/Microsoft.Graph/Generated/Models/IosPkcsCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/IosPkcsCertificateProfile.cs @@ -145,7 +145,7 @@ public IosPkcsCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosPkcsCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosPkcsCertificateProfile(); } /// @@ -172,7 +172,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateStore", CertificateStore); writer.WriteStringValue("certificateTemplateName", CertificateTemplateName); diff --git a/src/Microsoft.Graph/Generated/Models/IosRedirectSingleSignOnExtension.cs b/src/Microsoft.Graph/Generated/Models/IosRedirectSingleSignOnExtension.cs index de9b4226543..b97ee68007f 100644 --- a/src/Microsoft.Graph/Generated/Models/IosRedirectSingleSignOnExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/IosRedirectSingleSignOnExtension.cs @@ -91,7 +91,7 @@ public IosRedirectSingleSignOnExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosRedirectSingleSignOnExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosRedirectSingleSignOnExtension(); } /// @@ -114,7 +114,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("configurations", Configurations); writer.WriteStringValue("extensionIdentifier", ExtensionIdentifier); diff --git a/src/Microsoft.Graph/Generated/Models/IosScepCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/IosScepCertificateProfile.cs index 0587cfd2849..7bf4681009e 100644 --- a/src/Microsoft.Graph/Generated/Models/IosScepCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/IosScepCertificateProfile.cs @@ -157,7 +157,7 @@ public IosScepCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosScepCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosScepCertificateProfile(); } /// @@ -186,7 +186,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateStore", CertificateStore); writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", CustomSubjectAlternativeNames); diff --git a/src/Microsoft.Graph/Generated/Models/IosSingleSignOnExtension.cs b/src/Microsoft.Graph/Generated/Models/IosSingleSignOnExtension.cs index 938446c211e..33645a51dd4 100644 --- a/src/Microsoft.Graph/Generated/Models/IosSingleSignOnExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/IosSingleSignOnExtension.cs @@ -27,7 +27,7 @@ public IosSingleSignOnExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosSingleSignOnExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -54,7 +54,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IosSingleSignOnSettings.cs b/src/Microsoft.Graph/Generated/Models/IosSingleSignOnSettings.cs index fb9044932ec..98809a9b0c5 100644 --- a/src/Microsoft.Graph/Generated/Models/IosSingleSignOnSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/IosSingleSignOnSettings.cs @@ -133,7 +133,7 @@ public IosSingleSignOnSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IosSingleSignOnSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosSingleSignOnSettings(); } /// @@ -158,7 +158,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("allowedAppsList", AllowedAppsList); writer.WriteCollectionOfPrimitiveValues("allowedUrls", AllowedUrls); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/IosStoreApp.cs b/src/Microsoft.Graph/Generated/Models/IosStoreApp.cs index da4373f2542..9b2c67b13c9 100644 --- a/src/Microsoft.Graph/Generated/Models/IosStoreApp.cs +++ b/src/Microsoft.Graph/Generated/Models/IosStoreApp.cs @@ -91,7 +91,7 @@ public IosStoreApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosStoreApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosStoreApp(); } /// @@ -114,7 +114,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("applicableDeviceType", ApplicableDeviceType); writer.WriteStringValue("appStoreUrl", AppStoreUrl); diff --git a/src/Microsoft.Graph/Generated/Models/IosStoreAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/IosStoreAppAssignmentSettings.cs index 8d605f1da36..3022e7d19a2 100644 --- a/src/Microsoft.Graph/Generated/Models/IosStoreAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/IosStoreAppAssignmentSettings.cs @@ -61,7 +61,7 @@ public IosStoreAppAssignmentSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosStoreAppAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosStoreAppAssignmentSettings(); } /// @@ -84,7 +84,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isRemovable", IsRemovable); writer.WriteBoolValue("preventManagedAppBackup", PreventManagedAppBackup); diff --git a/src/Microsoft.Graph/Generated/Models/IosStoreAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IosStoreAppCollectionResponse.cs index de6ff650c2c..c83836b7125 100644 --- a/src/Microsoft.Graph/Generated/Models/IosStoreAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IosStoreAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IosStoreAppCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosStoreAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosStoreAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IosTrustedRootCertificate.cs b/src/Microsoft.Graph/Generated/Models/IosTrustedRootCertificate.cs index c11e0c89fa8..0e42517ed51 100644 --- a/src/Microsoft.Graph/Generated/Models/IosTrustedRootCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/IosTrustedRootCertificate.cs @@ -59,7 +59,7 @@ public IosTrustedRootCertificate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosTrustedRootCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosTrustedRootCertificate(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certFileName", CertFileName); writer.WriteByteArrayValue("trustedRootCertificate", TrustedRootCertificate); diff --git a/src/Microsoft.Graph/Generated/Models/IosUpdateConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosUpdateConfiguration.cs index 6c3451197f8..4fbe43f455a 100644 --- a/src/Microsoft.Graph/Generated/Models/IosUpdateConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosUpdateConfiguration.cs @@ -112,7 +112,7 @@ public IosUpdateConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosUpdateConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosUpdateConfiguration(); } /// @@ -140,7 +140,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeValue("activeHoursEnd", ActiveHoursEnd); writer.WriteTimeValue("activeHoursStart", ActiveHoursStart); diff --git a/src/Microsoft.Graph/Generated/Models/IosUpdateDeviceStatus.cs b/src/Microsoft.Graph/Generated/Models/IosUpdateDeviceStatus.cs index 85bc053c1db..16ae09ddc01 100644 --- a/src/Microsoft.Graph/Generated/Models/IosUpdateDeviceStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/IosUpdateDeviceStatus.cs @@ -161,7 +161,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosUpdateDeviceStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosUpdateDeviceStatus(); } /// @@ -192,7 +192,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("complianceGracePeriodExpirationDateTime", ComplianceGracePeriodExpirationDateTime); writer.WriteStringValue("deviceDisplayName", DeviceDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/IosUpdateDeviceStatusCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IosUpdateDeviceStatusCollectionResponse.cs index 4c9834f242e..8d7f2c56070 100644 --- a/src/Microsoft.Graph/Generated/Models/IosUpdateDeviceStatusCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IosUpdateDeviceStatusCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IosUpdateDeviceStatusCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosUpdateDeviceStatusCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosUpdateDeviceStatusCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IosVpnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosVpnConfiguration.cs index 26553842c9c..37185d4470a 100644 --- a/src/Microsoft.Graph/Generated/Models/IosVpnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosVpnConfiguration.cs @@ -145,7 +145,7 @@ public IosVpnConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosVpnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -177,7 +177,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("cloudName", CloudName); writer.WriteObjectValue("derivedCredentialSettings", DerivedCredentialSettings); diff --git a/src/Microsoft.Graph/Generated/Models/IosVpnSecurityAssociationParameters.cs b/src/Microsoft.Graph/Generated/Models/IosVpnSecurityAssociationParameters.cs index 110c2c08fae..6a0ecfec4c3 100644 --- a/src/Microsoft.Graph/Generated/Models/IosVpnSecurityAssociationParameters.cs +++ b/src/Microsoft.Graph/Generated/Models/IosVpnSecurityAssociationParameters.cs @@ -77,7 +77,7 @@ public IosVpnSecurityAssociationParameters() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IosVpnSecurityAssociationParameters CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosVpnSecurityAssociationParameters(); } /// @@ -101,7 +101,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("lifetimeInMinutes", LifetimeInMinutes); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("securityDiffieHellmanGroup", SecurityDiffieHellmanGroup); diff --git a/src/Microsoft.Graph/Generated/Models/IosVppApp.cs b/src/Microsoft.Graph/Generated/Models/IosVppApp.cs index 018f07365a4..f9e66286d04 100644 --- a/src/Microsoft.Graph/Generated/Models/IosVppApp.cs +++ b/src/Microsoft.Graph/Generated/Models/IosVppApp.cs @@ -211,7 +211,7 @@ public IosVppApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosVppApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosVppApp(); } /// @@ -244,7 +244,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("applicableDeviceType", ApplicableDeviceType); writer.WriteStringValue("appStoreUrl", AppStoreUrl); diff --git a/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedDeviceLicense.cs b/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedDeviceLicense.cs index 18d7186414d..e6c885713c0 100644 --- a/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedDeviceLicense.cs +++ b/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedDeviceLicense.cs @@ -52,7 +52,7 @@ public string ManagedDeviceId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosVppAppAssignedDeviceLicense CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosVppAppAssignedDeviceLicense(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceName", DeviceName); writer.WriteStringValue("managedDeviceId", ManagedDeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedLicense.cs b/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedLicense.cs index 8cdd90e1003..5f13f935a4e 100644 --- a/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedLicense.cs +++ b/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedLicense.cs @@ -84,7 +84,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosVppAppAssignedLicense CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userEmailAddress", UserEmailAddress); writer.WriteStringValue("userId", UserId); diff --git a/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedLicenseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedLicenseCollectionResponse.cs index 2414ecb24e5..ff07c21170d 100644 --- a/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedLicenseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedLicenseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IosVppAppAssignedLicenseCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosVppAppAssignedLicenseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosVppAppAssignedLicenseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedUserLicense.cs b/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedUserLicense.cs index 11fed66f320..ccef9eb725c 100644 --- a/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedUserLicense.cs +++ b/src/Microsoft.Graph/Generated/Models/IosVppAppAssignedUserLicense.cs @@ -20,7 +20,7 @@ public partial class IosVppAppAssignedUserLicense : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosVppAppAssignedUserLicense CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosVppAppAssignedUserLicense(); } /// @@ -39,7 +39,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IosVppAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/IosVppAppAssignmentSettings.cs index 6595b88514d..2d2c75cedca 100644 --- a/src/Microsoft.Graph/Generated/Models/IosVppAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/IosVppAppAssignmentSettings.cs @@ -73,7 +73,7 @@ public IosVppAppAssignmentSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosVppAppAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosVppAppAssignmentSettings(); } /// @@ -98,7 +98,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isRemovable", IsRemovable); writer.WriteBoolValue("preventAutoAppUpdate", PreventAutoAppUpdate); diff --git a/src/Microsoft.Graph/Generated/Models/IosVppAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IosVppAppCollectionResponse.cs index 78c2a7412e1..905afec456f 100644 --- a/src/Microsoft.Graph/Generated/Models/IosVppAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IosVppAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IosVppAppCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosVppAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosVppAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IosVppAppRevokeLicensesActionResult.cs b/src/Microsoft.Graph/Generated/Models/IosVppAppRevokeLicensesActionResult.cs index 1084c897fb2..c26dc5c597e 100644 --- a/src/Microsoft.Graph/Generated/Models/IosVppAppRevokeLicensesActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/IosVppAppRevokeLicensesActionResult.cs @@ -137,7 +137,7 @@ public IosVppAppRevokeLicensesActionResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IosVppAppRevokeLicensesActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosVppAppRevokeLicensesActionResult(); } /// @@ -166,7 +166,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("actionFailureReason", ActionFailureReason); writer.WriteStringValue("actionName", ActionName); writer.WriteEnumValue("actionState", ActionState); diff --git a/src/Microsoft.Graph/Generated/Models/IosVppEBook.cs b/src/Microsoft.Graph/Generated/Models/IosVppEBook.cs index 4111220c3ed..f4db4919e28 100644 --- a/src/Microsoft.Graph/Generated/Models/IosVppEBook.cs +++ b/src/Microsoft.Graph/Generated/Models/IosVppEBook.cs @@ -141,7 +141,7 @@ public IosVppEBook() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosVppEBook CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosVppEBook(); } /// @@ -169,7 +169,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appleId", AppleId); writer.WriteCollectionOfPrimitiveValues("genres", Genres); diff --git a/src/Microsoft.Graph/Generated/Models/IosVppEBookAssignment.cs b/src/Microsoft.Graph/Generated/Models/IosVppEBookAssignment.cs index 277c8d2913b..587dd5e5a06 100644 --- a/src/Microsoft.Graph/Generated/Models/IosVppEBookAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/IosVppEBookAssignment.cs @@ -20,7 +20,7 @@ public partial class IosVppEBookAssignment : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosVppEBookAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosVppEBookAssignment(); } /// @@ -39,7 +39,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/IosWebContentFilterAutoFilter.cs b/src/Microsoft.Graph/Generated/Models/IosWebContentFilterAutoFilter.cs index 79dfb22de27..dd463a7320e 100644 --- a/src/Microsoft.Graph/Generated/Models/IosWebContentFilterAutoFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/IosWebContentFilterAutoFilter.cs @@ -59,7 +59,7 @@ public IosWebContentFilterAutoFilter() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosWebContentFilterAutoFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosWebContentFilterAutoFilter(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("allowedUrls", AllowedUrls); writer.WriteCollectionOfPrimitiveValues("blockedUrls", BlockedUrls); diff --git a/src/Microsoft.Graph/Generated/Models/IosWebContentFilterBase.cs b/src/Microsoft.Graph/Generated/Models/IosWebContentFilterBase.cs index 50ff7160781..e3703118fad 100644 --- a/src/Microsoft.Graph/Generated/Models/IosWebContentFilterBase.cs +++ b/src/Microsoft.Graph/Generated/Models/IosWebContentFilterBase.cs @@ -53,7 +53,7 @@ public IosWebContentFilterBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IosWebContentFilterBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/IosWebContentFilterSpecificWebsitesAccess.cs b/src/Microsoft.Graph/Generated/Models/IosWebContentFilterSpecificWebsitesAccess.cs index 38903bb0e03..a8425019433 100644 --- a/src/Microsoft.Graph/Generated/Models/IosWebContentFilterSpecificWebsitesAccess.cs +++ b/src/Microsoft.Graph/Generated/Models/IosWebContentFilterSpecificWebsitesAccess.cs @@ -59,7 +59,7 @@ public IosWebContentFilterSpecificWebsitesAccess() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosWebContentFilterSpecificWebsitesAccess CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosWebContentFilterSpecificWebsitesAccess(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("specificWebsitesOnly", SpecificWebsitesOnly); writer.WriteCollectionOfObjectValues("websiteList", WebsiteList); diff --git a/src/Microsoft.Graph/Generated/Models/IosWiFiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosWiFiConfiguration.cs index ce20370aafa..1a44969f99f 100644 --- a/src/Microsoft.Graph/Generated/Models/IosWiFiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosWiFiConfiguration.cs @@ -143,7 +143,7 @@ public IosWiFiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosWiFiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -178,7 +178,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("connectAutomatically", ConnectAutomatically); writer.WriteBoolValue("connectWhenNetworkNameIsHidden", ConnectWhenNetworkNameIsHidden); diff --git a/src/Microsoft.Graph/Generated/Models/IosiPadOSWebClip.cs b/src/Microsoft.Graph/Generated/Models/IosiPadOSWebClip.cs index 2f9a3376870..f0648f8aeac 100644 --- a/src/Microsoft.Graph/Generated/Models/IosiPadOSWebClip.cs +++ b/src/Microsoft.Graph/Generated/Models/IosiPadOSWebClip.cs @@ -83,7 +83,7 @@ public IosiPadOSWebClip() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosiPadOSWebClip CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosiPadOSWebClip(); } /// @@ -108,7 +108,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appUrl", AppUrl); writer.WriteBoolValue("fullScreenEnabled", FullScreenEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/IosikEv2VpnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosikEv2VpnConfiguration.cs index 2bbd36c21c9..8606e252dfe 100644 --- a/src/Microsoft.Graph/Generated/Models/IosikEv2VpnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosikEv2VpnConfiguration.cs @@ -255,7 +255,7 @@ public IosikEv2VpnConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IosikEv2VpnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IosikEv2VpnConfiguration(); } /// @@ -297,7 +297,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowDefaultChildSecurityAssociationParameters", AllowDefaultChildSecurityAssociationParameters); writer.WriteBoolValue("allowDefaultSecurityAssociationParameters", AllowDefaultSecurityAssociationParameters); diff --git a/src/Microsoft.Graph/Generated/Models/IpApplicationSegment.cs b/src/Microsoft.Graph/Generated/Models/IpApplicationSegment.cs index d952bcc404b..cb5fda7eef9 100644 --- a/src/Microsoft.Graph/Generated/Models/IpApplicationSegment.cs +++ b/src/Microsoft.Graph/Generated/Models/IpApplicationSegment.cs @@ -92,7 +92,7 @@ public IpApplicationSegment() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IpApplicationSegment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IpApplicationSegment(); } /// @@ -117,7 +117,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("application", Application); writer.WriteStringValue("destinationHost", DestinationHost); diff --git a/src/Microsoft.Graph/Generated/Models/IpApplicationSegmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IpApplicationSegmentCollectionResponse.cs index 3443a739937..e4791320b38 100644 --- a/src/Microsoft.Graph/Generated/Models/IpApplicationSegmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IpApplicationSegmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IpApplicationSegmentCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IpApplicationSegmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IpApplicationSegmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IpCategory.cs b/src/Microsoft.Graph/Generated/Models/IpCategory.cs index ce8b7b56d10..bf280bde156 100644 --- a/src/Microsoft.Graph/Generated/Models/IpCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/IpCategory.cs @@ -100,7 +100,7 @@ public IpCategory() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IpCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IpCategory(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/IpRange.cs b/src/Microsoft.Graph/Generated/Models/IpRange.cs index f2f848dc401..4a8b45481f1 100644 --- a/src/Microsoft.Graph/Generated/Models/IpRange.cs +++ b/src/Microsoft.Graph/Generated/Models/IpRange.cs @@ -53,7 +53,7 @@ public IpRange() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IpRange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -81,7 +81,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/IpReferenceData.cs b/src/Microsoft.Graph/Generated/Models/IpReferenceData.cs index 28c2a961a58..1798507b2fe 100644 --- a/src/Microsoft.Graph/Generated/Models/IpReferenceData.cs +++ b/src/Microsoft.Graph/Generated/Models/IpReferenceData.cs @@ -138,7 +138,7 @@ public IpReferenceData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.IpReferenceData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IpReferenceData(); } /// @@ -164,7 +164,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("asn", Asn); writer.WriteStringValue("city", City); writer.WriteStringValue("countryOrRegionCode", CountryOrRegionCode); diff --git a/src/Microsoft.Graph/Generated/Models/IpSecurityProfile.cs b/src/Microsoft.Graph/Generated/Models/IpSecurityProfile.cs index c134a8b8dbb..5431de9d5fd 100644 --- a/src/Microsoft.Graph/Generated/Models/IpSecurityProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/IpSecurityProfile.cs @@ -187,7 +187,7 @@ public List Tags /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IpSecurityProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IpSecurityProfile(); } /// @@ -219,7 +219,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("activityGroupNames", ActivityGroupNames); writer.WriteStringValue("address", Address); diff --git a/src/Microsoft.Graph/Generated/Models/IpSecurityProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/IpSecurityProfileCollectionResponse.cs index ef58dfd4029..67cf09837f6 100644 --- a/src/Microsoft.Graph/Generated/Models/IpSecurityProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/IpSecurityProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IpSecurityProfileCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IpSecurityProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IpSecurityProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/IpSegmentConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IpSegmentConfiguration.cs index 2b5773ed1f8..60474a1a986 100644 --- a/src/Microsoft.Graph/Generated/Models/IpSegmentConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IpSegmentConfiguration.cs @@ -42,7 +42,7 @@ public IpSegmentConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.IpSegmentConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.IpSegmentConfiguration(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("applicationSegments", ApplicationSegments); } diff --git a/src/Microsoft.Graph/Generated/Models/Item.cs b/src/Microsoft.Graph/Generated/Models/Item.cs index 42b0a6b0275..8b1219dbef2 100644 --- a/src/Microsoft.Graph/Generated/Models/Item.cs +++ b/src/Microsoft.Graph/Generated/Models/Item.cs @@ -240,7 +240,7 @@ public Item() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Item CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Item(); } /// @@ -278,7 +278,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteGuidValue("baseUnitOfMeasureId", BaseUnitOfMeasureId); writer.WriteBoolValue("blocked", Blocked); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ItemActionSet.cs b/src/Microsoft.Graph/Generated/Models/ItemActionSet.cs index 16a03461151..7da77ffe3c2 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemActionSet.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemActionSet.cs @@ -212,7 +212,7 @@ public ItemActionSet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ItemActionSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemActionSet(); } /// @@ -242,7 +242,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("comment", Comment); writer.WriteObjectValue("create", Create); writer.WriteObjectValue("delete", Delete); diff --git a/src/Microsoft.Graph/Generated/Models/ItemActionStat.cs b/src/Microsoft.Graph/Generated/Models/ItemActionStat.cs index 9c51abab75e..cbefdc563cd 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemActionStat.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemActionStat.cs @@ -64,7 +64,7 @@ public ItemActionStat() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ItemActionStat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemActionStat(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("actionCount", ActionCount); writer.WriteIntValue("actorCount", ActorCount); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ItemActivity.cs b/src/Microsoft.Graph/Generated/Models/ItemActivity.cs index e5839492e24..b979a7ada4d 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemActivity.cs @@ -73,7 +73,7 @@ public DateTimeOffset? ActivityDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemActivity(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("access", Access); writer.WriteDateTimeOffsetValue("activityDateTime", ActivityDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ItemActivityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ItemActivityCollectionResponse.cs index 90ce0927a4f..a7d68b588e8 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemActivityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemActivityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ItemActivityCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemActivityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemActivityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ItemActivityOLD.cs b/src/Microsoft.Graph/Generated/Models/ItemActivityOLD.cs index f911922a2fd..704f2384a15 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemActivityOLD.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemActivityOLD.cs @@ -99,7 +99,7 @@ public partial class ItemActivityOLD : global::Microsoft.Graph.Beta.Models.Entit /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemActivityOLD CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemActivityOLD(); } /// @@ -123,7 +123,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("action", Action); writer.WriteObjectValue("actor", Actor); diff --git a/src/Microsoft.Graph/Generated/Models/ItemActivityOLDCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ItemActivityOLDCollectionResponse.cs index b31dd085272..ceca6591764 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemActivityOLDCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemActivityOLDCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ItemActivityOLDCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemActivityOLDCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemActivityOLDCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ItemActivityStat.cs b/src/Microsoft.Graph/Generated/Models/ItemActivityStat.cs index 32fa05f7d0f..148ee71eba5 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemActivityStat.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemActivityStat.cs @@ -149,7 +149,7 @@ public DateTimeOffset? StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemActivityStat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemActivityStat(); } /// @@ -178,7 +178,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("access", Access); writer.WriteCollectionOfObjectValues("activities", Activities); diff --git a/src/Microsoft.Graph/Generated/Models/ItemActivityStatCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ItemActivityStatCollectionResponse.cs index 782452d8730..253729c3d2b 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemActivityStatCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemActivityStatCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ItemActivityStatCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemActivityStatCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemActivityStatCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ItemActivityTimeSet.cs b/src/Microsoft.Graph/Generated/Models/ItemActivityTimeSet.cs index 2844aa36e2b..3dd8928479f 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemActivityTimeSet.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemActivityTimeSet.cs @@ -70,7 +70,7 @@ public ItemActivityTimeSet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ItemActivityTimeSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemActivityTimeSet(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastRecordedDateTime", LastRecordedDateTime); writer.WriteDateTimeOffsetValue("observedDateTime", ObservedDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ItemAddress.cs b/src/Microsoft.Graph/Generated/Models/ItemAddress.cs index 4a4364518dc..c7ac27dfd74 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemAddress.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemAddress.cs @@ -74,7 +74,7 @@ public ItemAddress() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemAddress CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemAddress(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("detail", Detail); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ItemAddressCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ItemAddressCollectionResponse.cs index 96511e97144..b21dfd1146e 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemAddressCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemAddressCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ItemAddressCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemAddressCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemAddressCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ItemAnalytics.cs b/src/Microsoft.Graph/Generated/Models/ItemAnalytics.cs index cbc80764ae2..d3d2136d85a 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemAnalytics.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemAnalytics.cs @@ -67,7 +67,7 @@ public partial class ItemAnalytics : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemAnalytics CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemAnalytics(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("allTime", AllTime); writer.WriteCollectionOfObjectValues("itemActivityStats", ItemActivityStats); diff --git a/src/Microsoft.Graph/Generated/Models/ItemAttachment.cs b/src/Microsoft.Graph/Generated/Models/ItemAttachment.cs index 45b16b2c9a9..e8ff7da1e4f 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemAttachment.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemAttachment.cs @@ -42,7 +42,7 @@ public ItemAttachment() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemAttachment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemAttachment(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("item", Item); } diff --git a/src/Microsoft.Graph/Generated/Models/ItemBody.cs b/src/Microsoft.Graph/Generated/Models/ItemBody.cs index 7e52864974f..0a687dc0241 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemBody.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemBody.cs @@ -74,7 +74,7 @@ public ItemBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ItemBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemBody(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("content", Content); writer.WriteEnumValue("contentType", ContentType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ItemCategory.cs b/src/Microsoft.Graph/Generated/Models/ItemCategory.cs index bc06bca5dbc..3cf90c84935 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemCategory.cs @@ -96,7 +96,7 @@ public ItemCategory() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ItemCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemCategory(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("displayName", DisplayName); writer.WriteGuidValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/ItemCategoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ItemCategoryCollectionResponse.cs index cd51b7c37d0..1323a0a98dd 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemCategoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemCategoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ItemCategoryCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemCategoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ItemCollectionResponse.cs index 4cc8e041f83..efdddee529a 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ItemCollectionResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ItemEmail.cs b/src/Microsoft.Graph/Generated/Models/ItemEmail.cs index 45e1281963d..fb32fa6413f 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemEmail.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemEmail.cs @@ -64,7 +64,7 @@ public ItemEmail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemEmail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemEmail(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("address", Address); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ItemEmailCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ItemEmailCollectionResponse.cs index 59dbe5f403d..c6c05582fc8 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemEmailCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemEmailCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ItemEmailCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemEmailCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemEmailCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ItemFacet.cs b/src/Microsoft.Graph/Generated/Models/ItemFacet.cs index d942caec196..f48af538b00 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemFacet.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemFacet.cs @@ -123,7 +123,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemFacet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -175,7 +175,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("allowedAudiences", AllowedAudiences); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/ItemInsights.cs b/src/Microsoft.Graph/Generated/Models/ItemInsights.cs index 36800a841b6..82273b1ebe2 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemInsights.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemInsights.cs @@ -19,7 +19,7 @@ public partial class ItemInsights : global::Microsoft.Graph.Beta.Models.OfficeGr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemInsights CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemInsights(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ItemPatent.cs b/src/Microsoft.Graph/Generated/Models/ItemPatent.cs index f8643a4d9c8..7876cbeb3dc 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemPatent.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemPatent.cs @@ -119,7 +119,7 @@ public ItemPatent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemPatent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemPatent(); } /// @@ -145,7 +145,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ItemPatentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ItemPatentCollectionResponse.cs index ddd319deae9..5c3f5a3e374 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemPatentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemPatentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ItemPatentCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemPatentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemPatentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ItemPhone.cs b/src/Microsoft.Graph/Generated/Models/ItemPhone.cs index dba7cfe60da..16d3986b5d2 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemPhone.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemPhone.cs @@ -64,7 +64,7 @@ public ItemPhone() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemPhone CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemPhone(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("number", Number); diff --git a/src/Microsoft.Graph/Generated/Models/ItemPhoneCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ItemPhoneCollectionResponse.cs index a1e8e5ec127..8dd14635661 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemPhoneCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemPhoneCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ItemPhoneCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemPhoneCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemPhoneCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ItemPreviewInfo.cs b/src/Microsoft.Graph/Generated/Models/ItemPreviewInfo.cs index 4d48404ab4f..465d9391eb4 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemPreviewInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemPreviewInfo.cs @@ -100,7 +100,7 @@ public ItemPreviewInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ItemPreviewInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemPreviewInfo(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("getUrl", GetUrl); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("postParameters", PostParameters); diff --git a/src/Microsoft.Graph/Generated/Models/ItemPublication.cs b/src/Microsoft.Graph/Generated/Models/ItemPublication.cs index 87c22dae685..ef0f400d5eb 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemPublication.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemPublication.cs @@ -113,7 +113,7 @@ public ItemPublication() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemPublication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemPublication(); } /// @@ -138,7 +138,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ItemPublicationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ItemPublicationCollectionResponse.cs index 7c29d964eea..bd8d5157576 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemPublicationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemPublicationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ItemPublicationCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemPublicationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemPublicationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ItemReference.cs b/src/Microsoft.Graph/Generated/Models/ItemReference.cs index 59f1ea0f281..d46cef52cb8 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemReference.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemReference.cs @@ -180,7 +180,7 @@ public ItemReference() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ItemReference CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemReference(); } /// @@ -208,7 +208,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("driveId", DriveId); writer.WriteStringValue("driveType", DriveType); writer.WriteStringValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/ItemRetentionLabel.cs b/src/Microsoft.Graph/Generated/Models/ItemRetentionLabel.cs index fabeba8f0d4..dc26792aee0 100644 --- a/src/Microsoft.Graph/Generated/Models/ItemRetentionLabel.cs +++ b/src/Microsoft.Graph/Generated/Models/ItemRetentionLabel.cs @@ -79,7 +79,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ItemRetentionLabel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ItemRetentionLabel(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isLabelAppliedExplicitly", IsLabelAppliedExplicitly); writer.WriteObjectValue("labelAppliedBy", LabelAppliedBy); diff --git a/src/Microsoft.Graph/Generated/Models/JobResponseBase.cs b/src/Microsoft.Graph/Generated/Models/JobResponseBase.cs index 049d8c9cdbf..463a154e7b1 100644 --- a/src/Microsoft.Graph/Generated/Models/JobResponseBase.cs +++ b/src/Microsoft.Graph/Generated/Models/JobResponseBase.cs @@ -117,7 +117,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.JobResponseBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -151,7 +151,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("creationDateTime", CreationDateTime); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/JobResponseBaseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/JobResponseBaseCollectionResponse.cs index 3201f9e7259..3c25dfd3118 100644 --- a/src/Microsoft.Graph/Generated/Models/JobResponseBaseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/JobResponseBaseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class JobResponseBaseCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.JobResponseBaseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.JobResponseBaseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/JoinMeetingIdMeetingInfo.cs b/src/Microsoft.Graph/Generated/Models/JoinMeetingIdMeetingInfo.cs index 9713513519f..e3b04da1fed 100644 --- a/src/Microsoft.Graph/Generated/Models/JoinMeetingIdMeetingInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/JoinMeetingIdMeetingInfo.cs @@ -58,7 +58,7 @@ public JoinMeetingIdMeetingInfo() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.JoinMeetingIdMeetingInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.JoinMeetingIdMeetingInfo(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("joinMeetingId", JoinMeetingId); writer.WriteStringValue("passcode", Passcode); diff --git a/src/Microsoft.Graph/Generated/Models/JoinMeetingIdSettings.cs b/src/Microsoft.Graph/Generated/Models/JoinMeetingIdSettings.cs index dcb6d9d4873..73f88d08c3f 100644 --- a/src/Microsoft.Graph/Generated/Models/JoinMeetingIdSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/JoinMeetingIdSettings.cs @@ -90,7 +90,7 @@ public JoinMeetingIdSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.JoinMeetingIdSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.JoinMeetingIdSettings(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isPasscodeRequired", IsPasscodeRequired); writer.WriteStringValue("joinMeetingId", JoinMeetingId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/JoinTransformation.cs b/src/Microsoft.Graph/Generated/Models/JoinTransformation.cs index 0c4b4f08341..beb89dc33fe 100644 --- a/src/Microsoft.Graph/Generated/Models/JoinTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/JoinTransformation.cs @@ -58,7 +58,7 @@ public JoinTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.JoinTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.JoinTransformation(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("input2", Input2); writer.WriteStringValue("separator", Separator); diff --git a/src/Microsoft.Graph/Generated/Models/Journal.cs b/src/Microsoft.Graph/Generated/Models/Journal.cs index 6ea0740a48d..fc9cca726ee 100644 --- a/src/Microsoft.Graph/Generated/Models/Journal.cs +++ b/src/Microsoft.Graph/Generated/Models/Journal.cs @@ -150,7 +150,7 @@ public Journal() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Journal CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Journal(); } /// @@ -178,7 +178,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("account", Account); writer.WriteGuidValue("balancingAccountId", BalancingAccountId); writer.WriteStringValue("balancingAccountNumber", BalancingAccountNumber); diff --git a/src/Microsoft.Graph/Generated/Models/JournalCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/JournalCollectionResponse.cs index 21e12ea5409..1658d56798d 100644 --- a/src/Microsoft.Graph/Generated/Models/JournalCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/JournalCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class JournalCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.JournalCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.JournalCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/JournalLine.cs b/src/Microsoft.Graph/Generated/Models/JournalLine.cs index 10a907ed37d..495643218a6 100644 --- a/src/Microsoft.Graph/Generated/Models/JournalLine.cs +++ b/src/Microsoft.Graph/Generated/Models/JournalLine.cs @@ -201,7 +201,7 @@ public JournalLine() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.JournalLine CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.JournalLine(); } /// @@ -234,7 +234,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("account", Account); writer.WriteGuidValue("accountId", AccountId); writer.WriteStringValue("accountNumber", AccountNumber); diff --git a/src/Microsoft.Graph/Generated/Models/JournalLineCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/JournalLineCollectionResponse.cs index caa3f907a80..e9aec522cf4 100644 --- a/src/Microsoft.Graph/Generated/Models/JournalLineCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/JournalLineCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class JournalLineCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.JournalLineCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.JournalLineCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/JustifyAction.cs b/src/Microsoft.Graph/Generated/Models/JustifyAction.cs index 07a508e1413..e84b4bbc6fc 100644 --- a/src/Microsoft.Graph/Generated/Models/JustifyAction.cs +++ b/src/Microsoft.Graph/Generated/Models/JustifyAction.cs @@ -26,7 +26,7 @@ public JustifyAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.JustifyAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.JustifyAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/KerberosSignOnSettings.cs b/src/Microsoft.Graph/Generated/Models/KerberosSignOnSettings.cs index d8acab2f529..5f5b4c5fc46 100644 --- a/src/Microsoft.Graph/Generated/Models/KerberosSignOnSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/KerberosSignOnSettings.cs @@ -74,7 +74,7 @@ public KerberosSignOnSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.KerberosSignOnSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.KerberosSignOnSettings(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("kerberosServicePrincipalName", KerberosServicePrincipalName); writer.WriteEnumValue("kerberosSignOnMappingAttributeType", KerberosSignOnMappingAttributeType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/KerberosSingleSignOnExtension.cs b/src/Microsoft.Graph/Generated/Models/KerberosSingleSignOnExtension.cs index c7fde9c4c37..4a306cd8fdd 100644 --- a/src/Microsoft.Graph/Generated/Models/KerberosSingleSignOnExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/KerberosSingleSignOnExtension.cs @@ -243,7 +243,7 @@ public KerberosSingleSignOnExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.KerberosSingleSignOnExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.KerberosSingleSignOnExtension(); } /// @@ -283,7 +283,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("activeDirectorySiteCode", ActiveDirectorySiteCode); writer.WriteBoolValue("blockActiveDirectorySiteAutoDiscovery", BlockActiveDirectorySiteAutoDiscovery); diff --git a/src/Microsoft.Graph/Generated/Models/KeyBooleanValuePair.cs b/src/Microsoft.Graph/Generated/Models/KeyBooleanValuePair.cs index 2d85ae35055..622ebf30d63 100644 --- a/src/Microsoft.Graph/Generated/Models/KeyBooleanValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/KeyBooleanValuePair.cs @@ -33,7 +33,7 @@ public KeyBooleanValuePair() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.KeyBooleanValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.KeyBooleanValuePair(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/KeyCredential.cs b/src/Microsoft.Graph/Generated/Models/KeyCredential.cs index 4f0da73fa91..f69646fd2c0 100644 --- a/src/Microsoft.Graph/Generated/Models/KeyCredential.cs +++ b/src/Microsoft.Graph/Generated/Models/KeyCredential.cs @@ -150,7 +150,7 @@ public KeyCredential() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.KeyCredential CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.KeyCredential(); } /// @@ -178,7 +178,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("customKeyIdentifier", CustomKeyIdentifier); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/KeyCredentialConfiguration.cs b/src/Microsoft.Graph/Generated/Models/KeyCredentialConfiguration.cs index e55a4cfe4fa..b330ffb6237 100644 --- a/src/Microsoft.Graph/Generated/Models/KeyCredentialConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/KeyCredentialConfiguration.cs @@ -108,7 +108,7 @@ public KeyCredentialConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.KeyCredentialConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.KeyCredentialConfiguration(); } /// @@ -134,7 +134,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("certificateBasedApplicationConfigurationIds", CertificateBasedApplicationConfigurationIds); writer.WriteObjectValue("excludeActors", ExcludeActors); writer.WriteTimeSpanValue("maxLifetime", MaxLifetime); diff --git a/src/Microsoft.Graph/Generated/Models/KeyIntegerValuePair.cs b/src/Microsoft.Graph/Generated/Models/KeyIntegerValuePair.cs index 55158fea16f..566a93c0cc4 100644 --- a/src/Microsoft.Graph/Generated/Models/KeyIntegerValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/KeyIntegerValuePair.cs @@ -33,7 +33,7 @@ public KeyIntegerValuePair() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.KeyIntegerValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.KeyIntegerValuePair(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/KeyLongValuePair.cs b/src/Microsoft.Graph/Generated/Models/KeyLongValuePair.cs index 7db9b9e51ba..a45c22d8cb1 100644 --- a/src/Microsoft.Graph/Generated/Models/KeyLongValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/KeyLongValuePair.cs @@ -75,7 +75,7 @@ public KeyLongValuePair() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.KeyLongValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.KeyLongValuePair(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/KeyRealValuePair.cs b/src/Microsoft.Graph/Generated/Models/KeyRealValuePair.cs index 6b8aba50b54..2c3626446b6 100644 --- a/src/Microsoft.Graph/Generated/Models/KeyRealValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/KeyRealValuePair.cs @@ -33,7 +33,7 @@ public KeyRealValuePair() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.KeyRealValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.KeyRealValuePair(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDoubleValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/KeyStringValuePair.cs b/src/Microsoft.Graph/Generated/Models/KeyStringValuePair.cs index 263ce83f22d..b7d04345fd0 100644 --- a/src/Microsoft.Graph/Generated/Models/KeyStringValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/KeyStringValuePair.cs @@ -43,7 +43,7 @@ public KeyStringValuePair() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.KeyStringValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.KeyStringValuePair(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/KeyTypedValuePair.cs b/src/Microsoft.Graph/Generated/Models/KeyTypedValuePair.cs index 4c15ec6e610..e499ec30721 100644 --- a/src/Microsoft.Graph/Generated/Models/KeyTypedValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/KeyTypedValuePair.cs @@ -69,7 +69,7 @@ public KeyTypedValuePair() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.KeyTypedValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -98,7 +98,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/KeyValue.cs b/src/Microsoft.Graph/Generated/Models/KeyValue.cs index 78ddab06a5b..6e33b5b7042 100644 --- a/src/Microsoft.Graph/Generated/Models/KeyValue.cs +++ b/src/Microsoft.Graph/Generated/Models/KeyValue.cs @@ -84,7 +84,7 @@ public KeyValue() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.KeyValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.KeyValue(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/KeyValuePair.cs b/src/Microsoft.Graph/Generated/Models/KeyValuePair.cs index 39fc2864fd1..f0aa5fa5495 100644 --- a/src/Microsoft.Graph/Generated/Models/KeyValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/KeyValuePair.cs @@ -84,7 +84,7 @@ public KeyValuePair() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.KeyValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.KeyValuePair(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/LabelActionBase.cs b/src/Microsoft.Graph/Generated/Models/LabelActionBase.cs index 15867af3806..e4ee172fef1 100644 --- a/src/Microsoft.Graph/Generated/Models/LabelActionBase.cs +++ b/src/Microsoft.Graph/Generated/Models/LabelActionBase.cs @@ -68,7 +68,7 @@ public LabelActionBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LabelActionBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/LabelContentRight.cs b/src/Microsoft.Graph/Generated/Models/LabelContentRight.cs index 9b970f953c2..4ff2d491f8c 100644 --- a/src/Microsoft.Graph/Generated/Models/LabelContentRight.cs +++ b/src/Microsoft.Graph/Generated/Models/LabelContentRight.cs @@ -73,7 +73,7 @@ public string Format /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LabelContentRight CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LabelContentRight(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("cid", Cid); writer.WriteStringValue("format", Format); diff --git a/src/Microsoft.Graph/Generated/Models/LabelDetails.cs b/src/Microsoft.Graph/Generated/Models/LabelDetails.cs index 5e61c30d7c2..6dd4dc1e165 100644 --- a/src/Microsoft.Graph/Generated/Models/LabelDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/LabelDetails.cs @@ -26,7 +26,7 @@ public LabelDetails() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LabelDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LabelDetails(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/LabelingOptions.cs b/src/Microsoft.Graph/Generated/Models/LabelingOptions.cs index 7a7d0fe611c..b1b79378627 100644 --- a/src/Microsoft.Graph/Generated/Models/LabelingOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/LabelingOptions.cs @@ -106,7 +106,7 @@ public LabelingOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LabelingOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LabelingOptions(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("assignmentMethod", AssignmentMethod); writer.WriteObjectValue("downgradeJustification", DowngradeJustification); writer.WriteCollectionOfObjectValues("extendedProperties", ExtendedProperties); diff --git a/src/Microsoft.Graph/Generated/Models/LandingPage.cs b/src/Microsoft.Graph/Generated/Models/LandingPage.cs index 6df28a30ed5..1020f299a21 100644 --- a/src/Microsoft.Graph/Generated/Models/LandingPage.cs +++ b/src/Microsoft.Graph/Generated/Models/LandingPage.cs @@ -155,7 +155,7 @@ public List SupportedLocales /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LandingPage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LandingPage(); } /// @@ -185,7 +185,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/LandingPageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/LandingPageCollectionResponse.cs index b0f5208b292..829412d9f70 100644 --- a/src/Microsoft.Graph/Generated/Models/LandingPageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/LandingPageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class LandingPageCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LandingPageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LandingPageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/LandingPageDetail.cs b/src/Microsoft.Graph/Generated/Models/LandingPageDetail.cs index 80d7dc05c30..bec3851c78e 100644 --- a/src/Microsoft.Graph/Generated/Models/LandingPageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/LandingPageDetail.cs @@ -57,7 +57,7 @@ public string Language /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LandingPageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LandingPageDetail(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("content", Content); writer.WriteBoolValue("isDefaultLangauge", IsDefaultLangauge); diff --git a/src/Microsoft.Graph/Generated/Models/LandingPageDetailCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/LandingPageDetailCollectionResponse.cs index d1ed9ea7e44..a11ce87626c 100644 --- a/src/Microsoft.Graph/Generated/Models/LandingPageDetailCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/LandingPageDetailCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class LandingPageDetailCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LandingPageDetailCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LandingPageDetailCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/LanguageProficiency.cs b/src/Microsoft.Graph/Generated/Models/LanguageProficiency.cs index f67c15e016d..bad74860935 100644 --- a/src/Microsoft.Graph/Generated/Models/LanguageProficiency.cs +++ b/src/Microsoft.Graph/Generated/Models/LanguageProficiency.cs @@ -98,7 +98,7 @@ public LanguageProficiency() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LanguageProficiency CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LanguageProficiency(); } /// @@ -124,7 +124,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteEnumValue("proficiency", Proficiency); diff --git a/src/Microsoft.Graph/Generated/Models/LanguageProficiencyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/LanguageProficiencyCollectionResponse.cs index f467aea00ed..7ad84d0f3b5 100644 --- a/src/Microsoft.Graph/Generated/Models/LanguageProficiencyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/LanguageProficiencyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class LanguageProficiencyCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LanguageProficiencyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LanguageProficiencyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/LearningAssignment.cs b/src/Microsoft.Graph/Generated/Models/LearningAssignment.cs index 049115e0e79..31b1e5b7e4f 100644 --- a/src/Microsoft.Graph/Generated/Models/LearningAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/LearningAssignment.cs @@ -79,7 +79,7 @@ public string AssignerUserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LearningAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LearningAssignment(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("assignedDateTime", AssignedDateTime); writer.WriteStringValue("assignerUserId", AssignerUserId); diff --git a/src/Microsoft.Graph/Generated/Models/LearningContent.cs b/src/Microsoft.Graph/Generated/Models/LearningContent.cs index bb3c6e96d1a..8f5f24380df 100644 --- a/src/Microsoft.Graph/Generated/Models/LearningContent.cs +++ b/src/Microsoft.Graph/Generated/Models/LearningContent.cs @@ -243,7 +243,7 @@ public string Title /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LearningContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LearningContent(); } /// @@ -281,7 +281,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("additionalTags", AdditionalTags); writer.WriteStringValue("contentWebUrl", ContentWebUrl); diff --git a/src/Microsoft.Graph/Generated/Models/LearningContentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/LearningContentCollectionResponse.cs index 607c0af0d23..3b19416af81 100644 --- a/src/Microsoft.Graph/Generated/Models/LearningContentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/LearningContentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class LearningContentCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LearningContentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LearningContentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/LearningCourseActivity.cs b/src/Microsoft.Graph/Generated/Models/LearningCourseActivity.cs index d99e2c50b2e..46a1715d3f8 100644 --- a/src/Microsoft.Graph/Generated/Models/LearningCourseActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/LearningCourseActivity.cs @@ -101,7 +101,7 @@ public string LearningProviderId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LearningCourseActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -133,7 +133,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); writer.WriteIntValue("completionPercentage", CompletionPercentage); diff --git a/src/Microsoft.Graph/Generated/Models/LearningCourseActivityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/LearningCourseActivityCollectionResponse.cs index 9ca78c32c5f..543ac1eac25 100644 --- a/src/Microsoft.Graph/Generated/Models/LearningCourseActivityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/LearningCourseActivityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class LearningCourseActivityCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LearningCourseActivityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LearningCourseActivityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/LearningProvider.cs b/src/Microsoft.Graph/Generated/Models/LearningProvider.cs index 87e89b04777..a2eaab1c251 100644 --- a/src/Microsoft.Graph/Generated/Models/LearningProvider.cs +++ b/src/Microsoft.Graph/Generated/Models/LearningProvider.cs @@ -153,7 +153,7 @@ public string SquareLogoWebUrlForLightTheme /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LearningProvider CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LearningProvider(); } /// @@ -181,7 +181,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteBoolValue("isCourseActivitySyncEnabled", IsCourseActivitySyncEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/LearningProviderCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/LearningProviderCollectionResponse.cs index f268caf57a8..c7173d50c5b 100644 --- a/src/Microsoft.Graph/Generated/Models/LearningProviderCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/LearningProviderCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class LearningProviderCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LearningProviderCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LearningProviderCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/LearningSelfInitiatedCourse.cs b/src/Microsoft.Graph/Generated/Models/LearningSelfInitiatedCourse.cs index 4774a08d1a6..50a8607f0cc 100644 --- a/src/Microsoft.Graph/Generated/Models/LearningSelfInitiatedCourse.cs +++ b/src/Microsoft.Graph/Generated/Models/LearningSelfInitiatedCourse.cs @@ -25,7 +25,7 @@ public DateTimeOffset? StartedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LearningSelfInitiatedCourse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LearningSelfInitiatedCourse(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("startedDateTime", StartedDateTime); } diff --git a/src/Microsoft.Graph/Generated/Models/LicenseAssignmentState.cs b/src/Microsoft.Graph/Generated/Models/LicenseAssignmentState.cs index 31eab5d4bdf..1f669934047 100644 --- a/src/Microsoft.Graph/Generated/Models/LicenseAssignmentState.cs +++ b/src/Microsoft.Graph/Generated/Models/LicenseAssignmentState.cs @@ -128,7 +128,7 @@ public LicenseAssignmentState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LicenseAssignmentState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LicenseAssignmentState(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("assignedByGroup", AssignedByGroup); writer.WriteCollectionOfPrimitiveValues("disabledPlans", DisabledPlans); writer.WriteStringValue("error", Error); diff --git a/src/Microsoft.Graph/Generated/Models/LicenseDetails.cs b/src/Microsoft.Graph/Generated/Models/LicenseDetails.cs index 8078089eca6..faf56650e72 100644 --- a/src/Microsoft.Graph/Generated/Models/LicenseDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/LicenseDetails.cs @@ -57,7 +57,7 @@ public string SkuPartNumber /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LicenseDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LicenseDetails(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("servicePlans", ServicePlans); writer.WriteGuidValue("skuId", SkuId); diff --git a/src/Microsoft.Graph/Generated/Models/LicenseDetailsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/LicenseDetailsCollectionResponse.cs index 65e83d2ce88..9d00086a4f5 100644 --- a/src/Microsoft.Graph/Generated/Models/LicenseDetailsCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/LicenseDetailsCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class LicenseDetailsCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LicenseDetailsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LicenseDetailsCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/LicenseProcessingState.cs b/src/Microsoft.Graph/Generated/Models/LicenseProcessingState.cs index a13ab54a101..644b5f5a153 100644 --- a/src/Microsoft.Graph/Generated/Models/LicenseProcessingState.cs +++ b/src/Microsoft.Graph/Generated/Models/LicenseProcessingState.cs @@ -68,7 +68,7 @@ public LicenseProcessingState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LicenseProcessingState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LicenseProcessingState(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("state", State); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/LicenseUnitsDetail.cs b/src/Microsoft.Graph/Generated/Models/LicenseUnitsDetail.cs index 24556a2b40d..7f98724146d 100644 --- a/src/Microsoft.Graph/Generated/Models/LicenseUnitsDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/LicenseUnitsDetail.cs @@ -76,7 +76,7 @@ public LicenseUnitsDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LicenseUnitsDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LicenseUnitsDetail(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("enabled", Enabled); writer.WriteIntValue("lockedOut", LockedOut); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/LinkRoleAbilities.cs b/src/Microsoft.Graph/Generated/Models/LinkRoleAbilities.cs index dfd158424ad..6a060719ba4 100644 --- a/src/Microsoft.Graph/Generated/Models/LinkRoleAbilities.cs +++ b/src/Microsoft.Graph/Generated/Models/LinkRoleAbilities.cs @@ -196,7 +196,7 @@ public LinkRoleAbilities() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LinkRoleAbilities CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LinkRoleAbilities(); } /// @@ -225,7 +225,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("addExistingExternalUsers", AddExistingExternalUsers); writer.WriteObjectValue("addNewExternalUsers", AddNewExternalUsers); writer.WriteObjectValue("applyVariants", ApplyVariants); diff --git a/src/Microsoft.Graph/Generated/Models/LinkScopeAbilities.cs b/src/Microsoft.Graph/Generated/Models/LinkScopeAbilities.cs index e4586bd65d2..3dc3c5495c6 100644 --- a/src/Microsoft.Graph/Generated/Models/LinkScopeAbilities.cs +++ b/src/Microsoft.Graph/Generated/Models/LinkScopeAbilities.cs @@ -148,7 +148,7 @@ public LinkScopeAbilities() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LinkScopeAbilities CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LinkScopeAbilities(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("blockDownloadLinkAbilities", BlockDownloadLinkAbilities); writer.WriteObjectValue("editLinkAbilities", EditLinkAbilities); writer.WriteObjectValue("manageListLinkAbilities", ManageListLinkAbilities); diff --git a/src/Microsoft.Graph/Generated/Models/LinkableIdentifiers.cs b/src/Microsoft.Graph/Generated/Models/LinkableIdentifiers.cs index 81f0b801463..4e7c1480cb1 100644 --- a/src/Microsoft.Graph/Generated/Models/LinkableIdentifiers.cs +++ b/src/Microsoft.Graph/Generated/Models/LinkableIdentifiers.cs @@ -100,7 +100,7 @@ public LinkableIdentifiers() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LinkableIdentifiers CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LinkableIdentifiers(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceId", DeviceId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("sessionId", SessionId); diff --git a/src/Microsoft.Graph/Generated/Models/LinkedResource.cs b/src/Microsoft.Graph/Generated/Models/LinkedResource.cs index f56cd0d0889..6b7657d0a1f 100644 --- a/src/Microsoft.Graph/Generated/Models/LinkedResource.cs +++ b/src/Microsoft.Graph/Generated/Models/LinkedResource.cs @@ -83,7 +83,7 @@ public string WebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LinkedResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LinkedResource(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("applicationName", ApplicationName); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/LinkedResourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/LinkedResourceCollectionResponse.cs index 076b598180d..16780884288 100644 --- a/src/Microsoft.Graph/Generated/Models/LinkedResourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/LinkedResourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class LinkedResourceCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LinkedResourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LinkedResourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/List.cs b/src/Microsoft.Graph/Generated/Models/List.cs index 1b45d646c00..75b4169bb95 100644 --- a/src/Microsoft.Graph/Generated/Models/List.cs +++ b/src/Microsoft.Graph/Generated/Models/List.cs @@ -218,7 +218,7 @@ public List() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.List CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.List(); } /// @@ -249,7 +249,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("activities", Activities); writer.WriteCollectionOfObjectValues("columns", Columns); diff --git a/src/Microsoft.Graph/Generated/Models/ListCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ListCollectionResponse.cs index 621d5506701..92868ab4625 100644 --- a/src/Microsoft.Graph/Generated/Models/ListCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ListCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ListCollectionResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ListCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ListCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ListInfo.cs b/src/Microsoft.Graph/Generated/Models/ListInfo.cs index 16c3cc792f9..4517466b841 100644 --- a/src/Microsoft.Graph/Generated/Models/ListInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ListInfo.cs @@ -80,7 +80,7 @@ public ListInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ListInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ListInfo(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("contentTypesEnabled", ContentTypesEnabled); writer.WriteBoolValue("hidden", Hidden); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ListItem.cs b/src/Microsoft.Graph/Generated/Models/ListItem.cs index d413db02eab..5c5d2c2c012 100644 --- a/src/Microsoft.Graph/Generated/Models/ListItem.cs +++ b/src/Microsoft.Graph/Generated/Models/ListItem.cs @@ -186,7 +186,7 @@ public ListItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ListItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ListItem(); } /// @@ -215,7 +215,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("activities", Activities); writer.WriteObjectValue("analytics", Analytics); diff --git a/src/Microsoft.Graph/Generated/Models/ListItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ListItemCollectionResponse.cs index 5af8781a69c..f86cbe2217d 100644 --- a/src/Microsoft.Graph/Generated/Models/ListItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ListItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ListItemCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ListItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ListItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ListItemVersion.cs b/src/Microsoft.Graph/Generated/Models/ListItemVersion.cs index 52fb064ddf3..e5ef6d38f1f 100644 --- a/src/Microsoft.Graph/Generated/Models/ListItemVersion.cs +++ b/src/Microsoft.Graph/Generated/Models/ListItemVersion.cs @@ -42,7 +42,7 @@ public ListItemVersion() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ListItemVersion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("fields", Fields); } diff --git a/src/Microsoft.Graph/Generated/Models/ListItemVersionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ListItemVersionCollectionResponse.cs index 84a75359d42..cf1444f030e 100644 --- a/src/Microsoft.Graph/Generated/Models/ListItemVersionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ListItemVersionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ListItemVersionCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ListItemVersionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ListItemVersionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/LiveCaptionOptions.cs b/src/Microsoft.Graph/Generated/Models/LiveCaptionOptions.cs index 0b00e05ebf9..7f3122825bf 100644 --- a/src/Microsoft.Graph/Generated/Models/LiveCaptionOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/LiveCaptionOptions.cs @@ -68,7 +68,7 @@ public LiveCaptionOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LiveCaptionOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LiveCaptionOptions(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("streamUrl", StreamUrl); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/LobbyBypassSettings.cs b/src/Microsoft.Graph/Generated/Models/LobbyBypassSettings.cs index e405d447ad3..a5ec14d542c 100644 --- a/src/Microsoft.Graph/Generated/Models/LobbyBypassSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/LobbyBypassSettings.cs @@ -64,7 +64,7 @@ public LobbyBypassSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LobbyBypassSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LobbyBypassSettings(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isDialInBypassEnabled", IsDialInBypassEnabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("scope", Scope); diff --git a/src/Microsoft.Graph/Generated/Models/LocalAdminPasswordSettings.cs b/src/Microsoft.Graph/Generated/Models/LocalAdminPasswordSettings.cs index 2f1c2cfd4bb..5e58d66c7da 100644 --- a/src/Microsoft.Graph/Generated/Models/LocalAdminPasswordSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/LocalAdminPasswordSettings.cs @@ -58,7 +58,7 @@ public LocalAdminPasswordSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LocalAdminPasswordSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LocalAdminPasswordSettings(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isEnabled", IsEnabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/LocalAdminSettings.cs b/src/Microsoft.Graph/Generated/Models/LocalAdminSettings.cs index dceb00216f4..c0acadbb58a 100644 --- a/src/Microsoft.Graph/Generated/Models/LocalAdminSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/LocalAdminSettings.cs @@ -74,7 +74,7 @@ public LocalAdminSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LocalAdminSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LocalAdminSettings(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("enableGlobalAdmins", EnableGlobalAdmins); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("registeringUsers", RegisteringUsers); diff --git a/src/Microsoft.Graph/Generated/Models/LocalIdentitySource.cs b/src/Microsoft.Graph/Generated/Models/LocalIdentitySource.cs index d25fe07cdbc..4095fc93d4d 100644 --- a/src/Microsoft.Graph/Generated/Models/LocalIdentitySource.cs +++ b/src/Microsoft.Graph/Generated/Models/LocalIdentitySource.cs @@ -26,7 +26,7 @@ public LocalIdentitySource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LocalIdentitySource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LocalIdentitySource(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/LocaleInfo.cs b/src/Microsoft.Graph/Generated/Models/LocaleInfo.cs index aead121017a..035d207937c 100644 --- a/src/Microsoft.Graph/Generated/Models/LocaleInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/LocaleInfo.cs @@ -84,7 +84,7 @@ public LocaleInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LocaleInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LocaleInfo(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("locale", Locale); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/LocalizedNotificationMessage.cs b/src/Microsoft.Graph/Generated/Models/LocalizedNotificationMessage.cs index 921d42726a7..874b91c3dae 100644 --- a/src/Microsoft.Graph/Generated/Models/LocalizedNotificationMessage.cs +++ b/src/Microsoft.Graph/Generated/Models/LocalizedNotificationMessage.cs @@ -80,7 +80,7 @@ public string Subject /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LocalizedNotificationMessage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LocalizedNotificationMessage(); } /// @@ -104,7 +104,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isDefault", IsDefault); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/LocalizedNotificationMessageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/LocalizedNotificationMessageCollectionResponse.cs index 27832e956d3..daac1d7f663 100644 --- a/src/Microsoft.Graph/Generated/Models/LocalizedNotificationMessageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/LocalizedNotificationMessageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class LocalizedNotificationMessageCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LocalizedNotificationMessageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LocalizedNotificationMessageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/LocateDeviceActionResult.cs b/src/Microsoft.Graph/Generated/Models/LocateDeviceActionResult.cs index 760e1e01678..d643242b76f 100644 --- a/src/Microsoft.Graph/Generated/Models/LocateDeviceActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/LocateDeviceActionResult.cs @@ -36,7 +36,7 @@ public partial class LocateDeviceActionResult : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LocateDeviceActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LocateDeviceActionResult(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("deviceLocation", DeviceLocation); } diff --git a/src/Microsoft.Graph/Generated/Models/Location.cs b/src/Microsoft.Graph/Generated/Models/Location.cs index dc194d4a869..553d5573424 100644 --- a/src/Microsoft.Graph/Generated/Models/Location.cs +++ b/src/Microsoft.Graph/Generated/Models/Location.cs @@ -160,7 +160,7 @@ public Location() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Location CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -193,7 +193,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("address", Address); writer.WriteObjectValue("coordinates", Coordinates); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/LocationConstraint.cs b/src/Microsoft.Graph/Generated/Models/LocationConstraint.cs index bb4fb855ce4..654437a7714 100644 --- a/src/Microsoft.Graph/Generated/Models/LocationConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/LocationConstraint.cs @@ -80,7 +80,7 @@ public LocationConstraint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LocationConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LocationConstraint(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isRequired", IsRequired); writer.WriteCollectionOfObjectValues("locations", Locations); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/LocationConstraintItem.cs b/src/Microsoft.Graph/Generated/Models/LocationConstraintItem.cs index beb45c11f91..3228f78e2da 100644 --- a/src/Microsoft.Graph/Generated/Models/LocationConstraintItem.cs +++ b/src/Microsoft.Graph/Generated/Models/LocationConstraintItem.cs @@ -32,7 +32,7 @@ public LocationConstraintItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LocationConstraintItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LocationConstraintItem(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("resolveAvailability", ResolveAvailability); } diff --git a/src/Microsoft.Graph/Generated/Models/LoggedOnUser.cs b/src/Microsoft.Graph/Generated/Models/LoggedOnUser.cs index 874f9baf5be..7cf2331443f 100644 --- a/src/Microsoft.Graph/Generated/Models/LoggedOnUser.cs +++ b/src/Microsoft.Graph/Generated/Models/LoggedOnUser.cs @@ -75,7 +75,7 @@ public LoggedOnUser() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LoggedOnUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LoggedOnUser(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastLogOnDateTime", LastLogOnDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("userId", UserId); diff --git a/src/Microsoft.Graph/Generated/Models/LogicAppTriggerEndpointConfiguration.cs b/src/Microsoft.Graph/Generated/Models/LogicAppTriggerEndpointConfiguration.cs index 355da48ce92..db7782c5776 100644 --- a/src/Microsoft.Graph/Generated/Models/LogicAppTriggerEndpointConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/LogicAppTriggerEndpointConfiguration.cs @@ -90,7 +90,7 @@ public LogicAppTriggerEndpointConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LogicAppTriggerEndpointConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LogicAppTriggerEndpointConfiguration(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("logicAppWorkflowName", LogicAppWorkflowName); writer.WriteStringValue("resourceGroupName", ResourceGroupName); diff --git a/src/Microsoft.Graph/Generated/Models/LoginPage.cs b/src/Microsoft.Graph/Generated/Models/LoginPage.cs index 71b27488447..8dee5796856 100644 --- a/src/Microsoft.Graph/Generated/Models/LoginPage.cs +++ b/src/Microsoft.Graph/Generated/Models/LoginPage.cs @@ -139,7 +139,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LoginPage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LoginPage(); } /// @@ -168,7 +168,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("content", Content); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/LoginPageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/LoginPageCollectionResponse.cs index ce060e929ae..bc8d11f7367 100644 --- a/src/Microsoft.Graph/Generated/Models/LoginPageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/LoginPageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class LoginPageCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LoginPageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LoginPageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/LoginPageLayoutConfiguration.cs b/src/Microsoft.Graph/Generated/Models/LoginPageLayoutConfiguration.cs index 576c9874427..f5460e4b3aa 100644 --- a/src/Microsoft.Graph/Generated/Models/LoginPageLayoutConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/LoginPageLayoutConfiguration.cs @@ -70,7 +70,7 @@ public LoginPageLayoutConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LoginPageLayoutConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LoginPageLayoutConfiguration(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isFooterShown", IsFooterShown); writer.WriteBoolValue("isHeaderShown", IsHeaderShown); writer.WriteEnumValue("layoutTemplateType", LayoutTemplateType); diff --git a/src/Microsoft.Graph/Generated/Models/LoginPageTextVisibilitySettings.cs b/src/Microsoft.Graph/Generated/Models/LoginPageTextVisibilitySettings.cs index 05b0ac89419..95df0c5aaab 100644 --- a/src/Microsoft.Graph/Generated/Models/LoginPageTextVisibilitySettings.cs +++ b/src/Microsoft.Graph/Generated/Models/LoginPageTextVisibilitySettings.cs @@ -88,7 +88,7 @@ public LoginPageTextVisibilitySettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LoginPageTextVisibilitySettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LoginPageTextVisibilitySettings(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("hideAccountResetCredentials", HideAccountResetCredentials); writer.WriteBoolValue("hideCannotAccessYourAccount", HideCannotAccessYourAccount); writer.WriteBoolValue("hideForgotMyPassword", HideForgotMyPassword); diff --git a/src/Microsoft.Graph/Generated/Models/LogonUser.cs b/src/Microsoft.Graph/Generated/Models/LogonUser.cs index 37b9db868a7..06716693205 100644 --- a/src/Microsoft.Graph/Generated/Models/LogonUser.cs +++ b/src/Microsoft.Graph/Generated/Models/LogonUser.cs @@ -134,7 +134,7 @@ public LogonUser() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LogonUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LogonUser(); } /// @@ -161,7 +161,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("accountDomain", AccountDomain); writer.WriteStringValue("accountName", AccountName); writer.WriteEnumValue("accountType", AccountType); diff --git a/src/Microsoft.Graph/Generated/Models/LongRunningOperation.cs b/src/Microsoft.Graph/Generated/Models/LongRunningOperation.cs index 2fde873dc12..e2b265f144a 100644 --- a/src/Microsoft.Graph/Generated/Models/LongRunningOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/LongRunningOperation.cs @@ -71,7 +71,7 @@ public string StatusDetail /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LongRunningOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -105,7 +105,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("lastActionDateTime", LastActionDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/LongRunningOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/LongRunningOperationCollectionResponse.cs index 34702307427..2e0aad6ed65 100644 --- a/src/Microsoft.Graph/Generated/Models/LongRunningOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/LongRunningOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class LongRunningOperationCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LongRunningOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LongRunningOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/LookupColumn.cs b/src/Microsoft.Graph/Generated/Models/LookupColumn.cs index 3e4b23a8740..b8403a70da0 100644 --- a/src/Microsoft.Graph/Generated/Models/LookupColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/LookupColumn.cs @@ -112,7 +112,7 @@ public LookupColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.LookupColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LookupColumn(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowMultipleValues", AllowMultipleValues); writer.WriteBoolValue("allowUnlimitedLength", AllowUnlimitedLength); writer.WriteStringValue("columnName", ColumnName); diff --git a/src/Microsoft.Graph/Generated/Models/LookupResultRow.cs b/src/Microsoft.Graph/Generated/Models/LookupResultRow.cs index 71555255439..fa9b810a4f1 100644 --- a/src/Microsoft.Graph/Generated/Models/LookupResultRow.cs +++ b/src/Microsoft.Graph/Generated/Models/LookupResultRow.cs @@ -35,7 +35,7 @@ public string Row /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.LookupResultRow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.LookupResultRow(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("row", Row); } diff --git a/src/Microsoft.Graph/Generated/Models/M365AppsInstallationOptions.cs b/src/Microsoft.Graph/Generated/Models/M365AppsInstallationOptions.cs index 22633c85f98..83e53b43166 100644 --- a/src/Microsoft.Graph/Generated/Models/M365AppsInstallationOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/M365AppsInstallationOptions.cs @@ -57,7 +57,7 @@ public partial class M365AppsInstallationOptions : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.M365AppsInstallationOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.M365AppsInstallationOptions(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("appsForMac", AppsForMac); writer.WriteObjectValue("appsForWindows", AppsForWindows); diff --git a/src/Microsoft.Graph/Generated/Models/MacAppIdentifier.cs b/src/Microsoft.Graph/Generated/Models/MacAppIdentifier.cs index af287aa8761..26220572179 100644 --- a/src/Microsoft.Graph/Generated/Models/MacAppIdentifier.cs +++ b/src/Microsoft.Graph/Generated/Models/MacAppIdentifier.cs @@ -43,7 +43,7 @@ public MacAppIdentifier() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacAppIdentifier CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacAppIdentifier(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("bundleId", BundleId); } diff --git a/src/Microsoft.Graph/Generated/Models/MacOSAppScript.cs b/src/Microsoft.Graph/Generated/Models/MacOSAppScript.cs index aa998f08b5a..cb9d6244ca0 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSAppScript.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSAppScript.cs @@ -69,7 +69,7 @@ public MacOSAppScript() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MacOSAppScript CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSAppScript(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("scriptContent", ScriptContent); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSAppleEventReceiver.cs b/src/Microsoft.Graph/Generated/Models/MacOSAppleEventReceiver.cs index bedc888d028..109c660e31d 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSAppleEventReceiver.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSAppleEventReceiver.cs @@ -97,7 +97,7 @@ public MacOSAppleEventReceiver() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MacOSAppleEventReceiver CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSAppleEventReceiver(); } /// @@ -121,7 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowed", Allowed); writer.WriteStringValue("codeRequirement", CodeRequirement); writer.WriteStringValue("identifier", Identifier); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSAssociatedDomainsItem.cs b/src/Microsoft.Graph/Generated/Models/MacOSAssociatedDomainsItem.cs index 02689d0ce8d..1f4c0877fbb 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSAssociatedDomainsItem.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSAssociatedDomainsItem.cs @@ -91,7 +91,7 @@ public MacOSAssociatedDomainsItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MacOSAssociatedDomainsItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSAssociatedDomainsItem(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applicationIdentifier", ApplicationIdentifier); writer.WriteBoolValue("directDownloadsEnabled", DirectDownloadsEnabled); writer.WriteCollectionOfPrimitiveValues("domains", Domains); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSAzureAdSingleSignOnExtension.cs b/src/Microsoft.Graph/Generated/Models/MacOSAzureAdSingleSignOnExtension.cs index 767321cbace..fc18ec9c089 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSAzureAdSingleSignOnExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSAzureAdSingleSignOnExtension.cs @@ -65,7 +65,7 @@ public MacOSAzureAdSingleSignOnExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSAzureAdSingleSignOnExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSAzureAdSingleSignOnExtension(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("bundleIdAccessControlList", BundleIdAccessControlList); writer.WriteCollectionOfObjectValues("configurations", Configurations); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSCertificateProfileBase.cs b/src/Microsoft.Graph/Generated/Models/MacOSCertificateProfileBase.cs index a11f7b1ebb1..6328de43c85 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSCertificateProfileBase.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSCertificateProfileBase.cs @@ -57,7 +57,7 @@ public MacOSCertificateProfileBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSCertificateProfileBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -88,7 +88,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateValidityPeriodScale", CertificateValidityPeriodScale); writer.WriteIntValue("certificateValidityPeriodValue", CertificateValidityPeriodValue); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/MacOSCompliancePolicy.cs index ea24f2070d9..bc30770ced5 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSCompliancePolicy.cs @@ -193,7 +193,7 @@ public MacOSCompliancePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSCompliancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSCompliancePolicy(); } /// @@ -233,7 +233,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("advancedThreatProtectionRequiredSecurityLevel", AdvancedThreatProtectionRequiredSecurityLevel); writer.WriteBoolValue("deviceThreatProtectionEnabled", DeviceThreatProtectionEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSCredentialSingleSignOnExtension.cs b/src/Microsoft.Graph/Generated/Models/MacOSCredentialSingleSignOnExtension.cs index 852d9fd7643..8c838ea107e 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSCredentialSingleSignOnExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSCredentialSingleSignOnExtension.cs @@ -107,7 +107,7 @@ public MacOSCredentialSingleSignOnExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSCredentialSingleSignOnExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSCredentialSingleSignOnExtension(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("configurations", Configurations); writer.WriteCollectionOfPrimitiveValues("domains", Domains); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSCustomAppConfiguration.cs b/src/Microsoft.Graph/Generated/Models/MacOSCustomAppConfiguration.cs index 7ac80a50b3c..f5b2943e34a 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSCustomAppConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSCustomAppConfiguration.cs @@ -75,7 +75,7 @@ public MacOSCustomAppConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSCustomAppConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSCustomAppConfiguration(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("bundleId", BundleId); writer.WriteByteArrayValue("configurationXml", ConfigurationXml); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSCustomConfiguration.cs b/src/Microsoft.Graph/Generated/Models/MacOSCustomConfiguration.cs index 5f57c213260..79b9792d47b 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSCustomConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSCustomConfiguration.cs @@ -81,7 +81,7 @@ public MacOSCustomConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSCustomConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSCustomConfiguration(); } /// @@ -104,7 +104,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("deploymentChannel", DeploymentChannel); writer.WriteByteArrayValue("payload", Payload); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSDeviceFeaturesConfiguration.cs b/src/Microsoft.Graph/Generated/Models/MacOSDeviceFeaturesConfiguration.cs index 6c99d03132d..a084a512ca4 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSDeviceFeaturesConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSDeviceFeaturesConfiguration.cs @@ -409,7 +409,7 @@ public MacOSDeviceFeaturesConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSDeviceFeaturesConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSDeviceFeaturesConfiguration(); } /// @@ -470,7 +470,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("adminShowHostInfo", AdminShowHostInfo); writer.WriteCollectionOfObjectValues("appAssociatedDomains", AppAssociatedDomains); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSDmgApp.cs b/src/Microsoft.Graph/Generated/Models/MacOSDmgApp.cs index 699c918345c..f20730e8436 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSDmgApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSDmgApp.cs @@ -97,7 +97,7 @@ public MacOSDmgApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSDmgApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSDmgApp(); } /// @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("ignoreVersionDetection", IgnoreVersionDetection); writer.WriteCollectionOfObjectValues("includedApps", IncludedApps); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSDmgAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MacOSDmgAppCollectionResponse.cs index 5e6d01888ed..31678058946 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSDmgAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSDmgAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MacOSDmgAppCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSDmgAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSDmgAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MacOSEndpointProtectionConfiguration.cs b/src/Microsoft.Graph/Generated/Models/MacOSEndpointProtectionConfiguration.cs index a0811eadf22..4f2e9f3c593 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSEndpointProtectionConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSEndpointProtectionConfiguration.cs @@ -251,7 +251,7 @@ public MacOSEndpointProtectionConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSEndpointProtectionConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSEndpointProtectionConfiguration(); } /// @@ -294,7 +294,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("advancedThreatProtectionAutomaticSampleSubmission", AdvancedThreatProtectionAutomaticSampleSubmission); writer.WriteEnumValue("advancedThreatProtectionCloudDelivered", AdvancedThreatProtectionCloudDelivered); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSEnterpriseWiFiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/MacOSEnterpriseWiFiConfiguration.cs index 72e89f162cf..74ce0d31d37 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSEnterpriseWiFiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSEnterpriseWiFiConfiguration.cs @@ -131,7 +131,7 @@ public MacOSEnterpriseWiFiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSEnterpriseWiFiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSEnterpriseWiFiConfiguration(); } /// @@ -159,7 +159,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteEnumValue("eapFastConfiguration", EapFastConfiguration); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSExtensionsConfiguration.cs b/src/Microsoft.Graph/Generated/Models/MacOSExtensionsConfiguration.cs index 90e09fd87b6..b99cedf9b7b 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSExtensionsConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSExtensionsConfiguration.cs @@ -119,7 +119,7 @@ public MacOSExtensionsConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSExtensionsConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSExtensionsConfiguration(); } /// @@ -145,7 +145,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("kernelExtensionAllowedTeamIdentifiers", KernelExtensionAllowedTeamIdentifiers); writer.WriteBoolValue("kernelExtensionOverridesAllowed", KernelExtensionOverridesAllowed); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSFirewallApplication.cs b/src/Microsoft.Graph/Generated/Models/MacOSFirewallApplication.cs index 7f1d6688b5a..ee7a8792495 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSFirewallApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSFirewallApplication.cs @@ -75,7 +75,7 @@ public MacOSFirewallApplication() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MacOSFirewallApplication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSFirewallApplication(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowsIncomingConnections", AllowsIncomingConnections); writer.WriteStringValue("bundleId", BundleId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSGeneralDeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/MacOSGeneralDeviceConfiguration.cs index 03e4f32e3bb..073a79301ba 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSGeneralDeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSGeneralDeviceConfiguration.cs @@ -417,7 +417,7 @@ public MacOSGeneralDeviceConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSGeneralDeviceConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSGeneralDeviceConfiguration(); } /// @@ -496,7 +496,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("activationLockWhenSupervisedAllowed", ActivationLockWhenSupervisedAllowed); writer.WriteBoolValue("addingGameCenterFriendsBlocked", AddingGameCenterFriendsBlocked); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSImportedPFXCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/MacOSImportedPFXCertificateProfile.cs index fff455eae84..f6b5e8dc05b 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSImportedPFXCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSImportedPFXCertificateProfile.cs @@ -55,7 +55,7 @@ public MacOSImportedPFXCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSImportedPFXCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSImportedPFXCertificateProfile(); } /// @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("deploymentChannel", DeploymentChannel); writer.WriteEnumValue("intendedPurpose", IntendedPurpose); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSIncludedApp.cs b/src/Microsoft.Graph/Generated/Models/MacOSIncludedApp.cs index e402a3d59f1..56900d24297 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSIncludedApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSIncludedApp.cs @@ -85,7 +85,7 @@ public MacOSIncludedApp() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MacOSIncludedApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSIncludedApp(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("bundleId", BundleId); writer.WriteStringValue("bundleVersion", BundleVersion); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSKerberosSingleSignOnExtension.cs b/src/Microsoft.Graph/Generated/Models/MacOSKerberosSingleSignOnExtension.cs index a544f4dca10..beda03c8c8f 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSKerberosSingleSignOnExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSKerberosSingleSignOnExtension.cs @@ -337,7 +337,7 @@ public MacOSKerberosSingleSignOnExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSKerberosSingleSignOnExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSKerberosSingleSignOnExtension(); } /// @@ -386,7 +386,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("activeDirectorySiteCode", ActiveDirectorySiteCode); writer.WriteBoolValue("blockActiveDirectorySiteAutoDiscovery", BlockActiveDirectorySiteAutoDiscovery); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSKernelExtension.cs b/src/Microsoft.Graph/Generated/Models/MacOSKernelExtension.cs index 89871dc0467..779333f3530 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSKernelExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSKernelExtension.cs @@ -85,7 +85,7 @@ public MacOSKernelExtension() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MacOSKernelExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSKernelExtension(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("bundleId", BundleId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("teamIdentifier", TeamIdentifier); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSLaunchItem.cs b/src/Microsoft.Graph/Generated/Models/MacOSLaunchItem.cs index fc95b2212ff..50b3e98f2bc 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSLaunchItem.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSLaunchItem.cs @@ -75,7 +75,7 @@ public MacOSLaunchItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MacOSLaunchItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSLaunchItem(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("hide", Hide); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("path", Path); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSLobApp.cs b/src/Microsoft.Graph/Generated/Models/MacOSLobApp.cs index fcb39519336..96d4e3c3801 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSLobApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSLobApp.cs @@ -141,7 +141,7 @@ public MacOSLobApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSLobApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSLobApp(); } /// @@ -169,7 +169,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("buildNumber", BuildNumber); writer.WriteStringValue("bundleId", BundleId); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSLobAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MacOSLobAppCollectionResponse.cs index 8a006df7130..af929b4895b 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSLobAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSLobAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MacOSLobAppCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSLobAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSLobAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MacOSLobChildApp.cs b/src/Microsoft.Graph/Generated/Models/MacOSLobChildApp.cs index 555e0e66535..be6062b78c5 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSLobChildApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSLobChildApp.cs @@ -101,7 +101,7 @@ public MacOSLobChildApp() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MacOSLobChildApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSLobChildApp(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("buildNumber", BuildNumber); writer.WriteStringValue("bundleId", BundleId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSManagedDeviceLocalAdminAccountDetail.cs b/src/Microsoft.Graph/Generated/Models/MacOSManagedDeviceLocalAdminAccountDetail.cs index f11c5c7bd68..3fa1d03bd31 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSManagedDeviceLocalAdminAccountDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSManagedDeviceLocalAdminAccountDetail.cs @@ -75,7 +75,7 @@ public MacOSManagedDeviceLocalAdminAccountDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MacOSManagedDeviceLocalAdminAccountDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSManagedDeviceLocalAdminAccountDetail(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("adminAccountPassword", AdminAccountPassword); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("passwordLastRotatedDateTime", PasswordLastRotatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSMicrosoftDefenderApp.cs b/src/Microsoft.Graph/Generated/Models/MacOSMicrosoftDefenderApp.cs index 6237581f792..643f4ee6e54 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSMicrosoftDefenderApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSMicrosoftDefenderApp.cs @@ -27,7 +27,7 @@ public MacOSMicrosoftDefenderApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSMicrosoftDefenderApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSMicrosoftDefenderApp(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/MacOSMicrosoftEdgeApp.cs b/src/Microsoft.Graph/Generated/Models/MacOSMicrosoftEdgeApp.cs index 12858fa176c..51dac8cf381 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSMicrosoftEdgeApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSMicrosoftEdgeApp.cs @@ -33,7 +33,7 @@ public MacOSMicrosoftEdgeApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSMicrosoftEdgeApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSMicrosoftEdgeApp(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("channel", Channel); } diff --git a/src/Microsoft.Graph/Generated/Models/MacOSMinimumOperatingSystem.cs b/src/Microsoft.Graph/Generated/Models/MacOSMinimumOperatingSystem.cs index f000ea96257..ce997867f0a 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSMinimumOperatingSystem.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSMinimumOperatingSystem.cs @@ -137,7 +137,7 @@ public MacOSMinimumOperatingSystem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MacOSMinimumOperatingSystem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSMinimumOperatingSystem(); } /// @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("v10_10", V1010); writer.WriteBoolValue("v10_11", V1011); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSOfficeSuiteApp.cs b/src/Microsoft.Graph/Generated/Models/MacOSOfficeSuiteApp.cs index ff2ca651258..120acee65c9 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSOfficeSuiteApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSOfficeSuiteApp.cs @@ -27,7 +27,7 @@ public MacOSOfficeSuiteApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSOfficeSuiteApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSOfficeSuiteApp(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/MacOSPkcsCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/MacOSPkcsCertificateProfile.cs index 379ca6b0c1a..1a967595553 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSPkcsCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSPkcsCertificateProfile.cs @@ -157,7 +157,7 @@ public MacOSPkcsCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSPkcsCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSPkcsCertificateProfile(); } /// @@ -186,7 +186,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowAllAppsAccess", AllowAllAppsAccess); writer.WriteEnumValue("certificateStore", CertificateStore); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSPkgApp.cs b/src/Microsoft.Graph/Generated/Models/MacOSPkgApp.cs index 06dc4bb053e..a63dc5f0159 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSPkgApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSPkgApp.cs @@ -129,7 +129,7 @@ public MacOSPkgApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSPkgApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSPkgApp(); } /// @@ -155,7 +155,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("ignoreVersionDetection", IgnoreVersionDetection); writer.WriteCollectionOfObjectValues("includedApps", IncludedApps); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSPkgAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MacOSPkgAppCollectionResponse.cs index 91f39f148b6..078e6d2acc1 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSPkgAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSPkgAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MacOSPkgAppCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSPkgAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSPkgAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MacOSPrivacyAccessControlItem.cs b/src/Microsoft.Graph/Generated/Models/MacOSPrivacyAccessControlItem.cs index fc5693a4959..ac7cda9004b 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSPrivacyAccessControlItem.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSPrivacyAccessControlItem.cs @@ -249,7 +249,7 @@ public MacOSPrivacyAccessControlItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MacOSPrivacyAccessControlItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSPrivacyAccessControlItem(); } /// @@ -295,7 +295,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("accessibility", Accessibility); writer.WriteEnumValue("addressBook", AddressBook); writer.WriteCollectionOfObjectValues("appleEventsAllowedReceivers", AppleEventsAllowedReceivers); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSRedirectSingleSignOnExtension.cs b/src/Microsoft.Graph/Generated/Models/MacOSRedirectSingleSignOnExtension.cs index ca45960149a..48616deb1c4 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSRedirectSingleSignOnExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSRedirectSingleSignOnExtension.cs @@ -91,7 +91,7 @@ public MacOSRedirectSingleSignOnExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSRedirectSingleSignOnExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSRedirectSingleSignOnExtension(); } /// @@ -114,7 +114,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("configurations", Configurations); writer.WriteStringValue("extensionIdentifier", ExtensionIdentifier); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSScepCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/MacOSScepCertificateProfile.cs index 4b78f83a3bd..888b7aaa7cb 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSScepCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSScepCertificateProfile.cs @@ -175,7 +175,7 @@ public MacOSScepCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSScepCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSScepCertificateProfile(); } /// @@ -207,7 +207,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowAllAppsAccess", AllowAllAppsAccess); writer.WriteEnumValue("certificateStore", CertificateStore); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSSingleSignOnExtension.cs b/src/Microsoft.Graph/Generated/Models/MacOSSingleSignOnExtension.cs index f72731e21d5..4624a760d41 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSSingleSignOnExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSSingleSignOnExtension.cs @@ -27,7 +27,7 @@ public MacOSSingleSignOnExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSSingleSignOnExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -54,7 +54,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateAccountSummary.cs b/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateAccountSummary.cs index 91ce218adb2..adf0ce80b21 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateAccountSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateAccountSummary.cs @@ -156,7 +156,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateAccountSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateAccountSummary(); } /// @@ -186,7 +186,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("categorySummaries", CategorySummaries); writer.WriteStringValue("deviceId", DeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateAccountSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateAccountSummaryCollectionResponse.cs index e8e833b4eff..1d2e6a921da 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateAccountSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateAccountSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MacOSSoftwareUpdateAccountSummaryCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateAccountSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateAccountSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateCategorySummary.cs b/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateCategorySummary.cs index 19040ff1522..046a623ab4b 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateCategorySummary.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateCategorySummary.cs @@ -114,7 +114,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateCategorySummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateCategorySummary(); } /// @@ -142,7 +142,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceId", DeviceId); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateCategorySummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateCategorySummaryCollectionResponse.cs index 77481b48684..87106f9bc0f 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateCategorySummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateCategorySummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MacOSSoftwareUpdateCategorySummaryCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateCategorySummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateCategorySummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateConfiguration.cs b/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateConfiguration.cs index a20b0a6a47f..199002b6cf7 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateConfiguration.cs @@ -91,7 +91,7 @@ public MacOSSoftwareUpdateConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateConfiguration(); } /// @@ -119,7 +119,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("allOtherUpdateBehavior", AllOtherUpdateBehavior); writer.WriteEnumValue("configDataUpdateBehavior", ConfigDataUpdateBehavior); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateStateSummary.cs b/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateStateSummary.cs index 218d88dec7d..b8e6471850f 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateStateSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateStateSummary.cs @@ -86,7 +86,7 @@ public string UpdateVersion /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateStateSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateStateSummary(); } /// @@ -111,7 +111,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("lastUpdatedDateTime", LastUpdatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateStateSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateStateSummaryCollectionResponse.cs index 14b5cda1b55..0d0773df849 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateStateSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSSoftwareUpdateStateSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MacOSSoftwareUpdateStateSummaryCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateStateSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSSoftwareUpdateStateSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MacOSSystemExtension.cs b/src/Microsoft.Graph/Generated/Models/MacOSSystemExtension.cs index d05c939e8ba..1539e9dd555 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSSystemExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSSystemExtension.cs @@ -85,7 +85,7 @@ public MacOSSystemExtension() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MacOSSystemExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSSystemExtension(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("bundleId", BundleId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("teamIdentifier", TeamIdentifier); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSSystemExtensionTypeMapping.cs b/src/Microsoft.Graph/Generated/Models/MacOSSystemExtensionTypeMapping.cs index 85b0d918374..2d13827ed16 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSSystemExtensionTypeMapping.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSSystemExtensionTypeMapping.cs @@ -75,7 +75,7 @@ public MacOSSystemExtensionTypeMapping() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MacOSSystemExtensionTypeMapping CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSSystemExtensionTypeMapping(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("allowedTypes", AllowedTypes); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("teamIdentifier", TeamIdentifier); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSTrustedRootCertificate.cs b/src/Microsoft.Graph/Generated/Models/MacOSTrustedRootCertificate.cs index 6c4ddb2eb5f..2c6fe4bdc3c 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSTrustedRootCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSTrustedRootCertificate.cs @@ -65,7 +65,7 @@ public MacOSTrustedRootCertificate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSTrustedRootCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSTrustedRootCertificate(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certFileName", CertFileName); writer.WriteEnumValue("deploymentChannel", DeploymentChannel); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSVpnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/MacOSVpnConfiguration.cs index a5725156b11..f7726c57616 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSVpnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSVpnConfiguration.cs @@ -49,7 +49,7 @@ public MacOSVpnConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSVpnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSVpnConfiguration(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("deploymentChannel", DeploymentChannel); writer.WriteObjectValue("identityCertificate", IdentityCertificate); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSWebClip.cs b/src/Microsoft.Graph/Generated/Models/MacOSWebClip.cs index ec7c175d7c0..e85848a7d94 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSWebClip.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSWebClip.cs @@ -55,7 +55,7 @@ public MacOSWebClip() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSWebClip CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSWebClip(); } /// @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appUrl", AppUrl); writer.WriteBoolValue("fullScreenEnabled", FullScreenEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSWiFiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/MacOSWiFiConfiguration.cs index 83cbb40e9db..662e9aad6ea 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSWiFiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSWiFiConfiguration.cs @@ -143,7 +143,7 @@ public MacOSWiFiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSWiFiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -178,7 +178,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("connectAutomatically", ConnectAutomatically); writer.WriteBoolValue("connectWhenNetworkNameIsHidden", ConnectWhenNetworkNameIsHidden); diff --git a/src/Microsoft.Graph/Generated/Models/MacOSWiredNetworkConfiguration.cs b/src/Microsoft.Graph/Generated/Models/MacOSWiredNetworkConfiguration.cs index 94d94ff5d74..c7807b81eee 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOSWiredNetworkConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOSWiredNetworkConfiguration.cs @@ -143,7 +143,7 @@ public MacOSWiredNetworkConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOSWiredNetworkConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOSWiredNetworkConfiguration(); } /// @@ -173,7 +173,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteEnumValue("deploymentChannel", DeploymentChannel); diff --git a/src/Microsoft.Graph/Generated/Models/MacOsLobAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/MacOsLobAppAssignmentSettings.cs index dd567b05e3b..9e5906a462e 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOsLobAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOsLobAppAssignmentSettings.cs @@ -13,7 +13,7 @@ namespace Microsoft.Graph.Beta.Models [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class MacOsLobAppAssignmentSettings : global::Microsoft.Graph.Beta.Models.MobileAppAssignmentSettings, IParsable { - /// Whether or not to uninstall the app when device is removed from Intune. + /// When TRUE, indicates that the app should be uninstalled when the device is removed from Intune. When FALSE, indicates that the app will not be uninstalled when the device is removed from Intune. public bool? UninstallOnDeviceRemoval { get { return BackingStore?.Get("uninstallOnDeviceRemoval"); } @@ -33,7 +33,7 @@ public MacOsLobAppAssignmentSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOsLobAppAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOsLobAppAssignmentSettings(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("uninstallOnDeviceRemoval", UninstallOnDeviceRemoval); } diff --git a/src/Microsoft.Graph/Generated/Models/MacOsVppApp.cs b/src/Microsoft.Graph/Generated/Models/MacOsVppApp.cs index dc37b36c34d..b530cf9bec9 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOsVppApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOsVppApp.cs @@ -195,7 +195,7 @@ public MacOsVppApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOsVppApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOsVppApp(); } /// @@ -227,7 +227,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appStoreUrl", AppStoreUrl); writer.WriteCollectionOfObjectValues("assignedLicenses", AssignedLicenses); diff --git a/src/Microsoft.Graph/Generated/Models/MacOsVppAppAssignedLicense.cs b/src/Microsoft.Graph/Generated/Models/MacOsVppAppAssignedLicense.cs index ab29ad91f09..d02ef32783e 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOsVppAppAssignedLicense.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOsVppAppAssignedLicense.cs @@ -84,7 +84,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOsVppAppAssignedLicense CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOsVppAppAssignedLicense(); } /// @@ -107,7 +107,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userEmailAddress", UserEmailAddress); writer.WriteStringValue("userId", UserId); diff --git a/src/Microsoft.Graph/Generated/Models/MacOsVppAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/MacOsVppAppAssignmentSettings.cs index 365f1b7b13b..60e2ff170a4 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOsVppAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOsVppAppAssignmentSettings.cs @@ -51,7 +51,7 @@ public MacOsVppAppAssignmentSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MacOsVppAppAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOsVppAppAssignmentSettings(); } /// @@ -74,7 +74,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("preventAutoAppUpdate", PreventAutoAppUpdate); writer.WriteBoolValue("preventManagedAppBackup", PreventManagedAppBackup); diff --git a/src/Microsoft.Graph/Generated/Models/MacOsVppAppRevokeLicensesActionResult.cs b/src/Microsoft.Graph/Generated/Models/MacOsVppAppRevokeLicensesActionResult.cs index 27037eac1fb..923c2e90ba7 100644 --- a/src/Microsoft.Graph/Generated/Models/MacOsVppAppRevokeLicensesActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/MacOsVppAppRevokeLicensesActionResult.cs @@ -137,7 +137,7 @@ public MacOsVppAppRevokeLicensesActionResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MacOsVppAppRevokeLicensesActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MacOsVppAppRevokeLicensesActionResult(); } /// @@ -166,7 +166,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("actionFailureReason", ActionFailureReason); writer.WriteStringValue("actionName", ActionName); writer.WriteEnumValue("actionState", ActionState); diff --git a/src/Microsoft.Graph/Generated/Models/MachineLearningDetectedSensitiveContent.cs b/src/Microsoft.Graph/Generated/Models/MachineLearningDetectedSensitiveContent.cs index 1a186cae8c1..f230f4dbaa9 100644 --- a/src/Microsoft.Graph/Generated/Models/MachineLearningDetectedSensitiveContent.cs +++ b/src/Microsoft.Graph/Generated/Models/MachineLearningDetectedSensitiveContent.cs @@ -41,7 +41,7 @@ public string ModelVersion /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MachineLearningDetectedSensitiveContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MachineLearningDetectedSensitiveContent(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("matchTolerance", MatchTolerance); writer.WriteStringValue("modelVersion", ModelVersion); diff --git a/src/Microsoft.Graph/Generated/Models/MailAssessmentRequest.cs b/src/Microsoft.Graph/Generated/Models/MailAssessmentRequest.cs index 4e835884b38..c90003c00ed 100644 --- a/src/Microsoft.Graph/Generated/Models/MailAssessmentRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/MailAssessmentRequest.cs @@ -64,7 +64,7 @@ public MailAssessmentRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailAssessmentRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailAssessmentRequest(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("destinationRoutingReason", DestinationRoutingReason); writer.WriteStringValue("messageUri", MessageUri); diff --git a/src/Microsoft.Graph/Generated/Models/MailFolder.cs b/src/Microsoft.Graph/Generated/Models/MailFolder.cs index 49b49301fe9..c0f87fdfecf 100644 --- a/src/Microsoft.Graph/Generated/Models/MailFolder.cs +++ b/src/Microsoft.Graph/Generated/Models/MailFolder.cs @@ -203,7 +203,7 @@ public string WellKnownName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailFolder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -241,7 +241,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("childFolderCount", ChildFolderCount); writer.WriteCollectionOfObjectValues("childFolders", ChildFolders); diff --git a/src/Microsoft.Graph/Generated/Models/MailFolderCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MailFolderCollectionResponse.cs index 9dff0e3f22d..3c22f8ebe26 100644 --- a/src/Microsoft.Graph/Generated/Models/MailFolderCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MailFolderCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MailFolderCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailFolderCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailFolderCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MailFolderOperation.cs b/src/Microsoft.Graph/Generated/Models/MailFolderOperation.cs index 1b3d2f0fb4a..146eb57f64b 100644 --- a/src/Microsoft.Graph/Generated/Models/MailFolderOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/MailFolderOperation.cs @@ -41,7 +41,7 @@ public string ResourceLocation /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailFolderOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("resourceLocation", ResourceLocation); writer.WriteEnumValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/MailFolderOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MailFolderOperationCollectionResponse.cs index 194e06f519f..2b6aba96199 100644 --- a/src/Microsoft.Graph/Generated/Models/MailFolderOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MailFolderOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MailFolderOperationCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailFolderOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailFolderOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MailSearchFolder.cs b/src/Microsoft.Graph/Generated/Models/MailSearchFolder.cs index ca850be73b1..30cf7c0b30f 100644 --- a/src/Microsoft.Graph/Generated/Models/MailSearchFolder.cs +++ b/src/Microsoft.Graph/Generated/Models/MailSearchFolder.cs @@ -70,7 +70,7 @@ public MailSearchFolder() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailSearchFolder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailSearchFolder(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("filterQuery", FilterQuery); writer.WriteBoolValue("includeNestedFolders", IncludeNestedFolders); diff --git a/src/Microsoft.Graph/Generated/Models/MailTips.cs b/src/Microsoft.Graph/Generated/Models/MailTips.cs index 971b16163c2..83f594bf9ef 100644 --- a/src/Microsoft.Graph/Generated/Models/MailTips.cs +++ b/src/Microsoft.Graph/Generated/Models/MailTips.cs @@ -174,7 +174,7 @@ public MailTips() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MailTips CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailTips(); } /// @@ -206,7 +206,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("automaticReplies", AutomaticReplies); writer.WriteStringValue("customMailTip", CustomMailTip); writer.WriteBoolValue("deliveryRestricted", DeliveryRestricted); diff --git a/src/Microsoft.Graph/Generated/Models/MailTipsError.cs b/src/Microsoft.Graph/Generated/Models/MailTipsError.cs index 2df8a4a3315..55c23d70c36 100644 --- a/src/Microsoft.Graph/Generated/Models/MailTipsError.cs +++ b/src/Microsoft.Graph/Generated/Models/MailTipsError.cs @@ -84,7 +84,7 @@ public MailTipsError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MailTipsError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailTipsError(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Mailbox.cs b/src/Microsoft.Graph/Generated/Models/Mailbox.cs index 224a1819ae5..7118a528078 100644 --- a/src/Microsoft.Graph/Generated/Models/Mailbox.cs +++ b/src/Microsoft.Graph/Generated/Models/Mailbox.cs @@ -42,7 +42,7 @@ public Mailbox() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Mailbox CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Mailbox(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("folders", Folders); } diff --git a/src/Microsoft.Graph/Generated/Models/MailboxCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MailboxCollectionResponse.cs index 29425575967..1ef4b50d581 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MailboxCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MailboxDetails.cs b/src/Microsoft.Graph/Generated/Models/MailboxDetails.cs index ed3dde647c1..c700cb60975 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxDetails.cs @@ -84,7 +84,7 @@ public MailboxDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MailboxDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxDetails(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("emailAddress", EmailAddress); writer.WriteStringValue("externalDirectoryObjectId", ExternalDirectoryObjectId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/MailboxFolder.cs b/src/Microsoft.Graph/Generated/Models/MailboxFolder.cs index c56dcf91599..530bab58e9a 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxFolder.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxFolder.cs @@ -159,7 +159,7 @@ public string Type /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxFolder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxFolder(); } /// @@ -188,7 +188,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("childFolderCount", ChildFolderCount); writer.WriteCollectionOfObjectValues("childFolders", ChildFolders); diff --git a/src/Microsoft.Graph/Generated/Models/MailboxFolderCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MailboxFolderCollectionResponse.cs index d64862d0031..0684117daeb 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxFolderCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxFolderCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MailboxFolderCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxFolderCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxFolderCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MailboxItem.cs b/src/Microsoft.Graph/Generated/Models/MailboxItem.cs index a53eec80ea4..b85de7e085a 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxItem.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxItem.cs @@ -80,7 +80,7 @@ public MailboxItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxItem(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", MultiValueExtendedProperties); writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", SingleValueExtendedProperties); diff --git a/src/Microsoft.Graph/Generated/Models/MailboxItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MailboxItemCollectionResponse.cs index 69511a28a81..c725703b835 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MailboxItemCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MailboxItemImportSession.cs b/src/Microsoft.Graph/Generated/Models/MailboxItemImportSession.cs index 365061037c4..1a02543bcb9 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxItemImportSession.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxItemImportSession.cs @@ -74,7 +74,7 @@ public MailboxItemImportSession() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MailboxItemImportSession CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxItemImportSession(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteStringValue("importUrl", ImportUrl); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/MailboxProtectionRule.cs b/src/Microsoft.Graph/Generated/Models/MailboxProtectionRule.cs index a828f059b21..2fc95177a40 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxProtectionRule.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxProtectionRule.cs @@ -42,7 +42,7 @@ public MailboxProtectionRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxProtectionRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxProtectionRule(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("mailboxExpression", MailboxExpression); } diff --git a/src/Microsoft.Graph/Generated/Models/MailboxProtectionRuleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MailboxProtectionRuleCollectionResponse.cs index ba177fb3091..3ca57610993 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxProtectionRuleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxProtectionRuleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MailboxProtectionRuleCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxProtectionRuleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxProtectionRuleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnit.cs b/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnit.cs index 75b4b9c9be0..170115fd9bf 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnit.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnit.cs @@ -80,7 +80,7 @@ public MailboxProtectionUnit() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxProtectionUnit CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxProtectionUnit(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("directoryObjectId", DirectoryObjectId); writer.WriteEnumValue("mailboxType", MailboxType); diff --git a/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnitCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnitCollectionResponse.cs index e2d23f1aa80..08a3bfb6f01 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnitCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnitCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MailboxProtectionUnitCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxProtectionUnitCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxProtectionUnitCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnitsBulkAdditionJob.cs b/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnitsBulkAdditionJob.cs index ee309b89cd3..dffd0c63195 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnitsBulkAdditionJob.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnitsBulkAdditionJob.cs @@ -58,7 +58,7 @@ public MailboxProtectionUnitsBulkAdditionJob() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxProtectionUnitsBulkAdditionJob CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxProtectionUnitsBulkAdditionJob(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("directoryObjectIds", DirectoryObjectIds); writer.WriteCollectionOfPrimitiveValues("mailboxes", Mailboxes); diff --git a/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnitsBulkAdditionJobCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnitsBulkAdditionJobCollectionResponse.cs index bb54ffdf5ac..d7248083cf4 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnitsBulkAdditionJobCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxProtectionUnitsBulkAdditionJobCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MailboxProtectionUnitsBulkAdditionJobCollectionResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxProtectionUnitsBulkAdditionJobCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxProtectionUnitsBulkAdditionJobCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifact.cs b/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifact.cs index 940feeec487..410d650052b 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifact.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifact.cs @@ -57,7 +57,7 @@ public int? RestoredItemCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxRestoreArtifact CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -84,7 +84,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("restoredFolderId", RestoredFolderId); writer.WriteIntValue("restoredItemCount", RestoredItemCount); diff --git a/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifactCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifactCollectionResponse.cs index 174df9a9616..a8ff9be02c1 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifactCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifactCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MailboxRestoreArtifactCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxRestoreArtifactCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxRestoreArtifactCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifactsBulkAdditionRequest.cs b/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifactsBulkAdditionRequest.cs index 16e216a9e5d..139f3ca0ec7 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifactsBulkAdditionRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifactsBulkAdditionRequest.cs @@ -51,7 +51,7 @@ public List Mailboxes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxRestoreArtifactsBulkAdditionRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxRestoreArtifactsBulkAdditionRequest(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("directoryObjectIds", DirectoryObjectIds); writer.WriteCollectionOfPrimitiveValues("mailboxes", Mailboxes); diff --git a/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifactsBulkAdditionRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifactsBulkAdditionRequestCollectionResponse.cs index 67f813eca50..3ba5180d88f 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifactsBulkAdditionRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxRestoreArtifactsBulkAdditionRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MailboxRestoreArtifactsBulkAdditionRequestCollectionRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MailboxRestoreArtifactsBulkAdditionRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxRestoreArtifactsBulkAdditionRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MailboxSettings.cs b/src/Microsoft.Graph/Generated/Models/MailboxSettings.cs index 4f05eab04ae..f42b71ae793 100644 --- a/src/Microsoft.Graph/Generated/Models/MailboxSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/MailboxSettings.cs @@ -182,7 +182,7 @@ public MailboxSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MailboxSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MailboxSettings(); } /// @@ -212,7 +212,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("archiveFolder", ArchiveFolder); writer.WriteObjectValue("automaticRepliesSetting", AutomaticRepliesSetting); writer.WriteStringValue("dateFormat", DateFormat); diff --git a/src/Microsoft.Graph/Generated/Models/Malware.cs b/src/Microsoft.Graph/Generated/Models/Malware.cs index 66d69a8b718..16623bda4b4 100644 --- a/src/Microsoft.Graph/Generated/Models/Malware.cs +++ b/src/Microsoft.Graph/Generated/Models/Malware.cs @@ -68,7 +68,7 @@ public Malware() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Malware CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Malware(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/MalwareState.cs b/src/Microsoft.Graph/Generated/Models/MalwareState.cs index 20cafd4a193..bbc41038f54 100644 --- a/src/Microsoft.Graph/Generated/Models/MalwareState.cs +++ b/src/Microsoft.Graph/Generated/Models/MalwareState.cs @@ -122,7 +122,7 @@ public MalwareState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MalwareState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MalwareState(); } /// @@ -147,7 +147,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("category", Category); writer.WriteStringValue("family", Family); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/MalwareStateForWindowsDevice.cs b/src/Microsoft.Graph/Generated/Models/MalwareStateForWindowsDevice.cs index ec75bcd0aed..4c381cff4ff 100644 --- a/src/Microsoft.Graph/Generated/Models/MalwareStateForWindowsDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/MalwareStateForWindowsDevice.cs @@ -66,7 +66,7 @@ public DateTimeOffset? LastStateChangeDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MalwareStateForWindowsDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MalwareStateForWindowsDevice(); } /// @@ -91,7 +91,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("detectionCount", DetectionCount); writer.WriteStringValue("deviceName", DeviceName); diff --git a/src/Microsoft.Graph/Generated/Models/MalwareStateForWindowsDeviceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MalwareStateForWindowsDeviceCollectionResponse.cs index 51d032b5562..2de063859be 100644 --- a/src/Microsoft.Graph/Generated/Models/MalwareStateForWindowsDeviceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MalwareStateForWindowsDeviceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MalwareStateForWindowsDeviceCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MalwareStateForWindowsDeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MalwareStateForWindowsDeviceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAllDeviceCertificateState.cs b/src/Microsoft.Graph/Generated/Models/ManagedAllDeviceCertificateState.cs index 90134de2a4e..829b6542580 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAllDeviceCertificateState.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAllDeviceCertificateState.cs @@ -161,7 +161,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAllDeviceCertificateState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAllDeviceCertificateState(); } /// @@ -192,7 +192,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("certificateExpirationDateTime", CertificateExpirationDateTime); writer.WriteStringValue("certificateExtendedKeyUsages", CertificateExtendedKeyUsages); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAllDeviceCertificateStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedAllDeviceCertificateStateCollectionResponse.cs index fa70dc22d18..9c15c83d2bc 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAllDeviceCertificateStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAllDeviceCertificateStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedAllDeviceCertificateStateCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAllDeviceCertificateStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAllDeviceCertificateStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAndroidLobApp.cs b/src/Microsoft.Graph/Generated/Models/ManagedAndroidLobApp.cs index 11630fd4ac8..94be40fc5c8 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAndroidLobApp.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAndroidLobApp.cs @@ -97,7 +97,7 @@ public ManagedAndroidLobApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAndroidLobApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAndroidLobApp(); } /// @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("minimumSupportedOperatingSystem", MinimumSupportedOperatingSystem); writer.WriteStringValue("packageId", PackageId); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAndroidLobAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedAndroidLobAppCollectionResponse.cs index cf1409e5bbe..906a4aeb589 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAndroidLobAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAndroidLobAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedAndroidLobAppCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAndroidLobAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAndroidLobAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAndroidStoreApp.cs b/src/Microsoft.Graph/Generated/Models/ManagedAndroidStoreApp.cs index 764bce21a54..b402dd302d5 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAndroidStoreApp.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAndroidStoreApp.cs @@ -75,7 +75,7 @@ public ManagedAndroidStoreApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAndroidStoreApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAndroidStoreApp(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appStoreUrl", AppStoreUrl); writer.WriteObjectValue("minimumSupportedOperatingSystem", MinimumSupportedOperatingSystem); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedApp.cs b/src/Microsoft.Graph/Generated/Models/ManagedApp.cs index 3f64ab583c6..abe840bbeda 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedApp.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedApp.cs @@ -49,7 +49,7 @@ public ManagedApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("appAvailability", AppAvailability); writer.WriteStringValue("version", Version); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppConfiguration.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppConfiguration.cs index c117b1ce29a..89947b10a20 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppConfiguration.cs @@ -59,7 +59,7 @@ public ManagedAppConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -85,7 +85,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("customSettings", CustomSettings); writer.WriteCollectionOfObjectValues("settings", Settings); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppDiagnosticStatus.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppDiagnosticStatus.cs index da8aa162dc0..eb09ffcad51 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppDiagnosticStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppDiagnosticStatus.cs @@ -101,7 +101,7 @@ public ManagedAppDiagnosticStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedAppDiagnosticStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAppDiagnosticStatus(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("mitigationInstruction", MitigationInstruction); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("state", State); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppLogCollectionRequest.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppLogCollectionRequest.cs index a68d234ba71..f54fe053b64 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppLogCollectionRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppLogCollectionRequest.cs @@ -134,7 +134,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppLogCollectionRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAppLogCollectionRequest(); } /// @@ -162,7 +162,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); writer.WriteStringValue("managedAppRegistrationId", ManagedAppRegistrationId); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppLogCollectionRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppLogCollectionRequestCollectionResponse.cs index eb42b33ab8a..07501b6a668 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppLogCollectionRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppLogCollectionRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedAppLogCollectionRequestCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppLogCollectionRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAppLogCollectionRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppLogUpload.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppLogUpload.cs index 77da4dfbe84..e111c591a93 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppLogUpload.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppLogUpload.cs @@ -107,7 +107,7 @@ public ManagedAppLogUpload() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedAppLogUpload CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAppLogUpload(); } /// @@ -131,7 +131,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("managedAppComponent", ManagedAppComponent); writer.WriteStringValue("managedAppComponentDescription", ManagedAppComponentDescription); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppOperation.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppOperation.cs index dd1a9ed05f8..b0a674182dd 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppOperation.cs @@ -74,7 +74,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAppOperation(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppOperationCollectionResponse.cs index 7820bfa174f..d9f58065e7d 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedAppOperationCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAppOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppPolicy.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppPolicy.cs index 8ae542e008f..d47190920c8 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppPolicy.cs @@ -96,7 +96,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -136,7 +136,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppPolicyCollectionResponse.cs index 0547958dd44..7ff3043f106 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedAppPolicyCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAppPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppPolicyDeploymentSummary.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppPolicyDeploymentSummary.cs index 6fb9d597f6c..02195747df1 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppPolicyDeploymentSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppPolicyDeploymentSummary.cs @@ -80,7 +80,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppPolicyDeploymentSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAppPolicyDeploymentSummary(); } /// @@ -104,7 +104,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("configurationDeployedUserCount", ConfigurationDeployedUserCount); writer.WriteCollectionOfObjectValues("configurationDeploymentSummaryPerApp", ConfigurationDeploymentSummaryPerApp); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppPolicyDeploymentSummaryPerApp.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppPolicyDeploymentSummaryPerApp.cs index 1cf6fcebc66..048a6c67dbe 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppPolicyDeploymentSummaryPerApp.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppPolicyDeploymentSummaryPerApp.cs @@ -75,7 +75,7 @@ public ManagedAppPolicyDeploymentSummaryPerApp() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedAppPolicyDeploymentSummaryPerApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAppPolicyDeploymentSummaryPerApp(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("configurationAppliedUserCount", ConfigurationAppliedUserCount); writer.WriteObjectValue("mobileAppIdentifier", MobileAppIdentifier); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppProtection.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppProtection.cs index afee1f14f28..0c70abe45ba 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppProtection.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppProtection.cs @@ -419,7 +419,7 @@ public ManagedAppProtection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppProtection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -493,7 +493,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfEnumValues("allowedDataIngestionLocations", AllowedDataIngestionLocations); writer.WriteCollectionOfEnumValues("allowedDataStorageLocations", AllowedDataStorageLocations); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppProtectionPolicySetItem.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppProtectionPolicySetItem.cs index c1283854adf..d341df51f23 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppProtectionPolicySetItem.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppProtectionPolicySetItem.cs @@ -43,7 +43,7 @@ public ManagedAppProtectionPolicySetItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppProtectionPolicySetItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAppProtectionPolicySetItem(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("targetedAppManagementLevels", TargetedAppManagementLevels); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppRegistration.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppRegistration.cs index 29ede2c9f07..ba800a7c524 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppRegistration.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppRegistration.cs @@ -320,7 +320,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppRegistration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -366,7 +366,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("appIdentifier", AppIdentifier); writer.WriteStringValue("applicationVersion", ApplicationVersion); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppRegistrationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppRegistrationCollectionResponse.cs index 71c1cac322e..271cb3d3255 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppRegistrationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppRegistrationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedAppRegistrationCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppRegistrationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAppRegistrationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppStatus.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppStatus.cs index a19abf9bcb4..50305fa6807 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppStatus.cs @@ -52,7 +52,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("version", Version); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppStatusCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppStatusCollectionResponse.cs index 8f80eb09a54..ac980493c55 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppStatusCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppStatusCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedAppStatusCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppStatusCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAppStatusCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedAppStatusRaw.cs b/src/Microsoft.Graph/Generated/Models/ManagedAppStatusRaw.cs index 1e78c825df5..55ffdbdbade 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedAppStatusRaw.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedAppStatusRaw.cs @@ -43,7 +43,7 @@ public ManagedAppStatusRaw() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedAppStatusRaw CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedAppStatusRaw(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("content", Content); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDevice.cs b/src/Microsoft.Graph/Generated/Models/ManagedDevice.cs index 81b4ebed41b..62085375bf9 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDevice.cs @@ -1134,7 +1134,7 @@ public int? WindowsRemediatedMalwareCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -1252,7 +1252,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignmentFilterEvaluationStatusDetails", AssignmentFilterEvaluationStatusDetails); writer.WriteEnumValue("chassisType", ChassisType); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceCertificateState.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceCertificateState.cs index 50bd9605f79..8f9b3f24ba0 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceCertificateState.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceCertificateState.cs @@ -253,7 +253,7 @@ public string UserDisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceCertificateState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceCertificateState(); } /// @@ -296,7 +296,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certificateEnhancedKeyUsage", CertificateEnhancedKeyUsage); writer.WriteIntValue("certificateErrorCode", CertificateErrorCode); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceCleanupRule.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceCleanupRule.cs index 1fb3295604a..f0e76b2259d 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceCleanupRule.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceCleanupRule.cs @@ -70,7 +70,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceCleanupRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceCleanupRule(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteEnumValue("deviceCleanupRulePlatformType", DeviceCleanupRulePlatformType); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceCleanupRuleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceCleanupRuleCollectionResponse.cs index c1abfc6537e..306c185e90b 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceCleanupRuleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceCleanupRuleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedDeviceCleanupRuleCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceCleanupRuleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceCleanupRuleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceCleanupSettings.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceCleanupSettings.cs index e1238a1d0e6..62d419e935c 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceCleanupSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceCleanupSettings.cs @@ -69,7 +69,7 @@ public ManagedDeviceCleanupSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedDeviceCleanupSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceCleanupSettings(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceInactivityBeforeRetirementInDays", DeviceInactivityBeforeRetirementInDays); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceCollectionResponse.cs index dce31e7a82e..8e62b0fb566 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedDeviceCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceEncryptionState.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceEncryptionState.cs index e97b52673a9..735a5ee7935 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceEncryptionState.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceEncryptionState.cs @@ -136,7 +136,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceEncryptionState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceEncryptionState(); } /// @@ -166,7 +166,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("advancedBitLockerStates", AdvancedBitLockerStates); writer.WriteStringValue("deviceName", DeviceName); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceEncryptionStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceEncryptionStateCollectionResponse.cs index fc322935a90..0d84fc88a33 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceEncryptionStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceEncryptionStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedDeviceEncryptionStateCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceEncryptionStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceEncryptionStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfiguration.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfiguration.cs index 0b90e79a810..013846dd2b0 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfiguration.cs @@ -182,7 +182,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -220,7 +220,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationAssignment.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationAssignment.cs index ab5aa3c7073..a10c63dc3cc 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationAssignment.cs @@ -36,7 +36,7 @@ public partial class ManagedDeviceMobileAppConfigurationAssignment : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse.cs index b5bb7ca3708..5140a85151b 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedDeviceMobileAppConfigurationAssignmentCollectionResp /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationCollectionResponse.cs index 99756e2a33d..8a7d1b5c4d5 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedDeviceMobileAppConfigurationCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationDeviceStatus.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationDeviceStatus.cs index b52acef548e..ba611349b09 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationDeviceStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationDeviceStatus.cs @@ -108,7 +108,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceStatus(); } /// @@ -135,7 +135,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("complianceGracePeriodExpirationDateTime", ComplianceGracePeriodExpirationDateTime); writer.WriteStringValue("deviceDisplayName", DeviceDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse.cs index ad14e87cefb..608b6b01c6f 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedDeviceMobileAppConfigurationDeviceStatusCollectionRe /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationDeviceSummary.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationDeviceSummary.cs index e862a21b2a6..080a855a7e5 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationDeviceSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationDeviceSummary.cs @@ -74,7 +74,7 @@ public int? SuccessCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationDeviceSummary(); } /// @@ -102,7 +102,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("configurationVersion", ConfigurationVersion); writer.WriteIntValue("conflictCount", ConflictCount); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationPolicySetItem.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationPolicySetItem.cs index 5a9a32f113f..c6a8bb7e69a 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationPolicySetItem.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationPolicySetItem.cs @@ -27,7 +27,7 @@ public ManagedDeviceMobileAppConfigurationPolicySetItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationPolicySetItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationPolicySetItem(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationSettingState.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationSettingState.cs index 2b5daae87c5..5b38e2a12b1 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationSettingState.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationSettingState.cs @@ -241,7 +241,7 @@ public ManagedDeviceMobileAppConfigurationSettingState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationSettingState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationSettingState(); } /// @@ -274,7 +274,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("currentValue", CurrentValue); writer.WriteLongValue("errorCode", ErrorCode); writer.WriteStringValue("errorDescription", ErrorDescription); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationState.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationState.cs index dd63304d264..f298af353da 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationState.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationState.cs @@ -108,7 +108,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationState(); } /// @@ -135,7 +135,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteEnumValue("platformType", PlatformType); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationStateCollectionResponse.cs index 0cc58b87ffd..e92283983ad 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedDeviceMobileAppConfigurationStateCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationUserStatus.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationUserStatus.cs index 03c72552e81..2ba3dc4bf96 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationUserStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationUserStatus.cs @@ -70,7 +70,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserStatus(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("devicesCount", DevicesCount); writer.WriteDateTimeOffsetValue("lastReportedDateTime", LastReportedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse.cs index 75656671715..0e4332f6ad0 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedDeviceMobileAppConfigurationUserStatusCollectionResp /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationUserSummary.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationUserSummary.cs index dc276d368c4..01aeb042462 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationUserSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceMobileAppConfigurationUserSummary.cs @@ -68,7 +68,7 @@ public int? SuccessCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceMobileAppConfigurationUserSummary(); } /// @@ -95,7 +95,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("configurationVersion", ConfigurationVersion); writer.WriteIntValue("conflictCount", ConflictCount); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceModelsAndManufacturers.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceModelsAndManufacturers.cs index 57be2adb279..3a37c514204 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceModelsAndManufacturers.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceModelsAndManufacturers.cs @@ -85,7 +85,7 @@ public ManagedDeviceModelsAndManufacturers() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedDeviceModelsAndManufacturers CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceModelsAndManufacturers(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("deviceManufacturers", DeviceManufacturers); writer.WriteCollectionOfPrimitiveValues("deviceModels", DeviceModels); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceOverview.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceOverview.cs index 9bd1c5ee3d4..f8d699f1845 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceOverview.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceOverview.cs @@ -92,7 +92,7 @@ public int? MdmEnrolledCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceOverview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceOverview(); } /// @@ -118,7 +118,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("deviceExchangeAccessStateSummary", DeviceExchangeAccessStateSummary); writer.WriteObjectValue("deviceOperatingSystemSummary", DeviceOperatingSystemSummary); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceReportedApp.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceReportedApp.cs index 108595d2ea4..483d82da407 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceReportedApp.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceReportedApp.cs @@ -69,7 +69,7 @@ public ManagedDeviceReportedApp() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedDeviceReportedApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceReportedApp(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceSummarizedAppState.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceSummarizedAppState.cs index 2b694042534..a6c34d0f0db 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceSummarizedAppState.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceSummarizedAppState.cs @@ -75,7 +75,7 @@ public ManagedDeviceSummarizedAppState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedDeviceSummarizedAppState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceSummarizedAppState(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceId", DeviceId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("summarizedAppState", SummarizedAppState); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemEdition.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemEdition.cs index d02f9d9515d..714d639be0b 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemEdition.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemEdition.cs @@ -66,7 +66,7 @@ public ManagedDeviceWindowsOperatingSystemEdition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedDeviceWindowsOperatingSystemEdition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceWindowsOperatingSystemEdition(); } /// @@ -88,7 +88,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("editionType", EditionType); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateValue("supportEndDate", SupportEndDate); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemImage.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemImage.cs index 80af872b1e2..33e138ad822 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemImage.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemImage.cs @@ -68,7 +68,7 @@ public partial class ManagedDeviceWindowsOperatingSystemImage : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceWindowsOperatingSystemImage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceWindowsOperatingSystemImage(); } /// @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("availableUpdates", AvailableUpdates); writer.WriteCollectionOfEnumValues("supportedArchitectures", SupportedArchitectures); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemImageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemImageCollectionResponse.cs index 7c0e8c14ba2..79d54e31b35 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemImageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemImageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedDeviceWindowsOperatingSystemImageCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedDeviceWindowsOperatingSystemImageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceWindowsOperatingSystemImageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemUpdate.cs b/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemUpdate.cs index d1c778dc08b..0347febf23a 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemUpdate.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedDeviceWindowsOperatingSystemUpdate.cs @@ -81,7 +81,7 @@ public ManagedDeviceWindowsOperatingSystemUpdate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedDeviceWindowsOperatingSystemUpdate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedDeviceWindowsOperatingSystemUpdate(); } /// @@ -104,7 +104,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("buildVersion", BuildVersion); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("releaseMonth", ReleaseMonth); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedEBook.cs b/src/Microsoft.Graph/Generated/Models/ManagedEBook.cs index fe4ac954352..8c8a03c535a 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedEBook.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedEBook.cs @@ -214,7 +214,7 @@ public string Publisher /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedEBook CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -252,7 +252,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteCollectionOfObjectValues("categories", Categories); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedEBookAssignment.cs b/src/Microsoft.Graph/Generated/Models/ManagedEBookAssignment.cs index 5a90d0a3066..06fa27b9a41 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedEBookAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedEBookAssignment.cs @@ -42,7 +42,7 @@ public partial class ManagedEBookAssignment : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedEBookAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -68,7 +68,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("installIntent", InstallIntent); writer.WriteObjectValue("target", Target); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedEBookAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedEBookAssignmentCollectionResponse.cs index 69f0823525a..4b02bafc8c1 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedEBookAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedEBookAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedEBookAssignmentCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedEBookAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedEBookAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedEBookCategory.cs b/src/Microsoft.Graph/Generated/Models/ManagedEBookCategory.cs index 918eb5666f6..29ae08ed5c3 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedEBookCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedEBookCategory.cs @@ -42,7 +42,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedEBookCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedEBookCategory(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedEBookCategoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedEBookCategoryCollectionResponse.cs index 6fdd2e2e375..0e6cd126130 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedEBookCategoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedEBookCategoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedEBookCategoryCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedEBookCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedEBookCategoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedEBookCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedEBookCollectionResponse.cs index 2287cc38897..3ed7bb9ae76 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedEBookCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedEBookCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedEBookCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedEBookCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedEBookCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedIOSLobApp.cs b/src/Microsoft.Graph/Generated/Models/ManagedIOSLobApp.cs index ec09b3d5410..dcb79615ccd 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedIOSLobApp.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedIOSLobApp.cs @@ -129,7 +129,7 @@ public ManagedIOSLobApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedIOSLobApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedIOSLobApp(); } /// @@ -155,7 +155,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("applicableDeviceType", ApplicableDeviceType); writer.WriteStringValue("buildNumber", BuildNumber); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedIOSLobAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedIOSLobAppCollectionResponse.cs index c96588e2b29..89d0107eca9 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedIOSLobAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedIOSLobAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedIOSLobAppCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedIOSLobAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedIOSLobAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedIOSStoreApp.cs b/src/Microsoft.Graph/Generated/Models/ManagedIOSStoreApp.cs index c7543da6753..974174463c1 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedIOSStoreApp.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedIOSStoreApp.cs @@ -91,7 +91,7 @@ public ManagedIOSStoreApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedIOSStoreApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedIOSStoreApp(); } /// @@ -114,7 +114,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("applicableDeviceType", ApplicableDeviceType); writer.WriteStringValue("appStoreUrl", AppStoreUrl); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedIdentity.cs b/src/Microsoft.Graph/Generated/Models/ManagedIdentity.cs index f4c75127641..5601e4d4a1a 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedIdentity.cs @@ -106,7 +106,7 @@ public ManagedIdentity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedIdentity(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("associatedResourceId", AssociatedResourceId); writer.WriteStringValue("federatedTokenId", FederatedTokenId); writer.WriteStringValue("federatedTokenIssuer", FederatedTokenIssuer); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedMobileApp.cs b/src/Microsoft.Graph/Generated/Models/ManagedMobileApp.cs index 0ef3f57e1d8..3914757d064 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedMobileApp.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedMobileApp.cs @@ -52,7 +52,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedMobileApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedMobileApp(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("mobileAppIdentifier", MobileAppIdentifier); writer.WriteStringValue("version", Version); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedMobileAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedMobileAppCollectionResponse.cs index 5c9aad784cf..68db471a150 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedMobileAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedMobileAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedMobileAppCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedMobileAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedMobileAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedMobileLobApp.cs b/src/Microsoft.Graph/Generated/Models/ManagedMobileLobApp.cs index 38efdcd5495..a143ee8ef0c 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedMobileLobApp.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedMobileLobApp.cs @@ -81,7 +81,7 @@ public ManagedMobileLobApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedMobileLobApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("committedContentVersion", CommittedContentVersion); writer.WriteCollectionOfObjectValues("contentVersions", ContentVersions); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedMobileLobAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedMobileLobAppCollectionResponse.cs index de7bebb8336..e70a973ad56 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedMobileLobAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedMobileLobAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedMobileLobAppCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedMobileLobAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedMobileLobAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AggregatedPolicyCompliance.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AggregatedPolicyCompliance.cs index 3d1fad2121a..280708e93a1 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AggregatedPolicyCompliance.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AggregatedPolicyCompliance.cs @@ -145,7 +145,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.AggregatedPolicyCompliance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.AggregatedPolicyCompliance(); } /// @@ -175,7 +175,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("compliancePolicyId", CompliancePolicyId); writer.WriteStringValue("compliancePolicyName", CompliancePolicyName); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AggregatedPolicyComplianceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AggregatedPolicyComplianceCollectionResponse.cs index 47846256f90..0cf5332d570 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AggregatedPolicyComplianceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AggregatedPolicyComplianceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AggregatedPolicyComplianceCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.AggregatedPolicyComplianceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.AggregatedPolicyComplianceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertData.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertData.cs index b358cce50c8..7c0c4432a84 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertData.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertData.cs @@ -68,7 +68,7 @@ public AlertData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.AlertData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.AlertData(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertDataReferenceString.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertDataReferenceString.cs index 42ba34e5ec9..b6781a57e00 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertDataReferenceString.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertDataReferenceString.cs @@ -68,7 +68,7 @@ public AlertDataReferenceString() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.AlertDataReferenceString CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.AlertDataReferenceString(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertLogContent.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertLogContent.cs index 64ab163ff76..f0fe7102bfa 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertLogContent.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertLogContent.cs @@ -68,7 +68,7 @@ public AlertLogContent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.AlertLogContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.AlertLogContent(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertRuleDefinitionTemplate.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertRuleDefinitionTemplate.cs index 30190111c2b..7b88a12fd7a 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertRuleDefinitionTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AlertRuleDefinitionTemplate.cs @@ -58,7 +58,7 @@ public AlertRuleDefinitionTemplate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.AlertRuleDefinitionTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.AlertRuleDefinitionTemplate(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("defaultSeverity", DefaultSeverity); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AppPerformance.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AppPerformance.cs index 21a91a8496f..a55c0812436 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AppPerformance.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AppPerformance.cs @@ -129,7 +129,7 @@ public int? TotalAppFreezeCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.AppPerformance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.AppPerformance(); } /// @@ -158,7 +158,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appFriendlyName", AppFriendlyName); writer.WriteStringValue("appName", AppName); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AppPerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AppPerformanceCollectionResponse.cs index 1d621bd5f5a..ec1df8d2635 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AppPerformanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AppPerformanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AppPerformanceCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.AppPerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.AppPerformanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AuditEvent.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AuditEvent.cs index 196316c38b2..39ddba41430 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AuditEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AuditEvent.cs @@ -217,7 +217,7 @@ public string TenantNames /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.AuditEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.AuditEvent(); } /// @@ -249,7 +249,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("activity", Activity); writer.WriteDateTimeOffsetValue("activityDateTime", ActivityDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AuditEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AuditEventCollectionResponse.cs index 89f0b0e3b4c..8fea09ebbe2 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/AuditEventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/AuditEventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuditEventCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.AuditEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.AuditEventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcConnection.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcConnection.cs index 98d64455e89..165d7adb2d5 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcConnection.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcConnection.cs @@ -89,7 +89,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.CloudPcConnection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.CloudPcConnection(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("healthCheckStatus", HealthCheckStatus); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcConnectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcConnectionCollectionResponse.cs index 4be00ae9832..d43e8dc9129 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcConnectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcConnectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcConnectionCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.CloudPcConnectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.CloudPcConnectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcDevice.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcDevice.cs index 620129860fa..d7f49f815d3 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcDevice.cs @@ -201,7 +201,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.CloudPcDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.CloudPcDevice(); } /// @@ -232,7 +232,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("cloudPcStatus", CloudPcStatus); writer.WriteStringValue("deviceSpecification", DeviceSpecification); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcDeviceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcDeviceCollectionResponse.cs index 6e471f4cc57..d92ed9d62b8 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcDeviceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcDeviceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcDeviceCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.CloudPcDeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.CloudPcDeviceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcOverview.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcOverview.cs index 13819f04848..a4dd50ed029 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcOverview.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcOverview.cs @@ -165,7 +165,7 @@ public int? TotalEnterpriseLicenses /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.CloudPcOverview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.CloudPcOverview(); } /// @@ -205,7 +205,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("frontlineLicensesCount", FrontlineLicensesCount); writer.WriteDateTimeOffsetValue("lastRefreshedDateTime", LastRefreshedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcOverviewCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcOverviewCollectionResponse.cs index ee6460eaf20..c2fb91cedc7 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcOverviewCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CloudPcOverviewCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudPcOverviewCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.CloudPcOverviewCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.CloudPcOverviewCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ConditionalAccessPolicyCoverage.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ConditionalAccessPolicyCoverage.cs index 3e6d4b72eeb..d6b20e25685 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ConditionalAccessPolicyCoverage.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ConditionalAccessPolicyCoverage.cs @@ -63,7 +63,7 @@ public string TenantDisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ConditionalAccessPolicyCoverage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ConditionalAccessPolicyCoverage(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("conditionalAccessPolicyState", ConditionalAccessPolicyState); writer.WriteDateTimeOffsetValue("latestPolicyModifiedDateTime", LatestPolicyModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ConditionalAccessPolicyCoverageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ConditionalAccessPolicyCoverageCollectionResponse.cs index 4d2d1b8f547..c9f1a803f2b 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ConditionalAccessPolicyCoverageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ConditionalAccessPolicyCoverageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConditionalAccessPolicyCoverageCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ConditionalAccessPolicyCoverageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ConditionalAccessPolicyCoverageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CredentialUserRegistrationsSummary.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CredentialUserRegistrationsSummary.cs index 3ad724d9f91..6ad55344164 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CredentialUserRegistrationsSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CredentialUserRegistrationsSummary.cs @@ -131,7 +131,7 @@ public int? TotalUserCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.CredentialUserRegistrationsSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.CredentialUserRegistrationsSummary(); } /// @@ -162,7 +162,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("lastRefreshedDateTime", LastRefreshedDateTime); writer.WriteIntValue("mfaAndSsprCapableUserCount", MfaAndSsprCapableUserCount); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CredentialUserRegistrationsSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CredentialUserRegistrationsSummaryCollectionResponse.cs index 56b1069260a..ec398a36eb1 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/CredentialUserRegistrationsSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/CredentialUserRegistrationsSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CredentialUserRegistrationsSummaryCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.CredentialUserRegistrationsSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.CredentialUserRegistrationsSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceAppPerformance.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceAppPerformance.cs index d366f543044..ff69088f79c 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceAppPerformance.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceAppPerformance.cs @@ -225,7 +225,7 @@ public int? TotalAppFreezeCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.DeviceAppPerformance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.DeviceAppPerformance(); } /// @@ -260,7 +260,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appFriendlyName", AppFriendlyName); writer.WriteStringValue("appName", AppName); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceAppPerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceAppPerformanceCollectionResponse.cs index 565f89c8ecc..6d3ca4dafee 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceAppPerformanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceAppPerformanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceAppPerformanceCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.DeviceAppPerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.DeviceAppPerformanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceCompliancePolicySettingStateSummary.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceCompliancePolicySettingStateSummary.cs index f7893158dc1..5097e8ea216 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceCompliancePolicySettingStateSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceCompliancePolicySettingStateSummary.cs @@ -157,7 +157,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.DeviceCompliancePolicySettingStateSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.DeviceCompliancePolicySettingStateSummary(); } /// @@ -189,7 +189,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("conflictDeviceCount", ConflictDeviceCount); writer.WriteIntValue("errorDeviceCount", ErrorDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceCompliancePolicySettingStateSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceCompliancePolicySettingStateSummaryCollectionResponse.cs index 4441e920de5..b504f5ec179 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceCompliancePolicySettingStateSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceCompliancePolicySettingStateSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceCompliancePolicySettingStateSummaryCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.DeviceCompliancePolicySettingStateSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.DeviceCompliancePolicySettingStateSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceHealthStatus.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceHealthStatus.cs index 9e46d214c15..96b279c2c5c 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceHealthStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceHealthStatus.cs @@ -209,7 +209,7 @@ public string TopProcesses /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.DeviceHealthStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.DeviceHealthStatus(); } /// @@ -243,7 +243,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("blueScreenCount", BlueScreenCount); writer.WriteDoubleValue("bootTotalDurationInSeconds", BootTotalDurationInSeconds); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceHealthStatusCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceHealthStatusCollectionResponse.cs index 78827535350..60368e3db2f 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceHealthStatusCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/DeviceHealthStatusCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceHealthStatusCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.DeviceHealthStatusCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.DeviceHealthStatusCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/Email.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/Email.cs index 9a1b0b5884a..edbf834bed5 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/Email.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/Email.cs @@ -68,7 +68,7 @@ public Email() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.Email CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.Email(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("emailAddress", EmailAddress); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/GraphAPIErrorDetails.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/GraphAPIErrorDetails.cs index 4510c407df4..df583aa01a4 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/GraphAPIErrorDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/GraphAPIErrorDetails.cs @@ -84,7 +84,7 @@ public GraphAPIErrorDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.GraphAPIErrorDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.GraphAPIErrorDetails(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceCompliance.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceCompliance.cs index 1407b60fee8..c69efd58301 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceCompliance.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceCompliance.cs @@ -213,7 +213,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedDeviceCompliance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedDeviceCompliance(); } /// @@ -246,7 +246,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("complianceStatus", ComplianceStatus); writer.WriteStringValue("deviceType", DeviceType); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceComplianceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceComplianceCollectionResponse.cs index 2f99d4137df..a0388202d83 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceComplianceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceComplianceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedDeviceComplianceCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedDeviceComplianceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedDeviceComplianceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceComplianceTrend.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceComplianceTrend.cs index b3c3108b9db..765319de9b9 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceComplianceTrend.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceComplianceTrend.cs @@ -103,7 +103,7 @@ public int? UnknownDeviceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedDeviceComplianceTrend CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedDeviceComplianceTrend(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("compliantDeviceCount", CompliantDeviceCount); writer.WriteIntValue("configManagerDeviceCount", ConfigManagerDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceComplianceTrendCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceComplianceTrendCollectionResponse.cs index f17d97cceb6..c3bebfcc30a 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceComplianceTrendCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedDeviceComplianceTrendCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedDeviceComplianceTrendCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedDeviceComplianceTrendCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedDeviceComplianceTrendCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenant.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenant.cs index 8d3aa927ee2..a02635b549b 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenant.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenant.cs @@ -611,7 +611,7 @@ public partial class ManagedTenant : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenant(); } /// @@ -667,7 +667,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("aggregatedPolicyCompliances", AggregatedPolicyCompliances); writer.WriteCollectionOfObjectValues("appPerformances", AppPerformances); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlert.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlert.cs index 1f4df3bd397..360986d2523 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlert.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlert.cs @@ -273,7 +273,7 @@ public string Title /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlert CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlert(); } /// @@ -311,7 +311,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("alertData", AlertData); writer.WriteCollectionOfObjectValues("alertDataReferenceStrings", AlertDataReferenceStrings); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertCollectionResponse.cs index f22af741ef5..3e8079441a0 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedTenantAlertCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlertCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlertCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertLog.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertLog.cs index 5f671a68be4..73dc3000ff2 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertLog.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertLog.cs @@ -95,7 +95,7 @@ public DateTimeOffset? LastActionDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlertLog CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlertLog(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("alert", Alert); writer.WriteObjectValue("content", Content); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertLogCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertLogCollectionResponse.cs index 5d4253f18f8..1c9dde18bb5 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertLogCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertLogCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedTenantAlertLogCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlertLogCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlertLogCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRule.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRule.cs index a0629e33740..0f3a84f0023 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRule.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRule.cs @@ -199,7 +199,7 @@ public DateTimeOffset? LastRunDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlertRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlertRule(); } /// @@ -233,7 +233,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("alertDisplayName", AlertDisplayName); writer.WriteCollectionOfObjectValues("alerts", Alerts); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRuleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRuleCollectionResponse.cs index ce2c6ea845d..917368c8659 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRuleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRuleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedTenantAlertRuleCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlertRuleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlertRuleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRuleDefinition.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRuleDefinition.cs index 20e8b7b3101..97f65f8a0ba 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRuleDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRuleDefinition.cs @@ -111,7 +111,7 @@ public DateTimeOffset? LastActionDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlertRuleDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlertRuleDefinition(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("alertRules", AlertRules); writer.WriteStringValue("createdByUserId", CreatedByUserId); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRuleDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRuleDefinitionCollectionResponse.cs index b6b86415801..cf550cf9f61 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRuleDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantAlertRuleDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedTenantAlertRuleDefinitionCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlertRuleDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantAlertRuleDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantApiNotification.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantApiNotification.cs index a0c6f2048f7..0e08909af16 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantApiNotification.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantApiNotification.cs @@ -133,7 +133,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantApiNotification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantApiNotification(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("alert", Alert); writer.WriteStringValue("createdByUserId", CreatedByUserId); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantApiNotificationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantApiNotificationCollectionResponse.cs index 3c66ebe2a9e..d083ba979e9 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantApiNotificationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantApiNotificationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedTenantApiNotificationCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantApiNotificationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantApiNotificationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantEmailNotification.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantEmailNotification.cs index aa6b922372e..73b81f72075 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantEmailNotification.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantEmailNotification.cs @@ -127,7 +127,7 @@ public string Subject /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantEmailNotification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantEmailNotification(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("alert", Alert); writer.WriteStringValue("createdByUserId", CreatedByUserId); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantEmailNotificationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantEmailNotificationCollectionResponse.cs index bb987064115..dfe4713e0d1 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantEmailNotificationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantEmailNotificationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedTenantEmailNotificationCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantEmailNotificationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantEmailNotificationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantTicketingEndpoint.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantTicketingEndpoint.cs index b186e25251a..0f1b542d8ef 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantTicketingEndpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantTicketingEndpoint.cs @@ -111,7 +111,7 @@ public string PhoneNumber /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantTicketingEndpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantTicketingEndpoint(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("createdByUserId", CreatedByUserId); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantTicketingEndpointCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantTicketingEndpointCollectionResponse.cs index 85d45c8896c..1b9927c461c 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantTicketingEndpointCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagedTenantTicketingEndpointCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagedTenantTicketingEndpointCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantTicketingEndpointCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagedTenantTicketingEndpointCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementAction.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementAction.cs index 111db6362c6..42ca9608e6d 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementAction.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementAction.cs @@ -95,7 +95,7 @@ public int? ReferenceTemplateVersion /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementAction(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("category", Category); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionCollectionResponse.cs index 998fcde1d38..5053a4e7dd5 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagementActionCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementActionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementActionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionDeploymentStatus.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionDeploymentStatus.cs index 51d927b97bc..92aa7d5df4d 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionDeploymentStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionDeploymentStatus.cs @@ -112,7 +112,7 @@ public ManagementActionDeploymentStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementActionDeploymentStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementActionDeploymentStatus(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("managementActionId", ManagementActionId); writer.WriteStringValue("managementTemplateId", ManagementTemplateId); writer.WriteIntValue("managementTemplateVersion", ManagementTemplateVersion); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionInfo.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionInfo.cs index 3461f0804ec..dd3391467f7 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionInfo.cs @@ -90,7 +90,7 @@ public ManagementActionInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementActionInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementActionInfo(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("managementActionId", ManagementActionId); writer.WriteStringValue("managementTemplateId", ManagementTemplateId); writer.WriteIntValue("managementTemplateVersion", ManagementTemplateVersion); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionTenantDeploymentStatus.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionTenantDeploymentStatus.cs index 3a89817e2d0..575b9447593 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionTenantDeploymentStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionTenantDeploymentStatus.cs @@ -67,7 +67,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementActionTenantDeploymentStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementActionTenantDeploymentStatus(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("statuses", Statuses); writer.WriteStringValue("tenantGroupId", TenantGroupId); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionTenantDeploymentStatusCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionTenantDeploymentStatusCollectionResponse.cs index 43f8fc3e4c0..2aacb19d011 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionTenantDeploymentStatusCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementActionTenantDeploymentStatusCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagementActionTenantDeploymentStatusCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementActionTenantDeploymentStatusCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementActionTenantDeploymentStatusCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementIntent.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementIntent.cs index 630dead6ecf..dcb111a9dff 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementIntent.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementIntent.cs @@ -57,7 +57,7 @@ public bool? IsGlobal /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementIntent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementIntent(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteBoolValue("isGlobal", IsGlobal); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementIntentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementIntentCollectionResponse.cs index f4228ac27a4..a4d517c7f9a 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementIntentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementIntentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagementIntentCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementIntentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementIntentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementIntentInfo.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementIntentInfo.cs index fc5186b055b..73f73cb1e1c 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementIntentInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementIntentInfo.cs @@ -100,7 +100,7 @@ public ManagementIntentInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementIntentInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementIntentInfo(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("managementIntentDisplayName", ManagementIntentDisplayName); writer.WriteStringValue("managementIntentId", ManagementIntentId); writer.WriteCollectionOfObjectValues("managementTemplates", ManagementTemplates); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplate.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplate.cs index b876e175e56..c99d9e23893 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplate.cs @@ -215,7 +215,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplate(); } /// @@ -250,7 +250,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("category", Category); writer.WriteStringValue("createdByUserId", CreatedByUserId); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollection.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollection.cs index 6e44c8c2a93..252eed3ebb1 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollection.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollection.cs @@ -111,7 +111,7 @@ public DateTimeOffset? LastActionDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateCollection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateCollection(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("createdByUserId", CreatedByUserId); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionCollectionResponse.cs index a3aa21453d6..c4e18d9107c 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagementTemplateCollectionCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateCollectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateCollectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionResponse.cs index 1ea5c1525f1..5ceaa2c1070 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagementTemplateCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionTenantSummary.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionTenantSummary.cs index 3e6f2b73da6..59ad74e68ba 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionTenantSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionTenantSummary.cs @@ -183,7 +183,7 @@ public int? UnlicensedUsersCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateCollectionTenantSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateCollectionTenantSummary(); } /// @@ -221,7 +221,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("completeStepsCount", CompleteStepsCount); writer.WriteIntValue("completeUsersCount", CompleteUsersCount); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionTenantSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionTenantSummaryCollectionResponse.cs index 777bb0ecf0a..6358f557c01 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionTenantSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateCollectionTenantSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagementTemplateCollectionTenantSummaryCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateCollectionTenantSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateCollectionTenantSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateDetailedInfo.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateDetailedInfo.cs index ee0bf0e3ffb..9c251f2b719 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateDetailedInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateDetailedInfo.cs @@ -96,7 +96,7 @@ public ManagementTemplateDetailedInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateDetailedInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateDetailedInfo(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("category", Category); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("managementTemplateId", ManagementTemplateId); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStep.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStep.cs index 16495294c14..140e28828bd 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStep.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStep.cs @@ -203,7 +203,7 @@ public string UserImpact /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStep CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStep(); } /// @@ -236,7 +236,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("acceptedVersion", AcceptedVersion); writer.WriteEnumValue("category", Category); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepCollectionResponse.cs index 3cf1d1e67b8..fca20869eb1 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagementTemplateStepCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStepCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStepCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepDeployment.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepDeployment.cs index 4e7cfed4817..105f79d5b55 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepDeployment.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepDeployment.cs @@ -117,7 +117,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStepDeployment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStepDeployment(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("createdByUserId", CreatedByUserId); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepDeploymentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepDeploymentCollectionResponse.cs index dc1434f43ad..a67eba6954c 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepDeploymentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepDeploymentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagementTemplateStepDeploymentCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStepDeploymentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStepDeploymentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepTenantSummary.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepTenantSummary.cs index 7ec15cf52a1..c1f4fb973a1 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepTenantSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepTenantSummary.cs @@ -189,7 +189,7 @@ public int? NotCompliantTenantsCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStepTenantSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStepTenantSummary(); } /// @@ -223,7 +223,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("assignedTenantsCount", AssignedTenantsCount); writer.WriteIntValue("compliantTenantsCount", CompliantTenantsCount); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepTenantSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepTenantSummaryCollectionResponse.cs index cd8ed126597..545462b2f16 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepTenantSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepTenantSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagementTemplateStepTenantSummaryCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStepTenantSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStepTenantSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepVersion.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepVersion.cs index 6b2f5a53be6..ad051882ab8 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepVersion.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepVersion.cs @@ -165,7 +165,7 @@ public string VersionInformation /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStepVersion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStepVersion(); } /// @@ -195,7 +195,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("acceptedFor", AcceptedFor); writer.WriteStringValue("contentMarkdown", ContentMarkdown); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepVersionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepVersionCollectionResponse.cs index b8d0a347fc0..97e83e9f9ae 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepVersionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/ManagementTemplateStepVersionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManagementTemplateStepVersionCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStepVersionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.ManagementTemplateStepVersionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/MyRole.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/MyRole.cs index 7b4a79c0d7e..437043d59ba 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/MyRole.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/MyRole.cs @@ -84,7 +84,7 @@ public MyRole() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.MyRole CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.MyRole(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("tenantId", TenantId); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/MyRoleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/MyRoleCollectionResponse.cs index 5dae00158ca..36807f42e4e 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/MyRoleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/MyRoleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MyRoleCollectionResponse : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.MyRoleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.MyRoleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/NotificationTarget.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/NotificationTarget.cs index 939eeef3f91..f410b1864bb 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/NotificationTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/NotificationTarget.cs @@ -68,7 +68,7 @@ public NotificationTarget() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.NotificationTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.NotificationTarget(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/RoleAssignment.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/RoleAssignment.cs index 9e20452af30..165221a92a8 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/RoleAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/RoleAssignment.cs @@ -74,7 +74,7 @@ public RoleAssignment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.RoleAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.RoleAssignment(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("assignmentType", AssignmentType); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("roles", Roles); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/RoleDefinition.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/RoleDefinition.cs index 0e8195621b3..d8a171ae023 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/RoleDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/RoleDefinition.cs @@ -100,7 +100,7 @@ public RoleDefinition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.RoleDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.RoleDefinition(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/Setting.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/Setting.cs index d11c0fdc0cc..8fdffe1fe0e 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/Setting.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/Setting.cs @@ -112,7 +112,7 @@ public Setting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.Setting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.Setting(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("jsonValue", JsonValue); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TemplateParameter.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TemplateParameter.cs index 2abb31638b6..168149af24e 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TemplateParameter.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TemplateParameter.cs @@ -122,7 +122,7 @@ public TemplateParameter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.TemplateParameter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.TemplateParameter(); } /// @@ -147,7 +147,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("jsonAllowedValues", JsonAllowedValues); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/Tenant.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/Tenant.cs index 8cfc020bc82..a52d5522b71 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/Tenant.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/Tenant.cs @@ -95,7 +95,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.Tenant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.Tenant(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("contract", Contract); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantCollectionResponse.cs index 47e33588351..48340325375 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TenantCollectionResponse : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantContactInformation.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantContactInformation.cs index 5a3eeeca3c8..68ac17e83d9 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantContactInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantContactInformation.cs @@ -132,7 +132,7 @@ public TenantContactInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantContactInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantContactInformation(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("email", Email); writer.WriteStringValue("name", Name); writer.WriteStringValue("notes", Notes); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantContract.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantContract.cs index 3dea8c86b74..bc64a24225d 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantContract.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantContract.cs @@ -90,7 +90,7 @@ public TenantContract() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantContract CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantContract(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("contractType", ContractType); writer.WriteStringValue("defaultDomainName", DefaultDomainName); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantCustomizedInformation.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantCustomizedInformation.cs index 9bc8b04437c..bfd1f1e6b6a 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantCustomizedInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantCustomizedInformation.cs @@ -169,7 +169,7 @@ public string Website /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantCustomizedInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantCustomizedInformation(); } /// @@ -198,7 +198,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("businessRelationship", BusinessRelationship); writer.WriteCollectionOfPrimitiveValues("complianceRequirements", ComplianceRequirements); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantCustomizedInformationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantCustomizedInformationCollectionResponse.cs index 0a58d39b4a1..af6cf02fa0a 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantCustomizedInformationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantCustomizedInformationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TenantCustomizedInformationCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantCustomizedInformationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantCustomizedInformationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantDetailedInformation.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantDetailedInformation.cs index da6d7e3e6ce..df15aee9950 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantDetailedInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantDetailedInformation.cs @@ -179,7 +179,7 @@ public string VerticalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantDetailedInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantDetailedInformation(); } /// @@ -208,7 +208,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("city", City); writer.WriteStringValue("countryCode", CountryCode); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantDetailedInformationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantDetailedInformationCollectionResponse.cs index f28d8befde5..8e450f86c43 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantDetailedInformationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantDetailedInformationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TenantDetailedInformationCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantDetailedInformationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantDetailedInformationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantGroup.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantGroup.cs index bf043ea3f10..1f08e5d5a20 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantGroup.cs @@ -89,7 +89,7 @@ public List TenantIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantGroup(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allTenantsIncluded", AllTenantsIncluded); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantGroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantGroupCollectionResponse.cs index bb0fdff6670..3019c161c70 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantGroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantGroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TenantGroupCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantGroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantGroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantInfo.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantInfo.cs index 59f43ba0f0f..de6f37e25b9 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantInfo.cs @@ -68,7 +68,7 @@ public TenantInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantInfo(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("tenantId", TenantId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantStatusInformation.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantStatusInformation.cs index a22084efabb..dcd5823552b 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantStatusInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantStatusInformation.cs @@ -136,7 +136,7 @@ public TenantStatusInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantStatusInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantStatusInformation(); } /// @@ -165,7 +165,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("delegatedPrivilegeStatus", DelegatedPrivilegeStatus); writer.WriteDateTimeOffsetValue("lastDelegatedPrivilegeRefreshDateTime", LastDelegatedPrivilegeRefreshDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantTag.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantTag.cs index d759795c38d..95b229e7eb4 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantTag.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantTag.cs @@ -117,7 +117,7 @@ public DateTimeOffset? LastActionDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantTag CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantTag(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("createdByUserId", CreatedByUserId); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantTagCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantTagCollectionResponse.cs index 2743220fa9a..604716f3fa1 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantTagCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/TenantTagCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TenantTagCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantTagCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.TenantTagCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsDeviceMalwareState.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsDeviceMalwareState.cs index 8bdbe4d9fc3..5bd161f5cea 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsDeviceMalwareState.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsDeviceMalwareState.cs @@ -225,7 +225,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.WindowsDeviceMalwareState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.WindowsDeviceMalwareState(); } /// @@ -260,7 +260,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("additionalInformationUrl", AdditionalInformationUrl); writer.WriteIntValue("detectionCount", DetectionCount); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsDeviceMalwareStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsDeviceMalwareStateCollectionResponse.cs index 9ee2be1fae1..725a8dabd8a 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsDeviceMalwareStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsDeviceMalwareStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsDeviceMalwareStateCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.WindowsDeviceMalwareStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.WindowsDeviceMalwareStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsProtectionState.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsProtectionState.cs index c58b67ad9e0..fd69786dc9f 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsProtectionState.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsProtectionState.cs @@ -269,7 +269,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.WindowsProtectionState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.WindowsProtectionState(); } /// @@ -313,7 +313,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("antiMalwareVersion", AntiMalwareVersion); writer.WriteBoolValue("attentionRequired", AttentionRequired); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsProtectionStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsProtectionStateCollectionResponse.cs index 339f8971af5..a91f7f4f2ca 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsProtectionStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/WindowsProtectionStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsProtectionStateCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ManagedTenants.WindowsProtectionStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.WindowsProtectionStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/WorkloadAction.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/WorkloadAction.cs index be2fec5e472..882838bfdd8 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/WorkloadAction.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/WorkloadAction.cs @@ -154,7 +154,7 @@ public WorkloadAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.WorkloadAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.WorkloadAction(); } /// @@ -181,7 +181,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("actionId", ActionId); writer.WriteEnumValue("category", Category); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/WorkloadActionDeploymentStatus.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/WorkloadActionDeploymentStatus.cs index 1758224d7f9..978e2b2090d 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/WorkloadActionDeploymentStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/WorkloadActionDeploymentStatus.cs @@ -150,7 +150,7 @@ public WorkloadActionDeploymentStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.WorkloadActionDeploymentStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.WorkloadActionDeploymentStatus(); } /// @@ -178,7 +178,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("actionId", ActionId); writer.WriteStringValue("deployedPolicyId", DeployedPolicyId); writer.WriteObjectValue("error", Error); diff --git a/src/Microsoft.Graph/Generated/Models/ManagedTenants/WorkloadStatus.cs b/src/Microsoft.Graph/Generated/Models/ManagedTenants/WorkloadStatus.cs index c89a4167c2b..fa6bd8db5f5 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagedTenants/WorkloadStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagedTenants/WorkloadStatus.cs @@ -86,7 +86,7 @@ public WorkloadStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagedTenants.WorkloadStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagedTenants.WorkloadStatus(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("offboardedDateTime", OffboardedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ManagementCertificateWithThumbprint.cs b/src/Microsoft.Graph/Generated/Models/ManagementCertificateWithThumbprint.cs index 6e8be6e419b..fe8691ca411 100644 --- a/src/Microsoft.Graph/Generated/Models/ManagementCertificateWithThumbprint.cs +++ b/src/Microsoft.Graph/Generated/Models/ManagementCertificateWithThumbprint.cs @@ -84,7 +84,7 @@ public ManagementCertificateWithThumbprint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ManagementCertificateWithThumbprint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ManagementCertificateWithThumbprint(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("certificate", Certificate); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("thumbprint", Thumbprint); diff --git a/src/Microsoft.Graph/Generated/Models/MarkContent.cs b/src/Microsoft.Graph/Generated/Models/MarkContent.cs index 1ae3a8d9df0..da6b7d80766 100644 --- a/src/Microsoft.Graph/Generated/Models/MarkContent.cs +++ b/src/Microsoft.Graph/Generated/Models/MarkContent.cs @@ -64,7 +64,7 @@ public MarkContent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MarkContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fontColor", FontColor); writer.WriteLongValue("fontSize", FontSize); diff --git a/src/Microsoft.Graph/Generated/Models/MatchLocation.cs b/src/Microsoft.Graph/Generated/Models/MatchLocation.cs index 412462b4c60..6aade7ef69e 100644 --- a/src/Microsoft.Graph/Generated/Models/MatchLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/MatchLocation.cs @@ -64,7 +64,7 @@ public MatchLocation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MatchLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MatchLocation(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("length", Length); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("offset", Offset); diff --git a/src/Microsoft.Graph/Generated/Models/MatchingDlpRule.cs b/src/Microsoft.Graph/Generated/Models/MatchingDlpRule.cs index 76e7177b841..fe229b1c455 100644 --- a/src/Microsoft.Graph/Generated/Models/MatchingDlpRule.cs +++ b/src/Microsoft.Graph/Generated/Models/MatchingDlpRule.cs @@ -150,7 +150,7 @@ public MatchingDlpRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MatchingDlpRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MatchingDlpRule(); } /// @@ -178,7 +178,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("actions", Actions); writer.WriteBoolValue("isMostRestrictive", IsMostRestrictive); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/MatchingLabel.cs b/src/Microsoft.Graph/Generated/Models/MatchingLabel.cs index 7212049595b..bb6deca90e7 100644 --- a/src/Microsoft.Graph/Generated/Models/MatchingLabel.cs +++ b/src/Microsoft.Graph/Generated/Models/MatchingLabel.cs @@ -182,7 +182,7 @@ public MatchingLabel() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MatchingLabel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MatchingLabel(); } /// @@ -212,7 +212,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("applicationMode", ApplicationMode); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/MdmWindowsInformationProtectionPolicy.cs b/src/Microsoft.Graph/Generated/Models/MdmWindowsInformationProtectionPolicy.cs index db8f3c93e35..b796dd91c19 100644 --- a/src/Microsoft.Graph/Generated/Models/MdmWindowsInformationProtectionPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/MdmWindowsInformationProtectionPolicy.cs @@ -27,7 +27,7 @@ public MdmWindowsInformationProtectionPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MdmWindowsInformationProtectionPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MdmWindowsInformationProtectionPolicy(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/MdmWindowsInformationProtectionPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MdmWindowsInformationProtectionPolicyCollectionResponse.cs index 5ef341d3776..32d14f54c63 100644 --- a/src/Microsoft.Graph/Generated/Models/MdmWindowsInformationProtectionPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MdmWindowsInformationProtectionPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MdmWindowsInformationProtectionPolicyCollectionResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MdmWindowsInformationProtectionPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MdmWindowsInformationProtectionPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MdmWindowsInformationProtectionPolicyPolicySetItem.cs b/src/Microsoft.Graph/Generated/Models/MdmWindowsInformationProtectionPolicyPolicySetItem.cs index 277ee3a3681..20a0d3d37a8 100644 --- a/src/Microsoft.Graph/Generated/Models/MdmWindowsInformationProtectionPolicyPolicySetItem.cs +++ b/src/Microsoft.Graph/Generated/Models/MdmWindowsInformationProtectionPolicyPolicySetItem.cs @@ -27,7 +27,7 @@ public MdmWindowsInformationProtectionPolicyPolicySetItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MdmWindowsInformationProtectionPolicyPolicySetItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MdmWindowsInformationProtectionPolicyPolicySetItem(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Media.cs b/src/Microsoft.Graph/Generated/Models/Media.cs index ff88652ecc0..c17e1808b8a 100644 --- a/src/Microsoft.Graph/Generated/Models/Media.cs +++ b/src/Microsoft.Graph/Generated/Models/Media.cs @@ -74,7 +74,7 @@ public Media() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Media CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Media(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isTranscriptionShown", IsTranscriptionShown); writer.WriteObjectValue("mediaSource", MediaSource); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/MediaConfig.cs b/src/Microsoft.Graph/Generated/Models/MediaConfig.cs index 8c2fa35b79b..b5753be3f5e 100644 --- a/src/Microsoft.Graph/Generated/Models/MediaConfig.cs +++ b/src/Microsoft.Graph/Generated/Models/MediaConfig.cs @@ -58,7 +58,7 @@ public MediaConfig() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MediaConfig CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -85,7 +85,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("removeFromDefaultAudioGroup", RemoveFromDefaultAudioGroup); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/MediaContentRatingAustralia.cs b/src/Microsoft.Graph/Generated/Models/MediaContentRatingAustralia.cs index 35b0b599469..0b1a411a668 100644 --- a/src/Microsoft.Graph/Generated/Models/MediaContentRatingAustralia.cs +++ b/src/Microsoft.Graph/Generated/Models/MediaContentRatingAustralia.cs @@ -64,7 +64,7 @@ public MediaContentRatingAustralia() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MediaContentRatingAustralia CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MediaContentRatingAustralia(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("movieRating", MovieRating); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("tvRating", TvRating); diff --git a/src/Microsoft.Graph/Generated/Models/MediaContentRatingCanada.cs b/src/Microsoft.Graph/Generated/Models/MediaContentRatingCanada.cs index 7c0eee413e9..8422560ac4c 100644 --- a/src/Microsoft.Graph/Generated/Models/MediaContentRatingCanada.cs +++ b/src/Microsoft.Graph/Generated/Models/MediaContentRatingCanada.cs @@ -64,7 +64,7 @@ public MediaContentRatingCanada() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MediaContentRatingCanada CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MediaContentRatingCanada(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("movieRating", MovieRating); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("tvRating", TvRating); diff --git a/src/Microsoft.Graph/Generated/Models/MediaContentRatingFrance.cs b/src/Microsoft.Graph/Generated/Models/MediaContentRatingFrance.cs index c8703b46dba..cd78aa59d7c 100644 --- a/src/Microsoft.Graph/Generated/Models/MediaContentRatingFrance.cs +++ b/src/Microsoft.Graph/Generated/Models/MediaContentRatingFrance.cs @@ -64,7 +64,7 @@ public MediaContentRatingFrance() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MediaContentRatingFrance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MediaContentRatingFrance(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("movieRating", MovieRating); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("tvRating", TvRating); diff --git a/src/Microsoft.Graph/Generated/Models/MediaContentRatingGermany.cs b/src/Microsoft.Graph/Generated/Models/MediaContentRatingGermany.cs index 5c1f16f3fbb..aaf3d3da1a1 100644 --- a/src/Microsoft.Graph/Generated/Models/MediaContentRatingGermany.cs +++ b/src/Microsoft.Graph/Generated/Models/MediaContentRatingGermany.cs @@ -64,7 +64,7 @@ public MediaContentRatingGermany() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MediaContentRatingGermany CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MediaContentRatingGermany(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("movieRating", MovieRating); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("tvRating", TvRating); diff --git a/src/Microsoft.Graph/Generated/Models/MediaContentRatingIreland.cs b/src/Microsoft.Graph/Generated/Models/MediaContentRatingIreland.cs index ff8f7e3957c..d99726d09cd 100644 --- a/src/Microsoft.Graph/Generated/Models/MediaContentRatingIreland.cs +++ b/src/Microsoft.Graph/Generated/Models/MediaContentRatingIreland.cs @@ -64,7 +64,7 @@ public MediaContentRatingIreland() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MediaContentRatingIreland CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MediaContentRatingIreland(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("movieRating", MovieRating); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("tvRating", TvRating); diff --git a/src/Microsoft.Graph/Generated/Models/MediaContentRatingJapan.cs b/src/Microsoft.Graph/Generated/Models/MediaContentRatingJapan.cs index 20c2145d8c7..0b6fcf7950f 100644 --- a/src/Microsoft.Graph/Generated/Models/MediaContentRatingJapan.cs +++ b/src/Microsoft.Graph/Generated/Models/MediaContentRatingJapan.cs @@ -64,7 +64,7 @@ public MediaContentRatingJapan() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MediaContentRatingJapan CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MediaContentRatingJapan(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("movieRating", MovieRating); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("tvRating", TvRating); diff --git a/src/Microsoft.Graph/Generated/Models/MediaContentRatingNewZealand.cs b/src/Microsoft.Graph/Generated/Models/MediaContentRatingNewZealand.cs index 5b31031f09f..672bd92930c 100644 --- a/src/Microsoft.Graph/Generated/Models/MediaContentRatingNewZealand.cs +++ b/src/Microsoft.Graph/Generated/Models/MediaContentRatingNewZealand.cs @@ -64,7 +64,7 @@ public MediaContentRatingNewZealand() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MediaContentRatingNewZealand CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MediaContentRatingNewZealand(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("movieRating", MovieRating); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("tvRating", TvRating); diff --git a/src/Microsoft.Graph/Generated/Models/MediaContentRatingUnitedKingdom.cs b/src/Microsoft.Graph/Generated/Models/MediaContentRatingUnitedKingdom.cs index a157ae89751..ba9c4bfbffb 100644 --- a/src/Microsoft.Graph/Generated/Models/MediaContentRatingUnitedKingdom.cs +++ b/src/Microsoft.Graph/Generated/Models/MediaContentRatingUnitedKingdom.cs @@ -64,7 +64,7 @@ public MediaContentRatingUnitedKingdom() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MediaContentRatingUnitedKingdom CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MediaContentRatingUnitedKingdom(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("movieRating", MovieRating); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("tvRating", TvRating); diff --git a/src/Microsoft.Graph/Generated/Models/MediaContentRatingUnitedStates.cs b/src/Microsoft.Graph/Generated/Models/MediaContentRatingUnitedStates.cs index 4013ee83e0e..de66acea5f6 100644 --- a/src/Microsoft.Graph/Generated/Models/MediaContentRatingUnitedStates.cs +++ b/src/Microsoft.Graph/Generated/Models/MediaContentRatingUnitedStates.cs @@ -64,7 +64,7 @@ public MediaContentRatingUnitedStates() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MediaContentRatingUnitedStates CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MediaContentRatingUnitedStates(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("movieRating", MovieRating); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("tvRating", TvRating); diff --git a/src/Microsoft.Graph/Generated/Models/MediaInfo.cs b/src/Microsoft.Graph/Generated/Models/MediaInfo.cs index b02e8d98363..2423f950328 100644 --- a/src/Microsoft.Graph/Generated/Models/MediaInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/MediaInfo.cs @@ -84,7 +84,7 @@ public MediaInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MediaInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MediaInfo(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("resourceId", ResourceId); writer.WriteStringValue("uri", Uri); diff --git a/src/Microsoft.Graph/Generated/Models/MediaPrompt.cs b/src/Microsoft.Graph/Generated/Models/MediaPrompt.cs index e94fa070585..2a864152ae6 100644 --- a/src/Microsoft.Graph/Generated/Models/MediaPrompt.cs +++ b/src/Microsoft.Graph/Generated/Models/MediaPrompt.cs @@ -48,7 +48,7 @@ public MediaPrompt() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MediaPrompt CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MediaPrompt(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("loop", Loop); writer.WriteObjectValue("mediaInfo", MediaInfo); diff --git a/src/Microsoft.Graph/Generated/Models/MediaSource.cs b/src/Microsoft.Graph/Generated/Models/MediaSource.cs index 98234701501..92181adef5d 100644 --- a/src/Microsoft.Graph/Generated/Models/MediaSource.cs +++ b/src/Microsoft.Graph/Generated/Models/MediaSource.cs @@ -58,7 +58,7 @@ public MediaSource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MediaSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MediaSource(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("contentCategory", ContentCategory); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/MediaStream.cs b/src/Microsoft.Graph/Generated/Models/MediaStream.cs index 36456229117..496e11c934d 100644 --- a/src/Microsoft.Graph/Generated/Models/MediaStream.cs +++ b/src/Microsoft.Graph/Generated/Models/MediaStream.cs @@ -102,7 +102,7 @@ public MediaStream() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MediaStream CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MediaStream(); } /// @@ -127,7 +127,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("direction", Direction); writer.WriteStringValue("label", Label); writer.WriteEnumValue("mediaType", MediaType); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingActivityStatistics.cs b/src/Microsoft.Graph/Generated/Models/MeetingActivityStatistics.cs index 707e0bf3fb1..950d4606500 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingActivityStatistics.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingActivityStatistics.cs @@ -62,7 +62,7 @@ public MeetingActivityStatistics() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MeetingActivityStatistics CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingActivityStatistics(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeSpanValue("afterHours", AfterHours); writer.WriteTimeSpanValue("conflicting", Conflicting); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingAttendanceReport.cs b/src/Microsoft.Graph/Generated/Models/MeetingAttendanceReport.cs index bcd6e579065..925b7ca75ea 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingAttendanceReport.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingAttendanceReport.cs @@ -69,7 +69,7 @@ public int? TotalParticipantCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingAttendanceReport(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("attendanceRecords", AttendanceRecords); writer.WriteCollectionOfObjectValues("externalEventInformation", ExternalEventInformation); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingAttendanceReportCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MeetingAttendanceReportCollectionResponse.cs index cf5d557c5f8..42b06942bd1 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingAttendanceReportCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingAttendanceReportCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MeetingAttendanceReportCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MeetingAttendanceReportCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingAttendanceReportCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MeetingCapability.cs b/src/Microsoft.Graph/Generated/Models/MeetingCapability.cs index a3f0260c2df..8658c1a7be4 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingCapability.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingCapability.cs @@ -70,7 +70,7 @@ public MeetingCapability() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MeetingCapability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingCapability(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowAnonymousUsersToDialOut", AllowAnonymousUsersToDialOut); writer.WriteBoolValue("allowAnonymousUsersToStartMeeting", AllowAnonymousUsersToStartMeeting); writer.WriteEnumValue("autoAdmittedUsers", AutoAdmittedUsers); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingInfo.cs b/src/Microsoft.Graph/Generated/Models/MeetingInfo.cs index c491ea116e7..2b1dbe89f8a 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingInfo.cs @@ -58,7 +58,7 @@ public MeetingInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MeetingInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowConversationWithoutHost", AllowConversationWithoutHost); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingNote.cs b/src/Microsoft.Graph/Generated/Models/MeetingNote.cs index 5755eff7e23..58bfe5f15aa 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingNote.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingNote.cs @@ -100,7 +100,7 @@ public MeetingNote() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MeetingNote CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingNote(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("subpoints", Subpoints); writer.WriteStringValue("text", Text); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingNoteSubpoint.cs b/src/Microsoft.Graph/Generated/Models/MeetingNoteSubpoint.cs index d31c38ff89f..24616df8721 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingNoteSubpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingNoteSubpoint.cs @@ -84,7 +84,7 @@ public MeetingNoteSubpoint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MeetingNoteSubpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingNoteSubpoint(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("text", Text); writer.WriteStringValue("title", Title); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingParticipantInfo.cs b/src/Microsoft.Graph/Generated/Models/MeetingParticipantInfo.cs index 2af8eaa0e99..31bccab5eac 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingParticipantInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingParticipantInfo.cs @@ -90,7 +90,7 @@ public MeetingParticipantInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MeetingParticipantInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -118,7 +118,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("identity", Identity); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("role", Role); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingParticipants.cs b/src/Microsoft.Graph/Generated/Models/MeetingParticipants.cs index 869caaf9719..a847bb51454 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingParticipants.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingParticipants.cs @@ -116,7 +116,7 @@ public MeetingParticipants() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MeetingParticipants CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingParticipants(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendees", Attendees); writer.WriteCollectionOfObjectValues("contributors", Contributors); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingPolicyUpdatedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/MeetingPolicyUpdatedEventMessageDetail.cs index ceeec97493c..ab0dd4a8184 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingPolicyUpdatedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingPolicyUpdatedEventMessageDetail.cs @@ -64,7 +64,7 @@ public MeetingPolicyUpdatedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MeetingPolicyUpdatedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingPolicyUpdatedEventMessageDetail(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteBoolValue("meetingChatEnabled", MeetingChatEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingRegistrant.cs b/src/Microsoft.Graph/Generated/Models/MeetingRegistrant.cs index 34fad20f49f..917c7f9a025 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingRegistrant.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingRegistrant.cs @@ -102,7 +102,7 @@ public MeetingRegistrant() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MeetingRegistrant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingRegistrant(); } /// @@ -127,7 +127,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("customQuestionAnswers", CustomQuestionAnswers); writer.WriteStringValue("email", Email); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingRegistrantBase.cs b/src/Microsoft.Graph/Generated/Models/MeetingRegistrantBase.cs index fecc5642d18..acad33a8fa0 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingRegistrantBase.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingRegistrantBase.cs @@ -35,7 +35,7 @@ public string JoinWebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MeetingRegistrantBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -61,7 +61,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("joinWebUrl", JoinWebUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/MeetingRegistrantBaseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MeetingRegistrantBaseCollectionResponse.cs index 7afd135447d..515c3aad736 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingRegistrantBaseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingRegistrantBaseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MeetingRegistrantBaseCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MeetingRegistrantBaseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingRegistrantBaseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MeetingRegistration.cs b/src/Microsoft.Graph/Generated/Models/MeetingRegistration.cs index 9582dd3f7e5..7d34c05df46 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingRegistration.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingRegistration.cs @@ -124,7 +124,7 @@ public MeetingRegistration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MeetingRegistration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingRegistration(); } /// @@ -151,7 +151,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("customQuestions", CustomQuestions); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingRegistrationBase.cs b/src/Microsoft.Graph/Generated/Models/MeetingRegistrationBase.cs index e61858d05a4..37819b2e8b2 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingRegistrationBase.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingRegistrationBase.cs @@ -41,7 +41,7 @@ public partial class MeetingRegistrationBase : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MeetingRegistrationBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -68,7 +68,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("allowedRegistrant", AllowedRegistrant); writer.WriteCollectionOfObjectValues("registrants", Registrants); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingRegistrationQuestion.cs b/src/Microsoft.Graph/Generated/Models/MeetingRegistrationQuestion.cs index 902a16ca4a4..2e8fad03c8b 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingRegistrationQuestion.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingRegistrationQuestion.cs @@ -63,7 +63,7 @@ public bool? IsRequired /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestion(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("answerInputType", AnswerInputType); writer.WriteCollectionOfPrimitiveValues("answerOptions", AnswerOptions); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingRegistrationQuestionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MeetingRegistrationQuestionCollectionResponse.cs index 99f179168c7..5b314ba3cc3 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingRegistrationQuestionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingRegistrationQuestionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MeetingRegistrationQuestionCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingRegistrationQuestionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MeetingSpeaker.cs b/src/Microsoft.Graph/Generated/Models/MeetingSpeaker.cs index f4d8c4da50e..61de772de4f 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingSpeaker.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingSpeaker.cs @@ -84,7 +84,7 @@ public MeetingSpeaker() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MeetingSpeaker CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingSpeaker(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("bio", Bio); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingTimeSuggestion.cs b/src/Microsoft.Graph/Generated/Models/MeetingTimeSuggestion.cs index 7ba52dfd0bd..3bb757120ac 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingTimeSuggestion.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingTimeSuggestion.cs @@ -134,7 +134,7 @@ public MeetingTimeSuggestion() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MeetingTimeSuggestion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingTimeSuggestion(); } /// @@ -161,7 +161,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attendeeAvailability", AttendeeAvailability); writer.WriteDoubleValue("confidence", Confidence); writer.WriteCollectionOfObjectValues("locations", Locations); diff --git a/src/Microsoft.Graph/Generated/Models/MeetingTimeSuggestionsResult.cs b/src/Microsoft.Graph/Generated/Models/MeetingTimeSuggestionsResult.cs index 30e98c51620..4d6d731c204 100644 --- a/src/Microsoft.Graph/Generated/Models/MeetingTimeSuggestionsResult.cs +++ b/src/Microsoft.Graph/Generated/Models/MeetingTimeSuggestionsResult.cs @@ -84,7 +84,7 @@ public MeetingTimeSuggestionsResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MeetingTimeSuggestionsResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MeetingTimeSuggestionsResult(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("emptySuggestionsReason", EmptySuggestionsReason); writer.WriteCollectionOfObjectValues("meetingTimeSuggestions", MeetingTimeSuggestions); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/MembersAddedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/MembersAddedEventMessageDetail.cs index 21a42cd591c..a24d396c153 100644 --- a/src/Microsoft.Graph/Generated/Models/MembersAddedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/MembersAddedEventMessageDetail.cs @@ -64,7 +64,7 @@ public MembersAddedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MembersAddedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MembersAddedEventMessageDetail(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteCollectionOfObjectValues("members", Members); diff --git a/src/Microsoft.Graph/Generated/Models/MembersDeletedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/MembersDeletedEventMessageDetail.cs index cd244e908bf..08d46e93319 100644 --- a/src/Microsoft.Graph/Generated/Models/MembersDeletedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/MembersDeletedEventMessageDetail.cs @@ -58,7 +58,7 @@ public MembersDeletedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MembersDeletedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MembersDeletedEventMessageDetail(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteCollectionOfObjectValues("members", Members); diff --git a/src/Microsoft.Graph/Generated/Models/MembersJoinedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/MembersJoinedEventMessageDetail.cs index f6051a29bf1..365a5048a50 100644 --- a/src/Microsoft.Graph/Generated/Models/MembersJoinedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/MembersJoinedEventMessageDetail.cs @@ -58,7 +58,7 @@ public MembersJoinedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MembersJoinedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MembersJoinedEventMessageDetail(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteCollectionOfObjectValues("members", Members); diff --git a/src/Microsoft.Graph/Generated/Models/MembersLeftEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/MembersLeftEventMessageDetail.cs index 5a9563eb945..26e23e759d4 100644 --- a/src/Microsoft.Graph/Generated/Models/MembersLeftEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/MembersLeftEventMessageDetail.cs @@ -58,7 +58,7 @@ public MembersLeftEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MembersLeftEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MembersLeftEventMessageDetail(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteCollectionOfObjectValues("members", Members); diff --git a/src/Microsoft.Graph/Generated/Models/MembershipOutlierInsight.cs b/src/Microsoft.Graph/Generated/Models/MembershipOutlierInsight.cs index c9991475f71..3deb1c863dd 100644 --- a/src/Microsoft.Graph/Generated/Models/MembershipOutlierInsight.cs +++ b/src/Microsoft.Graph/Generated/Models/MembershipOutlierInsight.cs @@ -118,7 +118,7 @@ public MembershipOutlierInsight() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MembershipOutlierInsight CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MembershipOutlierInsight(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("container", Container); writer.WriteStringValue("containerId", ContainerId); diff --git a/src/Microsoft.Graph/Generated/Models/MembershipRuleProcessingStatus.cs b/src/Microsoft.Graph/Generated/Models/MembershipRuleProcessingStatus.cs index f91a758d4c1..448ca9c0e25 100644 --- a/src/Microsoft.Graph/Generated/Models/MembershipRuleProcessingStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/MembershipRuleProcessingStatus.cs @@ -80,7 +80,7 @@ public MembershipRuleProcessingStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MembershipRuleProcessingStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MembershipRuleProcessingStatus(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("errorMessage", ErrorMessage); writer.WriteDateTimeOffsetValue("lastMembershipUpdated", LastMembershipUpdated); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Mention.cs b/src/Microsoft.Graph/Generated/Models/Mention.cs index 41730b9cadd..5068e4a8028 100644 --- a/src/Microsoft.Graph/Generated/Models/Mention.cs +++ b/src/Microsoft.Graph/Generated/Models/Mention.cs @@ -127,7 +127,7 @@ public DateTimeOffset? ServerCreatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Mention CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Mention(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("application", Application); writer.WriteStringValue("clientReference", ClientReference); diff --git a/src/Microsoft.Graph/Generated/Models/MentionAction.cs b/src/Microsoft.Graph/Generated/Models/MentionAction.cs index 5f6d1044737..34a706ef5d8 100644 --- a/src/Microsoft.Graph/Generated/Models/MentionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/MentionAction.cs @@ -68,7 +68,7 @@ public MentionAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MentionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MentionAction(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("mentionees", Mentionees); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/MentionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MentionCollectionResponse.cs index d9e1074c9af..4125535ffa4 100644 --- a/src/Microsoft.Graph/Generated/Models/MentionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MentionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MentionCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MentionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MentionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MentionEvent.cs b/src/Microsoft.Graph/Generated/Models/MentionEvent.cs index 88d55c974c6..960331b6f58 100644 --- a/src/Microsoft.Graph/Generated/Models/MentionEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/MentionEvent.cs @@ -90,7 +90,7 @@ public MentionEvent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MentionEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MentionEvent(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("eventDateTime", EventDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("speaker", Speaker); diff --git a/src/Microsoft.Graph/Generated/Models/MentionsPreview.cs b/src/Microsoft.Graph/Generated/Models/MentionsPreview.cs index 781ef7e3794..c170fe76b70 100644 --- a/src/Microsoft.Graph/Generated/Models/MentionsPreview.cs +++ b/src/Microsoft.Graph/Generated/Models/MentionsPreview.cs @@ -58,7 +58,7 @@ public MentionsPreview() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MentionsPreview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MentionsPreview(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isMentioned", IsMentioned); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Message.cs b/src/Microsoft.Graph/Generated/Models/Message.cs index e09953b7066..aa1ca4999ae 100644 --- a/src/Microsoft.Graph/Generated/Models/Message.cs +++ b/src/Microsoft.Graph/Generated/Models/Message.cs @@ -470,7 +470,7 @@ public Message() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Message CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -531,7 +531,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("attachments", Attachments); writer.WriteCollectionOfObjectValues("bccRecipients", BccRecipients); diff --git a/src/Microsoft.Graph/Generated/Models/MessageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MessageCollectionResponse.cs index a6134bc3381..ad666979afa 100644 --- a/src/Microsoft.Graph/Generated/Models/MessageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MessageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MessageCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MessageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MessageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MessageEvent.cs b/src/Microsoft.Graph/Generated/Models/MessageEvent.cs index 4b84e30c115..9fcacc54b1d 100644 --- a/src/Microsoft.Graph/Generated/Models/MessageEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/MessageEvent.cs @@ -47,7 +47,7 @@ public string Description /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MessageEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MessageEvent(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("dateTime", DateTime); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/MessageEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MessageEventCollectionResponse.cs index c841a993ae6..832c1f96e5e 100644 --- a/src/Microsoft.Graph/Generated/Models/MessageEventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MessageEventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MessageEventCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MessageEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MessageEventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MessagePinnedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/MessagePinnedEventMessageDetail.cs index b3e00e07aac..c98aa569e64 100644 --- a/src/Microsoft.Graph/Generated/Models/MessagePinnedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/MessagePinnedEventMessageDetail.cs @@ -48,7 +48,7 @@ public MessagePinnedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MessagePinnedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MessagePinnedEventMessageDetail(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("eventDateTime", EventDateTime); writer.WriteObjectValue("initiator", Initiator); diff --git a/src/Microsoft.Graph/Generated/Models/MessageRecipient.cs b/src/Microsoft.Graph/Generated/Models/MessageRecipient.cs index b210c959e8d..3c54f994369 100644 --- a/src/Microsoft.Graph/Generated/Models/MessageRecipient.cs +++ b/src/Microsoft.Graph/Generated/Models/MessageRecipient.cs @@ -57,7 +57,7 @@ public string RecipientEmail /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MessageRecipient CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MessageRecipient(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("deliveryStatus", DeliveryStatus); writer.WriteCollectionOfObjectValues("events", Events); diff --git a/src/Microsoft.Graph/Generated/Models/MessageRecipientCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MessageRecipientCollectionResponse.cs index 21c2c2137e5..83b9e1b5385 100644 --- a/src/Microsoft.Graph/Generated/Models/MessageRecipientCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MessageRecipientCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MessageRecipientCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MessageRecipientCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MessageRecipientCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MessageRule.cs b/src/Microsoft.Graph/Generated/Models/MessageRule.cs index b3d4712bfc9..dab74a02b0e 100644 --- a/src/Microsoft.Graph/Generated/Models/MessageRule.cs +++ b/src/Microsoft.Graph/Generated/Models/MessageRule.cs @@ -107,7 +107,7 @@ public int? Sequence /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MessageRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MessageRule(); } /// @@ -134,7 +134,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("actions", Actions); writer.WriteObjectValue("conditions", Conditions); diff --git a/src/Microsoft.Graph/Generated/Models/MessageRuleActions.cs b/src/Microsoft.Graph/Generated/Models/MessageRuleActions.cs index 5c379d3291c..deccf2bc123 100644 --- a/src/Microsoft.Graph/Generated/Models/MessageRuleActions.cs +++ b/src/Microsoft.Graph/Generated/Models/MessageRuleActions.cs @@ -178,7 +178,7 @@ public MessageRuleActions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MessageRuleActions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MessageRuleActions(); } /// @@ -209,7 +209,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("assignCategories", AssignCategories); writer.WriteStringValue("copyToFolder", CopyToFolder); writer.WriteBoolValue("delete", Delete); diff --git a/src/Microsoft.Graph/Generated/Models/MessageRuleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MessageRuleCollectionResponse.cs index 8f9f4efe1b9..839d20da428 100644 --- a/src/Microsoft.Graph/Generated/Models/MessageRuleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MessageRuleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MessageRuleCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MessageRuleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MessageRuleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MessageRulePredicates.cs b/src/Microsoft.Graph/Generated/Models/MessageRulePredicates.cs index 63716a17297..1b25baa911c 100644 --- a/src/Microsoft.Graph/Generated/Models/MessageRulePredicates.cs +++ b/src/Microsoft.Graph/Generated/Models/MessageRulePredicates.cs @@ -332,7 +332,7 @@ public MessageRulePredicates() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MessageRulePredicates CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MessageRulePredicates(); } /// @@ -382,7 +382,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("bodyContains", BodyContains); writer.WriteCollectionOfPrimitiveValues("bodyOrSubjectContains", BodyOrSubjectContains); writer.WriteCollectionOfPrimitiveValues("categories", Categories); diff --git a/src/Microsoft.Graph/Generated/Models/MessageSecurityState.cs b/src/Microsoft.Graph/Generated/Models/MessageSecurityState.cs index 17a01e7d01b..731485785b9 100644 --- a/src/Microsoft.Graph/Generated/Models/MessageSecurityState.cs +++ b/src/Microsoft.Graph/Generated/Models/MessageSecurityState.cs @@ -186,7 +186,7 @@ public MessageSecurityState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MessageSecurityState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MessageSecurityState(); } /// @@ -215,7 +215,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("connectingIP", ConnectingIP); writer.WriteStringValue("deliveryAction", DeliveryAction); writer.WriteStringValue("deliveryLocation", DeliveryLocation); diff --git a/src/Microsoft.Graph/Generated/Models/MessageTrace.cs b/src/Microsoft.Graph/Generated/Models/MessageTrace.cs index babb8828619..34e9364e520 100644 --- a/src/Microsoft.Graph/Generated/Models/MessageTrace.cs +++ b/src/Microsoft.Graph/Generated/Models/MessageTrace.cs @@ -127,7 +127,7 @@ public string Subject /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MessageTrace CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MessageTrace(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("destinationIPAddress", DestinationIPAddress); writer.WriteStringValue("messageId", MessageId); diff --git a/src/Microsoft.Graph/Generated/Models/MessageTraceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MessageTraceCollectionResponse.cs index c54c762c3c5..d4e5ba4306b 100644 --- a/src/Microsoft.Graph/Generated/Models/MessageTraceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MessageTraceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MessageTraceCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MessageTraceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MessageTraceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MessageUnpinnedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/MessageUnpinnedEventMessageDetail.cs index 69056e5e413..c815e6ca464 100644 --- a/src/Microsoft.Graph/Generated/Models/MessageUnpinnedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/MessageUnpinnedEventMessageDetail.cs @@ -48,7 +48,7 @@ public MessageUnpinnedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MessageUnpinnedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MessageUnpinnedEventMessageDetail(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("eventDateTime", EventDateTime); writer.WriteObjectValue("initiator", Initiator); diff --git a/src/Microsoft.Graph/Generated/Models/MetaDataKeyStringPair.cs b/src/Microsoft.Graph/Generated/Models/MetaDataKeyStringPair.cs index 05228a018a7..0a8f68ed5cb 100644 --- a/src/Microsoft.Graph/Generated/Models/MetaDataKeyStringPair.cs +++ b/src/Microsoft.Graph/Generated/Models/MetaDataKeyStringPair.cs @@ -84,7 +84,7 @@ public MetaDataKeyStringPair() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MetaDataKeyStringPair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MetaDataKeyStringPair(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/MetaDataKeyValuePair.cs b/src/Microsoft.Graph/Generated/Models/MetaDataKeyValuePair.cs index adcc0f1f23f..215a558fc5d 100644 --- a/src/Microsoft.Graph/Generated/Models/MetaDataKeyValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/MetaDataKeyValuePair.cs @@ -84,7 +84,7 @@ public MetaDataKeyValuePair() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MetaDataKeyValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MetaDataKeyValuePair(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/MetadataAction.cs b/src/Microsoft.Graph/Generated/Models/MetadataAction.cs index 2d261d478fe..1efa90a479e 100644 --- a/src/Microsoft.Graph/Generated/Models/MetadataAction.cs +++ b/src/Microsoft.Graph/Generated/Models/MetadataAction.cs @@ -58,7 +58,7 @@ public MetadataAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MetadataAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MetadataAction(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("metadataToAdd", MetadataToAdd); writer.WriteCollectionOfPrimitiveValues("metadataToRemove", MetadataToRemove); diff --git a/src/Microsoft.Graph/Generated/Models/MetricTimeSeriesDataPoint.cs b/src/Microsoft.Graph/Generated/Models/MetricTimeSeriesDataPoint.cs index 069fa8c3b68..0b509089bfe 100644 --- a/src/Microsoft.Graph/Generated/Models/MetricTimeSeriesDataPoint.cs +++ b/src/Microsoft.Graph/Generated/Models/MetricTimeSeriesDataPoint.cs @@ -65,7 +65,7 @@ public MetricTimeSeriesDataPoint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MetricTimeSeriesDataPoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MetricTimeSeriesDataPoint(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("dateTime", DateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/MfaCompletionMetric.cs b/src/Microsoft.Graph/Generated/Models/MfaCompletionMetric.cs index 596ae182998..223c7ac5d93 100644 --- a/src/Microsoft.Graph/Generated/Models/MfaCompletionMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/MfaCompletionMetric.cs @@ -150,7 +150,7 @@ public long? SuccessCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MfaCompletionMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MfaCompletionMetric(); } /// @@ -179,7 +179,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteLongValue("attemptsCount", AttemptsCount); diff --git a/src/Microsoft.Graph/Generated/Models/MfaCompletionMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MfaCompletionMetricCollectionResponse.cs index be3807989a4..715fb8057bf 100644 --- a/src/Microsoft.Graph/Generated/Models/MfaCompletionMetricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MfaCompletionMetricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MfaCompletionMetricCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MfaCompletionMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MfaCompletionMetricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MfaDetail.cs b/src/Microsoft.Graph/Generated/Models/MfaDetail.cs index f8b9ac94d59..69e9765d111 100644 --- a/src/Microsoft.Graph/Generated/Models/MfaDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/MfaDetail.cs @@ -84,7 +84,7 @@ public MfaDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MfaDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MfaDetail(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("authDetail", AuthDetail); writer.WriteStringValue("authMethod", AuthMethod); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/MfaFailure.cs b/src/Microsoft.Graph/Generated/Models/MfaFailure.cs index 34d0da5c4dc..7776b3b109f 100644 --- a/src/Microsoft.Graph/Generated/Models/MfaFailure.cs +++ b/src/Microsoft.Graph/Generated/Models/MfaFailure.cs @@ -47,7 +47,7 @@ public string Reason /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MfaFailure CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MfaFailure(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("count", Count); writer.WriteStringValue("reason", Reason); diff --git a/src/Microsoft.Graph/Generated/Models/MfaTelecomFraudMetric.cs b/src/Microsoft.Graph/Generated/Models/MfaTelecomFraudMetric.cs index bf6747de83e..e730aa26bcc 100644 --- a/src/Microsoft.Graph/Generated/Models/MfaTelecomFraudMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/MfaTelecomFraudMetric.cs @@ -56,7 +56,7 @@ public long? TelecomBlockedUserCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MfaTelecomFraudMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MfaTelecomFraudMetric(); } /// @@ -81,7 +81,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("captchaFailureCount", CaptchaFailureCount); writer.WriteLongValue("captchaNotTriggeredUserCount", CaptchaNotTriggeredUserCount); diff --git a/src/Microsoft.Graph/Generated/Models/MfaTelecomFraudMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MfaTelecomFraudMetricCollectionResponse.cs index 2cafafc2bc7..8704e736168 100644 --- a/src/Microsoft.Graph/Generated/Models/MfaTelecomFraudMetricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MfaTelecomFraudMetricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MfaTelecomFraudMetricCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MfaTelecomFraudMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MfaTelecomFraudMetricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MfaUserCountMetric.cs b/src/Microsoft.Graph/Generated/Models/MfaUserCountMetric.cs index 44ee1933da3..131dad7ae7c 100644 --- a/src/Microsoft.Graph/Generated/Models/MfaUserCountMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/MfaUserCountMetric.cs @@ -38,7 +38,7 @@ public Date? FactDate /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MfaUserCountMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MfaUserCountMetric(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("count", Count); writer.WriteDateValue("factDate", FactDate); diff --git a/src/Microsoft.Graph/Generated/Models/MfaUserCountMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MfaUserCountMetricCollectionResponse.cs index 3f1cddc92cd..149401742bb 100644 --- a/src/Microsoft.Graph/Generated/Models/MfaUserCountMetricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MfaUserCountMetricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MfaUserCountMetricCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MfaUserCountMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MfaUserCountMetricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftAccountUserConversationMember.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftAccountUserConversationMember.cs index eb903379029..3bc9dbfbfb6 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftAccountUserConversationMember.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftAccountUserConversationMember.cs @@ -42,7 +42,7 @@ public MicrosoftAccountUserConversationMember() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftAccountUserConversationMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftAccountUserConversationMember(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userId", UserId); } diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftApplicationDataAccessSettings.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftApplicationDataAccessSettings.cs index a089677c6a2..6f4ca9bdd3e 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftApplicationDataAccessSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftApplicationDataAccessSettings.cs @@ -41,7 +41,7 @@ public bool? IsEnabledForAllMicrosoftApplications /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftApplicationDataAccessSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftApplicationDataAccessSettings(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("disabledForGroup", DisabledForGroup); writer.WriteBoolValue("isEnabledForAllMicrosoftApplications", IsEnabledForAllMicrosoftApplications); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethod.cs index cedd8342d1a..4fe35e80885 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethod.cs @@ -96,7 +96,7 @@ public MicrosoftAuthenticatorAuthenticationMethod() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftAuthenticatorAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftAuthenticatorAuthenticationMethod(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("clientAppName", ClientAppName); writer.WriteObjectValue("device", Device); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethodCollectionResponse.cs index 3b15089f88e..7c5554dc4ac 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MicrosoftAuthenticatorAuthenticationMethodCollectionRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftAuthenticatorAuthenticationMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftAuthenticatorAuthenticationMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethodConfiguration.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethodConfiguration.cs index 0e7ee69234c..bb1323afa67 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethodConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethodConfiguration.cs @@ -64,7 +64,7 @@ public MicrosoftAuthenticatorAuthenticationMethodConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftAuthenticatorAuthenticationMethodConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftAuthenticatorAuthenticationMethodConfiguration(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("featureSettings", FeatureSettings); writer.WriteCollectionOfObjectValues("includeTargets", IncludeTargets); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethodTarget.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethodTarget.cs index bebc063d109..2d770a246d4 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethodTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorAuthenticationMethodTarget.cs @@ -25,7 +25,7 @@ public partial class MicrosoftAuthenticatorAuthenticationMethodTarget : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftAuthenticatorAuthenticationMethodTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftAuthenticatorAuthenticationMethodTarget(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMode", AuthenticationMode); } diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorFeatureSettings.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorFeatureSettings.cs index a86ae6f20ac..86833294c91 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorFeatureSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorFeatureSettings.cs @@ -116,7 +116,7 @@ public MicrosoftAuthenticatorFeatureSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MicrosoftAuthenticatorFeatureSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftAuthenticatorFeatureSettings(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("companionAppAllowedState", CompanionAppAllowedState); writer.WriteObjectValue("displayAppInformationRequiredState", DisplayAppInformationRequiredState); writer.WriteObjectValue("displayLocationInformationRequiredState", DisplayLocationInformationRequiredState); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorPlatformSettings.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorPlatformSettings.cs index 75fc47228f5..384138fb01d 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorPlatformSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftAuthenticatorPlatformSettings.cs @@ -68,7 +68,7 @@ public MicrosoftAuthenticatorPlatformSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MicrosoftAuthenticatorPlatformSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftAuthenticatorPlatformSettings(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("enforceAppPIN", EnforceAppPIN); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftCustomTrainingSetting.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftCustomTrainingSetting.cs index ab44a2c3f14..b1c8cb304cf 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftCustomTrainingSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftCustomTrainingSetting.cs @@ -54,7 +54,7 @@ public MicrosoftCustomTrainingSetting() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftCustomTrainingSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftCustomTrainingSetting(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completionDateTime", CompletionDateTime); writer.WriteCollectionOfObjectValues("trainingAssignmentMappings", TrainingAssignmentMappings); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftManagedDesktop.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftManagedDesktop.cs index 83c649a67f5..abf9714fb4a 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftManagedDesktop.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftManagedDesktop.cs @@ -80,7 +80,7 @@ public MicrosoftManagedDesktop() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MicrosoftManagedDesktop CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftManagedDesktop(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("managedType", ManagedType); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("profile", Profile); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftManagedTrainingSetting.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftManagedTrainingSetting.cs index 0732e921741..47f90d95eaa 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftManagedTrainingSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftManagedTrainingSetting.cs @@ -38,7 +38,7 @@ public MicrosoftManagedTrainingSetting() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftManagedTrainingSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftManagedTrainingSetting(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completionDateTime", CompletionDateTime); writer.WriteEnumValue("trainingCompletionDuration", TrainingCompletionDuration); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessApp.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessApp.cs index 29e0eaee70a..29a7e3e6300 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessApp.cs @@ -109,7 +109,7 @@ public MicrosoftStoreForBusinessApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftStoreForBusinessApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftStoreForBusinessApp(); } /// @@ -135,7 +135,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("containedApps", ContainedApps); writer.WriteEnumValue("licenseType", LicenseType); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessAppAssignmentSettings.cs index 41cf500d37d..89c10578260 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessAppAssignmentSettings.cs @@ -33,7 +33,7 @@ public MicrosoftStoreForBusinessAppAssignmentSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftStoreForBusinessAppAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftStoreForBusinessAppAssignmentSettings(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("useDeviceContext", UseDeviceContext); } diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessAppCollectionResponse.cs index 7c1775f89c3..3df41e1d285 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MicrosoftStoreForBusinessAppCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftStoreForBusinessAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftStoreForBusinessAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessContainedApp.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessContainedApp.cs index a3fc3e7ee4f..aaff9056638 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessContainedApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftStoreForBusinessContainedApp.cs @@ -43,7 +43,7 @@ public MicrosoftStoreForBusinessContainedApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftStoreForBusinessContainedApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftStoreForBusinessContainedApp(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appUserModelId", AppUserModelId); } diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftTrainingAssignmentMapping.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftTrainingAssignmentMapping.cs index cca65d9e097..2ddadfffcb5 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftTrainingAssignmentMapping.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftTrainingAssignmentMapping.cs @@ -58,7 +58,7 @@ public MicrosoftTrainingAssignmentMapping() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftTrainingAssignmentMapping CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftTrainingAssignmentMapping(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfEnumValues("assignedTo", AssignedTo); writer.WriteObjectValue("training", Training); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelConfiguration.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelConfiguration.cs index 744cde9cae9..7b669a415de 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelConfiguration.cs @@ -246,7 +246,7 @@ public List SplitDNS /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelConfiguration(); } /// @@ -281,7 +281,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("advancedSettings", AdvancedSettings); writer.WriteStringValue("defaultDomainSuffix", DefaultDomainSuffix); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelConfigurationCollectionResponse.cs index 78d0905ec02..60ca11563c3 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MicrosoftTunnelConfigurationCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelHealthThreshold.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelHealthThreshold.cs index 28c8b351606..bcb309318b6 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelHealthThreshold.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelHealthThreshold.cs @@ -44,7 +44,7 @@ public long? UnhealthyThreshold /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelHealthThreshold CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelHealthThreshold(); } /// @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("defaultHealthyThreshold", DefaultHealthyThreshold); writer.WriteLongValue("defaultUnhealthyThreshold", DefaultUnhealthyThreshold); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelHealthThresholdCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelHealthThresholdCollectionResponse.cs index 1473b62c712..512be29206f 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelHealthThresholdCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelHealthThresholdCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MicrosoftTunnelHealthThresholdCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelHealthThresholdCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelHealthThresholdCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServer.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServer.cs index 7c2c09a4a1e..76b51310ffd 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServer.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServer.cs @@ -86,7 +86,7 @@ public string ServerImageDigest /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServer(); } /// @@ -111,7 +111,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("agentImageDigest", AgentImageDigest); writer.WriteEnumValue("deploymentMode", DeploymentMode); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServerCollectionResponse.cs index 5030c748f4d..9561c8a4f0d 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MicrosoftTunnelServerCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServerLogCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServerLogCollectionResponse.cs index 684ab2af47c..b8f1a7ec50c 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServerLogCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServerLogCollectionResponse.cs @@ -72,7 +72,7 @@ public DateTimeOffset? StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServerLogCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServerLogCollectionResponse(); } /// @@ -98,7 +98,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteDateTimeOffsetValue("expiryDateTime", ExpiryDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServerLogCollectionResponseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServerLogCollectionResponseCollectionResponse.cs index f04becafa87..2bdbbbd5c08 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServerLogCollectionResponseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelServerLogCollectionResponseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MicrosoftTunnelServerLogCollectionResponseCollectionRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServerLogCollectionResponseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelServerLogCollectionResponseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelSite.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelSite.cs index 27afec5ef85..64bf8236161 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelSite.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelSite.cs @@ -163,7 +163,7 @@ public int? UpgradeWindowUtcOffsetInMinutes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelSite CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelSite(); } /// @@ -194,7 +194,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelSiteCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelSiteCollectionResponse.cs index 01ff5aeec79..724ba6ebef3 100644 --- a/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelSiteCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MicrosoftTunnelSiteCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MicrosoftTunnelSiteCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelSiteCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MicrosoftTunnelSiteCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MimeContent.cs b/src/Microsoft.Graph/Generated/Models/MimeContent.cs index 4937b765807..f44db98c30b 100644 --- a/src/Microsoft.Graph/Generated/Models/MimeContent.cs +++ b/src/Microsoft.Graph/Generated/Models/MimeContent.cs @@ -85,7 +85,7 @@ public MimeContent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MimeContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MimeContent(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("type", Type); writer.WriteByteArrayValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/MobileApp.cs b/src/Microsoft.Graph/Generated/Models/MobileApp.cs index 28243862130..ee548967fdf 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileApp.cs @@ -45,13 +45,13 @@ public partial class MobileApp : global::Microsoft.Graph.Beta.Models.Entity, IPa set { BackingStore?.Set("categories", value); } } #endif - /// The date and time the app was created. + /// The date and time the app was created. This property is read-only. public DateTimeOffset? CreatedDateTime { get { return BackingStore?.Get("createdDateTime"); } set { BackingStore?.Set("createdDateTime", value); } } - /// The total number of dependencies the child app has. + /// The total number of dependencies the child app has. This property is read-only. public int? DependentAppCount { get { return BackingStore?.Get("dependentAppCount"); } @@ -121,7 +121,7 @@ public string InformationUrl set { BackingStore?.Set("informationUrl", value); } } #endif - /// The value indicating whether the app is assigned to at least one group. + /// The value indicating whether the app is assigned to at least one group. This property is read-only. public bool? IsAssigned { get { return BackingStore?.Get("isAssigned"); } @@ -149,7 +149,7 @@ public bool? IsFeatured set { BackingStore?.Set("largeIcon", value); } } #endif - /// The date and time the app was last modified. + /// The date and time the app was last modified. This property is read-only. public DateTimeOffset? LastModifiedDateTime { get { return BackingStore?.Get("lastModifiedDateTime"); } @@ -225,7 +225,7 @@ public string Publisher get { return BackingStore?.Get("publishingState"); } set { BackingStore?.Set("publishingState", value); } } - /// List of relationships for this mobile app. + /// The set of direct relationships for this app. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? Relationships @@ -269,7 +269,7 @@ public int? SupersedingAppCount get { return BackingStore?.Get("supersedingAppCount"); } set { BackingStore?.Set("supersedingAppCount", value); } } - /// The upload state. + /// The upload state. Possible values are: 0 - Not Ready, 1 - Ready, 2 - Processing. This property is read-only. public int? UploadState { get { return BackingStore?.Get("uploadState"); } @@ -282,7 +282,7 @@ public int? UploadState /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -367,7 +367,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteCollectionOfObjectValues("categories", Categories); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppAssignment.cs b/src/Microsoft.Graph/Generated/Models/MobileAppAssignment.cs index 4da53e1ce00..166247295a5 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppAssignment.cs @@ -80,7 +80,7 @@ public string SourceId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppAssignment(); } /// @@ -104,7 +104,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("intent", Intent); writer.WriteObjectValue("settings", Settings); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileAppAssignmentCollectionResponse.cs index 642ce788c2c..c65f388222c 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MobileAppAssignmentCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/MobileAppAssignmentSettings.cs index 4f4c88f5023..9c6596e23f7 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppAssignmentSettings.cs @@ -53,7 +53,7 @@ public MobileAppAssignmentSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MobileAppAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppCatalogPackage.cs b/src/Microsoft.Graph/Generated/Models/MobileAppCatalogPackage.cs index be98dc24a0b..9c3399c1702 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppCatalogPackage.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppCatalogPackage.cs @@ -84,7 +84,7 @@ public string VersionDisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppCatalogPackage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -112,7 +112,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppCatalogPackageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileAppCatalogPackageCollectionResponse.cs index 64887e07a2f..47e0794acce 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppCatalogPackageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppCatalogPackageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MobileAppCatalogPackageCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppCatalogPackageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppCatalogPackageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppCategory.cs b/src/Microsoft.Graph/Generated/Models/MobileAppCategory.cs index b725e5f6e80..b6f2183b81a 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppCategory.cs @@ -42,7 +42,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppCategory(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppCategoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileAppCategoryCollectionResponse.cs index 68b3fa9f768..44bfad8824f 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppCategoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppCategoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MobileAppCategoryCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppCategoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileAppCollectionResponse.cs index ee3a0d5717e..3e103518968 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MobileAppCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppContent.cs b/src/Microsoft.Graph/Generated/Models/MobileAppContent.cs index b331f07b6dc..24d6ea87feb 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppContent.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppContent.cs @@ -52,7 +52,7 @@ public partial class MobileAppContent : global::Microsoft.Graph.Beta.Models.Enti /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppContent(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("containedApps", ContainedApps); writer.WriteCollectionOfObjectValues("files", Files); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppContentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileAppContentCollectionResponse.cs index 70a5e4c8521..0cebfa4b299 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppContentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppContentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MobileAppContentCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppContentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppContentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppContentFile.cs b/src/Microsoft.Graph/Generated/Models/MobileAppContentFile.cs index d78a3ed89e1..d59e2de5f57 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppContentFile.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppContentFile.cs @@ -116,7 +116,7 @@ public long? SizeEncrypted /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppContentFile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppContentFile(); } /// @@ -146,7 +146,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isDependency", IsDependency); writer.WriteBoolValue("isFrameworkFile", IsFrameworkFile); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppContentFileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileAppContentFileCollectionResponse.cs index 718fbb97708..7e99fb5ac40 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppContentFileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppContentFileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MobileAppContentFileCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppContentFileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppContentFileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppDependency.cs b/src/Microsoft.Graph/Generated/Models/MobileAppDependency.cs index 1a0a996ddf2..87ae5cab598 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppDependency.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppDependency.cs @@ -45,7 +45,7 @@ public MobileAppDependency() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppDependency CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppDependency(); } /// @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("dependencyType", DependencyType); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppIdentifier.cs b/src/Microsoft.Graph/Generated/Models/MobileAppIdentifier.cs index 41d5151101f..35886f72f12 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppIdentifier.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppIdentifier.cs @@ -53,7 +53,7 @@ public MobileAppIdentifier() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MobileAppIdentifier CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -81,7 +81,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppInstallStatus.cs b/src/Microsoft.Graph/Generated/Models/MobileAppInstallStatus.cs index ff0c7e0e625..a728d3e1a19 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppInstallStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppInstallStatus.cs @@ -178,7 +178,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppInstallStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppInstallStatus(); } /// @@ -210,7 +210,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("app", App); writer.WriteStringValue("deviceId", DeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppInstallSummary.cs b/src/Microsoft.Graph/Generated/Models/MobileAppInstallSummary.cs index 32c0c1bf00b..e9f7a7f1d3d 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppInstallSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppInstallSummary.cs @@ -80,7 +80,7 @@ public int? PendingInstallUserCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppInstallSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppInstallSummary(); } /// @@ -109,7 +109,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppInstallTimeSettings.cs b/src/Microsoft.Graph/Generated/Models/MobileAppInstallTimeSettings.cs index 08efd8d76c0..89ff10771da 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppInstallTimeSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppInstallTimeSettings.cs @@ -71,7 +71,7 @@ public MobileAppInstallTimeSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MobileAppInstallTimeSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppInstallTimeSettings(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("deadlineDateTime", DeadlineDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndState.cs b/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndState.cs index b16402f91fa..2aae0541c42 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndState.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndState.cs @@ -68,7 +68,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppIntentAndState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppIntentAndState(); } /// @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("managedDeviceIdentifier", ManagedDeviceIdentifier); writer.WriteCollectionOfObjectValues("mobileAppList", MobileAppList); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndStateCollectionResponse.cs index 001e4a630be..dfefa01642d 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MobileAppIntentAndStateCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppIntentAndStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppIntentAndStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndStateDetail.cs b/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndStateDetail.cs index 5d592400924..0dd5e6351d6 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndStateDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppIntentAndStateDetail.cs @@ -129,7 +129,7 @@ public MobileAppIntentAndStateDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MobileAppIntentAndStateDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppIntentAndStateDetail(); } /// @@ -155,7 +155,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applicationId", ApplicationId); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("displayVersion", DisplayVersion); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppPolicySetItem.cs b/src/Microsoft.Graph/Generated/Models/MobileAppPolicySetItem.cs index 7f30a9c4b52..cb3ffad061c 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppPolicySetItem.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppPolicySetItem.cs @@ -49,7 +49,7 @@ public MobileAppPolicySetItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppPolicySetItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppPolicySetItem(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("intent", Intent); writer.WriteObjectValue("settings", Settings); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppProvisioningConfigGroupAssignment.cs b/src/Microsoft.Graph/Generated/Models/MobileAppProvisioningConfigGroupAssignment.cs index a7d0207991c..46499e1c6d8 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppProvisioningConfigGroupAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppProvisioningConfigGroupAssignment.cs @@ -36,7 +36,7 @@ public string TargetGroupId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppProvisioningConfigGroupAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppProvisioningConfigGroupAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("targetGroupId", TargetGroupId); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppProvisioningConfigGroupAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileAppProvisioningConfigGroupAssignmentCollectionResponse.cs index bbc94a181ae..0dab3e0e0d6 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppProvisioningConfigGroupAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppProvisioningConfigGroupAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MobileAppProvisioningConfigGroupAssignmentCollectionRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppProvisioningConfigGroupAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppProvisioningConfigGroupAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppRelationship.cs b/src/Microsoft.Graph/Generated/Models/MobileAppRelationship.cs index 26a7ef4028b..018e5f14881 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppRelationship.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppRelationship.cs @@ -170,7 +170,7 @@ public string TargetPublisherDisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppRelationship CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -205,7 +205,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("targetId", TargetId); writer.WriteEnumValue("targetType", TargetType); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppRelationshipCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileAppRelationshipCollectionResponse.cs index 42476845f7c..945bdebb0c6 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppRelationshipCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppRelationshipCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MobileAppRelationshipCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppRelationshipCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppRelationshipCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppSupersedence.cs b/src/Microsoft.Graph/Generated/Models/MobileAppSupersedence.cs index ff9a3265c65..a3c0f192f1a 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppSupersedence.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppSupersedence.cs @@ -45,7 +45,7 @@ public MobileAppSupersedence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppSupersedence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppSupersedence(); } /// @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("supersedenceType", SupersedenceType); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppSupportedDeviceType.cs b/src/Microsoft.Graph/Generated/Models/MobileAppSupportedDeviceType.cs index 33d14d8e267..ad94e65736e 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppSupportedDeviceType.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppSupportedDeviceType.cs @@ -91,7 +91,7 @@ public MobileAppSupportedDeviceType() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MobileAppSupportedDeviceType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppSupportedDeviceType(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("maximumOperatingSystemVersion", MaximumOperatingSystemVersion); writer.WriteStringValue("minimumOperatingSystemVersion", MinimumOperatingSystemVersion); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppPolicyCreationHistory.cs b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppPolicyCreationHistory.cs index fc3e01e84e9..b0ff3f09224 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppPolicyCreationHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppPolicyCreationHistory.cs @@ -42,7 +42,7 @@ public string ErrorCode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingAppPolicyCreationHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingAppPolicyCreationHistory(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("errorCode", ErrorCode); writer.WriteEnumValue("runState", RunState); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppStateHistory.cs b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppStateHistory.cs index 022469c2a4b..64c9b40dc45 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppStateHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppStateHistory.cs @@ -48,7 +48,7 @@ public string ErrorCode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingAppStateHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingAppStateHistory(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("actionType", ActionType); writer.WriteStringValue("errorCode", ErrorCode); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppTargetHistory.cs b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppTargetHistory.cs index 55fa25cccc1..b81e8079c0b 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppTargetHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppTargetHistory.cs @@ -58,7 +58,7 @@ public string SecurityGroupId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingAppTargetHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingAppTargetHistory(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("errorCode", ErrorCode); writer.WriteEnumValue("runState", RunState); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppUpdateHistory.cs b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppUpdateHistory.cs index 7a4f4aeb5e6..e67d8d0ccf3 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppUpdateHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingAppUpdateHistory.cs @@ -20,7 +20,7 @@ public partial class MobileAppTroubleshootingAppUpdateHistory : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingAppUpdateHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingAppUpdateHistory(); } /// @@ -39,7 +39,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingDeviceCheckinHistory.cs b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingDeviceCheckinHistory.cs index 604e93cc845..9e4ef15f306 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingDeviceCheckinHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingDeviceCheckinHistory.cs @@ -20,7 +20,7 @@ public partial class MobileAppTroubleshootingDeviceCheckinHistory : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingDeviceCheckinHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingDeviceCheckinHistory(); } /// @@ -39,7 +39,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingEvent.cs b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingEvent.cs index 9011e830be5..cbd2599810b 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingEvent.cs @@ -116,7 +116,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingEvent(); } /// @@ -141,7 +141,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("applicationId", ApplicationId); writer.WriteCollectionOfObjectValues("appLogCollectionRequests", AppLogCollectionRequests); diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingEventCollectionResponse.cs index 26429c4c5a1..c66f4aad02b 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingEventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingEventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MobileAppTroubleshootingEventCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingEventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingHistoryItem.cs b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingHistoryItem.cs index 4056d5d0660..54a3381aa8b 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingHistoryItem.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileAppTroubleshootingHistoryItem.cs @@ -75,7 +75,7 @@ public MobileAppTroubleshootingHistoryItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MobileAppTroubleshootingHistoryItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("occurrenceDateTime", OccurrenceDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("troubleshootingErrorDetails", TroubleshootingErrorDetails); diff --git a/src/Microsoft.Graph/Generated/Models/MobileContainedApp.cs b/src/Microsoft.Graph/Generated/Models/MobileContainedApp.cs index c1da7ad2b72..e13352048a6 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileContainedApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileContainedApp.cs @@ -20,7 +20,7 @@ public partial class MobileContainedApp : global::Microsoft.Graph.Beta.Models.En /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileContainedApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/MobileContainedAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileContainedAppCollectionResponse.cs index edcc65994b6..1984712afbd 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileContainedAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileContainedAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MobileContainedAppCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileContainedAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileContainedAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MobileLobApp.cs b/src/Microsoft.Graph/Generated/Models/MobileLobApp.cs index ad8bd0f4117..6691db05dd4 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileLobApp.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileLobApp.cs @@ -81,7 +81,7 @@ public MobileLobApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileLobApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("committedContentVersion", CommittedContentVersion); writer.WriteCollectionOfObjectValues("contentVersions", ContentVersions); diff --git a/src/Microsoft.Graph/Generated/Models/MobileThreatDefenseConnector.cs b/src/Microsoft.Graph/Generated/Models/MobileThreatDefenseConnector.cs index b35158ca75f..68b043362fc 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileThreatDefenseConnector.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileThreatDefenseConnector.cs @@ -140,7 +140,7 @@ public bool? WindowsMobileApplicationManagementEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileThreatDefenseConnector CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileThreatDefenseConnector(); } /// @@ -179,7 +179,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowPartnerToCollectIOSApplicationMetadata", AllowPartnerToCollectIOSApplicationMetadata); writer.WriteBoolValue("allowPartnerToCollectIosCertificateMetadata", AllowPartnerToCollectIosCertificateMetadata); diff --git a/src/Microsoft.Graph/Generated/Models/MobileThreatDefenseConnectorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MobileThreatDefenseConnectorCollectionResponse.cs index ce3865ae12e..09735157f56 100644 --- a/src/Microsoft.Graph/Generated/Models/MobileThreatDefenseConnectorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobileThreatDefenseConnectorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MobileThreatDefenseConnectorCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobileThreatDefenseConnectorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobileThreatDefenseConnectorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MobilityManagementPolicy.cs b/src/Microsoft.Graph/Generated/Models/MobilityManagementPolicy.cs index 31be78b61fb..82b4aecfcd3 100644 --- a/src/Microsoft.Graph/Generated/Models/MobilityManagementPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/MobilityManagementPolicy.cs @@ -127,7 +127,7 @@ public string TermsOfUseUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobilityManagementPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobilityManagementPolicy(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("appliesTo", AppliesTo); writer.WriteStringValue("complianceUrl", ComplianceUrl); diff --git a/src/Microsoft.Graph/Generated/Models/MobilityManagementPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MobilityManagementPolicyCollectionResponse.cs index 41926809edc..56dc1e5df8b 100644 --- a/src/Microsoft.Graph/Generated/Models/MobilityManagementPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MobilityManagementPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MobilityManagementPolicyCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MobilityManagementPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MobilityManagementPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ModifiedProperty.cs b/src/Microsoft.Graph/Generated/Models/ModifiedProperty.cs index 71001630afc..1531e0cb8da 100644 --- a/src/Microsoft.Graph/Generated/Models/ModifiedProperty.cs +++ b/src/Microsoft.Graph/Generated/Models/ModifiedProperty.cs @@ -100,7 +100,7 @@ public ModifiedProperty() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ModifiedProperty CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ModifiedProperty(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("newValue", NewValue); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersByApplicationMetric.cs b/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersByApplicationMetric.cs index 9631b1c4d06..c31f6cfafd1 100644 --- a/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersByApplicationMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersByApplicationMetric.cs @@ -25,7 +25,7 @@ public long? InactiveCalendarMonthCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MonthlyInactiveUsersByApplicationMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MonthlyInactiveUsersByApplicationMetric(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("inactiveCalendarMonthCount", InactiveCalendarMonthCount); } diff --git a/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersByApplicationMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersByApplicationMetricCollectionResponse.cs index 45e3bcbf399..38d64e4676e 100644 --- a/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersByApplicationMetricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersByApplicationMetricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MonthlyInactiveUsersByApplicationMetricCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MonthlyInactiveUsersByApplicationMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MonthlyInactiveUsersByApplicationMetricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersMetric.cs b/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersMetric.cs index b3536805fa1..66df2e39b3d 100644 --- a/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersMetric.cs @@ -25,7 +25,7 @@ public long? InactiveCalendarMonthCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MonthlyInactiveUsersMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MonthlyInactiveUsersMetric(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("inactiveCalendarMonthCount", InactiveCalendarMonthCount); } diff --git a/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersMetricCollectionResponse.cs index 057862d9d2c..6638fed5a6e 100644 --- a/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersMetricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MonthlyInactiveUsersMetricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MonthlyInactiveUsersMetricCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MonthlyInactiveUsersMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MonthlyInactiveUsersMetricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MonthlyUserInsightMetricsRoot.cs b/src/Microsoft.Graph/Generated/Models/MonthlyUserInsightMetricsRoot.cs index f9037804cfa..36b99570b65 100644 --- a/src/Microsoft.Graph/Generated/Models/MonthlyUserInsightMetricsRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/MonthlyUserInsightMetricsRoot.cs @@ -163,7 +163,7 @@ public partial class MonthlyUserInsightMetricsRoot : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MonthlyUserInsightMetricsRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MonthlyUserInsightMetricsRoot(); } /// @@ -191,7 +191,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("activeUsers", ActiveUsers); writer.WriteCollectionOfObjectValues("authentications", Authentications); diff --git a/src/Microsoft.Graph/Generated/Models/MoveAction.cs b/src/Microsoft.Graph/Generated/Models/MoveAction.cs index c7524238c1a..29b097c7234 100644 --- a/src/Microsoft.Graph/Generated/Models/MoveAction.cs +++ b/src/Microsoft.Graph/Generated/Models/MoveAction.cs @@ -84,7 +84,7 @@ public MoveAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MoveAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MoveAction(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("from", From); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("to", To); diff --git a/src/Microsoft.Graph/Generated/Models/MultiActivitySubscription.cs b/src/Microsoft.Graph/Generated/Models/MultiActivitySubscription.cs new file mode 100644 index 00000000000..f0ba42d4b31 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/MultiActivitySubscription.cs @@ -0,0 +1,136 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Microsoft.Graph.Beta.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class MultiActivitySubscription : global::Microsoft.Graph.Beta.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The activities property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Microsoft.Graph.Beta.Models.SubscriptionActivities? Activities + { + get { return BackingStore?.Get("activities"); } + set { BackingStore?.Set("activities", value); } + } +#nullable restore +#else + public global::Microsoft.Graph.Beta.Models.SubscriptionActivities Activities + { + get { return BackingStore?.Get("activities"); } + set { BackingStore?.Set("activities", value); } + } +#endif + /// The callbackUrl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? CallbackUrl + { + get { return BackingStore?.Get("callbackUrl"); } + set { BackingStore?.Set("callbackUrl", value); } + } +#nullable restore +#else + public string CallbackUrl + { + get { return BackingStore?.Get("callbackUrl"); } + set { BackingStore?.Set("callbackUrl", value); } + } +#endif + /// The chatInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Microsoft.Graph.Beta.Models.ChatInfo? ChatInfo + { + get { return BackingStore?.Get("chatInfo"); } + set { BackingStore?.Set("chatInfo", value); } + } +#nullable restore +#else + public global::Microsoft.Graph.Beta.Models.ChatInfo ChatInfo + { + get { return BackingStore?.Get("chatInfo"); } + set { BackingStore?.Set("chatInfo", value); } + } +#endif + /// The meetingInfo property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Microsoft.Graph.Beta.Models.MeetingInfo? MeetingInfo + { + get { return BackingStore?.Get("meetingInfo"); } + set { BackingStore?.Set("meetingInfo", value); } + } +#nullable restore +#else + public global::Microsoft.Graph.Beta.Models.MeetingInfo MeetingInfo + { + get { return BackingStore?.Get("meetingInfo"); } + set { BackingStore?.Set("meetingInfo", value); } + } +#endif + /// The userId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? UserId + { + get { return BackingStore?.Get("userId"); } + set { BackingStore?.Set("userId", value); } + } +#nullable restore +#else + public string UserId + { + get { return BackingStore?.Get("userId"); } + set { BackingStore?.Set("userId", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Microsoft.Graph.Beta.Models.MultiActivitySubscription CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Microsoft.Graph.Beta.Models.MultiActivitySubscription(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "activities", n => { Activities = n.GetObjectValue(global::Microsoft.Graph.Beta.Models.SubscriptionActivities.CreateFromDiscriminatorValue); } }, + { "callbackUrl", n => { CallbackUrl = n.GetStringValue(); } }, + { "chatInfo", n => { ChatInfo = n.GetObjectValue(global::Microsoft.Graph.Beta.Models.ChatInfo.CreateFromDiscriminatorValue); } }, + { "meetingInfo", n => { MeetingInfo = n.GetObjectValue(global::Microsoft.Graph.Beta.Models.MeetingInfo.CreateFromDiscriminatorValue); } }, + { "userId", n => { UserId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteObjectValue("activities", Activities); + writer.WriteStringValue("callbackUrl", CallbackUrl); + writer.WriteObjectValue("chatInfo", ChatInfo); + writer.WriteObjectValue("meetingInfo", MeetingInfo); + writer.WriteStringValue("userId", UserId); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganization.cs b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganization.cs index 9aad0ab68d7..8e094ec2ada 100644 --- a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganization.cs +++ b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganization.cs @@ -95,7 +95,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MultiTenantOrganization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MultiTenantOrganization(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationIdentitySyncPolicyTemplate.cs b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationIdentitySyncPolicyTemplate.cs index 665fb2d0370..01ae2d97811 100644 --- a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationIdentitySyncPolicyTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationIdentitySyncPolicyTemplate.cs @@ -41,7 +41,7 @@ public partial class MultiTenantOrganizationIdentitySyncPolicyTemplate : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationIdentitySyncPolicyTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationIdentitySyncPolicyTemplate(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("templateApplicationLevel", TemplateApplicationLevel); writer.WriteObjectValue("userSyncInbound", UserSyncInbound); diff --git a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationJoinRequestRecord.cs b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationJoinRequestRecord.cs index 1783427b523..e0697c5b895 100644 --- a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationJoinRequestRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationJoinRequestRecord.cs @@ -63,7 +63,7 @@ public string AddedByTenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationJoinRequestRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationJoinRequestRecord(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("addedByTenantId", AddedByTenantId); writer.WriteEnumValue("memberState", MemberState); diff --git a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationJoinRequestTransitionDetails.cs b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationJoinRequestTransitionDetails.cs index b46d9a3fe94..4739be0a3e2 100644 --- a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationJoinRequestTransitionDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationJoinRequestTransitionDetails.cs @@ -80,7 +80,7 @@ public MultiTenantOrganizationJoinRequestTransitionDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationJoinRequestTransitionDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationJoinRequestTransitionDetails(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("desiredMemberState", DesiredMemberState); writer.WriteStringValue("details", Details); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationMember.cs b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationMember.cs index 029ad1d34d7..f38c84fe907 100644 --- a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationMember.cs +++ b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationMember.cs @@ -104,7 +104,7 @@ public MultiTenantOrganizationMember() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationMember(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteGuidValue("addedByTenantId", AddedByTenantId); writer.WriteDateTimeOffsetValue("addedDateTime", AddedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationMemberCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationMemberCollectionResponse.cs index 858eedd2e1c..9318badb132 100644 --- a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationMemberCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationMemberCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MultiTenantOrganizationMemberCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationMemberCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationMemberCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationMemberTransitionDetails.cs b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationMemberTransitionDetails.cs index 1a0f66e2ca4..3ab62129d86 100644 --- a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationMemberTransitionDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationMemberTransitionDetails.cs @@ -86,7 +86,7 @@ public MultiTenantOrganizationMemberTransitionDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationMemberTransitionDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationMemberTransitionDetails(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("desiredRole", DesiredRole); writer.WriteEnumValue("desiredState", DesiredState); writer.WriteStringValue("details", Details); diff --git a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationPartnerConfigurationTemplate.cs b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationPartnerConfigurationTemplate.cs index de5002ff152..d233fcff92b 100644 --- a/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationPartnerConfigurationTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/MultiTenantOrganizationPartnerConfigurationTemplate.cs @@ -121,7 +121,7 @@ public partial class MultiTenantOrganizationPartnerConfigurationTemplate : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationPartnerConfigurationTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationPartnerConfigurationTemplate(); } /// @@ -147,7 +147,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("automaticUserConsentSettings", AutomaticUserConsentSettings); writer.WriteObjectValue("b2bCollaborationInbound", B2bCollaborationInbound); diff --git a/src/Microsoft.Graph/Generated/Models/MultiValueLegacyExtendedProperty.cs b/src/Microsoft.Graph/Generated/Models/MultiValueLegacyExtendedProperty.cs index a17d7b19b28..cc8dd70bb81 100644 --- a/src/Microsoft.Graph/Generated/Models/MultiValueLegacyExtendedProperty.cs +++ b/src/Microsoft.Graph/Generated/Models/MultiValueLegacyExtendedProperty.cs @@ -35,7 +35,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MultiValueLegacyExtendedProperty CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MultiValueLegacyExtendedProperty(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/MuteParticipantOperation.cs b/src/Microsoft.Graph/Generated/Models/MuteParticipantOperation.cs index ebd7ea3c802..def2198c182 100644 --- a/src/Microsoft.Graph/Generated/Models/MuteParticipantOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/MuteParticipantOperation.cs @@ -19,7 +19,7 @@ public partial class MuteParticipantOperation : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MuteParticipantOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MuteParticipantOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/MuteParticipantsOperation.cs b/src/Microsoft.Graph/Generated/Models/MuteParticipantsOperation.cs index 5658591ce15..17503347bc9 100644 --- a/src/Microsoft.Graph/Generated/Models/MuteParticipantsOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/MuteParticipantsOperation.cs @@ -35,7 +35,7 @@ public List Participants /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MuteParticipantsOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MuteParticipantsOperation(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("participants", Participants); } diff --git a/src/Microsoft.Graph/Generated/Models/MutualTlsOauthConfiguration.cs b/src/Microsoft.Graph/Generated/Models/MutualTlsOauthConfiguration.cs index 141cf8f9a89..537b6a28983 100644 --- a/src/Microsoft.Graph/Generated/Models/MutualTlsOauthConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/MutualTlsOauthConfiguration.cs @@ -48,7 +48,7 @@ public MutualTlsOauthConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MutualTlsOauthConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MutualTlsOauthConfiguration(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteEnumValue("tlsClientAuthParameter", TlsClientAuthParameter); diff --git a/src/Microsoft.Graph/Generated/Models/MutualTlsOauthConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/MutualTlsOauthConfigurationCollectionResponse.cs index 41ce5997c46..5a74fee6e55 100644 --- a/src/Microsoft.Graph/Generated/Models/MutualTlsOauthConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/MutualTlsOauthConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class MutualTlsOauthConfigurationCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.MutualTlsOauthConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.MutualTlsOauthConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/NamePronunciationSettings.cs b/src/Microsoft.Graph/Generated/Models/NamePronunciationSettings.cs index c9f7be82647..bfa965407b2 100644 --- a/src/Microsoft.Graph/Generated/Models/NamePronunciationSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/NamePronunciationSettings.cs @@ -25,7 +25,7 @@ public bool? IsEnabledInOrganization /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NamePronunciationSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NamePronunciationSettings(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isEnabledInOrganization", IsEnabledInOrganization); } diff --git a/src/Microsoft.Graph/Generated/Models/NdesConnector.cs b/src/Microsoft.Graph/Generated/Models/NdesConnector.cs index 1a80f9dd156..6e5b96fbbb2 100644 --- a/src/Microsoft.Graph/Generated/Models/NdesConnector.cs +++ b/src/Microsoft.Graph/Generated/Models/NdesConnector.cs @@ -102,7 +102,7 @@ public List RoleScopeTagIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NdesConnector CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NdesConnector(); } /// @@ -128,7 +128,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("connectorVersion", ConnectorVersion); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/NdesConnectorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/NdesConnectorCollectionResponse.cs index 55a9b0b345e..37d734bde21 100644 --- a/src/Microsoft.Graph/Generated/Models/NdesConnectorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/NdesConnectorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class NdesConnectorCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NdesConnectorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NdesConnectorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Network.cs b/src/Microsoft.Graph/Generated/Models/Network.cs index 6f0856ad0fa..adfef66abf4 100644 --- a/src/Microsoft.Graph/Generated/Models/Network.cs +++ b/src/Microsoft.Graph/Generated/Models/Network.cs @@ -53,7 +53,7 @@ public Network() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Network CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Network(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/NetworkConnection.cs b/src/Microsoft.Graph/Generated/Models/NetworkConnection.cs index 38a0a0a3bec..54d55170733 100644 --- a/src/Microsoft.Graph/Generated/Models/NetworkConnection.cs +++ b/src/Microsoft.Graph/Generated/Models/NetworkConnection.cs @@ -332,7 +332,7 @@ public NetworkConnection() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.NetworkConnection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NetworkConnection(); } /// @@ -372,7 +372,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applicationName", ApplicationName); writer.WriteStringValue("destinationAddress", DestinationAddress); writer.WriteStringValue("destinationDomain", DestinationDomain); diff --git a/src/Microsoft.Graph/Generated/Models/NetworkInterface.cs b/src/Microsoft.Graph/Generated/Models/NetworkInterface.cs index 03f5762342b..f2978d92457 100644 --- a/src/Microsoft.Graph/Generated/Models/NetworkInterface.cs +++ b/src/Microsoft.Graph/Generated/Models/NetworkInterface.cs @@ -132,7 +132,7 @@ public NetworkInterface() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.NetworkInterface CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NetworkInterface(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("ipV4Address", IpV4Address); writer.WriteStringValue("ipV6Address", IpV6Address); diff --git a/src/Microsoft.Graph/Generated/Models/NetworkLocationDetail.cs b/src/Microsoft.Graph/Generated/Models/NetworkLocationDetail.cs index a723c73b896..6509a0470f2 100644 --- a/src/Microsoft.Graph/Generated/Models/NetworkLocationDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/NetworkLocationDetail.cs @@ -74,7 +74,7 @@ public NetworkLocationDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.NetworkLocationDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NetworkLocationDetail(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("networkNames", NetworkNames); writer.WriteEnumValue("networkType", NetworkType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/Alert.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/Alert.cs index 38927648231..422f154afbd 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/Alert.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/Alert.cs @@ -263,7 +263,7 @@ public string VendorName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.Alert CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.Alert(); } /// @@ -301,7 +301,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("actions", Actions); writer.WriteEnumValue("alertType", AlertType); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertAction.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertAction.cs index 196ef01008b..b9050c7325a 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertAction.cs @@ -84,7 +84,7 @@ public AlertAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.AlertAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.AlertAction(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("actionLink", ActionLink); writer.WriteStringValue("actionText", ActionText); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertCollectionResponse.cs index 9e9ea42be9e..5d98e5e43a4 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AlertCollectionResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.AlertCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.AlertCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertFrequencyPoint.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertFrequencyPoint.cs index f912946c272..51cba3e3452 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertFrequencyPoint.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertFrequencyPoint.cs @@ -82,7 +82,7 @@ public AlertFrequencyPoint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.AlertFrequencyPoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.AlertFrequencyPoint(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("highSeverityCount", HighSeverityCount); writer.WriteLongValue("informationalSeverityCount", InformationalSeverityCount); writer.WriteLongValue("lowSeverityCount", LowSeverityCount); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertSeveritySummary.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertSeveritySummary.cs index e3f2cc1287a..b78a3caf956 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertSeveritySummary.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertSeveritySummary.cs @@ -64,7 +64,7 @@ public AlertSeveritySummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.AlertSeveritySummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.AlertSeveritySummary(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("count", Count); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("severity", Severity); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertSummary.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertSummary.cs index 4ff58ae1c38..aa5ee5c4ea5 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/AlertSummary.cs @@ -70,7 +70,7 @@ public AlertSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.AlertSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.AlertSummary(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("alertType", AlertType); writer.WriteLongValue("count", Count); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ApplicationSnapshot.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ApplicationSnapshot.cs index a33948aadc3..d2477d663e7 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ApplicationSnapshot.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ApplicationSnapshot.cs @@ -68,7 +68,7 @@ public ApplicationSnapshot() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.ApplicationSnapshot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ApplicationSnapshot(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/AssociatedBranch.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/AssociatedBranch.cs index ad62a04d6fa..72b5939df73 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/AssociatedBranch.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/AssociatedBranch.cs @@ -42,7 +42,7 @@ public AssociatedBranch() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.AssociatedBranch CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.AssociatedBranch(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("branchId", BranchId); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/Association.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/Association.cs index 1c0a38c2e93..fd252fe4dea 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/Association.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/Association.cs @@ -52,7 +52,7 @@ public Association() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.Association CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/BgpConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/BgpConfiguration.cs index 0c55d031038..0f8579a317b 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/BgpConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/BgpConfiguration.cs @@ -106,7 +106,7 @@ public BgpConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.BgpConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.BgpConfiguration(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("asn", Asn); writer.WriteStringValue("ipAddress", IpAddress); writer.WriteStringValue("localIpAddress", LocalIpAddress); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/BranchConnectivityConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/BranchConnectivityConfiguration.cs index bd5524ec483..f47480839ce 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/BranchConnectivityConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/BranchConnectivityConfiguration.cs @@ -100,7 +100,7 @@ public BranchConnectivityConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.BranchConnectivityConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.BranchConnectivityConfiguration(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("branchId", BranchId); writer.WriteStringValue("branchName", BranchName); writer.WriteCollectionOfObjectValues("links", Links); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/BranchSite.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/BranchSite.cs index d1ad292078c..96c033c4f73 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/BranchSite.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/BranchSite.cs @@ -139,7 +139,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.BranchSite CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.BranchSite(); } /// @@ -168,7 +168,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("bandwidthCapacity", BandwidthCapacity); writer.WriteObjectValue("connectivityConfiguration", ConnectivityConfiguration); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/BranchSiteCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/BranchSiteCollectionResponse.cs index d2a48090e48..58625a25a42 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/BranchSiteCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/BranchSiteCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BranchSiteCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.BranchSiteCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.BranchSiteCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ConditionalAccessPolicy.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ConditionalAccessPolicy.cs index 2bf16110fb1..7b6178131b1 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ConditionalAccessPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ConditionalAccessPolicy.cs @@ -63,7 +63,7 @@ public DateTimeOffset? ModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ConditionalAccessPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ConditionalAccessPolicy(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ConditionalAccessPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ConditionalAccessPolicyCollectionResponse.cs index 801d4f22e76..e2719b6ee9e 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ConditionalAccessPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ConditionalAccessPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConditionalAccessPolicyCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ConditionalAccessPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ConditionalAccessPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ConditionalAccessSettings.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ConditionalAccessSettings.cs index ad8901f150c..2a015251cf0 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ConditionalAccessSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ConditionalAccessSettings.cs @@ -25,7 +25,7 @@ public partial class ConditionalAccessSettings : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ConditionalAccessSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ConditionalAccessSettings(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("signalingStatus", SignalingStatus); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/Connection.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/Connection.cs index 940de298683..b645b55a876 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/Connection.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/Connection.cs @@ -327,7 +327,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.Connection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.Connection(); } /// @@ -374,7 +374,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("agentVersion", AgentVersion); writer.WriteObjectValue("applicationSnapshot", ApplicationSnapshot); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectionCollectionResponse.cs index c1cce467f36..6148a539dd0 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConnectionCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectionSummary.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectionSummary.cs index 337c128d92e..73ab35b455b 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectionSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectionSummary.cs @@ -64,7 +64,7 @@ public ConnectionSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectionSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectionSummary(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("totalCount", TotalCount); writer.WriteEnumValue("trafficType", TrafficType); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/Connectivity.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/Connectivity.cs index 91334cd530f..d4b3c51f6e6 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/Connectivity.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/Connectivity.cs @@ -67,7 +67,7 @@ public partial class Connectivity : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.Connectivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.Connectivity(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("branches", Branches); writer.WriteCollectionOfObjectValues("remoteNetworks", RemoteNetworks); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectivityConfigurationLink.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectivityConfigurationLink.cs index a840558aace..ae45ac2c8a8 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectivityConfigurationLink.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectivityConfigurationLink.cs @@ -67,7 +67,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectivityConfigurationLink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectivityConfigurationLink(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfObjectValues("localConfigurations", LocalConfigurations); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectivityConfigurationLinkCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectivityConfigurationLinkCollectionResponse.cs index 8e9bbea7829..5def2a68608 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectivityConfigurationLinkCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ConnectivityConfigurationLinkCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ConnectivityConfigurationLinkCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectivityConfigurationLinkCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectivityConfigurationLinkCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/CrossTenantAccess.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/CrossTenantAccess.cs index e79b4dd3596..cd8ca6e515a 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/CrossTenantAccess.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/CrossTenantAccess.cs @@ -124,7 +124,7 @@ public CrossTenantAccess() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.CrossTenantAccess CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.CrossTenantAccess(); } /// @@ -151,7 +151,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("deviceCount", DeviceCount); writer.WriteDateTimeOffsetValue("lastAccessDateTime", LastAccessDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/CrossTenantAccessSettings.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/CrossTenantAccessSettings.cs index 68db6212aac..12cc8dc040e 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/CrossTenantAccessSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/CrossTenantAccessSettings.cs @@ -25,7 +25,7 @@ public partial class CrossTenantAccessSettings : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.CrossTenantAccessSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.CrossTenantAccessSettings(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("networkPacketTaggingStatus", NetworkPacketTaggingStatus); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/CrossTenantSummary.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/CrossTenantSummary.cs index d2f01fd162d..875b15e2aed 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/CrossTenantSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/CrossTenantSummary.cs @@ -88,7 +88,7 @@ public CrossTenantSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.CrossTenantSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.CrossTenantSummary(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("authTransactionCount", AuthTransactionCount); writer.WriteIntValue("deviceCount", DeviceCount); writer.WriteIntValue("newTenantCount", NewTenantCount); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/Destination.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/Destination.cs index 8dcc3cc2138..73be9c8f8dd 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/Destination.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/Destination.cs @@ -150,7 +150,7 @@ public Destination() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.Destination CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.Destination(); } /// @@ -183,7 +183,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("deviceCount", DeviceCount); writer.WriteDateTimeOffsetValue("firstAccessDateTime", FirstAccessDateTime); writer.WriteStringValue("fqdn", Fqdn); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/DestinationSummary.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/DestinationSummary.cs index 114ad77668d..ae843f151c4 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/DestinationSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/DestinationSummary.cs @@ -80,7 +80,7 @@ public DestinationSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.DestinationSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.DestinationSummary(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("count", Count); writer.WriteStringValue("destination", Destination); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/Device.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/Device.cs index 47bdb7b7c58..4da83a2310f 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/Device.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/Device.cs @@ -118,7 +118,7 @@ public Device() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.Device CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.Device(); } /// @@ -144,7 +144,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceId", DeviceId); writer.WriteStringValue("displayName", DisplayName); writer.WriteBoolValue("isCompliant", IsCompliant); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/DeviceLink.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/DeviceLink.cs index c6ad559096d..b023b083a2a 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/DeviceLink.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/DeviceLink.cs @@ -117,7 +117,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.DeviceLink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.DeviceLink(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("bandwidthCapacityInMbps", BandwidthCapacityInMbps); writer.WriteObjectValue("bgpConfiguration", BgpConfiguration); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/DeviceLinkCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/DeviceLinkCollectionResponse.cs index 3c5aac6ae46..b7dd4a5cba7 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/DeviceLinkCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/DeviceLinkCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeviceLinkCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.DeviceLinkCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.DeviceLinkCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/DeviceUsageSummary.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/DeviceUsageSummary.cs index a35487d9064..8d03101f916 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/DeviceUsageSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/DeviceUsageSummary.cs @@ -70,7 +70,7 @@ public DeviceUsageSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.DeviceUsageSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.DeviceUsageSummary(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("activeDeviceCount", ActiveDeviceCount); writer.WriteIntValue("inactiveDeviceCount", InactiveDeviceCount); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/DiscoveredApplicationSegmentReport.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/DiscoveredApplicationSegmentReport.cs index 4b7707b6dd0..bba21ba86a5 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/DiscoveredApplicationSegmentReport.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/DiscoveredApplicationSegmentReport.cs @@ -160,7 +160,7 @@ public DiscoveredApplicationSegmentReport() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.DiscoveredApplicationSegmentReport CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.DiscoveredApplicationSegmentReport(); } /// @@ -193,7 +193,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("accessType", AccessType); writer.WriteIntValue("deviceCount", DeviceCount); writer.WriteStringValue("discoveredApplicationSegmentId", DiscoveredApplicationSegmentId); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/EntitiesSummary.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/EntitiesSummary.cs index 66cfb46c17b..94b56d881fe 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/EntitiesSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/EntitiesSummary.cs @@ -76,7 +76,7 @@ public EntitiesSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.EntitiesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.EntitiesSummary(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("deviceCount", DeviceCount); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("trafficType", TrafficType); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ExtendedProperties.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ExtendedProperties.cs index 44bd7a6cfb2..5795c4361b0 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ExtendedProperties.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ExtendedProperties.cs @@ -19,7 +19,7 @@ public partial class ExtendedProperties : global::Microsoft.Graph.Beta.Models.Di /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ExtendedProperties CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ExtendedProperties(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ExternalCertificateAuthorityCertificate.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ExternalCertificateAuthorityCertificate.cs index 4464bb618ad..82159232e65 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ExternalCertificateAuthorityCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ExternalCertificateAuthorityCertificate.cs @@ -137,7 +137,7 @@ public string OrganizationName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ExternalCertificateAuthorityCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ExternalCertificateAuthorityCertificate(); } /// @@ -164,7 +164,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certificate", Certificate); writer.WriteStringValue("certificateSigningRequest", CertificateSigningRequest); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ExternalCertificateAuthorityCertificateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ExternalCertificateAuthorityCertificateCollectionResponse.cs index d29fdb29c8d..cf2abf1ce59 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ExternalCertificateAuthorityCertificateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ExternalCertificateAuthorityCertificateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ExternalCertificateAuthorityCertificateCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ExternalCertificateAuthorityCertificateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ExternalCertificateAuthorityCertificateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringPolicy.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringPolicy.cs index ccfaa8cb51c..930ece55f99 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringPolicy.cs @@ -44,7 +44,7 @@ public FilteringPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringPolicy(); } /// @@ -66,7 +66,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("action", Action); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringPolicyCollectionResponse.cs index 907ab0113d2..dc0290db6e1 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class FilteringPolicyCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringPolicyLink.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringPolicyLink.cs index ec30156d9a7..31c51ec131d 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringPolicyLink.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringPolicyLink.cs @@ -50,7 +50,7 @@ public FilteringPolicyLink() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringPolicyLink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringPolicyLink(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringProfile.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringProfile.cs index f7bcef6b9be..1f892c09f28 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringProfile.cs @@ -54,7 +54,7 @@ public FilteringProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringProfile(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("conditionalAccessPolicies", ConditionalAccessPolicies); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringProfileCollectionResponse.cs index 8a3e54dc31e..3312f694782 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class FilteringProfileCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringRule.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringRule.cs index 6b8f1fb7490..327658fd7c5 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/FilteringRule.cs @@ -48,7 +48,7 @@ public FilteringRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -75,7 +75,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("destinations", Destinations); writer.WriteEnumValue("ruleType", RuleType); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingOptions.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingOptions.cs index 829f02cee9c..068ecea6e77 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingOptions.cs @@ -25,7 +25,7 @@ public partial class ForwardingOptions : global::Microsoft.Graph.Beta.Models.Ent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingOptions(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("skipDnsLookupState", SkipDnsLookupState); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingPolicy.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingPolicy.cs index 2928e832167..9633912ac1a 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingPolicy.cs @@ -32,7 +32,7 @@ public ForwardingPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingPolicy(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("trafficForwardingType", TrafficForwardingType); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingPolicyCollectionResponse.cs index d77f54ddde3..07a146effc9 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ForwardingPolicyCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingPolicyLink.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingPolicyLink.cs index 562e6ce134f..c6f4352c2f2 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingPolicyLink.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingPolicyLink.cs @@ -26,7 +26,7 @@ public ForwardingPolicyLink() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingPolicyLink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingPolicyLink(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingProfile.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingProfile.cs index bd36c09b9bc..58f681a22fb 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingProfile.cs @@ -70,7 +70,7 @@ public ForwardingProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfile(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("associations", Associations); writer.WriteIntValue("priority", Priority); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingProfileCollectionResponse.cs index 5d8150e0c49..262816f91e0 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ForwardingProfileCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingRule.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingRule.cs index a5e6dfddd7f..05cbd07f54d 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ForwardingRule.cs @@ -60,7 +60,7 @@ public ForwardingRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("action", Action); writer.WriteEnumValue("clientFallbackAction", ClientFallbackAction); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/Fqdn.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/Fqdn.cs index 7c86d42277e..e8b222133b3 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/Fqdn.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/Fqdn.cs @@ -42,7 +42,7 @@ public Fqdn() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.Fqdn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.Fqdn(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/FqdnFilteringRule.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/FqdnFilteringRule.cs index 7b8d108845a..492c115a7c4 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/FqdnFilteringRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/FqdnFilteringRule.cs @@ -26,7 +26,7 @@ public FqdnFilteringRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.FqdnFilteringRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.FqdnFilteringRule(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/Headers.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/Headers.cs index 6a6b1eb5594..4772ce49565 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/Headers.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/Headers.cs @@ -100,7 +100,7 @@ public Headers() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.Headers CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.Headers(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("origin", Origin); writer.WriteStringValue("referrer", Referrer); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/InternetAccessForwardingRule.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/InternetAccessForwardingRule.cs index 5fb2d3ccec6..83e8d08e2cb 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/InternetAccessForwardingRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/InternetAccessForwardingRule.cs @@ -48,7 +48,7 @@ public InternetAccessForwardingRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.InternetAccessForwardingRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.InternetAccessForwardingRule(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("ports", Ports); writer.WriteEnumValue("protocol", Protocol); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/IpAddress.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/IpAddress.cs index cd1224cd502..fd36c82f0f5 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/IpAddress.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/IpAddress.cs @@ -42,7 +42,7 @@ public IpAddress() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.IpAddress CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.IpAddress(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/IpRange.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/IpRange.cs index b2f2e547577..5a0f17dbfc4 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/IpRange.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/IpRange.cs @@ -58,7 +58,7 @@ public IpRange() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.IpRange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.IpRange(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("beginAddress", BeginAddress); writer.WriteStringValue("endAddress", EndAddress); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/IpSubnet.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/IpSubnet.cs index e437b3ebc2f..3bc19f401f9 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/IpSubnet.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/IpSubnet.cs @@ -42,7 +42,7 @@ public IpSubnet() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.IpSubnet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.IpSubnet(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/LocalConnectivityConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/LocalConnectivityConfiguration.cs index 981bd00c955..3407330e312 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/LocalConnectivityConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/LocalConnectivityConfiguration.cs @@ -96,7 +96,7 @@ public LocalConnectivityConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.LocalConnectivityConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.LocalConnectivityConfiguration(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("asn", Asn); writer.WriteStringValue("bgpAddress", BgpAddress); writer.WriteStringValue("endpoint", Endpoint); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/Logs.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/Logs.cs index 4769575090a..340efec3196 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/Logs.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/Logs.cs @@ -67,7 +67,7 @@ public partial class Logs : global::Microsoft.Graph.Beta.Models.Entity, IParsabl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.Logs CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.Logs(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("connections", Connections); writer.WriteCollectionOfObjectValues("remoteNetworks", RemoteNetworks); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/M365ForwardingRule.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/M365ForwardingRule.cs index 0dd3bb42a8b..4f5d8aa205d 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/M365ForwardingRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/M365ForwardingRule.cs @@ -54,7 +54,7 @@ public M365ForwardingRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.M365ForwardingRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.M365ForwardingRule(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("category", Category); writer.WriteCollectionOfPrimitiveValues("ports", Ports); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/NetworkAccessRoot.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/NetworkAccessRoot.cs index e450b9f5f58..d54f8ad3324 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/NetworkAccessRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/NetworkAccessRoot.cs @@ -227,7 +227,7 @@ public partial class NetworkAccessRoot : global::Microsoft.Graph.Beta.Models.Ent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.NetworkAccessRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.NetworkAccessRoot(); } /// @@ -259,7 +259,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("alerts", Alerts); writer.WriteObjectValue("connectivity", Connectivity); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/NetworkAccessTraffic.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/NetworkAccessTraffic.cs index a540c965984..c73e9cb5fa4 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/NetworkAccessTraffic.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/NetworkAccessTraffic.cs @@ -658,7 +658,7 @@ public NetworkAccessTraffic() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.NetworkAccessTraffic CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.NetworkAccessTraffic(); } /// @@ -724,7 +724,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteStringValue("agentVersion", AgentVersion); writer.WriteObjectValue("applicationSnapshot", ApplicationSnapshot); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/NetworkAccessTrafficCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/NetworkAccessTrafficCollectionResponse.cs index fe4d2b4bc5a..96a05ab51e0 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/NetworkAccessTrafficCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/NetworkAccessTrafficCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class NetworkAccessTrafficCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.NetworkAccessTrafficCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.NetworkAccessTrafficCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/PeerConnectivityConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/PeerConnectivityConfiguration.cs index df59b8c6cbe..8985baaded6 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/PeerConnectivityConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/PeerConnectivityConfiguration.cs @@ -90,7 +90,7 @@ public PeerConnectivityConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.PeerConnectivityConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.PeerConnectivityConfiguration(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("asn", Asn); writer.WriteStringValue("bgpAddress", BgpAddress); writer.WriteStringValue("endpoint", Endpoint); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/Policy.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/Policy.cs index 4dd5bf6d4a1..8f22eedba77 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/Policy.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/Policy.cs @@ -83,7 +83,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.Policy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -114,7 +114,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyLink.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyLink.cs index 40b3686c652..431e1be708a 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyLink.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyLink.cs @@ -57,7 +57,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("policy", Policy); writer.WriteEnumValue("state", State); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyLinkCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyLinkCollectionResponse.cs index f72662993e2..8996f0fd73b 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyLinkCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyLinkCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PolicyLinkCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLinkCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLinkCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyRule.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyRule.cs index 30532aff91a..97b1e522fe4 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyRule.cs @@ -35,7 +35,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -68,7 +68,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyRuleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyRuleCollectionResponse.cs index 56a106adfc5..626558dab06 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyRuleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyRuleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PolicyRuleCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRuleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRuleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyRuleDelta.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyRuleDelta.cs index 281d79625df..88fb33e91d0 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyRuleDelta.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/PolicyRuleDelta.cs @@ -74,7 +74,7 @@ public PolicyRuleDelta() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRuleDelta CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRuleDelta(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("ruleId", RuleId); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/PrivateAccessDetails.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/PrivateAccessDetails.cs index 796a33ebf1c..232c94fd842 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/PrivateAccessDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/PrivateAccessDetails.cs @@ -160,7 +160,7 @@ public PrivateAccessDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.PrivateAccessDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.PrivateAccessDetails(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("accessType", AccessType); writer.WriteStringValue("appSegmentId", AppSegmentId); writer.WriteEnumValue("connectionStatus", ConnectionStatus); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/PrivateAccessForwardingRule.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/PrivateAccessForwardingRule.cs index a4be801b8be..5ad82cd631b 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/PrivateAccessForwardingRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/PrivateAccessForwardingRule.cs @@ -26,7 +26,7 @@ public PrivateAccessForwardingRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.PrivateAccessForwardingRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.PrivateAccessForwardingRule(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/Profile.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/Profile.cs index 1c2e63710d6..62e228fb26a 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/Profile.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/Profile.cs @@ -95,7 +95,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.Profile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -126,7 +126,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RedundancyConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RedundancyConfiguration.cs index a59c321e61f..20b3c34a47e 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RedundancyConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RedundancyConfiguration.cs @@ -74,7 +74,7 @@ public RedundancyConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.RedundancyConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RedundancyConfiguration(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("redundancyTier", RedundancyTier); writer.WriteStringValue("zoneLocalIpAddress", ZoneLocalIpAddress); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedDestination.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedDestination.cs index d37af28a73e..87425e1ba1a 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedDestination.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedDestination.cs @@ -70,7 +70,7 @@ public RelatedDestination() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedDestination CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedDestination(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fqdn", Fqdn); writer.WriteStringValue("ip", Ip); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedDevice.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedDevice.cs index 785014e292e..2a46970ab92 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedDevice.cs @@ -42,7 +42,7 @@ public RelatedDevice() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedDevice(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceId", DeviceId); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedFile.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedFile.cs index 81bc14a50cf..5f5f86a306d 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedFile.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedFile.cs @@ -64,7 +64,7 @@ public RelatedFile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedFile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedFile(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("directory", Directory); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedFileHash.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedFileHash.cs index badd7289fc9..c94a153f791 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedFileHash.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedFileHash.cs @@ -48,7 +48,7 @@ public RelatedFileHash() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedFileHash CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedFileHash(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("algorithm", Algorithm); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedMalware.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedMalware.cs index c9bad7ae56f..fc6ed1cf586 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedMalware.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedMalware.cs @@ -54,7 +54,7 @@ public RelatedMalware() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedMalware CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedMalware(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("category", Category); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedRemoteNetwork.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedRemoteNetwork.cs index d32382e9ac1..523b10f97b2 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedRemoteNetwork.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedRemoteNetwork.cs @@ -42,7 +42,7 @@ public RelatedRemoteNetwork() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedRemoteNetwork CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedRemoteNetwork(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("remoteNetworkId", RemoteNetworkId); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedResource.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedResource.cs index 0f774818237..86a84f0e1f8 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedResource.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedResource.cs @@ -52,7 +52,7 @@ public RelatedResource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedTenant.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedTenant.cs index f4e4c9442a8..cb50eece74a 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedTenant.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedTenant.cs @@ -42,7 +42,7 @@ public RelatedTenant() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedTenant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedTenant(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("tenantId", TenantId); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedThreatIntelligence.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedThreatIntelligence.cs index 574a86d85c3..b82c6a76511 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedThreatIntelligence.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedThreatIntelligence.cs @@ -32,7 +32,7 @@ public RelatedThreatIntelligence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedThreatIntelligence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedThreatIntelligence(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("threatCount", ThreatCount); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedToken.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedToken.cs index f868c0670d8..daa37c30d4b 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedToken.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedToken.cs @@ -42,7 +42,7 @@ public RelatedToken() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedToken CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedToken(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("uniqueTokenIdentifier", UniqueTokenIdentifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedTransaction.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedTransaction.cs index 13d127e1e67..c532eb58966 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedTransaction.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedTransaction.cs @@ -42,7 +42,7 @@ public RelatedTransaction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedTransaction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedTransaction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("transactionId", TransactionId); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedUrl.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedUrl.cs index 24cbc801e5c..5a4f83423b9 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedUrl.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedUrl.cs @@ -42,7 +42,7 @@ public RelatedUrl() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedUrl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedUrl(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("url", Url); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedUser.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedUser.cs index 15109a40a09..f716d80cb77 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedUser.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedUser.cs @@ -58,7 +58,7 @@ public RelatedUser() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedUser(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userId", UserId); writer.WriteStringValue("userPrincipalName", UserPrincipalName); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedWebCategory.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedWebCategory.cs index 5677d936c31..33f10e7c75b 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedWebCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RelatedWebCategory.cs @@ -42,7 +42,7 @@ public RelatedWebCategory() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedWebCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RelatedWebCategory(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("webCategoryName", WebCategoryName); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetwork.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetwork.cs index 198e897b4f4..83319c89ed1 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetwork.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetwork.cs @@ -111,7 +111,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetwork CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetwork(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("connectivityConfiguration", ConnectivityConfiguration); writer.WriteCollectionOfObjectValues("deviceLinks", DeviceLinks); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkCollectionResponse.cs index 21bb46b478c..7f2169e35cf 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RemoteNetworkCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetworkCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetworkCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkConnectivityConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkConnectivityConfiguration.cs index 469101c383e..c49d9d548b9 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkConnectivityConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkConnectivityConfiguration.cs @@ -100,7 +100,7 @@ public RemoteNetworkConnectivityConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetworkConnectivityConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetworkConnectivityConfiguration(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("links", Links); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("remoteNetworkId", RemoteNetworkId); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkHealthEvent.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkHealthEvent.cs index 550c4199b8c..d40ebc04ba6 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkHealthEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkHealthEvent.cs @@ -113,7 +113,7 @@ public string SourceIp /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetworkHealthEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetworkHealthEvent(); } /// @@ -141,7 +141,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("bgpRoutesAdvertisedCount", BgpRoutesAdvertisedCount); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkHealthEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkHealthEventCollectionResponse.cs index 7795d66298a..8e7512b76f9 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkHealthEventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RemoteNetworkHealthEventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RemoteNetworkHealthEventCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetworkHealthEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetworkHealthEventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/Reports.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/Reports.cs index ce5ade5f8f4..84e581d91b1 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/Reports.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/Reports.cs @@ -19,7 +19,7 @@ public partial class Reports : global::Microsoft.Graph.Beta.Models.Entity, IPars /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.Reports CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.Reports(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/RuleDestination.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/RuleDestination.cs index d9fbb2bbb81..4927da4c1a3 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/RuleDestination.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/RuleDestination.cs @@ -52,7 +52,7 @@ public RuleDestination() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.RuleDestination CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -82,7 +82,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/Settings.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/Settings.cs index 112aff7834f..96ac61f092d 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/Settings.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/Settings.cs @@ -67,7 +67,7 @@ public partial class Settings : global::Microsoft.Graph.Beta.Models.Entity, IPar /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.Settings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.Settings(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("conditionalAccess", ConditionalAccess); writer.WriteObjectValue("crossTenantAccess", CrossTenantAccess); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TenantStatus.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TenantStatus.cs index 352f63f6581..8ac70b4b6de 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TenantStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TenantStatus.cs @@ -41,7 +41,7 @@ public string OnboardingErrorMessage /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.TenantStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.TenantStatus(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("onboardingErrorMessage", OnboardingErrorMessage); writer.WriteEnumValue("onboardingStatus", OnboardingStatus); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThirdPartyTokenDetails.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThirdPartyTokenDetails.cs index 081d27be980..84d252278c2 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThirdPartyTokenDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThirdPartyTokenDetails.cs @@ -86,7 +86,7 @@ public ThirdPartyTokenDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.ThirdPartyTokenDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ThirdPartyTokenDetails(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteDateTimeOffsetValue("issuedAtDateTime", IssuedAtDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceDestination.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceDestination.cs index 47b59ce4aec..1c1e7bcb9b7 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceDestination.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceDestination.cs @@ -52,7 +52,7 @@ public ThreatIntelligenceDestination() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligenceDestination CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceFqdnDestination.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceFqdnDestination.cs index 2d1b3c00e2a..888168881ed 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceFqdnDestination.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceFqdnDestination.cs @@ -42,7 +42,7 @@ public ThreatIntelligenceFqdnDestination() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligenceFqdnDestination CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligenceFqdnDestination(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("values", Values); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceMatchingConditions.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceMatchingConditions.cs index 7dddfd227a8..e7ff9155852 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceMatchingConditions.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceMatchingConditions.cs @@ -74,7 +74,7 @@ public ThreatIntelligenceMatchingConditions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligenceMatchingConditions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligenceMatchingConditions(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("destinations", Destinations); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("severity", Severity); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicy.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicy.cs index e87f42d465a..fc21c132742 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicy.cs @@ -48,7 +48,7 @@ public ThreatIntelligencePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligencePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligencePolicy(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteObjectValue("settings", Settings); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicyCollectionResponse.cs index e387fdb45d8..1e6f22b1131 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ThreatIntelligencePolicyCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligencePolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligencePolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicyLink.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicyLink.cs index f6a653cb6de..51f2c5cea06 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicyLink.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicyLink.cs @@ -26,7 +26,7 @@ public ThreatIntelligencePolicyLink() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligencePolicyLink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligencePolicyLink(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicySettings.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicySettings.cs index 7d143babf98..be93daa0604 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicySettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligencePolicySettings.cs @@ -58,7 +58,7 @@ public ThreatIntelligencePolicySettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligencePolicySettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligencePolicySettings(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("defaultAction", DefaultAction); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceRule.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceRule.cs index 2371277e5a8..9313a43f3ec 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceRule.cs @@ -86,7 +86,7 @@ public ThreatIntelligenceRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligenceRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligenceRule(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("action", Action); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceRuleSettings.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceRuleSettings.cs index a049a951986..c4d051f71b6 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceRuleSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ThreatIntelligenceRuleSettings.cs @@ -58,7 +58,7 @@ public ThreatIntelligenceRuleSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligenceRuleSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligenceRuleSettings(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("status", Status); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionDestination.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionDestination.cs index 661680fe8f6..06255351780 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionDestination.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionDestination.cs @@ -52,7 +52,7 @@ public TlsInspectionDestination() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionDestination CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionFqdnDestination.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionFqdnDestination.cs index 3ab1cd5bc58..7d28023fae1 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionFqdnDestination.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionFqdnDestination.cs @@ -42,7 +42,7 @@ public TlsInspectionFqdnDestination() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionFqdnDestination CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionFqdnDestination(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("values", Values); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionMatchingConditions.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionMatchingConditions.cs index c3a24dc04c5..0fa892781e2 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionMatchingConditions.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionMatchingConditions.cs @@ -68,7 +68,7 @@ public TlsInspectionMatchingConditions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionMatchingConditions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionMatchingConditions(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("destinations", Destinations); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicy.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicy.cs index 856b4811aa0..12f53d979b2 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicy.cs @@ -48,7 +48,7 @@ public TlsInspectionPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionPolicy(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteObjectValue("settings", Settings); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicyCollectionResponse.cs index a7315f0465e..8593d084bc9 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TlsInspectionPolicyCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicyLink.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicyLink.cs index 0215b2fd32b..939864648a4 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicyLink.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicyLink.cs @@ -26,7 +26,7 @@ public TlsInspectionPolicyLink() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionPolicyLink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionPolicyLink(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicySettings.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicySettings.cs index 590484dd6eb..3ba841278d7 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicySettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionPolicySettings.cs @@ -52,7 +52,7 @@ public TlsInspectionPolicySettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionPolicySettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionPolicySettings(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionRule.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionRule.cs index 3386583985d..fe65b12614c 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionRule.cs @@ -80,7 +80,7 @@ public TlsInspectionRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionRule(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteObjectValue("matchingConditions", MatchingConditions); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionRuleSettings.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionRuleSettings.cs index f33d23abbcb..75786bccdd5 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionRuleSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionRuleSettings.cs @@ -58,7 +58,7 @@ public TlsInspectionRuleSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionRuleSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionRuleSettings(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("status", Status); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionWebCategoryDestination.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionWebCategoryDestination.cs index 75db85af0a6..6e986f28bcf 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionWebCategoryDestination.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsInspectionWebCategoryDestination.cs @@ -42,7 +42,7 @@ public TlsInspectionWebCategoryDestination() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionWebCategoryDestination CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionWebCategoryDestination(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("values", Values); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsTermination.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsTermination.cs index 7d90e36272b..ac43b560c45 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsTermination.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TlsTermination.cs @@ -35,7 +35,7 @@ public partial class TlsTermination : global::Microsoft.Graph.Beta.Models.Entity /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsTermination CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.TlsTermination(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("externalCertificateAuthorityCertificates", ExternalCertificateAuthorityCertificates); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TransactionSummary.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TransactionSummary.cs index b960ccc4964..32e6be30830 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TransactionSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TransactionSummary.cs @@ -70,7 +70,7 @@ public TransactionSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.TransactionSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.TransactionSummary(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("blockedCount", BlockedCount); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("totalCount", TotalCount); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TunnelConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TunnelConfiguration.cs index 3e2ec97cc0d..61caceac762 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TunnelConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TunnelConfiguration.cs @@ -84,7 +84,7 @@ public TunnelConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.TunnelConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -112,7 +112,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("preSharedKey", PreSharedKey); writer.WriteStringValue("zoneRedundancyPreSharedKey", ZoneRedundancyPreSharedKey); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TunnelConfigurationIKEv2Custom.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TunnelConfigurationIKEv2Custom.cs index 040dbb9b63d..5fd35bde259 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TunnelConfigurationIKEv2Custom.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TunnelConfigurationIKEv2Custom.cs @@ -68,7 +68,7 @@ public TunnelConfigurationIKEv2Custom() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.TunnelConfigurationIKEv2Custom CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.TunnelConfigurationIKEv2Custom(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("dhGroup", DhGroup); writer.WriteEnumValue("ikeEncryption", IkeEncryption); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/TunnelConfigurationIKEv2Default.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/TunnelConfigurationIKEv2Default.cs index 37eeba5dd91..ccb9f2f6d86 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/TunnelConfigurationIKEv2Default.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/TunnelConfigurationIKEv2Default.cs @@ -26,7 +26,7 @@ public TunnelConfigurationIKEv2Default() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.TunnelConfigurationIKEv2Default CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.TunnelConfigurationIKEv2Default(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/Url.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/Url.cs index 11a49d2ef8e..767d760f5e1 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/Url.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/Url.cs @@ -42,7 +42,7 @@ public Url() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.Url CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.Url(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/UsageProfilingPoint.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/UsageProfilingPoint.cs index 36702f57adc..625a86fee5e 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/UsageProfilingPoint.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/UsageProfilingPoint.cs @@ -82,7 +82,7 @@ public UsageProfilingPoint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.UsageProfilingPoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.UsageProfilingPoint(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("internetAccessTrafficCount", InternetAccessTrafficCount); writer.WriteLongValue("microsoft365AccessTrafficCount", Microsoft365AccessTrafficCount); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/User.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/User.cs index bab1182271c..1aa023817f1 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/User.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/User.cs @@ -142,7 +142,7 @@ public User() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.User CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.User(); } /// @@ -172,7 +172,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("firstAccessDateTime", FirstAccessDateTime); writer.WriteDateTimeOffsetValue("lastAccessDateTime", LastAccessDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/ValidityDate.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/ValidityDate.cs index 82de2195ede..3d765d6dcf7 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/ValidityDate.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/ValidityDate.cs @@ -64,7 +64,7 @@ public ValidityDate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.ValidityDate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.ValidityDate(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/WebCategoriesSummary.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/WebCategoriesSummary.cs index e1fd4621642..146dcf638a0 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/WebCategoriesSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/WebCategoriesSummary.cs @@ -92,7 +92,7 @@ public WebCategoriesSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Networkaccess.WebCategoriesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.WebCategoriesSummary(); } /// @@ -117,7 +117,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteLongValue("deviceCount", DeviceCount); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/WebCategory.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/WebCategory.cs index e507aa2eb8a..dd37b84e901 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/WebCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/WebCategory.cs @@ -74,7 +74,7 @@ public WebCategory() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.WebCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.WebCategory(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("group", Group); diff --git a/src/Microsoft.Graph/Generated/Models/Networkaccess/WebCategoryFilteringRule.cs b/src/Microsoft.Graph/Generated/Models/Networkaccess/WebCategoryFilteringRule.cs index 67b4d92f4f7..1227a712474 100644 --- a/src/Microsoft.Graph/Generated/Models/Networkaccess/WebCategoryFilteringRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Networkaccess/WebCategoryFilteringRule.cs @@ -26,7 +26,7 @@ public WebCategoryFilteringRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Networkaccess.WebCategoryFilteringRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Networkaccess.WebCategoryFilteringRule(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/NewsLinkPage.cs b/src/Microsoft.Graph/Generated/Models/NewsLinkPage.cs index 859b0df3423..7e89fc4890e 100644 --- a/src/Microsoft.Graph/Generated/Models/NewsLinkPage.cs +++ b/src/Microsoft.Graph/Generated/Models/NewsLinkPage.cs @@ -67,7 +67,7 @@ public string NewsWebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NewsLinkPage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NewsLinkPage(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("bannerImageWebUrl", BannerImageWebUrl); writer.WriteObjectValue("newsSharepointIds", NewsSharepointIds); diff --git a/src/Microsoft.Graph/Generated/Models/NoDeviceRegistrationMembership.cs b/src/Microsoft.Graph/Generated/Models/NoDeviceRegistrationMembership.cs index b4230922329..8acb753fe58 100644 --- a/src/Microsoft.Graph/Generated/Models/NoDeviceRegistrationMembership.cs +++ b/src/Microsoft.Graph/Generated/Models/NoDeviceRegistrationMembership.cs @@ -26,7 +26,7 @@ public NoDeviceRegistrationMembership() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NoDeviceRegistrationMembership CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NoDeviceRegistrationMembership(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/NoEntitlementsDataCollection.cs b/src/Microsoft.Graph/Generated/Models/NoEntitlementsDataCollection.cs index c3ba3e39368..12075443ff1 100644 --- a/src/Microsoft.Graph/Generated/Models/NoEntitlementsDataCollection.cs +++ b/src/Microsoft.Graph/Generated/Models/NoEntitlementsDataCollection.cs @@ -26,7 +26,7 @@ public NoEntitlementsDataCollection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NoEntitlementsDataCollection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NoEntitlementsDataCollection(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/NoMfaOnRoleActivationAlertConfiguration.cs b/src/Microsoft.Graph/Generated/Models/NoMfaOnRoleActivationAlertConfiguration.cs index 28c502a648f..9c9bfa7e29a 100644 --- a/src/Microsoft.Graph/Generated/Models/NoMfaOnRoleActivationAlertConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/NoMfaOnRoleActivationAlertConfiguration.cs @@ -26,7 +26,7 @@ public NoMfaOnRoleActivationAlertConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NoMfaOnRoleActivationAlertConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NoMfaOnRoleActivationAlertConfiguration(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/NoMfaOnRoleActivationAlertIncident.cs b/src/Microsoft.Graph/Generated/Models/NoMfaOnRoleActivationAlertIncident.cs index ef1f3711170..a5aea9c9223 100644 --- a/src/Microsoft.Graph/Generated/Models/NoMfaOnRoleActivationAlertIncident.cs +++ b/src/Microsoft.Graph/Generated/Models/NoMfaOnRoleActivationAlertIncident.cs @@ -58,7 +58,7 @@ public NoMfaOnRoleActivationAlertIncident() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NoMfaOnRoleActivationAlertIncident CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NoMfaOnRoleActivationAlertIncident(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("roleDisplayName", RoleDisplayName); writer.WriteStringValue("roleTemplateId", RoleTemplateId); diff --git a/src/Microsoft.Graph/Generated/Models/NoTrainingNotificationSetting.cs b/src/Microsoft.Graph/Generated/Models/NoTrainingNotificationSetting.cs index 938023dc40e..131e6422934 100644 --- a/src/Microsoft.Graph/Generated/Models/NoTrainingNotificationSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/NoTrainingNotificationSetting.cs @@ -42,7 +42,7 @@ public NoTrainingNotificationSetting() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NoTrainingNotificationSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NoTrainingNotificationSetting(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("simulationNotification", SimulationNotification); } diff --git a/src/Microsoft.Graph/Generated/Models/NoTrainingSetting.cs b/src/Microsoft.Graph/Generated/Models/NoTrainingSetting.cs index 6613a10ea5c..44964dde26e 100644 --- a/src/Microsoft.Graph/Generated/Models/NoTrainingSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/NoTrainingSetting.cs @@ -26,7 +26,7 @@ public NoTrainingSetting() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NoTrainingSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NoTrainingSetting(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Note.cs b/src/Microsoft.Graph/Generated/Models/Note.cs index 020270d0886..8840ccd9f18 100644 --- a/src/Microsoft.Graph/Generated/Models/Note.cs +++ b/src/Microsoft.Graph/Generated/Models/Note.cs @@ -134,7 +134,7 @@ public Note() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Note CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Note(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("attachments", Attachments); writer.WriteObjectValue("body", Body); diff --git a/src/Microsoft.Graph/Generated/Models/Notebook.cs b/src/Microsoft.Graph/Generated/Models/Notebook.cs index 3ed11eb4fd1..95a325233dc 100644 --- a/src/Microsoft.Graph/Generated/Models/Notebook.cs +++ b/src/Microsoft.Graph/Generated/Models/Notebook.cs @@ -124,7 +124,7 @@ public Notebook() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Notebook CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Notebook(); } /// @@ -151,7 +151,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isDefault", IsDefault); writer.WriteBoolValue("isShared", IsShared); diff --git a/src/Microsoft.Graph/Generated/Models/NotebookCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/NotebookCollectionResponse.cs index f0f4d4719a3..71e4cc2e45d 100644 --- a/src/Microsoft.Graph/Generated/Models/NotebookCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/NotebookCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class NotebookCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NotebookCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NotebookCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/NotebookLinks.cs b/src/Microsoft.Graph/Generated/Models/NotebookLinks.cs index abba09fd5e5..da8928b501c 100644 --- a/src/Microsoft.Graph/Generated/Models/NotebookLinks.cs +++ b/src/Microsoft.Graph/Generated/Models/NotebookLinks.cs @@ -84,7 +84,7 @@ public NotebookLinks() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.NotebookLinks CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NotebookLinks(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("oneNoteClientUrl", OneNoteClientUrl); writer.WriteObjectValue("oneNoteWebUrl", OneNoteWebUrl); diff --git a/src/Microsoft.Graph/Generated/Models/Notification.cs b/src/Microsoft.Graph/Generated/Models/Notification.cs index 5d76e210521..25f11d5a4c9 100644 --- a/src/Microsoft.Graph/Generated/Models/Notification.cs +++ b/src/Microsoft.Graph/Generated/Models/Notification.cs @@ -101,7 +101,7 @@ public string TargetHostName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Notification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Notification(); } /// @@ -127,7 +127,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("displayTimeToLive", DisplayTimeToLive); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/NotificationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/NotificationCollectionResponse.cs index de1672935cc..dd125b9c5b4 100644 --- a/src/Microsoft.Graph/Generated/Models/NotificationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/NotificationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class NotificationCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NotificationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NotificationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/NotificationMessageTemplate.cs b/src/Microsoft.Graph/Generated/Models/NotificationMessageTemplate.cs index 9466832733f..7d284769e67 100644 --- a/src/Microsoft.Graph/Generated/Models/NotificationMessageTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/NotificationMessageTemplate.cs @@ -112,7 +112,7 @@ public List RoleScopeTagIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NotificationMessageTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NotificationMessageTemplate(); } /// @@ -138,7 +138,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("brandingOptions", BrandingOptions); writer.WriteStringValue("defaultLocale", DefaultLocale); diff --git a/src/Microsoft.Graph/Generated/Models/NotificationMessageTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/NotificationMessageTemplateCollectionResponse.cs index 9a207af5dc9..e91c113c30b 100644 --- a/src/Microsoft.Graph/Generated/Models/NotificationMessageTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/NotificationMessageTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class NotificationMessageTemplateCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NotificationMessageTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NotificationMessageTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/NotificationRecipients.cs b/src/Microsoft.Graph/Generated/Models/NotificationRecipients.cs index db09e04f043..f6f763265e9 100644 --- a/src/Microsoft.Graph/Generated/Models/NotificationRecipients.cs +++ b/src/Microsoft.Graph/Generated/Models/NotificationRecipients.cs @@ -74,7 +74,7 @@ public NotificationRecipients() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.NotificationRecipients CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NotificationRecipients(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("customRecipients", CustomRecipients); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("role", Role); diff --git a/src/Microsoft.Graph/Generated/Models/NotifyUserAction.cs b/src/Microsoft.Graph/Generated/Models/NotifyUserAction.cs index 7746424a746..0beb58cca6f 100644 --- a/src/Microsoft.Graph/Generated/Models/NotifyUserAction.cs +++ b/src/Microsoft.Graph/Generated/Models/NotifyUserAction.cs @@ -73,7 +73,7 @@ public List Recipients /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.NotifyUserAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NotifyUserAction(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("actionLastModifiedDateTime", ActionLastModifiedDateTime); writer.WriteStringValue("emailText", EmailText); diff --git a/src/Microsoft.Graph/Generated/Models/NumberColumn.cs b/src/Microsoft.Graph/Generated/Models/NumberColumn.cs index 3dc8dae1667..b3d75bfe1e6 100644 --- a/src/Microsoft.Graph/Generated/Models/NumberColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/NumberColumn.cs @@ -96,7 +96,7 @@ public NumberColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.NumberColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NumberColumn(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("decimalPlaces", DecimalPlaces); writer.WriteStringValue("displayAs", DisplayAs); writer.WriteDoubleValue("maximum", Maximum); diff --git a/src/Microsoft.Graph/Generated/Models/NumberRange.cs b/src/Microsoft.Graph/Generated/Models/NumberRange.cs index aeececa5b2f..e029e860393 100644 --- a/src/Microsoft.Graph/Generated/Models/NumberRange.cs +++ b/src/Microsoft.Graph/Generated/Models/NumberRange.cs @@ -65,7 +65,7 @@ public NumberRange() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.NumberRange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.NumberRange(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("lowerNumber", LowerNumber); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("upperNumber", UpperNumber); diff --git a/src/Microsoft.Graph/Generated/Models/OAuth2PermissionGrant.cs b/src/Microsoft.Graph/Generated/Models/OAuth2PermissionGrant.cs index b94810ba313..7d642df10a5 100644 --- a/src/Microsoft.Graph/Generated/Models/OAuth2PermissionGrant.cs +++ b/src/Microsoft.Graph/Generated/Models/OAuth2PermissionGrant.cs @@ -111,7 +111,7 @@ public DateTimeOffset? StartTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OAuth2PermissionGrant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OAuth2PermissionGrant(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("clientId", ClientId); writer.WriteStringValue("consentType", ConsentType); diff --git a/src/Microsoft.Graph/Generated/Models/OAuth2PermissionGrantCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OAuth2PermissionGrantCollectionResponse.cs index f4c51d0dae5..7583fcc8c13 100644 --- a/src/Microsoft.Graph/Generated/Models/OAuth2PermissionGrantCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OAuth2PermissionGrantCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OAuth2PermissionGrantCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OAuth2PermissionGrantCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OAuth2PermissionGrantCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OAuthConsentAppDetail.cs b/src/Microsoft.Graph/Generated/Models/OAuthConsentAppDetail.cs index ad2a26dd055..6d26d484db6 100644 --- a/src/Microsoft.Graph/Generated/Models/OAuthConsentAppDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/OAuthConsentAppDetail.cs @@ -90,7 +90,7 @@ public OAuthConsentAppDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OAuthConsentAppDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OAuthConsentAppDetail(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("appScope", AppScope); writer.WriteStringValue("displayLogo", DisplayLogo); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ODataErrors/ErrorDetails.cs b/src/Microsoft.Graph/Generated/Models/ODataErrors/ErrorDetails.cs index ab2a83e8725..b79f5f97b50 100644 --- a/src/Microsoft.Graph/Generated/Models/ODataErrors/ErrorDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/ODataErrors/ErrorDetails.cs @@ -84,7 +84,7 @@ public ErrorDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ODataErrors.ErrorDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ODataErrors.ErrorDetails(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); writer.WriteStringValue("target", Target); diff --git a/src/Microsoft.Graph/Generated/Models/ODataErrors/InnerError.cs b/src/Microsoft.Graph/Generated/Models/ODataErrors/InnerError.cs index 06fe5265edc..653b7c88686 100644 --- a/src/Microsoft.Graph/Generated/Models/ODataErrors/InnerError.cs +++ b/src/Microsoft.Graph/Generated/Models/ODataErrors/InnerError.cs @@ -90,7 +90,7 @@ public InnerError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ODataErrors.InnerError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ODataErrors.InnerError(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("client-request-id", ClientRequestId); writer.WriteDateTimeOffsetValue("date", Date); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ODataErrors/MainError.cs b/src/Microsoft.Graph/Generated/Models/ODataErrors/MainError.cs index 97fa8c9de04..4ec1dfc61bc 100644 --- a/src/Microsoft.Graph/Generated/Models/ODataErrors/MainError.cs +++ b/src/Microsoft.Graph/Generated/Models/ODataErrors/MainError.cs @@ -116,7 +116,7 @@ public MainError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ODataErrors.MainError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ODataErrors.MainError(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteCollectionOfObjectValues("details", Details); writer.WriteObjectValue("innerError", InnerError); diff --git a/src/Microsoft.Graph/Generated/Models/ODataErrors/ODataError.cs b/src/Microsoft.Graph/Generated/Models/ODataErrors/ODataError.cs index 3108fca8b63..f6663ede41c 100644 --- a/src/Microsoft.Graph/Generated/Models/ODataErrors/ODataError.cs +++ b/src/Microsoft.Graph/Generated/Models/ODataErrors/ODataError.cs @@ -55,7 +55,7 @@ public ODataError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ODataErrors.ODataError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ODataErrors.ODataError(); } /// @@ -75,7 +75,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("error", Error); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/OathTokenMetadata.cs b/src/Microsoft.Graph/Generated/Models/OathTokenMetadata.cs index 4cc87e0d92e..54cf20539c7 100644 --- a/src/Microsoft.Graph/Generated/Models/OathTokenMetadata.cs +++ b/src/Microsoft.Graph/Generated/Models/OathTokenMetadata.cs @@ -122,7 +122,7 @@ public OathTokenMetadata() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OathTokenMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OathTokenMetadata(); } /// @@ -147,7 +147,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("enabled", Enabled); writer.WriteStringValue("manufacturer", Manufacturer); writer.WriteCollectionOfObjectValues("manufacturerProperties", ManufacturerProperties); diff --git a/src/Microsoft.Graph/Generated/Models/ObjectDefinition.cs b/src/Microsoft.Graph/Generated/Models/ObjectDefinition.cs index fd62371b510..6b2a98749de 100644 --- a/src/Microsoft.Graph/Generated/Models/ObjectDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/ObjectDefinition.cs @@ -116,7 +116,7 @@ public ObjectDefinition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ObjectDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ObjectDefinition(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attributes", Attributes); writer.WriteCollectionOfObjectValues("metadata", Metadata); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/ObjectDefinitionMetadataEntry.cs b/src/Microsoft.Graph/Generated/Models/ObjectDefinitionMetadataEntry.cs index f91ed678567..45a53c0e770 100644 --- a/src/Microsoft.Graph/Generated/Models/ObjectDefinitionMetadataEntry.cs +++ b/src/Microsoft.Graph/Generated/Models/ObjectDefinitionMetadataEntry.cs @@ -74,7 +74,7 @@ public ObjectDefinitionMetadataEntry() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ObjectDefinitionMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ObjectDefinitionMetadataEntry(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/ObjectIdentity.cs b/src/Microsoft.Graph/Generated/Models/ObjectIdentity.cs index 012c2d6baf2..04bfd30f63e 100644 --- a/src/Microsoft.Graph/Generated/Models/ObjectIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/ObjectIdentity.cs @@ -100,7 +100,7 @@ public ObjectIdentity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ObjectIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ObjectIdentity(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("issuer", Issuer); writer.WriteStringValue("issuerAssignedId", IssuerAssignedId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ObjectMapping.cs b/src/Microsoft.Graph/Generated/Models/ObjectMapping.cs index b3b98d8aff2..3f13de830c7 100644 --- a/src/Microsoft.Graph/Generated/Models/ObjectMapping.cs +++ b/src/Microsoft.Graph/Generated/Models/ObjectMapping.cs @@ -160,7 +160,7 @@ public ObjectMapping() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ObjectMapping CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ObjectMapping(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("attributeMappings", AttributeMappings); writer.WriteBoolValue("enabled", Enabled); writer.WriteEnumValue("flowTypes", FlowTypes); diff --git a/src/Microsoft.Graph/Generated/Models/ObjectMappingMetadataEntry.cs b/src/Microsoft.Graph/Generated/Models/ObjectMappingMetadataEntry.cs index 4132337a86f..dc3be58b3ad 100644 --- a/src/Microsoft.Graph/Generated/Models/ObjectMappingMetadataEntry.cs +++ b/src/Microsoft.Graph/Generated/Models/ObjectMappingMetadataEntry.cs @@ -74,7 +74,7 @@ public ObjectMappingMetadataEntry() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ObjectMappingMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ObjectMappingMetadataEntry(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/OfferShiftRequest.cs b/src/Microsoft.Graph/Generated/Models/OfferShiftRequest.cs index 6166d6510e9..abb76d08143 100644 --- a/src/Microsoft.Graph/Generated/Models/OfferShiftRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/OfferShiftRequest.cs @@ -80,7 +80,7 @@ public OfferShiftRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OfferShiftRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -108,7 +108,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("recipientActionMessage", RecipientActionMessage); writer.WriteStringValue("recipientUserId", RecipientUserId); diff --git a/src/Microsoft.Graph/Generated/Models/OfferShiftRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OfferShiftRequestCollectionResponse.cs index 8a5987fb4f7..f1013bbeb90 100644 --- a/src/Microsoft.Graph/Generated/Models/OfferShiftRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OfferShiftRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OfferShiftRequestCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OfferShiftRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OfferShiftRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Office365ActiveUserCounts.cs b/src/Microsoft.Graph/Generated/Models/Office365ActiveUserCounts.cs index f9fde5d710d..bf1ccdcf38d 100644 --- a/src/Microsoft.Graph/Generated/Models/Office365ActiveUserCounts.cs +++ b/src/Microsoft.Graph/Generated/Models/Office365ActiveUserCounts.cs @@ -90,7 +90,7 @@ public long? Yammer /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Office365ActiveUserCounts CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Office365ActiveUserCounts(); } /// @@ -119,7 +119,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("exchange", Exchange); writer.WriteLongValue("office365", Office365); diff --git a/src/Microsoft.Graph/Generated/Models/Office365ActiveUserDetail.cs b/src/Microsoft.Graph/Generated/Models/Office365ActiveUserDetail.cs index 214dbdf2a6c..ea3d99f064e 100644 --- a/src/Microsoft.Graph/Generated/Models/Office365ActiveUserDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/Office365ActiveUserDetail.cs @@ -194,7 +194,7 @@ public Date? YammerLicenseAssignDate /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Office365ActiveUserDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Office365ActiveUserDetail(); } /// @@ -237,7 +237,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("assignedProducts", AssignedProducts); writer.WriteDateValue("deletedDate", DeletedDate); diff --git a/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityCounts.cs b/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityCounts.cs index 4bbb27fa09d..0034dff78e6 100644 --- a/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityCounts.cs +++ b/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityCounts.cs @@ -84,7 +84,7 @@ public long? YammerMessagesRead /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Office365GroupsActivityCounts CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Office365GroupsActivityCounts(); } /// @@ -112,7 +112,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("exchangeEmailsReceived", ExchangeEmailsReceived); writer.WriteDateValue("reportDate", ReportDate); diff --git a/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityDetail.cs b/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityDetail.cs index 4da5cbfbf1d..5ee13e12f2f 100644 --- a/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityDetail.cs @@ -196,7 +196,7 @@ public long? YammerReadMessageCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Office365GroupsActivityDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Office365GroupsActivityDetail(); } /// @@ -236,7 +236,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("exchangeMailboxStorageUsedInBytes", ExchangeMailboxStorageUsedInBytes); writer.WriteLongValue("exchangeMailboxTotalItemCount", ExchangeMailboxTotalItemCount); diff --git a/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityFileCounts.cs b/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityFileCounts.cs index ef66e7992ad..311fc55cee7 100644 --- a/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityFileCounts.cs +++ b/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityFileCounts.cs @@ -60,7 +60,7 @@ public long? Total /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Office365GroupsActivityFileCounts CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Office365GroupsActivityFileCounts(); } /// @@ -84,7 +84,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("active", Active); writer.WriteDateValue("reportDate", ReportDate); diff --git a/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityGroupCounts.cs b/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityGroupCounts.cs index a29d56e2786..56715847d76 100644 --- a/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityGroupCounts.cs +++ b/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityGroupCounts.cs @@ -60,7 +60,7 @@ public long? Total /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Office365GroupsActivityGroupCounts CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Office365GroupsActivityGroupCounts(); } /// @@ -84,7 +84,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("active", Active); writer.WriteDateValue("reportDate", ReportDate); diff --git a/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityStorage.cs b/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityStorage.cs index 46e863e2c72..8678f9cafdb 100644 --- a/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityStorage.cs +++ b/src/Microsoft.Graph/Generated/Models/Office365GroupsActivityStorage.cs @@ -60,7 +60,7 @@ public long? SiteStorageUsedInBytes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Office365GroupsActivityStorage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Office365GroupsActivityStorage(); } /// @@ -84,7 +84,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("mailboxStorageUsedInBytes", MailboxStorageUsedInBytes); writer.WriteDateValue("reportDate", ReportDate); diff --git a/src/Microsoft.Graph/Generated/Models/Office365ServicesUserCounts.cs b/src/Microsoft.Graph/Generated/Models/Office365ServicesUserCounts.cs index d5d84d983c8..aeb9304ce98 100644 --- a/src/Microsoft.Graph/Generated/Models/Office365ServicesUserCounts.cs +++ b/src/Microsoft.Graph/Generated/Models/Office365ServicesUserCounts.cs @@ -126,7 +126,7 @@ public long? YammerInactive /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Office365ServicesUserCounts CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Office365ServicesUserCounts(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("exchangeActive", ExchangeActive); writer.WriteLongValue("exchangeInactive", ExchangeInactive); diff --git a/src/Microsoft.Graph/Generated/Models/OfficeGraphInsights.cs b/src/Microsoft.Graph/Generated/Models/OfficeGraphInsights.cs index e11f9849486..16c7904f71e 100644 --- a/src/Microsoft.Graph/Generated/Models/OfficeGraphInsights.cs +++ b/src/Microsoft.Graph/Generated/Models/OfficeGraphInsights.cs @@ -67,7 +67,7 @@ public partial class OfficeGraphInsights : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OfficeGraphInsights CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("shared", Shared); writer.WriteCollectionOfObjectValues("trending", Trending); diff --git a/src/Microsoft.Graph/Generated/Models/OfficeSuiteApp.cs b/src/Microsoft.Graph/Generated/Models/OfficeSuiteApp.cs index db0b9cc080c..6c1d65bc493 100644 --- a/src/Microsoft.Graph/Generated/Models/OfficeSuiteApp.cs +++ b/src/Microsoft.Graph/Generated/Models/OfficeSuiteApp.cs @@ -165,7 +165,7 @@ public OfficeSuiteApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OfficeSuiteApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OfficeSuiteApp(); } /// @@ -197,7 +197,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("autoAcceptEula", AutoAcceptEula); writer.WriteObjectValue("excludedApps", ExcludedApps); diff --git a/src/Microsoft.Graph/Generated/Models/OfflinePlaceMode.cs b/src/Microsoft.Graph/Generated/Models/OfflinePlaceMode.cs index be79f62a7e4..0cd0914ef01 100644 --- a/src/Microsoft.Graph/Generated/Models/OfflinePlaceMode.cs +++ b/src/Microsoft.Graph/Generated/Models/OfflinePlaceMode.cs @@ -42,7 +42,7 @@ public OfflinePlaceMode() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OfflinePlaceMode CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OfflinePlaceMode(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("reason", Reason); } diff --git a/src/Microsoft.Graph/Generated/Models/OidcAddressInboundClaims.cs b/src/Microsoft.Graph/Generated/Models/OidcAddressInboundClaims.cs index 43d52e60226..e1585657a14 100644 --- a/src/Microsoft.Graph/Generated/Models/OidcAddressInboundClaims.cs +++ b/src/Microsoft.Graph/Generated/Models/OidcAddressInboundClaims.cs @@ -132,7 +132,7 @@ public OidcAddressInboundClaims() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OidcAddressInboundClaims CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OidcAddressInboundClaims(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("country", Country); writer.WriteStringValue("locality", Locality); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/OidcClientAuthentication.cs b/src/Microsoft.Graph/Generated/Models/OidcClientAuthentication.cs index 4357f5d1096..1ec5833a51f 100644 --- a/src/Microsoft.Graph/Generated/Models/OidcClientAuthentication.cs +++ b/src/Microsoft.Graph/Generated/Models/OidcClientAuthentication.cs @@ -52,7 +52,7 @@ public OidcClientAuthentication() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OidcClientAuthentication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/OidcClientSecretAuthentication.cs b/src/Microsoft.Graph/Generated/Models/OidcClientSecretAuthentication.cs index 8bc5e88388b..0a28c5a9c32 100644 --- a/src/Microsoft.Graph/Generated/Models/OidcClientSecretAuthentication.cs +++ b/src/Microsoft.Graph/Generated/Models/OidcClientSecretAuthentication.cs @@ -42,7 +42,7 @@ public OidcClientSecretAuthentication() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OidcClientSecretAuthentication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OidcClientSecretAuthentication(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("clientSecret", ClientSecret); } diff --git a/src/Microsoft.Graph/Generated/Models/OidcIdentityProvider.cs b/src/Microsoft.Graph/Generated/Models/OidcIdentityProvider.cs index f0c7be7cb3e..f442f743438 100644 --- a/src/Microsoft.Graph/Generated/Models/OidcIdentityProvider.cs +++ b/src/Microsoft.Graph/Generated/Models/OidcIdentityProvider.cs @@ -128,7 +128,7 @@ public OidcIdentityProvider() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OidcIdentityProvider CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OidcIdentityProvider(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("clientAuthentication", ClientAuthentication); writer.WriteStringValue("clientId", ClientId); diff --git a/src/Microsoft.Graph/Generated/Models/OidcInboundClaimMappingOverride.cs b/src/Microsoft.Graph/Generated/Models/OidcInboundClaimMappingOverride.cs index 32eb8daf395..44d313a281a 100644 --- a/src/Microsoft.Graph/Generated/Models/OidcInboundClaimMappingOverride.cs +++ b/src/Microsoft.Graph/Generated/Models/OidcInboundClaimMappingOverride.cs @@ -196,7 +196,7 @@ public OidcInboundClaimMappingOverride() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OidcInboundClaimMappingOverride CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OidcInboundClaimMappingOverride(); } /// @@ -225,7 +225,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("address", Address); writer.WriteStringValue("email", Email); writer.WriteStringValue("email_verified", EmailVerified); diff --git a/src/Microsoft.Graph/Generated/Models/OidcPrivateJwtKeyClientAuthentication.cs b/src/Microsoft.Graph/Generated/Models/OidcPrivateJwtKeyClientAuthentication.cs index de82b942835..b0a5aced6c0 100644 --- a/src/Microsoft.Graph/Generated/Models/OidcPrivateJwtKeyClientAuthentication.cs +++ b/src/Microsoft.Graph/Generated/Models/OidcPrivateJwtKeyClientAuthentication.cs @@ -26,7 +26,7 @@ public OidcPrivateJwtKeyClientAuthentication() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OidcPrivateJwtKeyClientAuthentication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OidcPrivateJwtKeyClientAuthentication(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/OmaSetting.cs b/src/Microsoft.Graph/Generated/Models/OmaSetting.cs index 76ac5644cb0..823c94cd10e 100644 --- a/src/Microsoft.Graph/Generated/Models/OmaSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/OmaSetting.cs @@ -123,7 +123,7 @@ public OmaSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OmaSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -159,7 +159,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/OmaSettingBase64.cs b/src/Microsoft.Graph/Generated/Models/OmaSettingBase64.cs index 66ffb6c10a9..b812e378f16 100644 --- a/src/Microsoft.Graph/Generated/Models/OmaSettingBase64.cs +++ b/src/Microsoft.Graph/Generated/Models/OmaSettingBase64.cs @@ -59,7 +59,7 @@ public OmaSettingBase64() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OmaSettingBase64 CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OmaSettingBase64(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fileName", FileName); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/OmaSettingBoolean.cs b/src/Microsoft.Graph/Generated/Models/OmaSettingBoolean.cs index 0384c801947..050af8409c5 100644 --- a/src/Microsoft.Graph/Generated/Models/OmaSettingBoolean.cs +++ b/src/Microsoft.Graph/Generated/Models/OmaSettingBoolean.cs @@ -33,7 +33,7 @@ public OmaSettingBoolean() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OmaSettingBoolean CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OmaSettingBoolean(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OmaSettingDateTime.cs b/src/Microsoft.Graph/Generated/Models/OmaSettingDateTime.cs index f3f7572e6fa..2ffe65c739f 100644 --- a/src/Microsoft.Graph/Generated/Models/OmaSettingDateTime.cs +++ b/src/Microsoft.Graph/Generated/Models/OmaSettingDateTime.cs @@ -33,7 +33,7 @@ public OmaSettingDateTime() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OmaSettingDateTime CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OmaSettingDateTime(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OmaSettingFloatingPoint.cs b/src/Microsoft.Graph/Generated/Models/OmaSettingFloatingPoint.cs index e80b021f26a..b819b85420b 100644 --- a/src/Microsoft.Graph/Generated/Models/OmaSettingFloatingPoint.cs +++ b/src/Microsoft.Graph/Generated/Models/OmaSettingFloatingPoint.cs @@ -33,7 +33,7 @@ public OmaSettingFloatingPoint() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OmaSettingFloatingPoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OmaSettingFloatingPoint(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteFloatValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OmaSettingInteger.cs b/src/Microsoft.Graph/Generated/Models/OmaSettingInteger.cs index 5c065ff13d9..dfb203d1b95 100644 --- a/src/Microsoft.Graph/Generated/Models/OmaSettingInteger.cs +++ b/src/Microsoft.Graph/Generated/Models/OmaSettingInteger.cs @@ -39,7 +39,7 @@ public OmaSettingInteger() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OmaSettingInteger CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OmaSettingInteger(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isReadOnly", IsReadOnly); writer.WriteIntValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/OmaSettingString.cs b/src/Microsoft.Graph/Generated/Models/OmaSettingString.cs index 2252d67811c..68f838a2580 100644 --- a/src/Microsoft.Graph/Generated/Models/OmaSettingString.cs +++ b/src/Microsoft.Graph/Generated/Models/OmaSettingString.cs @@ -43,7 +43,7 @@ public OmaSettingString() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OmaSettingString CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OmaSettingString(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OmaSettingStringXml.cs b/src/Microsoft.Graph/Generated/Models/OmaSettingStringXml.cs index d1055b03869..ca7f6f07739 100644 --- a/src/Microsoft.Graph/Generated/Models/OmaSettingStringXml.cs +++ b/src/Microsoft.Graph/Generated/Models/OmaSettingStringXml.cs @@ -59,7 +59,7 @@ public OmaSettingStringXml() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OmaSettingStringXml CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OmaSettingStringXml(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fileName", FileName); writer.WriteByteArrayValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionExternalUsersSelfServiceSignUp.cs b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionExternalUsersSelfServiceSignUp.cs index b16b798d0e1..dafc58c56b5 100644 --- a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionExternalUsersSelfServiceSignUp.cs +++ b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionExternalUsersSelfServiceSignUp.cs @@ -58,7 +58,7 @@ public OnAttributeCollectionExternalUsersSelfServiceSignUp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionExternalUsersSelfServiceSignUp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionExternalUsersSelfServiceSignUp(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("attributeCollectionPage", AttributeCollectionPage); writer.WriteCollectionOfObjectValues("attributes", Attributes); diff --git a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionHandler.cs b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionHandler.cs index 37e0d49e00f..587ae957aea 100644 --- a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionHandler.cs @@ -52,7 +52,7 @@ public OnAttributeCollectionHandler() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnAttributeCollectionHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionListener.cs b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionListener.cs index 2486e641d38..c24640e4be6 100644 --- a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionListener.cs +++ b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionListener.cs @@ -42,7 +42,7 @@ public OnAttributeCollectionListener() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionListener CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionListener(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("handler", Handler); } diff --git a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartCustomExtension.cs b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartCustomExtension.cs index 1f47eb1e28c..babec201b62 100644 --- a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartCustomExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartCustomExtension.cs @@ -26,7 +26,7 @@ public OnAttributeCollectionStartCustomExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionStartCustomExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionStartCustomExtension(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartCustomExtensionHandler.cs b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartCustomExtensionHandler.cs index 9cc5070001f..b78a97ccf08 100644 --- a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartCustomExtensionHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartCustomExtensionHandler.cs @@ -58,7 +58,7 @@ public OnAttributeCollectionStartCustomExtensionHandler() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionStartCustomExtensionHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionStartCustomExtensionHandler(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("configuration", Configuration); writer.WriteObjectValue("customExtension", CustomExtension); diff --git a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartHandler.cs b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartHandler.cs index b3fd5809b98..3e0f6dc3dc3 100644 --- a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartHandler.cs @@ -52,7 +52,7 @@ public OnAttributeCollectionStartHandler() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnAttributeCollectionStartHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartListener.cs b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartListener.cs index cd835a7cde1..c25633a835e 100644 --- a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartListener.cs +++ b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionStartListener.cs @@ -42,7 +42,7 @@ public OnAttributeCollectionStartListener() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionStartListener CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionStartListener(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("handler", Handler); } diff --git a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitCustomExtension.cs b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitCustomExtension.cs index 91b54b7947b..8e2c0627824 100644 --- a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitCustomExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitCustomExtension.cs @@ -26,7 +26,7 @@ public OnAttributeCollectionSubmitCustomExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionSubmitCustomExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionSubmitCustomExtension(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitCustomExtensionHandler.cs b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitCustomExtensionHandler.cs index d1fc3229fe5..ee25acf4aaf 100644 --- a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitCustomExtensionHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitCustomExtensionHandler.cs @@ -58,7 +58,7 @@ public OnAttributeCollectionSubmitCustomExtensionHandler() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionSubmitCustomExtensionHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionSubmitCustomExtensionHandler(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("configuration", Configuration); writer.WriteObjectValue("customExtension", CustomExtension); diff --git a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitHandler.cs b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitHandler.cs index 50064bed513..c06a2008ddf 100644 --- a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitHandler.cs @@ -52,7 +52,7 @@ public OnAttributeCollectionSubmitHandler() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnAttributeCollectionSubmitHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitListener.cs b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitListener.cs index a280a0cbcaf..c568c03feea 100644 --- a/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitListener.cs +++ b/src/Microsoft.Graph/Generated/Models/OnAttributeCollectionSubmitListener.cs @@ -42,7 +42,7 @@ public OnAttributeCollectionSubmitListener() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionSubmitListener CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnAttributeCollectionSubmitListener(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("handler", Handler); } diff --git a/src/Microsoft.Graph/Generated/Models/OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp.cs b/src/Microsoft.Graph/Generated/Models/OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp.cs index 3400bff3735..11a107a2d84 100644 --- a/src/Microsoft.Graph/Generated/Models/OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp.cs +++ b/src/Microsoft.Graph/Generated/Models/OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp.cs @@ -42,7 +42,7 @@ public OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("identityProviders", IdentityProviders); } diff --git a/src/Microsoft.Graph/Generated/Models/OnAuthenticationMethodLoadStartHandler.cs b/src/Microsoft.Graph/Generated/Models/OnAuthenticationMethodLoadStartHandler.cs index d3d4efa88a1..f61cc9a2860 100644 --- a/src/Microsoft.Graph/Generated/Models/OnAuthenticationMethodLoadStartHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/OnAuthenticationMethodLoadStartHandler.cs @@ -52,7 +52,7 @@ public OnAuthenticationMethodLoadStartHandler() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnAuthenticationMethodLoadStartHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/OnAuthenticationMethodLoadStartListener.cs b/src/Microsoft.Graph/Generated/Models/OnAuthenticationMethodLoadStartListener.cs index 34cd22dfea9..543a22e4e7b 100644 --- a/src/Microsoft.Graph/Generated/Models/OnAuthenticationMethodLoadStartListener.cs +++ b/src/Microsoft.Graph/Generated/Models/OnAuthenticationMethodLoadStartListener.cs @@ -42,7 +42,7 @@ public OnAuthenticationMethodLoadStartListener() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnAuthenticationMethodLoadStartListener CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnAuthenticationMethodLoadStartListener(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("handler", Handler); } diff --git a/src/Microsoft.Graph/Generated/Models/OnEmailOtpSendListener.cs b/src/Microsoft.Graph/Generated/Models/OnEmailOtpSendListener.cs index b4597058009..d40112a6305 100644 --- a/src/Microsoft.Graph/Generated/Models/OnEmailOtpSendListener.cs +++ b/src/Microsoft.Graph/Generated/Models/OnEmailOtpSendListener.cs @@ -42,7 +42,7 @@ public OnEmailOtpSendListener() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnEmailOtpSendListener CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnEmailOtpSendListener(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("handler", Handler); } diff --git a/src/Microsoft.Graph/Generated/Models/OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp.cs b/src/Microsoft.Graph/Generated/Models/OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp.cs index 2f4302e0a90..9bb7c332c67 100644 --- a/src/Microsoft.Graph/Generated/Models/OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp.cs +++ b/src/Microsoft.Graph/Generated/Models/OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp.cs @@ -32,7 +32,7 @@ public OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isSignUpAllowed", IsSignUpAllowed); } diff --git a/src/Microsoft.Graph/Generated/Models/OnInteractiveAuthFlowStartHandler.cs b/src/Microsoft.Graph/Generated/Models/OnInteractiveAuthFlowStartHandler.cs index 14fe7bc6097..b8c6f0cfcdd 100644 --- a/src/Microsoft.Graph/Generated/Models/OnInteractiveAuthFlowStartHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/OnInteractiveAuthFlowStartHandler.cs @@ -52,7 +52,7 @@ public OnInteractiveAuthFlowStartHandler() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnInteractiveAuthFlowStartHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/OnInteractiveAuthFlowStartListener.cs b/src/Microsoft.Graph/Generated/Models/OnInteractiveAuthFlowStartListener.cs index 866c25f3f55..5329e39bf0b 100644 --- a/src/Microsoft.Graph/Generated/Models/OnInteractiveAuthFlowStartListener.cs +++ b/src/Microsoft.Graph/Generated/Models/OnInteractiveAuthFlowStartListener.cs @@ -42,7 +42,7 @@ public OnInteractiveAuthFlowStartListener() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnInteractiveAuthFlowStartListener CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnInteractiveAuthFlowStartListener(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("handler", Handler); } diff --git a/src/Microsoft.Graph/Generated/Models/OnOtpSendCustomExtension.cs b/src/Microsoft.Graph/Generated/Models/OnOtpSendCustomExtension.cs index b879ae64081..8fffb074e5a 100644 --- a/src/Microsoft.Graph/Generated/Models/OnOtpSendCustomExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/OnOtpSendCustomExtension.cs @@ -26,7 +26,7 @@ public OnOtpSendCustomExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnOtpSendCustomExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnOtpSendCustomExtension(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/OnOtpSendCustomExtensionHandler.cs b/src/Microsoft.Graph/Generated/Models/OnOtpSendCustomExtensionHandler.cs index a876e0b5eb7..ec282932435 100644 --- a/src/Microsoft.Graph/Generated/Models/OnOtpSendCustomExtensionHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/OnOtpSendCustomExtensionHandler.cs @@ -58,7 +58,7 @@ public OnOtpSendCustomExtensionHandler() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnOtpSendCustomExtensionHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnOtpSendCustomExtensionHandler(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("configuration", Configuration); writer.WriteObjectValue("customExtension", CustomExtension); diff --git a/src/Microsoft.Graph/Generated/Models/OnOtpSendHandler.cs b/src/Microsoft.Graph/Generated/Models/OnOtpSendHandler.cs index 3c76d9e7af2..6b8867cc964 100644 --- a/src/Microsoft.Graph/Generated/Models/OnOtpSendHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/OnOtpSendHandler.cs @@ -52,7 +52,7 @@ public OnOtpSendHandler() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnOtpSendHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/OnPhoneMethodLoadStartExternalUsersAuthHandler.cs b/src/Microsoft.Graph/Generated/Models/OnPhoneMethodLoadStartExternalUsersAuthHandler.cs index 0525b0fe226..1cc12b02d8c 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPhoneMethodLoadStartExternalUsersAuthHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPhoneMethodLoadStartExternalUsersAuthHandler.cs @@ -58,7 +58,7 @@ public OnPhoneMethodLoadStartExternalUsersAuthHandler() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnPhoneMethodLoadStartExternalUsersAuthHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPhoneMethodLoadStartExternalUsersAuthHandler(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("smsOptions", SmsOptions); writer.WriteObjectValue("voiceOptions", VoiceOptions); diff --git a/src/Microsoft.Graph/Generated/Models/OnPhoneMethodLoadStartHandler.cs b/src/Microsoft.Graph/Generated/Models/OnPhoneMethodLoadStartHandler.cs index d063dd740fb..134928d98ed 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPhoneMethodLoadStartHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPhoneMethodLoadStartHandler.cs @@ -52,7 +52,7 @@ public OnPhoneMethodLoadStartHandler() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnPhoneMethodLoadStartHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/OnPhoneMethodLoadStartListener.cs b/src/Microsoft.Graph/Generated/Models/OnPhoneMethodLoadStartListener.cs index 2c112a66ef0..ce7e3504cc2 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPhoneMethodLoadStartListener.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPhoneMethodLoadStartListener.cs @@ -42,7 +42,7 @@ public OnPhoneMethodLoadStartListener() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnPhoneMethodLoadStartListener CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPhoneMethodLoadStartListener(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("handler", Handler); } diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesAccidentalDeletionPrevention.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesAccidentalDeletionPrevention.cs index 57d7df8ddd2..7732499aec6 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesAccidentalDeletionPrevention.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesAccidentalDeletionPrevention.cs @@ -64,7 +64,7 @@ public OnPremisesAccidentalDeletionPrevention() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnPremisesAccidentalDeletionPrevention CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesAccidentalDeletionPrevention(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("alertThreshold", AlertThreshold); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("synchronizationPreventionType", SynchronizationPreventionType); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesAgent.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesAgent.cs index 11467d2558b..989f02483ab 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesAgent.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesAgent.cs @@ -89,7 +89,7 @@ public string MachineName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnPremisesAgent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesAgent(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("agentGroups", AgentGroups); writer.WriteStringValue("externalIp", ExternalIp); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesAgentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesAgentCollectionResponse.cs index 4fe536bd269..da359fa9df4 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesAgentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesAgentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OnPremisesAgentCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnPremisesAgentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesAgentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesAgentGroup.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesAgentGroup.cs index 3cc56b8b53e..9e795c15e70 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesAgentGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesAgentGroup.cs @@ -79,7 +79,7 @@ public bool? IsDefault /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnPremisesAgentGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesAgentGroup(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("agents", Agents); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesAgentGroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesAgentGroupCollectionResponse.cs index 0440f0e4603..565b9dd0a9e 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesAgentGroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesAgentGroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OnPremisesAgentGroupCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnPremisesAgentGroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesAgentGroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesApplicationSegment.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesApplicationSegment.cs index 786fc755305..738eac2513b 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesApplicationSegment.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesApplicationSegment.cs @@ -116,7 +116,7 @@ public OnPremisesApplicationSegment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnPremisesApplicationSegment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesApplicationSegment(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("alternateUrl", AlternateUrl); writer.WriteCollectionOfObjectValues("corsConfigurations", CorsConfigurations); writer.WriteStringValue("externalUrl", ExternalUrl); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesConditionalAccessSettings.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesConditionalAccessSettings.cs index bed84980d06..ad74a0a0a09 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesConditionalAccessSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesConditionalAccessSettings.cs @@ -64,7 +64,7 @@ public bool? OverrideDefaultRule /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnPremisesConditionalAccessSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesConditionalAccessSettings(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("enabled", Enabled); writer.WriteCollectionOfPrimitiveValues("excludedGroups", ExcludedGroups); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesCurrentExportData.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesCurrentExportData.cs index 8e17c019afb..27c7a7c8872 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesCurrentExportData.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesCurrentExportData.cs @@ -120,7 +120,7 @@ public OnPremisesCurrentExportData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnPremisesCurrentExportData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesCurrentExportData(); } /// @@ -148,7 +148,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientMachineName", ClientMachineName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("pendingObjectsAddition", PendingObjectsAddition); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronization.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronization.cs index 59bfc270c53..e0dd91c9674 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronization.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronization.cs @@ -51,7 +51,7 @@ public partial class OnPremisesDirectorySynchronization : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnPremisesDirectorySynchronization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesDirectorySynchronization(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("configuration", Configuration); writer.WriteObjectValue("features", Features); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronizationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronizationCollectionResponse.cs index e91f0e98ef3..01addd99560 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronizationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronizationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OnPremisesDirectorySynchronizationCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnPremisesDirectorySynchronizationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesDirectorySynchronizationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronizationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronizationConfiguration.cs index 415cebac2ac..35c6c0a2938 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronizationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronizationConfiguration.cs @@ -160,7 +160,7 @@ public OnPremisesDirectorySynchronizationConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnPremisesDirectorySynchronizationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesDirectorySynchronizationConfiguration(); } /// @@ -188,7 +188,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("accidentalDeletionPrevention", AccidentalDeletionPrevention); writer.WriteStringValue("anchorAttribute", AnchorAttribute); writer.WriteStringValue("applicationId", ApplicationId); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronizationFeature.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronizationFeature.cs index 14d9ea17d57..b108e7ff944 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronizationFeature.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesDirectorySynchronizationFeature.cs @@ -166,7 +166,7 @@ public OnPremisesDirectorySynchronizationFeature() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnPremisesDirectorySynchronizationFeature CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesDirectorySynchronizationFeature(); } /// @@ -205,7 +205,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("blockCloudObjectTakeoverThroughHardMatchEnabled", BlockCloudObjectTakeoverThroughHardMatchEnabled); writer.WriteBoolValue("blockSoftMatchEnabled", BlockSoftMatchEnabled); writer.WriteBoolValue("bypassDirSyncOverridesEnabled", BypassDirSyncOverridesEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesExtensionAttributes.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesExtensionAttributes.cs index 19a5e412331..70c69cd99f6 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesExtensionAttributes.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesExtensionAttributes.cs @@ -292,7 +292,7 @@ public OnPremisesExtensionAttributes() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnPremisesExtensionAttributes CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesExtensionAttributes(); } /// @@ -327,7 +327,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("extensionAttribute1", ExtensionAttribute1); writer.WriteStringValue("extensionAttribute10", ExtensionAttribute10); writer.WriteStringValue("extensionAttribute11", ExtensionAttribute11); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesProvisioningError.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesProvisioningError.cs index 28c5e2b97fe..3ae385d50f8 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesProvisioningError.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesProvisioningError.cs @@ -106,7 +106,7 @@ public OnPremisesProvisioningError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnPremisesProvisioningError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesProvisioningError(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("category", Category); writer.WriteDateTimeOffsetValue("occurredDateTime", OccurredDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesPublishing.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesPublishing.cs index fb16a63538d..004c9500f29 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesPublishing.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesPublishing.cs @@ -348,7 +348,7 @@ public OnPremisesPublishing() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnPremisesPublishing CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesPublishing(); } /// @@ -394,7 +394,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("alternateUrl", AlternateUrl); writer.WriteStringValue("applicationServerTimeout", ApplicationServerTimeout); writer.WriteStringValue("applicationType", ApplicationType); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesPublishingProfile.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesPublishingProfile.cs index 744d560709a..97d0680f23f 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesPublishingProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesPublishingProfile.cs @@ -143,7 +143,7 @@ public bool? IsEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnPremisesPublishingProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesPublishingProfile(); } /// @@ -171,7 +171,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("agentGroups", AgentGroups); writer.WriteCollectionOfObjectValues("agents", Agents); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesPublishingProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesPublishingProfileCollectionResponse.cs index be888cdcf48..e55013ef8c8 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesPublishingProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesPublishingProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OnPremisesPublishingProfileCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnPremisesPublishingProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesPublishingProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesPublishingSingleSignOn.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesPublishingSingleSignOn.cs index 77ff314185e..579caabac0d 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesPublishingSingleSignOn.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesPublishingSingleSignOn.cs @@ -74,7 +74,7 @@ public OnPremisesPublishingSingleSignOn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnPremisesPublishingSingleSignOn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesPublishingSingleSignOn(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("kerberosSignOnSettings", KerberosSignOnSettings); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("singleSignOnMode", SingleSignOnMode); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesSipInfo.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesSipInfo.cs index 69d429f5d8a..0a43ce884be 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesSipInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesSipInfo.cs @@ -90,7 +90,7 @@ public OnPremisesSipInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnPremisesSipInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesSipInfo(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isSipEnabled", IsSipEnabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("sipDeploymentLocation", SipDeploymentLocation); diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesSyncBehavior.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesSyncBehavior.cs index 8b1e875940f..ad957684b0c 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesSyncBehavior.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesSyncBehavior.cs @@ -25,7 +25,7 @@ public bool? IsCloudManaged /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnPremisesSyncBehavior CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesSyncBehavior(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isCloudManaged", IsCloudManaged); } diff --git a/src/Microsoft.Graph/Generated/Models/OnPremisesWritebackConfiguration.cs b/src/Microsoft.Graph/Generated/Models/OnPremisesWritebackConfiguration.cs index c9380a295aa..ebf594f47f2 100644 --- a/src/Microsoft.Graph/Generated/Models/OnPremisesWritebackConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/OnPremisesWritebackConfiguration.cs @@ -84,7 +84,7 @@ public OnPremisesWritebackConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnPremisesWritebackConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnPremisesWritebackConfiguration(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("unifiedGroupContainer", UnifiedGroupContainer); writer.WriteStringValue("userContainer", UserContainer); diff --git a/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartCustomExtension.cs b/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartCustomExtension.cs index fc0f670b6af..8e12af91c75 100644 --- a/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartCustomExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartCustomExtension.cs @@ -42,7 +42,7 @@ public OnTokenIssuanceStartCustomExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnTokenIssuanceStartCustomExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnTokenIssuanceStartCustomExtension(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("claimsForTokenConfiguration", ClaimsForTokenConfiguration); } diff --git a/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartCustomExtensionHandler.cs b/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartCustomExtensionHandler.cs index a600d1886fc..96fefa8aedf 100644 --- a/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartCustomExtensionHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartCustomExtensionHandler.cs @@ -58,7 +58,7 @@ public OnTokenIssuanceStartCustomExtensionHandler() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnTokenIssuanceStartCustomExtensionHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnTokenIssuanceStartCustomExtensionHandler(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("configuration", Configuration); writer.WriteObjectValue("customExtension", CustomExtension); diff --git a/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartHandler.cs b/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartHandler.cs index 49fd783f58b..32235b3cc4e 100644 --- a/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartHandler.cs @@ -52,7 +52,7 @@ public OnTokenIssuanceStartHandler() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnTokenIssuanceStartHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartListener.cs b/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartListener.cs index a4cccb2fc53..c14cb956f38 100644 --- a/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartListener.cs +++ b/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartListener.cs @@ -42,7 +42,7 @@ public OnTokenIssuanceStartListener() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnTokenIssuanceStartListener CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnTokenIssuanceStartListener(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("handler", Handler); } diff --git a/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartReturnClaim.cs b/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartReturnClaim.cs index 360d9ab6e44..f1e09173133 100644 --- a/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartReturnClaim.cs +++ b/src/Microsoft.Graph/Generated/Models/OnTokenIssuanceStartReturnClaim.cs @@ -68,7 +68,7 @@ public OnTokenIssuanceStartReturnClaim() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnTokenIssuanceStartReturnClaim CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnTokenIssuanceStartReturnClaim(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("claimIdInApiResponse", ClaimIdInApiResponse); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/OnUserCreateStartExternalUsersSelfServiceSignUp.cs b/src/Microsoft.Graph/Generated/Models/OnUserCreateStartExternalUsersSelfServiceSignUp.cs index f52a3e51000..f64e1a4e75f 100644 --- a/src/Microsoft.Graph/Generated/Models/OnUserCreateStartExternalUsersSelfServiceSignUp.cs +++ b/src/Microsoft.Graph/Generated/Models/OnUserCreateStartExternalUsersSelfServiceSignUp.cs @@ -32,7 +32,7 @@ public OnUserCreateStartExternalUsersSelfServiceSignUp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnUserCreateStartExternalUsersSelfServiceSignUp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnUserCreateStartExternalUsersSelfServiceSignUp(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("userTypeToCreate", UserTypeToCreate); } diff --git a/src/Microsoft.Graph/Generated/Models/OnUserCreateStartHandler.cs b/src/Microsoft.Graph/Generated/Models/OnUserCreateStartHandler.cs index ada4593e7d9..c14ce36708c 100644 --- a/src/Microsoft.Graph/Generated/Models/OnUserCreateStartHandler.cs +++ b/src/Microsoft.Graph/Generated/Models/OnUserCreateStartHandler.cs @@ -52,7 +52,7 @@ public OnUserCreateStartHandler() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnUserCreateStartHandler CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/OnUserCreateStartListener.cs b/src/Microsoft.Graph/Generated/Models/OnUserCreateStartListener.cs index bd114354651..b200ec89308 100644 --- a/src/Microsoft.Graph/Generated/Models/OnUserCreateStartListener.cs +++ b/src/Microsoft.Graph/Generated/Models/OnUserCreateStartListener.cs @@ -42,7 +42,7 @@ public OnUserCreateStartListener() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnUserCreateStartListener CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnUserCreateStartListener(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("handler", Handler); } diff --git a/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessProtectionPolicy.cs b/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessProtectionPolicy.cs index c2d4d5eb7e5..17f55b13c26 100644 --- a/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessProtectionPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessProtectionPolicy.cs @@ -74,7 +74,7 @@ public OneDriveForBusinessProtectionPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OneDriveForBusinessProtectionPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OneDriveForBusinessProtectionPolicy(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("driveInclusionRules", DriveInclusionRules); writer.WriteCollectionOfObjectValues("driveProtectionUnits", DriveProtectionUnits); diff --git a/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessProtectionPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessProtectionPolicyCollectionResponse.cs index cab29fd1ef7..7b3719d08e7 100644 --- a/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessProtectionPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessProtectionPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OneDriveForBusinessProtectionPolicyCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OneDriveForBusinessProtectionPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OneDriveForBusinessProtectionPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessRestoreSession.cs b/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessRestoreSession.cs index 331a2e367f2..1ea3b0d5efb 100644 --- a/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessRestoreSession.cs +++ b/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessRestoreSession.cs @@ -58,7 +58,7 @@ public OneDriveForBusinessRestoreSession() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OneDriveForBusinessRestoreSession CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OneDriveForBusinessRestoreSession(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("driveRestoreArtifacts", DriveRestoreArtifacts); writer.WriteCollectionOfObjectValues("driveRestoreArtifactsBulkAdditionRequests", DriveRestoreArtifactsBulkAdditionRequests); diff --git a/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessRestoreSessionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessRestoreSessionCollectionResponse.cs index b8bab1caa6e..1d95435f8aa 100644 --- a/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessRestoreSessionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OneDriveForBusinessRestoreSessionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OneDriveForBusinessRestoreSessionCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OneDriveForBusinessRestoreSessionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OneDriveForBusinessRestoreSessionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Onenote.cs b/src/Microsoft.Graph/Generated/Models/Onenote.cs index addd7779b8f..cef509255cd 100644 --- a/src/Microsoft.Graph/Generated/Models/Onenote.cs +++ b/src/Microsoft.Graph/Generated/Models/Onenote.cs @@ -115,7 +115,7 @@ public partial class Onenote : global::Microsoft.Graph.Beta.Models.Entity, IPars /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Onenote CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Onenote(); } /// @@ -140,7 +140,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("notebooks", Notebooks); writer.WriteCollectionOfObjectValues("operations", Operations); diff --git a/src/Microsoft.Graph/Generated/Models/OnenoteEntityBaseModel.cs b/src/Microsoft.Graph/Generated/Models/OnenoteEntityBaseModel.cs index 6c21619564d..3d8dca3717a 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenoteEntityBaseModel.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenoteEntityBaseModel.cs @@ -35,7 +35,7 @@ public string Self /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnenoteEntityBaseModel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -66,7 +66,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("self", Self); } diff --git a/src/Microsoft.Graph/Generated/Models/OnenoteEntityHierarchyModel.cs b/src/Microsoft.Graph/Generated/Models/OnenoteEntityHierarchyModel.cs index 4fb99d7878a..f16b45953dd 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenoteEntityHierarchyModel.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenoteEntityHierarchyModel.cs @@ -80,7 +80,7 @@ public OnenoteEntityHierarchyModel() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnenoteEntityHierarchyModel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/OnenoteEntitySchemaObjectModel.cs b/src/Microsoft.Graph/Generated/Models/OnenoteEntitySchemaObjectModel.cs index b8e83b16ab5..365bf904926 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenoteEntitySchemaObjectModel.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenoteEntitySchemaObjectModel.cs @@ -32,7 +32,7 @@ public OnenoteEntitySchemaObjectModel() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnenoteEntitySchemaObjectModel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -61,7 +61,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); } diff --git a/src/Microsoft.Graph/Generated/Models/OnenoteOperation.cs b/src/Microsoft.Graph/Generated/Models/OnenoteOperation.cs index 3313d75e4c0..dd4afa71aa5 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenoteOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenoteOperation.cs @@ -83,7 +83,7 @@ public string ResourceLocation /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnenoteOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnenoteOperation(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("error", Error); writer.WriteStringValue("percentComplete", PercentComplete); diff --git a/src/Microsoft.Graph/Generated/Models/OnenoteOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OnenoteOperationCollectionResponse.cs index f0ecbba02c5..7547fc840ce 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenoteOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenoteOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OnenoteOperationCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnenoteOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnenoteOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OnenoteOperationError.cs b/src/Microsoft.Graph/Generated/Models/OnenoteOperationError.cs index 5bbedf1c2c5..71bf0f66ef4 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenoteOperationError.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenoteOperationError.cs @@ -84,7 +84,7 @@ public OnenoteOperationError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnenoteOperationError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnenoteOperationError(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/OnenotePage.cs b/src/Microsoft.Graph/Generated/Models/OnenotePage.cs index 754e2eff200..6d007bd8950 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenotePage.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenotePage.cs @@ -172,7 +172,7 @@ public OnenotePage() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnenotePage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnenotePage(); } /// @@ -202,7 +202,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); writer.WriteStringValue("contentUrl", ContentUrl); diff --git a/src/Microsoft.Graph/Generated/Models/OnenotePageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OnenotePageCollectionResponse.cs index b8c0240344f..f0b9c1b73fe 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenotePageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenotePageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OnenotePageCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnenotePageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnenotePageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OnenotePagePreview.cs b/src/Microsoft.Graph/Generated/Models/OnenotePagePreview.cs index 39c88d31555..201449bc829 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenotePagePreview.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenotePagePreview.cs @@ -84,7 +84,7 @@ public OnenotePagePreview() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnenotePagePreview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnenotePagePreview(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("links", Links); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("previewText", PreviewText); diff --git a/src/Microsoft.Graph/Generated/Models/OnenotePagePreviewLinks.cs b/src/Microsoft.Graph/Generated/Models/OnenotePagePreviewLinks.cs index 66d97369bfa..db7065618ba 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenotePagePreviewLinks.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenotePagePreviewLinks.cs @@ -68,7 +68,7 @@ public OnenotePagePreviewLinks() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnenotePagePreviewLinks CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnenotePagePreviewLinks(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("previewImageUrl", PreviewImageUrl); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/OnenotePatchContentCommand.cs b/src/Microsoft.Graph/Generated/Models/OnenotePatchContentCommand.cs index ae043bdede5..301cd681434 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenotePatchContentCommand.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenotePatchContentCommand.cs @@ -96,7 +96,7 @@ public OnenotePatchContentCommand() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnenotePatchContentCommand CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnenotePatchContentCommand(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteStringValue("content", Content); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/OnenoteResource.cs b/src/Microsoft.Graph/Generated/Models/OnenoteResource.cs index 9aa89f4822f..ce63e7d233d 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenoteResource.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenoteResource.cs @@ -58,7 +58,7 @@ public OnenoteResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnenoteResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnenoteResource(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); writer.WriteStringValue("contentUrl", ContentUrl); diff --git a/src/Microsoft.Graph/Generated/Models/OnenoteResourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OnenoteResourceCollectionResponse.cs index af48a256b1f..6698568bbf9 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenoteResourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenoteResourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OnenoteResourceCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnenoteResourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnenoteResourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OnenoteSection.cs b/src/Microsoft.Graph/Generated/Models/OnenoteSection.cs index a353e116d34..dd7a98548ee 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenoteSection.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenoteSection.cs @@ -112,7 +112,7 @@ public OnenoteSection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnenoteSection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnenoteSection(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isDefault", IsDefault); writer.WriteObjectValue("links", Links); diff --git a/src/Microsoft.Graph/Generated/Models/OnenoteSectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OnenoteSectionCollectionResponse.cs index d032271bf46..f829cbf416f 100644 --- a/src/Microsoft.Graph/Generated/Models/OnenoteSectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OnenoteSectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OnenoteSectionCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnenoteSectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnenoteSectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OnlineMeeting.cs b/src/Microsoft.Graph/Generated/Models/OnlineMeeting.cs index 459d2936000..41abb5766b5 100644 --- a/src/Microsoft.Graph/Generated/Models/OnlineMeeting.cs +++ b/src/Microsoft.Graph/Generated/Models/OnlineMeeting.cs @@ -291,7 +291,7 @@ public OnlineMeeting() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnlineMeeting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnlineMeeting(); } /// @@ -329,7 +329,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("aiInsights", AiInsights); writer.WriteByteArrayValue("alternativeRecording", AlternativeRecording); diff --git a/src/Microsoft.Graph/Generated/Models/OnlineMeetingBase.cs b/src/Microsoft.Graph/Generated/Models/OnlineMeetingBase.cs index bf5b07e2c3d..66472b5c230 100644 --- a/src/Microsoft.Graph/Generated/Models/OnlineMeetingBase.cs +++ b/src/Microsoft.Graph/Generated/Models/OnlineMeetingBase.cs @@ -319,7 +319,7 @@ public string VideoTeleconferenceId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnlineMeetingBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -374,7 +374,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowAttendeeToEnableCamera", AllowAttendeeToEnableCamera); writer.WriteBoolValue("allowAttendeeToEnableMic", AllowAttendeeToEnableMic); diff --git a/src/Microsoft.Graph/Generated/Models/OnlineMeetingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OnlineMeetingCollectionResponse.cs index be496143062..1211e11d71d 100644 --- a/src/Microsoft.Graph/Generated/Models/OnlineMeetingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OnlineMeetingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OnlineMeetingCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnlineMeetingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnlineMeetingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OnlineMeetingEngagementConversation.cs b/src/Microsoft.Graph/Generated/Models/OnlineMeetingEngagementConversation.cs index 760378c032a..34f5d446655 100644 --- a/src/Microsoft.Graph/Generated/Models/OnlineMeetingEngagementConversation.cs +++ b/src/Microsoft.Graph/Generated/Models/OnlineMeetingEngagementConversation.cs @@ -87,7 +87,7 @@ public OnlineMeetingEngagementConversation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnlineMeetingEngagementConversation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnlineMeetingEngagementConversation(); } /// @@ -111,7 +111,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("moderationState", ModerationState); writer.WriteObjectValue("onlineMeeting", OnlineMeeting); diff --git a/src/Microsoft.Graph/Generated/Models/OnlineMeetingEngagementConversationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OnlineMeetingEngagementConversationCollectionResponse.cs index 74815658822..921d281f85e 100644 --- a/src/Microsoft.Graph/Generated/Models/OnlineMeetingEngagementConversationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OnlineMeetingEngagementConversationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OnlineMeetingEngagementConversationCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OnlineMeetingEngagementConversationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnlineMeetingEngagementConversationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OnlineMeetingInfo.cs b/src/Microsoft.Graph/Generated/Models/OnlineMeetingInfo.cs index e481b4df62c..322e3d06e43 100644 --- a/src/Microsoft.Graph/Generated/Models/OnlineMeetingInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/OnlineMeetingInfo.cs @@ -148,7 +148,7 @@ public OnlineMeetingInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnlineMeetingInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnlineMeetingInfo(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("conferenceId", ConferenceId); writer.WriteStringValue("joinUrl", JoinUrl); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/OnlineMeetingRestricted.cs b/src/Microsoft.Graph/Generated/Models/OnlineMeetingRestricted.cs index 451e8b6eb77..10bbbd8fba4 100644 --- a/src/Microsoft.Graph/Generated/Models/OnlineMeetingRestricted.cs +++ b/src/Microsoft.Graph/Generated/Models/OnlineMeetingRestricted.cs @@ -64,7 +64,7 @@ public OnlineMeetingRestricted() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OnlineMeetingRestricted CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OnlineMeetingRestricted(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("contentSharingDisabled", ContentSharingDisabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("videoDisabled", VideoDisabled); diff --git a/src/Microsoft.Graph/Generated/Models/OpenAwsSecurityGroupFinding.cs b/src/Microsoft.Graph/Generated/Models/OpenAwsSecurityGroupFinding.cs index fc956532616..ce6ace5b482 100644 --- a/src/Microsoft.Graph/Generated/Models/OpenAwsSecurityGroupFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/OpenAwsSecurityGroupFinding.cs @@ -73,7 +73,7 @@ public int? TotalStorageBucketCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OpenAwsSecurityGroupFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OpenAwsSecurityGroupFinding(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignedComputeInstancesDetails", AssignedComputeInstancesDetails); writer.WriteObjectValue("inboundPorts", InboundPorts); diff --git a/src/Microsoft.Graph/Generated/Models/OpenComplexDictionaryType.cs b/src/Microsoft.Graph/Generated/Models/OpenComplexDictionaryType.cs index baa3b1c3ccc..5f85fa5a866 100644 --- a/src/Microsoft.Graph/Generated/Models/OpenComplexDictionaryType.cs +++ b/src/Microsoft.Graph/Generated/Models/OpenComplexDictionaryType.cs @@ -19,7 +19,7 @@ public partial class OpenComplexDictionaryType : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OpenComplexDictionaryType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OpenComplexDictionaryType(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/OpenIdConnectIdentityProvider.cs b/src/Microsoft.Graph/Generated/Models/OpenIdConnectIdentityProvider.cs index c0a69211b94..b0dd00d5b3f 100644 --- a/src/Microsoft.Graph/Generated/Models/OpenIdConnectIdentityProvider.cs +++ b/src/Microsoft.Graph/Generated/Models/OpenIdConnectIdentityProvider.cs @@ -134,7 +134,7 @@ public OpenIdConnectIdentityProvider() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OpenIdConnectIdentityProvider CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OpenIdConnectIdentityProvider(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("claimsMapping", ClaimsMapping); writer.WriteStringValue("clientId", ClientId); diff --git a/src/Microsoft.Graph/Generated/Models/OpenIdConnectProvider.cs b/src/Microsoft.Graph/Generated/Models/OpenIdConnectProvider.cs index f14517d2cf5..5890077be7e 100644 --- a/src/Microsoft.Graph/Generated/Models/OpenIdConnectProvider.cs +++ b/src/Microsoft.Graph/Generated/Models/OpenIdConnectProvider.cs @@ -95,7 +95,7 @@ public string Scope /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OpenIdConnectProvider CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OpenIdConnectProvider(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("claimsMapping", ClaimsMapping); writer.WriteStringValue("domainHint", DomainHint); diff --git a/src/Microsoft.Graph/Generated/Models/OpenIdConnectSetting.cs b/src/Microsoft.Graph/Generated/Models/OpenIdConnectSetting.cs index 812acc135fd..8080d017f24 100644 --- a/src/Microsoft.Graph/Generated/Models/OpenIdConnectSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/OpenIdConnectSetting.cs @@ -84,7 +84,7 @@ public OpenIdConnectSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OpenIdConnectSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OpenIdConnectSetting(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientId", ClientId); writer.WriteStringValue("discoveryUrl", DiscoveryUrl); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/OpenNetworkAzureSecurityGroupFinding.cs b/src/Microsoft.Graph/Generated/Models/OpenNetworkAzureSecurityGroupFinding.cs index 6e359f8ee05..c3d7ee3f6ef 100644 --- a/src/Microsoft.Graph/Generated/Models/OpenNetworkAzureSecurityGroupFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/OpenNetworkAzureSecurityGroupFinding.cs @@ -67,7 +67,7 @@ public partial class OpenNetworkAzureSecurityGroupFinding : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OpenNetworkAzureSecurityGroupFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OpenNetworkAzureSecurityGroupFinding(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("inboundPorts", InboundPorts); writer.WriteObjectValue("securityGroup", SecurityGroup); diff --git a/src/Microsoft.Graph/Generated/Models/OpenShift.cs b/src/Microsoft.Graph/Generated/Models/OpenShift.cs index f8429da4f1a..7162215f5af 100644 --- a/src/Microsoft.Graph/Generated/Models/OpenShift.cs +++ b/src/Microsoft.Graph/Generated/Models/OpenShift.cs @@ -112,7 +112,7 @@ public OpenShift() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OpenShift CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OpenShift(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("draftOpenShift", DraftOpenShift); writer.WriteBoolValue("isStagedForDeletion", IsStagedForDeletion); diff --git a/src/Microsoft.Graph/Generated/Models/OpenShiftChangeRequest.cs b/src/Microsoft.Graph/Generated/Models/OpenShiftChangeRequest.cs index de8e7968082..f10d0f7350b 100644 --- a/src/Microsoft.Graph/Generated/Models/OpenShiftChangeRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/OpenShiftChangeRequest.cs @@ -42,7 +42,7 @@ public OpenShiftChangeRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OpenShiftChangeRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OpenShiftChangeRequest(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("openShiftId", OpenShiftId); } diff --git a/src/Microsoft.Graph/Generated/Models/OpenShiftChangeRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OpenShiftChangeRequestCollectionResponse.cs index d793d3deddc..cf4804657c1 100644 --- a/src/Microsoft.Graph/Generated/Models/OpenShiftChangeRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OpenShiftChangeRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OpenShiftChangeRequestCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OpenShiftChangeRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OpenShiftChangeRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OpenShiftCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OpenShiftCollectionResponse.cs index c297208d8dc..9d9e0bfb92d 100644 --- a/src/Microsoft.Graph/Generated/Models/OpenShiftCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OpenShiftCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OpenShiftCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OpenShiftCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OpenShiftCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OpenShiftItem.cs b/src/Microsoft.Graph/Generated/Models/OpenShiftItem.cs index 5bb383bb465..12506dfa1f8 100644 --- a/src/Microsoft.Graph/Generated/Models/OpenShiftItem.cs +++ b/src/Microsoft.Graph/Generated/Models/OpenShiftItem.cs @@ -32,7 +32,7 @@ public OpenShiftItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OpenShiftItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OpenShiftItem(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("openSlotCount", OpenSlotCount); } diff --git a/src/Microsoft.Graph/Generated/Models/OpenTypeExtension.cs b/src/Microsoft.Graph/Generated/Models/OpenTypeExtension.cs index 76c49054d19..d03c801141d 100644 --- a/src/Microsoft.Graph/Generated/Models/OpenTypeExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/OpenTypeExtension.cs @@ -42,7 +42,7 @@ public OpenTypeExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OpenTypeExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OpenTypeExtension(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("extensionName", ExtensionName); } diff --git a/src/Microsoft.Graph/Generated/Models/OperatingSystemSpecifications.cs b/src/Microsoft.Graph/Generated/Models/OperatingSystemSpecifications.cs index 29f9b986ec7..ea0d4680af1 100644 --- a/src/Microsoft.Graph/Generated/Models/OperatingSystemSpecifications.cs +++ b/src/Microsoft.Graph/Generated/Models/OperatingSystemSpecifications.cs @@ -84,7 +84,7 @@ public OperatingSystemSpecifications() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OperatingSystemSpecifications CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OperatingSystemSpecifications(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("operatingSystemPlatform", OperatingSystemPlatform); writer.WriteStringValue("operatingSystemVersion", OperatingSystemVersion); diff --git a/src/Microsoft.Graph/Generated/Models/OperatingSystemVersionRange.cs b/src/Microsoft.Graph/Generated/Models/OperatingSystemVersionRange.cs index 0342584dba4..9beb8c67a9a 100644 --- a/src/Microsoft.Graph/Generated/Models/OperatingSystemVersionRange.cs +++ b/src/Microsoft.Graph/Generated/Models/OperatingSystemVersionRange.cs @@ -101,7 +101,7 @@ public OperatingSystemVersionRange() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OperatingSystemVersionRange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OperatingSystemVersionRange(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("highestVersion", HighestVersion); writer.WriteStringValue("lowestVersion", LowestVersion); diff --git a/src/Microsoft.Graph/Generated/Models/Operation.cs b/src/Microsoft.Graph/Generated/Models/Operation.cs index 1e89244689e..b41e2b0ca5c 100644 --- a/src/Microsoft.Graph/Generated/Models/Operation.cs +++ b/src/Microsoft.Graph/Generated/Models/Operation.cs @@ -37,7 +37,7 @@ public DateTimeOffset? LastActionDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Operation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -64,7 +64,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("lastActionDateTime", LastActionDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/OperationApprovalPolicy.cs b/src/Microsoft.Graph/Generated/Models/OperationApprovalPolicy.cs index 72dc9ab4c6c..edbc01c5af4 100644 --- a/src/Microsoft.Graph/Generated/Models/OperationApprovalPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/OperationApprovalPolicy.cs @@ -102,7 +102,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OperationApprovalPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OperationApprovalPolicy(); } /// @@ -128,7 +128,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("approverGroupIds", ApproverGroupIds); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/OperationApprovalPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OperationApprovalPolicyCollectionResponse.cs index 584d0ceb442..755c7856f79 100644 --- a/src/Microsoft.Graph/Generated/Models/OperationApprovalPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OperationApprovalPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OperationApprovalPolicyCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OperationApprovalPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OperationApprovalPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OperationApprovalPolicySet.cs b/src/Microsoft.Graph/Generated/Models/OperationApprovalPolicySet.cs index 305cdbca68f..63f3e0d5fb1 100644 --- a/src/Microsoft.Graph/Generated/Models/OperationApprovalPolicySet.cs +++ b/src/Microsoft.Graph/Generated/Models/OperationApprovalPolicySet.cs @@ -65,7 +65,7 @@ public OperationApprovalPolicySet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OperationApprovalPolicySet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OperationApprovalPolicySet(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("policyPlatform", PolicyPlatform); writer.WriteEnumValue("policyType", PolicyType); diff --git a/src/Microsoft.Graph/Generated/Models/OperationApprovalRequest.cs b/src/Microsoft.Graph/Generated/Models/OperationApprovalRequest.cs index 1da0e1c10d7..7284aee4f46 100644 --- a/src/Microsoft.Graph/Generated/Models/OperationApprovalRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/OperationApprovalRequest.cs @@ -124,7 +124,7 @@ public string RequestJustification /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OperationApprovalRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OperationApprovalRequest(); } /// @@ -152,7 +152,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("status", Status); } diff --git a/src/Microsoft.Graph/Generated/Models/OperationApprovalRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OperationApprovalRequestCollectionResponse.cs index 1ef67db6081..70277f481dc 100644 --- a/src/Microsoft.Graph/Generated/Models/OperationApprovalRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OperationApprovalRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OperationApprovalRequestCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OperationApprovalRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OperationApprovalRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OperationApprovalRequestEntityStatus.cs b/src/Microsoft.Graph/Generated/Models/OperationApprovalRequestEntityStatus.cs index 261dae51894..593ab6cd2ae 100644 --- a/src/Microsoft.Graph/Generated/Models/OperationApprovalRequestEntityStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/OperationApprovalRequestEntityStatus.cs @@ -87,7 +87,7 @@ public OperationApprovalRequestEntityStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OperationApprovalRequestEntityStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OperationApprovalRequestEntityStatus(); } /// @@ -111,7 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("requestStatus", RequestStatus); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/OperationError.cs b/src/Microsoft.Graph/Generated/Models/OperationError.cs index 1cc929f01ce..63c6940afc6 100644 --- a/src/Microsoft.Graph/Generated/Models/OperationError.cs +++ b/src/Microsoft.Graph/Generated/Models/OperationError.cs @@ -84,7 +84,7 @@ public OperationError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OperationError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OperationError(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/OptionalClaim.cs b/src/Microsoft.Graph/Generated/Models/OptionalClaim.cs index ae1e7f10a81..53c938ec2e2 100644 --- a/src/Microsoft.Graph/Generated/Models/OptionalClaim.cs +++ b/src/Microsoft.Graph/Generated/Models/OptionalClaim.cs @@ -106,7 +106,7 @@ public OptionalClaim() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OptionalClaim CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OptionalClaim(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("additionalProperties", AdditionalProperties); writer.WriteBoolValue("essential", Essential); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/OptionalClaims.cs b/src/Microsoft.Graph/Generated/Models/OptionalClaims.cs index 035e1ac8ff6..402ff46a788 100644 --- a/src/Microsoft.Graph/Generated/Models/OptionalClaims.cs +++ b/src/Microsoft.Graph/Generated/Models/OptionalClaims.cs @@ -100,7 +100,7 @@ public OptionalClaims() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OptionalClaims CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OptionalClaims(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("accessToken", AccessToken); writer.WriteCollectionOfObjectValues("idToken", IdToken); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/OrgContact.cs b/src/Microsoft.Graph/Generated/Models/OrgContact.cs index 4b3d42f60ea..3df014356ee 100644 --- a/src/Microsoft.Graph/Generated/Models/OrgContact.cs +++ b/src/Microsoft.Graph/Generated/Models/OrgContact.cs @@ -326,7 +326,7 @@ public OrgContact() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OrgContact CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OrgContact(); } /// @@ -365,7 +365,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("addresses", Addresses); writer.WriteStringValue("companyName", CompanyName); diff --git a/src/Microsoft.Graph/Generated/Models/OrgContactCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OrgContactCollectionResponse.cs index e19b4af0a06..8c446c25b46 100644 --- a/src/Microsoft.Graph/Generated/Models/OrgContactCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OrgContactCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OrgContactCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OrgContactCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OrgContactCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Organization.cs b/src/Microsoft.Graph/Generated/Models/Organization.cs index 423e4ea2dfa..6a74dc91012 100644 --- a/src/Microsoft.Graph/Generated/Models/Organization.cs +++ b/src/Microsoft.Graph/Generated/Models/Organization.cs @@ -484,7 +484,7 @@ public Organization() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Organization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Organization(); } /// @@ -536,7 +536,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignedPlans", AssignedPlans); writer.WriteObjectValue("branding", Branding); diff --git a/src/Microsoft.Graph/Generated/Models/OrganizationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OrganizationCollectionResponse.cs index 9a1a1caf5ea..0e73e2e954d 100644 --- a/src/Microsoft.Graph/Generated/Models/OrganizationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OrganizationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OrganizationCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OrganizationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OrganizationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OrganizationSettings.cs b/src/Microsoft.Graph/Generated/Models/OrganizationSettings.cs index 8d002ae5dc8..7ec9f310847 100644 --- a/src/Microsoft.Graph/Generated/Models/OrganizationSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/OrganizationSettings.cs @@ -83,7 +83,7 @@ public partial class OrganizationSettings : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OrganizationSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OrganizationSettings(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("contactInsights", ContactInsights); writer.WriteObjectValue("itemInsights", ItemInsights); diff --git a/src/Microsoft.Graph/Generated/Models/OrganizationalBranding.cs b/src/Microsoft.Graph/Generated/Models/OrganizationalBranding.cs index bb2203d97cc..c0baa514309 100644 --- a/src/Microsoft.Graph/Generated/Models/OrganizationalBranding.cs +++ b/src/Microsoft.Graph/Generated/Models/OrganizationalBranding.cs @@ -42,7 +42,7 @@ public OrganizationalBranding() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OrganizationalBranding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OrganizationalBranding(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("localizations", Localizations); } diff --git a/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingLocalization.cs b/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingLocalization.cs index 02093e6ceca..0e16f82377f 100644 --- a/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingLocalization.cs +++ b/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingLocalization.cs @@ -26,7 +26,7 @@ public OrganizationalBrandingLocalization() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OrganizationalBrandingLocalization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OrganizationalBrandingLocalization(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingLocalizationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingLocalizationCollectionResponse.cs index c2c77602ca8..605771f5a3e 100644 --- a/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingLocalizationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingLocalizationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OrganizationalBrandingLocalizationCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OrganizationalBrandingLocalizationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OrganizationalBrandingLocalizationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingProperties.cs b/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingProperties.cs index ebe842b7369..76e9cc8e4fa 100644 --- a/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingProperties.cs +++ b/src/Microsoft.Graph/Generated/Models/OrganizationalBrandingProperties.cs @@ -515,7 +515,7 @@ public string UsernameHintText /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OrganizationalBrandingProperties CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -571,7 +571,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("backgroundColor", BackgroundColor); writer.WriteByteArrayValue("backgroundImage", BackgroundImage); diff --git a/src/Microsoft.Graph/Generated/Models/OrganizerMeetingInfo.cs b/src/Microsoft.Graph/Generated/Models/OrganizerMeetingInfo.cs index 7476c250831..c592833e5c4 100644 --- a/src/Microsoft.Graph/Generated/Models/OrganizerMeetingInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/OrganizerMeetingInfo.cs @@ -42,7 +42,7 @@ public OrganizerMeetingInfo() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OrganizerMeetingInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OrganizerMeetingInfo(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("organizer", Organizer); } diff --git a/src/Microsoft.Graph/Generated/Models/OriginTenantInfo.cs b/src/Microsoft.Graph/Generated/Models/OriginTenantInfo.cs index 2dfc3a3ffb1..74f87a6d4cd 100644 --- a/src/Microsoft.Graph/Generated/Models/OriginTenantInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/OriginTenantInfo.cs @@ -84,7 +84,7 @@ public OriginTenantInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OriginTenantInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OriginTenantInfo(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("originTenantId", OriginTenantId); writer.WriteStringValue("originUserId", OriginUserId); diff --git a/src/Microsoft.Graph/Generated/Models/OsVersionCount.cs b/src/Microsoft.Graph/Generated/Models/OsVersionCount.cs index 5469cbed77d..5a9ba02ea3f 100644 --- a/src/Microsoft.Graph/Generated/Models/OsVersionCount.cs +++ b/src/Microsoft.Graph/Generated/Models/OsVersionCount.cs @@ -81,7 +81,7 @@ public OsVersionCount() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OsVersionCount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OsVersionCount(); } /// @@ -104,7 +104,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("deviceCount", DeviceCount); writer.WriteDateTimeOffsetValue("lastUpdateDateTime", LastUpdateDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/OutOfBoxExperienceSetting.cs b/src/Microsoft.Graph/Generated/Models/OutOfBoxExperienceSetting.cs index 3a5fb0e847b..53592e209db 100644 --- a/src/Microsoft.Graph/Generated/Models/OutOfBoxExperienceSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/OutOfBoxExperienceSetting.cs @@ -89,7 +89,7 @@ public OutOfBoxExperienceSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OutOfBoxExperienceSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutOfBoxExperienceSetting(); } /// @@ -115,7 +115,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("deviceUsageType", DeviceUsageType); writer.WriteBoolValue("escapeLinkHidden", EscapeLinkHidden); writer.WriteBoolValue("eulaHidden", EulaHidden); diff --git a/src/Microsoft.Graph/Generated/Models/OutOfBoxExperienceSettings.cs b/src/Microsoft.Graph/Generated/Models/OutOfBoxExperienceSettings.cs index c22d6be3883..9ddf2890913 100644 --- a/src/Microsoft.Graph/Generated/Models/OutOfBoxExperienceSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/OutOfBoxExperienceSettings.cs @@ -89,7 +89,7 @@ public OutOfBoxExperienceSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OutOfBoxExperienceSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutOfBoxExperienceSettings(); } /// @@ -115,7 +115,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("deviceUsageType", DeviceUsageType); writer.WriteBoolValue("hideEscapeLink", HideEscapeLink); writer.WriteBoolValue("hideEULA", HideEULA); diff --git a/src/Microsoft.Graph/Generated/Models/OutOfOfficeSettings.cs b/src/Microsoft.Graph/Generated/Models/OutOfOfficeSettings.cs index e2a674f51d8..4dd74bbdff6 100644 --- a/src/Microsoft.Graph/Generated/Models/OutOfOfficeSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/OutOfOfficeSettings.cs @@ -74,7 +74,7 @@ public OutOfOfficeSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OutOfOfficeSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutOfOfficeSettings(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isOutOfOffice", IsOutOfOffice); writer.WriteStringValue("message", Message); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/OutboundSharedUserProfile.cs b/src/Microsoft.Graph/Generated/Models/OutboundSharedUserProfile.cs index 48f3b079b1e..05d8b4461e1 100644 --- a/src/Microsoft.Graph/Generated/Models/OutboundSharedUserProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/OutboundSharedUserProfile.cs @@ -84,7 +84,7 @@ public OutboundSharedUserProfile() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OutboundSharedUserProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutboundSharedUserProfile(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("tenants", Tenants); writer.WriteStringValue("userId", UserId); diff --git a/src/Microsoft.Graph/Generated/Models/OutboundSharedUserProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OutboundSharedUserProfileCollectionResponse.cs index 8285ab3a1b7..9a39543bf99 100644 --- a/src/Microsoft.Graph/Generated/Models/OutboundSharedUserProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OutboundSharedUserProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OutboundSharedUserProfileCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OutboundSharedUserProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutboundSharedUserProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OutgoingCallOptions.cs b/src/Microsoft.Graph/Generated/Models/OutgoingCallOptions.cs index 04806659478..3b20dbd7d5b 100644 --- a/src/Microsoft.Graph/Generated/Models/OutgoingCallOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/OutgoingCallOptions.cs @@ -26,7 +26,7 @@ public OutgoingCallOptions() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OutgoingCallOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutgoingCallOptions(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/OutlookCategory.cs b/src/Microsoft.Graph/Generated/Models/OutlookCategory.cs index bcb7e5171bc..ea8d0647489 100644 --- a/src/Microsoft.Graph/Generated/Models/OutlookCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/OutlookCategory.cs @@ -41,7 +41,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OutlookCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutlookCategory(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("color", Color); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/OutlookCategoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OutlookCategoryCollectionResponse.cs index fde03415c2a..504536d9a3b 100644 --- a/src/Microsoft.Graph/Generated/Models/OutlookCategoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OutlookCategoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OutlookCategoryCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OutlookCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutlookCategoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OutlookGeoCoordinates.cs b/src/Microsoft.Graph/Generated/Models/OutlookGeoCoordinates.cs index 1dc17fae400..073b6d28cbf 100644 --- a/src/Microsoft.Graph/Generated/Models/OutlookGeoCoordinates.cs +++ b/src/Microsoft.Graph/Generated/Models/OutlookGeoCoordinates.cs @@ -82,7 +82,7 @@ public OutlookGeoCoordinates() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.OutlookGeoCoordinates CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutlookGeoCoordinates(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDoubleValue("accuracy", Accuracy); writer.WriteDoubleValue("altitude", Altitude); writer.WriteDoubleValue("altitudeAccuracy", AltitudeAccuracy); diff --git a/src/Microsoft.Graph/Generated/Models/OutlookItem.cs b/src/Microsoft.Graph/Generated/Models/OutlookItem.cs index 49c95fe8f05..283241e670a 100644 --- a/src/Microsoft.Graph/Generated/Models/OutlookItem.cs +++ b/src/Microsoft.Graph/Generated/Models/OutlookItem.cs @@ -63,7 +63,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OutlookItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("categories", Categories); writer.WriteStringValue("changeKey", ChangeKey); diff --git a/src/Microsoft.Graph/Generated/Models/OutlookTask.cs b/src/Microsoft.Graph/Generated/Models/OutlookTask.cs index a95c4027d02..564f443ce4f 100644 --- a/src/Microsoft.Graph/Generated/Models/OutlookTask.cs +++ b/src/Microsoft.Graph/Generated/Models/OutlookTask.cs @@ -264,7 +264,7 @@ public OutlookTask() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OutlookTask CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutlookTask(); } /// @@ -301,7 +301,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assignedTo", AssignedTo); writer.WriteCollectionOfObjectValues("attachments", Attachments); diff --git a/src/Microsoft.Graph/Generated/Models/OutlookTaskCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OutlookTaskCollectionResponse.cs index a8a4023f15b..f75dce6a5e1 100644 --- a/src/Microsoft.Graph/Generated/Models/OutlookTaskCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OutlookTaskCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OutlookTaskCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OutlookTaskCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutlookTaskCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OutlookTaskFolder.cs b/src/Microsoft.Graph/Generated/Models/OutlookTaskFolder.cs index ea5f83147b8..b6ebd71a897 100644 --- a/src/Microsoft.Graph/Generated/Models/OutlookTaskFolder.cs +++ b/src/Microsoft.Graph/Generated/Models/OutlookTaskFolder.cs @@ -111,7 +111,7 @@ public Guid? ParentGroupKey /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OutlookTaskFolder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutlookTaskFolder(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("changeKey", ChangeKey); writer.WriteBoolValue("isDefaultFolder", IsDefaultFolder); diff --git a/src/Microsoft.Graph/Generated/Models/OutlookTaskFolderCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OutlookTaskFolderCollectionResponse.cs index 219841ed1b2..7ffeab3675e 100644 --- a/src/Microsoft.Graph/Generated/Models/OutlookTaskFolderCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OutlookTaskFolderCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OutlookTaskFolderCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OutlookTaskFolderCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutlookTaskFolderCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OutlookTaskGroup.cs b/src/Microsoft.Graph/Generated/Models/OutlookTaskGroup.cs index 23f68cae8cc..6f05a20c24f 100644 --- a/src/Microsoft.Graph/Generated/Models/OutlookTaskGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/OutlookTaskGroup.cs @@ -79,7 +79,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OutlookTaskGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutlookTaskGroup(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("changeKey", ChangeKey); writer.WriteGuidValue("groupKey", GroupKey); diff --git a/src/Microsoft.Graph/Generated/Models/OutlookTaskGroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/OutlookTaskGroupCollectionResponse.cs index c433028579c..4707b82130d 100644 --- a/src/Microsoft.Graph/Generated/Models/OutlookTaskGroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/OutlookTaskGroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OutlookTaskGroupCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OutlookTaskGroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutlookTaskGroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/OutlookUser.cs b/src/Microsoft.Graph/Generated/Models/OutlookUser.cs index 3c3b8c0a7c8..1caf47da135 100644 --- a/src/Microsoft.Graph/Generated/Models/OutlookUser.cs +++ b/src/Microsoft.Graph/Generated/Models/OutlookUser.cs @@ -83,7 +83,7 @@ public partial class OutlookUser : global::Microsoft.Graph.Beta.Models.Entity, I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OutlookUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OutlookUser(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("masterCategories", MasterCategories); writer.WriteCollectionOfObjectValues("taskFolders", TaskFolders); diff --git a/src/Microsoft.Graph/Generated/Models/OverprovisionedAwsResourceFinding.cs b/src/Microsoft.Graph/Generated/Models/OverprovisionedAwsResourceFinding.cs index 0ba3853ecdf..9fe1e944891 100644 --- a/src/Microsoft.Graph/Generated/Models/OverprovisionedAwsResourceFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/OverprovisionedAwsResourceFinding.cs @@ -19,7 +19,7 @@ public partial class OverprovisionedAwsResourceFinding : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OverprovisionedAwsResourceFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OverprovisionedAwsResourceFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/OverprovisionedAwsRoleFinding.cs b/src/Microsoft.Graph/Generated/Models/OverprovisionedAwsRoleFinding.cs index 6e9823a4403..fb12abb9e54 100644 --- a/src/Microsoft.Graph/Generated/Models/OverprovisionedAwsRoleFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/OverprovisionedAwsRoleFinding.cs @@ -19,7 +19,7 @@ public partial class OverprovisionedAwsRoleFinding : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OverprovisionedAwsRoleFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OverprovisionedAwsRoleFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/OverprovisionedAzureServicePrincipalFinding.cs b/src/Microsoft.Graph/Generated/Models/OverprovisionedAzureServicePrincipalFinding.cs index d0db6b372c1..c59109e0bc3 100644 --- a/src/Microsoft.Graph/Generated/Models/OverprovisionedAzureServicePrincipalFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/OverprovisionedAzureServicePrincipalFinding.cs @@ -19,7 +19,7 @@ public partial class OverprovisionedAzureServicePrincipalFinding : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OverprovisionedAzureServicePrincipalFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OverprovisionedAzureServicePrincipalFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/OverprovisionedGcpServiceAccountFinding.cs b/src/Microsoft.Graph/Generated/Models/OverprovisionedGcpServiceAccountFinding.cs index e1e29ec1ce9..c475199b7c7 100644 --- a/src/Microsoft.Graph/Generated/Models/OverprovisionedGcpServiceAccountFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/OverprovisionedGcpServiceAccountFinding.cs @@ -19,7 +19,7 @@ public partial class OverprovisionedGcpServiceAccountFinding : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OverprovisionedGcpServiceAccountFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OverprovisionedGcpServiceAccountFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/OverprovisionedServerlessFunctionFinding.cs b/src/Microsoft.Graph/Generated/Models/OverprovisionedServerlessFunctionFinding.cs index 634559aeab1..d2d90b7af50 100644 --- a/src/Microsoft.Graph/Generated/Models/OverprovisionedServerlessFunctionFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/OverprovisionedServerlessFunctionFinding.cs @@ -19,7 +19,7 @@ public partial class OverprovisionedServerlessFunctionFinding : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OverprovisionedServerlessFunctionFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OverprovisionedServerlessFunctionFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/OverprovisionedUserFinding.cs b/src/Microsoft.Graph/Generated/Models/OverprovisionedUserFinding.cs index 20cb2af4cd5..3646c1c3c70 100644 --- a/src/Microsoft.Graph/Generated/Models/OverprovisionedUserFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/OverprovisionedUserFinding.cs @@ -19,7 +19,7 @@ public partial class OverprovisionedUserFinding : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.OverprovisionedUserFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.OverprovisionedUserFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Package.cs b/src/Microsoft.Graph/Generated/Models/Package.cs index 0db1d5982c7..3c107a34597 100644 --- a/src/Microsoft.Graph/Generated/Models/Package.cs +++ b/src/Microsoft.Graph/Generated/Models/Package.cs @@ -68,7 +68,7 @@ public Package() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Package CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Package(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("type", Type); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PageLinks.cs b/src/Microsoft.Graph/Generated/Models/PageLinks.cs index 82c3263affe..9c237005950 100644 --- a/src/Microsoft.Graph/Generated/Models/PageLinks.cs +++ b/src/Microsoft.Graph/Generated/Models/PageLinks.cs @@ -84,7 +84,7 @@ public PageLinks() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PageLinks CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PageLinks(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("oneNoteClientUrl", OneNoteClientUrl); writer.WriteObjectValue("oneNoteWebUrl", OneNoteWebUrl); diff --git a/src/Microsoft.Graph/Generated/Models/PageTemplate.cs b/src/Microsoft.Graph/Generated/Models/PageTemplate.cs index acce7b24942..db5e1930b64 100644 --- a/src/Microsoft.Graph/Generated/Models/PageTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/PageTemplate.cs @@ -67,7 +67,7 @@ public partial class PageTemplate : global::Microsoft.Graph.Beta.Models.BaseSite /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PageTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PageTemplate(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("canvasLayout", CanvasLayout); writer.WriteObjectValue("titleArea", TitleArea); diff --git a/src/Microsoft.Graph/Generated/Models/PageTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PageTemplateCollectionResponse.cs index 44957dfaba5..4cc0936aad5 100644 --- a/src/Microsoft.Graph/Generated/Models/PageTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PageTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PageTemplateCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PageTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PageTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ParentLabelDetails.cs b/src/Microsoft.Graph/Generated/Models/ParentLabelDetails.cs index 88b217a379f..0f01cc1f004 100644 --- a/src/Microsoft.Graph/Generated/Models/ParentLabelDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/ParentLabelDetails.cs @@ -160,7 +160,7 @@ public ParentLabelDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ParentLabelDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -193,7 +193,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("color", Color); writer.WriteStringValue("description", Description); writer.WriteStringValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/ParentalControlSettings.cs b/src/Microsoft.Graph/Generated/Models/ParentalControlSettings.cs index bc400d8e176..82eb40e033c 100644 --- a/src/Microsoft.Graph/Generated/Models/ParentalControlSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/ParentalControlSettings.cs @@ -84,7 +84,7 @@ public ParentalControlSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ParentalControlSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ParentalControlSettings(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("countriesBlockedForMinors", CountriesBlockedForMinors); writer.WriteStringValue("legalAgeGroupRule", LegalAgeGroupRule); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ParseExpressionResponse.cs b/src/Microsoft.Graph/Generated/Models/ParseExpressionResponse.cs index 106d835af4a..7bb3b67656f 100644 --- a/src/Microsoft.Graph/Generated/Models/ParseExpressionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ParseExpressionResponse.cs @@ -112,7 +112,7 @@ public ParseExpressionResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ParseExpressionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ParseExpressionResponse(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("error", Error); writer.WriteCollectionOfPrimitiveValues("evaluationResult", EvaluationResult); writer.WriteBoolValue("evaluationSucceeded", EvaluationSucceeded); diff --git a/src/Microsoft.Graph/Generated/Models/Participant.cs b/src/Microsoft.Graph/Generated/Models/Participant.cs index 795f8c41c3a..01e92aedca9 100644 --- a/src/Microsoft.Graph/Generated/Models/Participant.cs +++ b/src/Microsoft.Graph/Generated/Models/Participant.cs @@ -155,7 +155,7 @@ public long? RosterSequenceNumber /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Participant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Participant(); } /// @@ -185,7 +185,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("info", Info); writer.WriteBoolValue("isIdentityAnonymized", IsIdentityAnonymized); diff --git a/src/Microsoft.Graph/Generated/Models/ParticipantCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ParticipantCollectionResponse.cs index a679b378c1c..4aa7f2428c6 100644 --- a/src/Microsoft.Graph/Generated/Models/ParticipantCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ParticipantCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ParticipantCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ParticipantCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ParticipantCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ParticipantInfo.cs b/src/Microsoft.Graph/Generated/Models/ParticipantInfo.cs index fa4eb56093f..f46be35c400 100644 --- a/src/Microsoft.Graph/Generated/Models/ParticipantInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ParticipantInfo.cs @@ -170,7 +170,7 @@ public ParticipantInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ParticipantInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ParticipantInfo(); } /// @@ -198,7 +198,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("countryCode", CountryCode); writer.WriteEnumValue("endpointType", EndpointType); writer.WriteObjectValue("identity", Identity); diff --git a/src/Microsoft.Graph/Generated/Models/ParticipantJoiningNotification.cs b/src/Microsoft.Graph/Generated/Models/ParticipantJoiningNotification.cs index 245d2c2147a..a1ea1cf6bf1 100644 --- a/src/Microsoft.Graph/Generated/Models/ParticipantJoiningNotification.cs +++ b/src/Microsoft.Graph/Generated/Models/ParticipantJoiningNotification.cs @@ -35,7 +35,7 @@ public partial class ParticipantJoiningNotification : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ParticipantJoiningNotification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ParticipantJoiningNotification(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("call", Call); } diff --git a/src/Microsoft.Graph/Generated/Models/ParticipantLeftNotification.cs b/src/Microsoft.Graph/Generated/Models/ParticipantLeftNotification.cs index 6b145cfad25..91088d6a2bd 100644 --- a/src/Microsoft.Graph/Generated/Models/ParticipantLeftNotification.cs +++ b/src/Microsoft.Graph/Generated/Models/ParticipantLeftNotification.cs @@ -51,7 +51,7 @@ public string ParticipantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ParticipantLeftNotification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ParticipantLeftNotification(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("call", Call); writer.WriteStringValue("participantId", ParticipantId); diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/ActivityLog.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/ActivityLog.cs index 76b63ff0ad2..a7320131cec 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/ActivityLog.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/ActivityLog.cs @@ -86,7 +86,7 @@ public ActivityLog() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Partner.Security.ActivityLog CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.ActivityLog(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("statusFrom", StatusFrom); writer.WriteEnumValue("statusTo", StatusTo); diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/AdditionalDataDictionary.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/AdditionalDataDictionary.cs index ed5809283ab..3ab4731cb0a 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/AdditionalDataDictionary.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/AdditionalDataDictionary.cs @@ -19,7 +19,7 @@ public partial class AdditionalDataDictionary : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partner.Security.AdditionalDataDictionary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.AdditionalDataDictionary(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/AdminsMfaEnforcedSecurityRequirement.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/AdminsMfaEnforcedSecurityRequirement.cs index 58dcce12d29..17059439584 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/AdminsMfaEnforcedSecurityRequirement.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/AdminsMfaEnforcedSecurityRequirement.cs @@ -73,7 +73,7 @@ public long? UsersRequiredNotUsingMfaCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partner.Security.AdminsMfaEnforcedSecurityRequirement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.AdminsMfaEnforcedSecurityRequirement(); } /// @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("adminsRequiredNotUsingMfaCount", AdminsRequiredNotUsingMfaCount); writer.WriteEnumValue("legacyPerUserMfaStatus", LegacyPerUserMfaStatus); diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/AffectedResource.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/AffectedResource.cs index db37891dfa6..2a5c23e3d1e 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/AffectedResource.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/AffectedResource.cs @@ -84,7 +84,7 @@ public AffectedResource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Partner.Security.AffectedResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.AffectedResource(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("resourceId", ResourceId); writer.WriteStringValue("resourceType", ResourceType); diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomerInsight.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomerInsight.cs index 4e6671cd0d8..7bece57c5bc 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomerInsight.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomerInsight.cs @@ -84,7 +84,7 @@ public CustomerInsight() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Partner.Security.CustomerInsight CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.CustomerInsight(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("mfa", Mfa); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("tenantId", TenantId); diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomerInsightCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomerInsightCollectionResponse.cs index 3f38317d9fc..2e2bd426798 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomerInsightCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomerInsightCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CustomerInsightCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partner.Security.CustomerInsightCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.CustomerInsightCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomerMfaInsight.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomerMfaInsight.cs index b3e1cc79800..b4b2c86c339 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomerMfaInsight.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomerMfaInsight.cs @@ -88,7 +88,7 @@ public CustomerMfaInsight() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Partner.Security.CustomerMfaInsight CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.CustomerMfaInsight(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("compliantAdminsCount", CompliantAdminsCount); writer.WriteLongValue("compliantNonAdminsCount", CompliantNonAdminsCount); writer.WriteEnumValue("legacyPerUserMfaStatus", LegacyPerUserMfaStatus); diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomersMfaEnforcedSecurityRequirement.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomersMfaEnforcedSecurityRequirement.cs index 2ca3e5ccb63..3fa64fab077 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomersMfaEnforcedSecurityRequirement.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomersMfaEnforcedSecurityRequirement.cs @@ -31,7 +31,7 @@ public long? TotalTenantCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partner.Security.CustomersMfaEnforcedSecurityRequirement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.CustomersMfaEnforcedSecurityRequirement(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("compliantTenantCount", CompliantTenantCount); writer.WriteLongValue("totalTenantCount", TotalTenantCount); diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomersSpendingBudgetSecurityRequirement.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomersSpendingBudgetSecurityRequirement.cs index 1ec48377b83..40f5b1f5c3e 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomersSpendingBudgetSecurityRequirement.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/CustomersSpendingBudgetSecurityRequirement.cs @@ -31,7 +31,7 @@ public long? TotalCustomersCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partner.Security.CustomersSpendingBudgetSecurityRequirement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.CustomersSpendingBudgetSecurityRequirement(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("customersWithSpendBudgetCount", CustomersWithSpendBudgetCount); writer.WriteLongValue("totalCustomersCount", TotalCustomersCount); diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurity.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurity.cs index 58290c6c8aa..d1769384e53 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurity.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurity.cs @@ -51,7 +51,7 @@ public partial class PartnerSecurity : global::Microsoft.Graph.Beta.Models.Entit /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partner.Security.PartnerSecurity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.PartnerSecurity(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("securityAlerts", SecurityAlerts); writer.WriteObjectValue("securityScore", SecurityScore); diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurityAlert.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurityAlert.cs index f77cd0a9161..0b362fb4df7 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurityAlert.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurityAlert.cs @@ -249,7 +249,7 @@ public string ValueAddedResellerTenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partner.Security.PartnerSecurityAlert CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.PartnerSecurityAlert(); } /// @@ -288,7 +288,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("activityLogs", ActivityLogs); writer.WriteObjectValue("additionalDetails", AdditionalDetails); diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurityAlertCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurityAlertCollectionResponse.cs index 83594f2e831..0f02738acd9 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurityAlertCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurityAlertCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PartnerSecurityAlertCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partner.Security.PartnerSecurityAlertCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.PartnerSecurityAlertCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurityScore.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurityScore.cs index 0f12837286b..544b320ff7b 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurityScore.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/PartnerSecurityScore.cs @@ -91,7 +91,7 @@ public DateTimeOffset? UpdatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partner.Security.PartnerSecurityScore CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.PartnerSecurityScore(); } /// @@ -117,7 +117,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteFloatValue("currentScore", CurrentScore); writer.WriteCollectionOfObjectValues("customerInsights", CustomerInsights); diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/ResponseTimeSecurityRequirement.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/ResponseTimeSecurityRequirement.cs index ff01e379002..9f9793e558b 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/ResponseTimeSecurityRequirement.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/ResponseTimeSecurityRequirement.cs @@ -25,7 +25,7 @@ public float? AverageResponseTimeInHours /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partner.Security.ResponseTimeSecurityRequirement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.ResponseTimeSecurityRequirement(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteFloatValue("averageResponseTimeInHours", AverageResponseTimeInHours); } diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityRequirement.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityRequirement.cs index aeae02f3649..9f8e2661bd0 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityRequirement.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityRequirement.cs @@ -87,7 +87,7 @@ public DateTimeOffset? UpdatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partner.Security.SecurityRequirement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -122,7 +122,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("actionUrl", ActionUrl); writer.WriteEnumValue("complianceStatus", ComplianceStatus); diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityRequirementCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityRequirementCollectionResponse.cs index 2c420002f7d..59a3638aa4c 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityRequirementCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityRequirementCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SecurityRequirementCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partner.Security.SecurityRequirementCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.SecurityRequirementCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityScoreHistory.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityScoreHistory.cs index 766c19b7f76..b215789e668 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityScoreHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityScoreHistory.cs @@ -43,7 +43,7 @@ public long? TotalRequirementsCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partner.Security.SecurityScoreHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.SecurityScoreHistory(); } /// @@ -66,7 +66,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("compliantRequirementsCount", CompliantRequirementsCount); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityScoreHistoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityScoreHistoryCollectionResponse.cs index 91a8f63ad54..275cfacebea 100644 --- a/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityScoreHistoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Partner/Security/SecurityScoreHistoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SecurityScoreHistoryCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partner.Security.SecurityScoreHistoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partner.Security.SecurityScoreHistoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PartnerInformation.cs b/src/Microsoft.Graph/Generated/Models/PartnerInformation.cs index b9a132254d8..a7041206be4 100644 --- a/src/Microsoft.Graph/Generated/Models/PartnerInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/PartnerInformation.cs @@ -170,7 +170,7 @@ public PartnerInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PartnerInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PartnerInformation(); } /// @@ -198,7 +198,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("commerceUrl", CommerceUrl); writer.WriteStringValue("companyName", CompanyName); writer.WriteEnumValue("companyType", CompanyType); diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/AzureUsage.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/AzureUsage.cs index 2f825c799ad..30d48cb4b41 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/AzureUsage.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/AzureUsage.cs @@ -51,7 +51,7 @@ public partial class AzureUsage : global::Microsoft.Graph.Beta.Models.Entity, IP /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Billing.AzureUsage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Billing.AzureUsage(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("billed", Billed); writer.WriteObjectValue("unbilled", Unbilled); diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/BilledReconciliation.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/BilledReconciliation.cs index 4a65a22277c..d07d981f350 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/BilledReconciliation.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/BilledReconciliation.cs @@ -19,7 +19,7 @@ public partial class BilledReconciliation : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Billing.BilledReconciliation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Billing.BilledReconciliation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/BilledUsage.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/BilledUsage.cs index 28da02d7e3b..50a7b504f63 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/BilledUsage.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/BilledUsage.cs @@ -19,7 +19,7 @@ public partial class BilledUsage : global::Microsoft.Graph.Beta.Models.Entity, I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Billing.BilledUsage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Billing.BilledUsage(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/Billing.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/Billing.cs index c06df5cf4ef..41065de719f 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/Billing.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/Billing.cs @@ -83,7 +83,7 @@ public partial class Billing : global::Microsoft.Graph.Beta.Models.Entity, IPars /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Billing.Billing CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Billing.Billing(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("manifests", Manifests); writer.WriteCollectionOfObjectValues("operations", Operations); diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/BillingReconciliation.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/BillingReconciliation.cs index 39afc1b9c5a..1a4b954184c 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/BillingReconciliation.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/BillingReconciliation.cs @@ -51,7 +51,7 @@ public partial class BillingReconciliation : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Billing.BillingReconciliation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Billing.BillingReconciliation(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("billed", Billed); writer.WriteObjectValue("unbilled", Unbilled); diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/Blob.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/Blob.cs index 3f02c2a7105..6e40aca619c 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/Blob.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/Blob.cs @@ -84,7 +84,7 @@ public Blob() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Partners.Billing.Blob CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Billing.Blob(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("partitionValue", PartitionValue); diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/ExportSuccessOperation.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/ExportSuccessOperation.cs index c95afec1034..9b910a6aed6 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/ExportSuccessOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/ExportSuccessOperation.cs @@ -35,7 +35,7 @@ public partial class ExportSuccessOperation : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Billing.ExportSuccessOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Billing.ExportSuccessOperation(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("resourceLocation", ResourceLocation); } diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/FailedOperation.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/FailedOperation.cs index 90907ebd9d6..f822efbcd5a 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/FailedOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/FailedOperation.cs @@ -35,7 +35,7 @@ public partial class FailedOperation : global::Microsoft.Graph.Beta.Models.Partn /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Billing.FailedOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Billing.FailedOperation(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("error", Error); } diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/Manifest.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/Manifest.cs index 774c265ce19..f4c4c8a96b6 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/Manifest.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/Manifest.cs @@ -159,7 +159,7 @@ public string SchemaVersion /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Billing.Manifest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Billing.Manifest(); } /// @@ -188,7 +188,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("blobCount", BlobCount); writer.WriteCollectionOfObjectValues("blobs", Blobs); diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/ManifestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/ManifestCollectionResponse.cs index 6c4d67bb1fe..1f3ee3ee737 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/ManifestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/ManifestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ManifestCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Billing.ManifestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Billing.ManifestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/Operation.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/Operation.cs index 278ee421abd..0f9b5b1c5a6 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/Operation.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/Operation.cs @@ -37,7 +37,7 @@ public DateTimeOffset? LastActionDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Billing.Operation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -66,7 +66,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("lastActionDateTime", LastActionDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/OperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/OperationCollectionResponse.cs index e84f8c6c9dc..c5dbd1faacb 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/OperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/OperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class OperationCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Billing.OperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Billing.OperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/RunningOperation.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/RunningOperation.cs index d2d7bf5edac..e51cebe0374 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/RunningOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/RunningOperation.cs @@ -19,7 +19,7 @@ public partial class RunningOperation : global::Microsoft.Graph.Beta.Models.Part /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Billing.RunningOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Billing.RunningOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/UnbilledReconciliation.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/UnbilledReconciliation.cs index 0f9265b99dd..f0ad39f3f3f 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/UnbilledReconciliation.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/UnbilledReconciliation.cs @@ -19,7 +19,7 @@ public partial class UnbilledReconciliation : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Billing.UnbilledReconciliation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Billing.UnbilledReconciliation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Billing/UnbilledUsage.cs b/src/Microsoft.Graph/Generated/Models/Partners/Billing/UnbilledUsage.cs index f97134fdca2..2ded2141d01 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Billing/UnbilledUsage.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Billing/UnbilledUsage.cs @@ -19,7 +19,7 @@ public partial class UnbilledUsage : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Billing.UnbilledUsage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Billing.UnbilledUsage(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Partners/Partners.cs b/src/Microsoft.Graph/Generated/Models/Partners/Partners.cs index 8af18ed46a9..ac0cf92ef16 100644 --- a/src/Microsoft.Graph/Generated/Models/Partners/Partners.cs +++ b/src/Microsoft.Graph/Generated/Models/Partners/Partners.cs @@ -36,7 +36,7 @@ public partial class Partners : global::Microsoft.Graph.Beta.Models.Entity, IPar /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Partners.Partners CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Partners.Partners(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("billing", Billing); } diff --git a/src/Microsoft.Graph/Generated/Models/PasskeyAuthenticationMethodTarget.cs b/src/Microsoft.Graph/Generated/Models/PasskeyAuthenticationMethodTarget.cs index ffe3985e618..42668153e73 100644 --- a/src/Microsoft.Graph/Generated/Models/PasskeyAuthenticationMethodTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/PasskeyAuthenticationMethodTarget.cs @@ -19,7 +19,7 @@ public partial class PasskeyAuthenticationMethodTarget : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PasskeyAuthenticationMethodTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PasskeyAuthenticationMethodTarget(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PasswordAuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/PasswordAuthenticationMethod.cs index ec1b5cbc72f..68ff9bff1e4 100644 --- a/src/Microsoft.Graph/Generated/Models/PasswordAuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/PasswordAuthenticationMethod.cs @@ -42,7 +42,7 @@ public PasswordAuthenticationMethod() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PasswordAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PasswordAuthenticationMethod(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("password", Password); } diff --git a/src/Microsoft.Graph/Generated/Models/PasswordAuthenticationMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PasswordAuthenticationMethodCollectionResponse.cs index e6da65a1dfa..23a4efc9515 100644 --- a/src/Microsoft.Graph/Generated/Models/PasswordAuthenticationMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PasswordAuthenticationMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PasswordAuthenticationMethodCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PasswordAuthenticationMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PasswordAuthenticationMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PasswordCredential.cs b/src/Microsoft.Graph/Generated/Models/PasswordCredential.cs index 236e0bc5aff..c6e46c46747 100644 --- a/src/Microsoft.Graph/Generated/Models/PasswordCredential.cs +++ b/src/Microsoft.Graph/Generated/Models/PasswordCredential.cs @@ -134,7 +134,7 @@ public PasswordCredential() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PasswordCredential CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PasswordCredential(); } /// @@ -161,7 +161,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("customKeyIdentifier", CustomKeyIdentifier); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/PasswordCredentialConfiguration.cs b/src/Microsoft.Graph/Generated/Models/PasswordCredentialConfiguration.cs index da2e7f3e1b7..9c09f8b3b0d 100644 --- a/src/Microsoft.Graph/Generated/Models/PasswordCredentialConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/PasswordCredentialConfiguration.cs @@ -92,7 +92,7 @@ public PasswordCredentialConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PasswordCredentialConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PasswordCredentialConfiguration(); } /// @@ -117,7 +117,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("excludeActors", ExcludeActors); writer.WriteTimeSpanValue("maxLifetime", MaxLifetime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PasswordProfile.cs b/src/Microsoft.Graph/Generated/Models/PasswordProfile.cs index 7d3849d5726..72b9708a84e 100644 --- a/src/Microsoft.Graph/Generated/Models/PasswordProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/PasswordProfile.cs @@ -80,7 +80,7 @@ public PasswordProfile() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PasswordProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PasswordProfile(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("forceChangePasswordNextSignIn", ForceChangePasswordNextSignIn); writer.WriteBoolValue("forceChangePasswordNextSignInWithMfa", ForceChangePasswordNextSignInWithMfa); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PasswordResetResponse.cs b/src/Microsoft.Graph/Generated/Models/PasswordResetResponse.cs index fef12d31ad4..43f309622c4 100644 --- a/src/Microsoft.Graph/Generated/Models/PasswordResetResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PasswordResetResponse.cs @@ -68,7 +68,7 @@ public PasswordResetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PasswordResetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PasswordResetResponse(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("newPassword", NewPassword); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PasswordSingleSignOnCredentialSet.cs b/src/Microsoft.Graph/Generated/Models/PasswordSingleSignOnCredentialSet.cs index aa950aa16c6..ff26020c45d 100644 --- a/src/Microsoft.Graph/Generated/Models/PasswordSingleSignOnCredentialSet.cs +++ b/src/Microsoft.Graph/Generated/Models/PasswordSingleSignOnCredentialSet.cs @@ -84,7 +84,7 @@ public PasswordSingleSignOnCredentialSet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PasswordSingleSignOnCredentialSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PasswordSingleSignOnCredentialSet(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("credentials", Credentials); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PasswordSingleSignOnField.cs b/src/Microsoft.Graph/Generated/Models/PasswordSingleSignOnField.cs index 4a768ad43db..1bc38c5be1d 100644 --- a/src/Microsoft.Graph/Generated/Models/PasswordSingleSignOnField.cs +++ b/src/Microsoft.Graph/Generated/Models/PasswordSingleSignOnField.cs @@ -116,7 +116,7 @@ public PasswordSingleSignOnField() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PasswordSingleSignOnField CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PasswordSingleSignOnField(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("customizedLabel", CustomizedLabel); writer.WriteStringValue("defaultLabel", DefaultLabel); writer.WriteStringValue("fieldId", FieldId); diff --git a/src/Microsoft.Graph/Generated/Models/PasswordSingleSignOnSettings.cs b/src/Microsoft.Graph/Generated/Models/PasswordSingleSignOnSettings.cs index 29c6bd89e85..4d403f46274 100644 --- a/src/Microsoft.Graph/Generated/Models/PasswordSingleSignOnSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/PasswordSingleSignOnSettings.cs @@ -68,7 +68,7 @@ public PasswordSingleSignOnSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PasswordSingleSignOnSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PasswordSingleSignOnSettings(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("fields", Fields); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PasswordValidationInformation.cs b/src/Microsoft.Graph/Generated/Models/PasswordValidationInformation.cs index 7d62733323a..f6652cb9686 100644 --- a/src/Microsoft.Graph/Generated/Models/PasswordValidationInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/PasswordValidationInformation.cs @@ -74,7 +74,7 @@ public PasswordValidationInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PasswordValidationInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PasswordValidationInformation(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isValid", IsValid); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("validationResults", ValidationResults); diff --git a/src/Microsoft.Graph/Generated/Models/PasswordlessMicrosoftAuthenticatorAuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/PasswordlessMicrosoftAuthenticatorAuthenticationMethod.cs index c8dc73dbbd9..13a63e26736 100644 --- a/src/Microsoft.Graph/Generated/Models/PasswordlessMicrosoftAuthenticatorAuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/PasswordlessMicrosoftAuthenticatorAuthenticationMethod.cs @@ -64,7 +64,7 @@ public PasswordlessMicrosoftAuthenticatorAuthenticationMethod() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PasswordlessMicrosoftAuthenticatorAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PasswordlessMicrosoftAuthenticatorAuthenticationMethod(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("creationDateTime", CreationDateTime); writer.WriteObjectValue("device", Device); diff --git a/src/Microsoft.Graph/Generated/Models/PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse.cs index 6080ed81ab8..b52d0f5bc23 100644 --- a/src/Microsoft.Graph/Generated/Models/PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PasswordlessMicrosoftAuthenticatorAuthenticationMethodColle /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PatternedRecurrence.cs b/src/Microsoft.Graph/Generated/Models/PatternedRecurrence.cs index 7c52df1c158..751d0bdccd2 100644 --- a/src/Microsoft.Graph/Generated/Models/PatternedRecurrence.cs +++ b/src/Microsoft.Graph/Generated/Models/PatternedRecurrence.cs @@ -84,7 +84,7 @@ public PatternedRecurrence() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PatternedRecurrence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PatternedRecurrence(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("pattern", Pattern); writer.WriteObjectValue("range", Range); diff --git a/src/Microsoft.Graph/Generated/Models/Payload.cs b/src/Microsoft.Graph/Generated/Models/Payload.cs index a9f4fc46337..5270080ff09 100644 --- a/src/Microsoft.Graph/Generated/Models/Payload.cs +++ b/src/Microsoft.Graph/Generated/Models/Payload.cs @@ -221,7 +221,7 @@ public double? PredictedCompromiseRate /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Payload CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Payload(); } /// @@ -262,7 +262,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("brand", Brand); writer.WriteEnumValue("complexity", Complexity); diff --git a/src/Microsoft.Graph/Generated/Models/PayloadByFilter.cs b/src/Microsoft.Graph/Generated/Models/PayloadByFilter.cs index 624d4df104e..4c8f3756f3b 100644 --- a/src/Microsoft.Graph/Generated/Models/PayloadByFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/PayloadByFilter.cs @@ -97,7 +97,7 @@ public PayloadByFilter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PayloadByFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PayloadByFilter(); } /// @@ -121,7 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("assignmentFilterType", AssignmentFilterType); writer.WriteStringValue("groupId", GroupId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PayloadCoachmark.cs b/src/Microsoft.Graph/Generated/Models/PayloadCoachmark.cs index ee2fc7ecf72..5bbc6b5419f 100644 --- a/src/Microsoft.Graph/Generated/Models/PayloadCoachmark.cs +++ b/src/Microsoft.Graph/Generated/Models/PayloadCoachmark.cs @@ -138,7 +138,7 @@ public PayloadCoachmark() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PayloadCoachmark CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PayloadCoachmark(); } /// @@ -164,7 +164,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("coachmarkLocation", CoachmarkLocation); writer.WriteStringValue("description", Description); writer.WriteStringValue("indicator", Indicator); diff --git a/src/Microsoft.Graph/Generated/Models/PayloadCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PayloadCollectionResponse.cs index 60af4e1e7e7..47a0e975006 100644 --- a/src/Microsoft.Graph/Generated/Models/PayloadCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PayloadCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PayloadCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PayloadCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PayloadCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PayloadCompatibleAssignmentFilter.cs b/src/Microsoft.Graph/Generated/Models/PayloadCompatibleAssignmentFilter.cs index 9359c438c12..6e09579aee5 100644 --- a/src/Microsoft.Graph/Generated/Models/PayloadCompatibleAssignmentFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/PayloadCompatibleAssignmentFilter.cs @@ -33,7 +33,7 @@ public PayloadCompatibleAssignmentFilter() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PayloadCompatibleAssignmentFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PayloadCompatibleAssignmentFilter(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("payloadType", PayloadType); } diff --git a/src/Microsoft.Graph/Generated/Models/PayloadDetail.cs b/src/Microsoft.Graph/Generated/Models/PayloadDetail.cs index 56674699535..69d49e119eb 100644 --- a/src/Microsoft.Graph/Generated/Models/PayloadDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/PayloadDetail.cs @@ -100,7 +100,7 @@ public PayloadDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PayloadDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -128,7 +128,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("coachmarks", Coachmarks); writer.WriteStringValue("content", Content); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PayloadRequest.cs b/src/Microsoft.Graph/Generated/Models/PayloadRequest.cs index 279e0edeaf1..f72a5f44e82 100644 --- a/src/Microsoft.Graph/Generated/Models/PayloadRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/PayloadRequest.cs @@ -52,7 +52,7 @@ public PayloadRequest() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PayloadRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PayloadRequest(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/PayloadResponse.cs b/src/Microsoft.Graph/Generated/Models/PayloadResponse.cs index d7ace892ac3..6f4c83a0f16 100644 --- a/src/Microsoft.Graph/Generated/Models/PayloadResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PayloadResponse.cs @@ -19,7 +19,7 @@ public partial class PayloadResponse : global::Microsoft.Graph.Beta.Models.Entit /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PayloadResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PayloadResponse(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PayloadResponseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PayloadResponseCollectionResponse.cs index 33b4a2fec0e..98f62e653e9 100644 --- a/src/Microsoft.Graph/Generated/Models/PayloadResponseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PayloadResponseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PayloadResponseCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PayloadResponseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PayloadResponseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PayloadTypes.cs b/src/Microsoft.Graph/Generated/Models/PayloadTypes.cs index 22cea06e653..4e007b9c1ab 100644 --- a/src/Microsoft.Graph/Generated/Models/PayloadTypes.cs +++ b/src/Microsoft.Graph/Generated/Models/PayloadTypes.cs @@ -84,7 +84,7 @@ public PayloadTypes() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PayloadTypes CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PayloadTypes(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("rawContent", RawContent); writer.WriteObjectValue("visualContent", VisualContent); diff --git a/src/Microsoft.Graph/Generated/Models/PaymentMethod.cs b/src/Microsoft.Graph/Generated/Models/PaymentMethod.cs index b99cdcf3e6b..025ed993315 100644 --- a/src/Microsoft.Graph/Generated/Models/PaymentMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/PaymentMethod.cs @@ -96,7 +96,7 @@ public PaymentMethod() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PaymentMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PaymentMethod(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("displayName", DisplayName); writer.WriteGuidValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/PaymentMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PaymentMethodCollectionResponse.cs index 3dd73586c60..f3820e9a042 100644 --- a/src/Microsoft.Graph/Generated/Models/PaymentMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PaymentMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PaymentMethodCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PaymentMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PaymentMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PaymentTerm.cs b/src/Microsoft.Graph/Generated/Models/PaymentTerm.cs index 91d55ec9857..a5908c0006d 100644 --- a/src/Microsoft.Graph/Generated/Models/PaymentTerm.cs +++ b/src/Microsoft.Graph/Generated/Models/PaymentTerm.cs @@ -140,7 +140,7 @@ public PaymentTerm() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PaymentTerm CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PaymentTerm(); } /// @@ -168,7 +168,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("calculateDiscountOnCreditMemos", CalculateDiscountOnCreditMemos); writer.WriteStringValue("code", Code); writer.WriteStringValue("discountDateCalculation", DiscountDateCalculation); diff --git a/src/Microsoft.Graph/Generated/Models/PaymentTermCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PaymentTermCollectionResponse.cs index 109ec0cb927..c4b73a62d8b 100644 --- a/src/Microsoft.Graph/Generated/Models/PaymentTermCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PaymentTermCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PaymentTermCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PaymentTermCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PaymentTermCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PendingContentUpdate.cs b/src/Microsoft.Graph/Generated/Models/PendingContentUpdate.cs index 647defdc391..aa4661214f1 100644 --- a/src/Microsoft.Graph/Generated/Models/PendingContentUpdate.cs +++ b/src/Microsoft.Graph/Generated/Models/PendingContentUpdate.cs @@ -58,7 +58,7 @@ public PendingContentUpdate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PendingContentUpdate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PendingContentUpdate(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("queuedDateTime", QueuedDateTime); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PendingExternalUserProfile.cs b/src/Microsoft.Graph/Generated/Models/PendingExternalUserProfile.cs index b641668023d..c6c7b537fb8 100644 --- a/src/Microsoft.Graph/Generated/Models/PendingExternalUserProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/PendingExternalUserProfile.cs @@ -26,7 +26,7 @@ public PendingExternalUserProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PendingExternalUserProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PendingExternalUserProfile(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PendingExternalUserProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PendingExternalUserProfileCollectionResponse.cs index d96f4ae3721..73036c89c61 100644 --- a/src/Microsoft.Graph/Generated/Models/PendingExternalUserProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PendingExternalUserProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PendingExternalUserProfileCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PendingExternalUserProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PendingExternalUserProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PendingOperations.cs b/src/Microsoft.Graph/Generated/Models/PendingOperations.cs index e173fadb2b0..23242f68635 100644 --- a/src/Microsoft.Graph/Generated/Models/PendingOperations.cs +++ b/src/Microsoft.Graph/Generated/Models/PendingOperations.cs @@ -68,7 +68,7 @@ public PendingOperations() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PendingOperations CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PendingOperations(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("pendingContentUpdate", PendingContentUpdate); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PeopleAdminSettings.cs b/src/Microsoft.Graph/Generated/Models/PeopleAdminSettings.cs index 29a2724bbc6..ef71d17f301 100644 --- a/src/Microsoft.Graph/Generated/Models/PeopleAdminSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/PeopleAdminSettings.cs @@ -131,7 +131,7 @@ public partial class PeopleAdminSettings : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PeopleAdminSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PeopleAdminSettings(); } /// @@ -157,7 +157,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("itemInsights", ItemInsights); writer.WriteObjectValue("namePronunciation", NamePronunciation); diff --git a/src/Microsoft.Graph/Generated/Models/Permission.cs b/src/Microsoft.Graph/Generated/Models/Permission.cs index 27c2cc6e4bb..78cde80baca 100644 --- a/src/Microsoft.Graph/Generated/Models/Permission.cs +++ b/src/Microsoft.Graph/Generated/Models/Permission.cs @@ -175,7 +175,7 @@ public string ShareId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Permission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Permission(); } /// @@ -205,7 +205,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteObjectValue("grantedTo", GrantedTo); diff --git a/src/Microsoft.Graph/Generated/Models/PermissionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PermissionCollectionResponse.cs index 84f2a747ec7..b28f242e262 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PermissionCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PermissionGrantConditionSet.cs b/src/Microsoft.Graph/Generated/Models/PermissionGrantConditionSet.cs index 530488ed7a3..f56879b8054 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionGrantConditionSet.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionGrantConditionSet.cs @@ -149,7 +149,7 @@ public string ResourceApplication /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionGrantConditionSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionGrantConditionSet(); } /// @@ -178,7 +178,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("certifiedClientApplicationsOnly", CertifiedClientApplicationsOnly); writer.WriteCollectionOfPrimitiveValues("clientApplicationIds", ClientApplicationIds); diff --git a/src/Microsoft.Graph/Generated/Models/PermissionGrantConditionSetCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PermissionGrantConditionSetCollectionResponse.cs index 3c56260422e..2693312d116 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionGrantConditionSetCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionGrantConditionSetCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PermissionGrantConditionSetCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionGrantConditionSetCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionGrantConditionSetCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PermissionGrantPolicy.cs b/src/Microsoft.Graph/Generated/Models/PermissionGrantPolicy.cs index be39d4ca6b0..e2879b92033 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionGrantPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionGrantPolicy.cs @@ -70,7 +70,7 @@ public PermissionGrantPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionGrantPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionGrantPolicy(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("excludes", Excludes); writer.WriteBoolValue("includeAllPreApprovedApplications", IncludeAllPreApprovedApplications); diff --git a/src/Microsoft.Graph/Generated/Models/PermissionGrantPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PermissionGrantPolicyCollectionResponse.cs index 0473276e010..d11b29e3a8f 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionGrantPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionGrantPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PermissionGrantPolicyCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionGrantPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionGrantPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PermissionGrantPreApprovalPolicy.cs b/src/Microsoft.Graph/Generated/Models/PermissionGrantPreApprovalPolicy.cs index e67012dc64a..2041b7aa074 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionGrantPreApprovalPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionGrantPreApprovalPolicy.cs @@ -42,7 +42,7 @@ public PermissionGrantPreApprovalPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionGrantPreApprovalPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionGrantPreApprovalPolicy(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("conditions", Conditions); } diff --git a/src/Microsoft.Graph/Generated/Models/PermissionGrantPreApprovalPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PermissionGrantPreApprovalPolicyCollectionResponse.cs index c604f84d2c7..9d338df5cb7 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionGrantPreApprovalPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionGrantPreApprovalPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PermissionGrantPreApprovalPolicyCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionGrantPreApprovalPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionGrantPreApprovalPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PermissionScope.cs b/src/Microsoft.Graph/Generated/Models/PermissionScope.cs index b4f08bc95f9..54ada8c9561 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionScope.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionScope.cs @@ -176,7 +176,7 @@ public PermissionScope() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PermissionScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionScope(); } /// @@ -205,7 +205,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("adminConsentDescription", AdminConsentDescription); writer.WriteStringValue("adminConsentDisplayName", AdminConsentDisplayName); writer.WriteGuidValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsAnalytics.cs b/src/Microsoft.Graph/Generated/Models/PermissionsAnalytics.cs index 7b338bc68f4..7a1fcb80a2d 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsAnalytics.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsAnalytics.cs @@ -51,7 +51,7 @@ public partial class PermissionsAnalytics : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionsAnalytics CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionsAnalytics(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("findings", Findings); writer.WriteCollectionOfObjectValues("permissionsCreepIndexDistributions", PermissionsCreepIndexDistributions); diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsAnalyticsAggregation.cs b/src/Microsoft.Graph/Generated/Models/PermissionsAnalyticsAggregation.cs index fdae901c75d..a116175ae32 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsAnalyticsAggregation.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsAnalyticsAggregation.cs @@ -67,7 +67,7 @@ public partial class PermissionsAnalyticsAggregation : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionsAnalyticsAggregation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionsAnalyticsAggregation(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("aws", Aws); writer.WriteObjectValue("azure", Azure); diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsCreepIndex.cs b/src/Microsoft.Graph/Generated/Models/PermissionsCreepIndex.cs index c242ba6a132..ceaa08040de 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsCreepIndex.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsCreepIndex.cs @@ -58,7 +58,7 @@ public PermissionsCreepIndex() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PermissionsCreepIndex CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionsCreepIndex(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("score", Score); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsCreepIndexDistribution.cs b/src/Microsoft.Graph/Generated/Models/PermissionsCreepIndexDistribution.cs index d8a5addc2d0..c2c409012f1 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsCreepIndexDistribution.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsCreepIndexDistribution.cs @@ -89,7 +89,7 @@ public DateTimeOffset? CreatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistribution CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistribution(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("authorizationSystem", AuthorizationSystem); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsCreepIndexDistributionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PermissionsCreepIndexDistributionCollectionResponse.cs index 5818301cf21..c6f58eae674 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsCreepIndexDistributionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsCreepIndexDistributionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PermissionsCreepIndexDistributionCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistributionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionsCreepIndexDistributionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsDefinition.cs b/src/Microsoft.Graph/Generated/Models/PermissionsDefinition.cs index fac8726ccc0..61bfd021056 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsDefinition.cs @@ -84,7 +84,7 @@ public PermissionsDefinition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PermissionsDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("authorizationSystemInfo", AuthorizationSystemInfo); writer.WriteObjectValue("identityInfo", IdentityInfo); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAction.cs b/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAction.cs index 81ddcb2ce0f..1bffc4ddb50 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAction.cs @@ -52,7 +52,7 @@ public PermissionsDefinitionAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PermissionsDefinitionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -85,7 +85,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAuthorizationSystem.cs b/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAuthorizationSystem.cs index 16b8e56382f..e94c145b23b 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAuthorizationSystem.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAuthorizationSystem.cs @@ -84,7 +84,7 @@ public PermissionsDefinitionAuthorizationSystem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PermissionsDefinitionAuthorizationSystem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionsDefinitionAuthorizationSystem(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("authorizationSystemId", AuthorizationSystemId); writer.WriteStringValue("authorizationSystemType", AuthorizationSystemType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAuthorizationSystemIdentity.cs b/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAuthorizationSystemIdentity.cs index 90ded7622c6..3da857fbf9e 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAuthorizationSystemIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAuthorizationSystemIdentity.cs @@ -90,7 +90,7 @@ public PermissionsDefinitionAuthorizationSystemIdentity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PermissionsDefinitionAuthorizationSystemIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionsDefinitionAuthorizationSystemIdentity(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("externalId", ExternalId); writer.WriteEnumValue("identityType", IdentityType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAwsPolicy.cs b/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAwsPolicy.cs index e1853f773dc..cdbf3ab6d0b 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAwsPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAwsPolicy.cs @@ -19,7 +19,7 @@ public partial class PermissionsDefinitionAwsPolicy : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionsDefinitionAwsPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionsDefinitionAwsPolicy(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAzureRole.cs b/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAzureRole.cs index 438a72e64a9..c02ab9897ed 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAzureRole.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionAzureRole.cs @@ -19,7 +19,7 @@ public partial class PermissionsDefinitionAzureRole : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionsDefinitionAzureRole CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionsDefinitionAzureRole(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionGcpRole.cs b/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionGcpRole.cs index 8a29721fdc6..b91cab65c27 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionGcpRole.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionGcpRole.cs @@ -19,7 +19,7 @@ public partial class PermissionsDefinitionGcpRole : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionsDefinitionGcpRole CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionsDefinitionGcpRole(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionIdentitySource.cs b/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionIdentitySource.cs index 1e0edfe2bb6..728c9773bd2 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionIdentitySource.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsDefinitionIdentitySource.cs @@ -52,7 +52,7 @@ public PermissionsDefinitionIdentitySource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PermissionsDefinitionIdentitySource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsManagement.cs b/src/Microsoft.Graph/Generated/Models/PermissionsManagement.cs index 122c21a3264..22cf80655b1 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsManagement.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsManagement.cs @@ -67,7 +67,7 @@ public partial class PermissionsManagement : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionsManagement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionsManagement(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("permissionsRequestChanges", PermissionsRequestChanges); writer.WriteCollectionOfObjectValues("scheduledPermissionsApprovals", ScheduledPermissionsApprovals); diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsRequestChange.cs b/src/Microsoft.Graph/Generated/Models/PermissionsRequestChange.cs index 0e5a74c433f..9c45721fb82 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsRequestChange.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsRequestChange.cs @@ -69,7 +69,7 @@ public string TicketId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionsRequestChange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionsRequestChange(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("activeOccurrenceStatus", ActiveOccurrenceStatus); writer.WriteDateTimeOffsetValue("modificationDateTime", ModificationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/PermissionsRequestChangeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PermissionsRequestChangeCollectionResponse.cs index ee5f3e79d59..0f51d3c6a06 100644 --- a/src/Microsoft.Graph/Generated/Models/PermissionsRequestChangeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PermissionsRequestChangeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PermissionsRequestChangeCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PermissionsRequestChangeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PermissionsRequestChangeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PersistentBrowserSessionControl.cs b/src/Microsoft.Graph/Generated/Models/PersistentBrowserSessionControl.cs index 572b51f2677..3733e783339 100644 --- a/src/Microsoft.Graph/Generated/Models/PersistentBrowserSessionControl.cs +++ b/src/Microsoft.Graph/Generated/Models/PersistentBrowserSessionControl.cs @@ -32,7 +32,7 @@ public PersistentBrowserSessionControl() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersistentBrowserSessionControl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersistentBrowserSessionControl(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("mode", Mode); } diff --git a/src/Microsoft.Graph/Generated/Models/Person.cs b/src/Microsoft.Graph/Generated/Models/Person.cs index 8cc286f6c10..a7825c6c593 100644 --- a/src/Microsoft.Graph/Generated/Models/Person.cs +++ b/src/Microsoft.Graph/Generated/Models/Person.cs @@ -329,7 +329,7 @@ public string YomiCompany /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Person CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Person(); } /// @@ -368,7 +368,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("birthday", Birthday); writer.WriteStringValue("companyName", CompanyName); diff --git a/src/Microsoft.Graph/Generated/Models/PersonAnnotation.cs b/src/Microsoft.Graph/Generated/Models/PersonAnnotation.cs index 6c74f99e870..b691bd3f7d0 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonAnnotation.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonAnnotation.cs @@ -74,7 +74,7 @@ public PersonAnnotation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonAnnotation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonAnnotation(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("detail", Detail); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/PersonAnnotationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PersonAnnotationCollectionResponse.cs index 8577a05d545..9677416e18e 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonAnnotationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonAnnotationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PersonAnnotationCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonAnnotationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonAnnotationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PersonAnnualEvent.cs b/src/Microsoft.Graph/Generated/Models/PersonAnnualEvent.cs index a746c372ce2..9f4bdea4dbe 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonAnnualEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonAnnualEvent.cs @@ -55,7 +55,7 @@ public PersonAnnualEvent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonAnnualEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonAnnualEvent(); } /// @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateValue("date", Date); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/PersonAnnualEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PersonAnnualEventCollectionResponse.cs index f1ebec4f056..548346f39c0 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonAnnualEventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonAnnualEventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PersonAnnualEventCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonAnnualEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonAnnualEventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PersonAward.cs b/src/Microsoft.Graph/Generated/Models/PersonAward.cs index 99e17527b38..d25d7b245a5 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonAward.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonAward.cs @@ -113,7 +113,7 @@ public PersonAward() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonAward CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonAward(); } /// @@ -138,7 +138,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/PersonAwardCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PersonAwardCollectionResponse.cs index a9d6f396ca0..80a54542f5c 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonAwardCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonAwardCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PersonAwardCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonAwardCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonAwardCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PersonCertification.cs b/src/Microsoft.Graph/Generated/Models/PersonCertification.cs index 7dded25e8b6..c59a9640a8c 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonCertification.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonCertification.cs @@ -157,7 +157,7 @@ public PersonCertification() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonCertification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonCertification(); } /// @@ -186,7 +186,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certificationId", CertificationId); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/PersonCertificationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PersonCertificationCollectionResponse.cs index fe1902120cd..d35ad521366 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonCertificationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonCertificationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PersonCertificationCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonCertificationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonCertificationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PersonCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PersonCollectionResponse.cs index bc2b5cb8630..1cbfe34b689 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PersonCollectionResponse : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PersonDataSource.cs b/src/Microsoft.Graph/Generated/Models/PersonDataSource.cs index c57911edc28..6d8891bd68b 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonDataSource.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonDataSource.cs @@ -68,7 +68,7 @@ public PersonDataSource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PersonDataSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonDataSource(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("type", Type); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PersonDataSources.cs b/src/Microsoft.Graph/Generated/Models/PersonDataSources.cs index 21c15a4f26a..9e7a35c1ebb 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonDataSources.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonDataSources.cs @@ -68,7 +68,7 @@ public PersonDataSources() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PersonDataSources CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonDataSources(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("type", Type); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PersonExtension.cs b/src/Microsoft.Graph/Generated/Models/PersonExtension.cs index 9ecc1b6d929..aae25518217 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonExtension.cs @@ -26,7 +26,7 @@ public PersonExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonExtension(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PersonInterest.cs b/src/Microsoft.Graph/Generated/Models/PersonInterest.cs index f127cf2c8a2..b422bec1fc3 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonInterest.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonInterest.cs @@ -122,7 +122,7 @@ public PersonInterest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonInterest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonInterest(); } /// @@ -147,7 +147,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("categories", Categories); writer.WriteCollectionOfPrimitiveValues("collaborationTags", CollaborationTags); diff --git a/src/Microsoft.Graph/Generated/Models/PersonInterestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PersonInterestCollectionResponse.cs index 1a333e30bbf..5d44351c345 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonInterestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonInterestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PersonInterestCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonInterestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonInterestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PersonName.cs b/src/Microsoft.Graph/Generated/Models/PersonName.cs index 2dde69b2827..2ef9b8cab8c 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonName.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonName.cs @@ -202,7 +202,7 @@ public PersonName() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonName CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonName(); } /// @@ -232,7 +232,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("first", First); diff --git a/src/Microsoft.Graph/Generated/Models/PersonNameCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PersonNameCollectionResponse.cs index a4ddb943aec..0e72b545db6 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonNameCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonNameCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PersonNameCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonNameCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonNameCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PersonNamePronounciation.cs b/src/Microsoft.Graph/Generated/Models/PersonNamePronounciation.cs index d6dc055e668..161b8729ec6 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonNamePronounciation.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonNamePronounciation.cs @@ -132,7 +132,7 @@ public PersonNamePronounciation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PersonNamePronounciation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonNamePronounciation(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("first", First); writer.WriteStringValue("last", Last); diff --git a/src/Microsoft.Graph/Generated/Models/PersonOrGroupColumn.cs b/src/Microsoft.Graph/Generated/Models/PersonOrGroupColumn.cs index 4f6efaab471..38d72d60a33 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonOrGroupColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonOrGroupColumn.cs @@ -90,7 +90,7 @@ public PersonOrGroupColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PersonOrGroupColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonOrGroupColumn(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowMultipleSelection", AllowMultipleSelection); writer.WriteStringValue("chooseFromType", ChooseFromType); writer.WriteStringValue("displayAs", DisplayAs); diff --git a/src/Microsoft.Graph/Generated/Models/PersonResponsibility.cs b/src/Microsoft.Graph/Generated/Models/PersonResponsibility.cs index 87d453b7db7..373fd0403cc 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonResponsibility.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonResponsibility.cs @@ -106,7 +106,7 @@ public PersonResponsibility() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonResponsibility CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonResponsibility(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("collaborationTags", CollaborationTags); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/PersonWebsite.cs b/src/Microsoft.Graph/Generated/Models/PersonWebsite.cs index 4b918c16255..7af742a2200 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonWebsite.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonWebsite.cs @@ -106,7 +106,7 @@ public PersonWebsite() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonWebsite CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonWebsite(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("categories", Categories); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/PersonWebsiteCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PersonWebsiteCollectionResponse.cs index 283d08b20d0..180793c07fa 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonWebsiteCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonWebsiteCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PersonWebsiteCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonWebsiteCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonWebsiteCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PersonalTeamsAppInstallationScopeInfo.cs b/src/Microsoft.Graph/Generated/Models/PersonalTeamsAppInstallationScopeInfo.cs index d694fc311f0..5c5b1851e71 100644 --- a/src/Microsoft.Graph/Generated/Models/PersonalTeamsAppInstallationScopeInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/PersonalTeamsAppInstallationScopeInfo.cs @@ -42,7 +42,7 @@ public PersonalTeamsAppInstallationScopeInfo() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PersonalTeamsAppInstallationScopeInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PersonalTeamsAppInstallationScopeInfo(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userId", UserId); } diff --git a/src/Microsoft.Graph/Generated/Models/Phone.cs b/src/Microsoft.Graph/Generated/Models/Phone.cs index 6e7e0a480c0..8ef42b7d887 100644 --- a/src/Microsoft.Graph/Generated/Models/Phone.cs +++ b/src/Microsoft.Graph/Generated/Models/Phone.cs @@ -74,7 +74,7 @@ public Phone() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Phone CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Phone(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("number", Number); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/Models/PhoneAuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/PhoneAuthenticationMethod.cs index b65f7544392..fc275b57efe 100644 --- a/src/Microsoft.Graph/Generated/Models/PhoneAuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/PhoneAuthenticationMethod.cs @@ -54,7 +54,7 @@ public PhoneAuthenticationMethod() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PhoneAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PhoneAuthenticationMethod(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("phoneNumber", PhoneNumber); writer.WriteEnumValue("phoneType", PhoneType); diff --git a/src/Microsoft.Graph/Generated/Models/PhoneAuthenticationMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PhoneAuthenticationMethodCollectionResponse.cs index 47d526ef5d5..ce1060ccada 100644 --- a/src/Microsoft.Graph/Generated/Models/PhoneAuthenticationMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PhoneAuthenticationMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PhoneAuthenticationMethodCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PhoneAuthenticationMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PhoneAuthenticationMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PhoneOptions.cs b/src/Microsoft.Graph/Generated/Models/PhoneOptions.cs index 3fd22159805..dae3f6bdc6b 100644 --- a/src/Microsoft.Graph/Generated/Models/PhoneOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/PhoneOptions.cs @@ -100,7 +100,7 @@ public PhoneOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PhoneOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PhoneOptions(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("defaultRegions", DefaultRegions); writer.WriteCollectionOfPrimitiveValues("excludeRegions", ExcludeRegions); writer.WriteCollectionOfPrimitiveValues("includeAdditionalRegions", IncludeAdditionalRegions); diff --git a/src/Microsoft.Graph/Generated/Models/PhoneUserConversationMember.cs b/src/Microsoft.Graph/Generated/Models/PhoneUserConversationMember.cs index 59a951756d0..cb32d45fe0a 100644 --- a/src/Microsoft.Graph/Generated/Models/PhoneUserConversationMember.cs +++ b/src/Microsoft.Graph/Generated/Models/PhoneUserConversationMember.cs @@ -42,7 +42,7 @@ public PhoneUserConversationMember() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PhoneUserConversationMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PhoneUserConversationMember(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("phoneNumber", PhoneNumber); } diff --git a/src/Microsoft.Graph/Generated/Models/Photo.cs b/src/Microsoft.Graph/Generated/Models/Photo.cs index f566aa7b4e4..8aaaaa68127 100644 --- a/src/Microsoft.Graph/Generated/Models/Photo.cs +++ b/src/Microsoft.Graph/Generated/Models/Photo.cs @@ -126,7 +126,7 @@ public Photo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Photo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Photo(); } /// @@ -155,7 +155,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("cameraMake", CameraMake); writer.WriteStringValue("cameraModel", CameraModel); writer.WriteDoubleValue("exposureDenominator", ExposureDenominator); diff --git a/src/Microsoft.Graph/Generated/Models/PhotoUpdateSettings.cs b/src/Microsoft.Graph/Generated/Models/PhotoUpdateSettings.cs index 81381cc3b88..24c65753cad 100644 --- a/src/Microsoft.Graph/Generated/Models/PhotoUpdateSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/PhotoUpdateSettings.cs @@ -35,7 +35,7 @@ public List AllowedRoles /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PhotoUpdateSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PhotoUpdateSettings(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("allowedRoles", AllowedRoles); } diff --git a/src/Microsoft.Graph/Generated/Models/PhysicalAddress.cs b/src/Microsoft.Graph/Generated/Models/PhysicalAddress.cs index 6629a6d6b47..37f544926ac 100644 --- a/src/Microsoft.Graph/Generated/Models/PhysicalAddress.cs +++ b/src/Microsoft.Graph/Generated/Models/PhysicalAddress.cs @@ -154,7 +154,7 @@ public PhysicalAddress() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PhysicalAddress CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PhysicalAddress(); } /// @@ -181,7 +181,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("city", City); writer.WriteStringValue("countryOrRegion", CountryOrRegion); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PhysicalOfficeAddress.cs b/src/Microsoft.Graph/Generated/Models/PhysicalOfficeAddress.cs index 4c92ef501a1..d5166cfc32c 100644 --- a/src/Microsoft.Graph/Generated/Models/PhysicalOfficeAddress.cs +++ b/src/Microsoft.Graph/Generated/Models/PhysicalOfficeAddress.cs @@ -148,7 +148,7 @@ public PhysicalOfficeAddress() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PhysicalOfficeAddress CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PhysicalOfficeAddress(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("city", City); writer.WriteStringValue("countryOrRegion", CountryOrRegion); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Picture.cs b/src/Microsoft.Graph/Generated/Models/Picture.cs index 49b116a2aec..4ecfada5c3c 100644 --- a/src/Microsoft.Graph/Generated/Models/Picture.cs +++ b/src/Microsoft.Graph/Generated/Models/Picture.cs @@ -102,7 +102,7 @@ public Picture() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Picture CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Picture(); } /// @@ -127,7 +127,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("content", Content); writer.WriteStringValue("contentType", ContentType); writer.WriteIntValue("height", Height); diff --git a/src/Microsoft.Graph/Generated/Models/PictureCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PictureCollectionResponse.cs index fd520a8ba34..6e489779923 100644 --- a/src/Microsoft.Graph/Generated/Models/PictureCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PictureCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PictureCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PictureCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PictureCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PinnedChatMessageInfo.cs b/src/Microsoft.Graph/Generated/Models/PinnedChatMessageInfo.cs index 44215ca3282..b75a0aa5da6 100644 --- a/src/Microsoft.Graph/Generated/Models/PinnedChatMessageInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/PinnedChatMessageInfo.cs @@ -35,7 +35,7 @@ public partial class PinnedChatMessageInfo : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PinnedChatMessageInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PinnedChatMessageInfo(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("message", Message); } diff --git a/src/Microsoft.Graph/Generated/Models/PinnedChatMessageInfoCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PinnedChatMessageInfoCollectionResponse.cs index a6aba86282b..acdc21b1af7 100644 --- a/src/Microsoft.Graph/Generated/Models/PinnedChatMessageInfoCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PinnedChatMessageInfoCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PinnedChatMessageInfoCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PinnedChatMessageInfoCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PinnedChatMessageInfoCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Pkcs12Certificate.cs b/src/Microsoft.Graph/Generated/Models/Pkcs12Certificate.cs index 11243ca44e8..e8d2be97b7a 100644 --- a/src/Microsoft.Graph/Generated/Models/Pkcs12Certificate.cs +++ b/src/Microsoft.Graph/Generated/Models/Pkcs12Certificate.cs @@ -58,7 +58,7 @@ public Pkcs12Certificate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Pkcs12Certificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Pkcs12Certificate(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("password", Password); writer.WriteStringValue("pkcs12Value", Pkcs12Value); diff --git a/src/Microsoft.Graph/Generated/Models/Pkcs12CertificateInformation.cs b/src/Microsoft.Graph/Generated/Models/Pkcs12CertificateInformation.cs index fff4395791e..d562989c529 100644 --- a/src/Microsoft.Graph/Generated/Models/Pkcs12CertificateInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/Pkcs12CertificateInformation.cs @@ -86,7 +86,7 @@ public Pkcs12CertificateInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Pkcs12CertificateInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Pkcs12CertificateInformation(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isActive", IsActive); writer.WriteLongValue("notAfter", NotAfter); writer.WriteLongValue("notBefore", NotBefore); diff --git a/src/Microsoft.Graph/Generated/Models/Place.cs b/src/Microsoft.Graph/Generated/Models/Place.cs index 9923e788e25..f3586d1c11f 100644 --- a/src/Microsoft.Graph/Generated/Models/Place.cs +++ b/src/Microsoft.Graph/Generated/Models/Place.cs @@ -153,7 +153,7 @@ public List Tags /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Place CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -192,7 +192,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("address", Address); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/PlaceMode.cs b/src/Microsoft.Graph/Generated/Models/PlaceMode.cs index d379fd56a0d..a37591a0080 100644 --- a/src/Microsoft.Graph/Generated/Models/PlaceMode.cs +++ b/src/Microsoft.Graph/Generated/Models/PlaceMode.cs @@ -52,7 +52,7 @@ public PlaceMode() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlaceMode CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Planner.cs b/src/Microsoft.Graph/Generated/Models/Planner.cs index 07f5219c4c8..6ba7fe6b177 100644 --- a/src/Microsoft.Graph/Generated/Models/Planner.cs +++ b/src/Microsoft.Graph/Generated/Models/Planner.cs @@ -83,7 +83,7 @@ public partial class Planner : global::Microsoft.Graph.Beta.Models.Entity, IPars /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Planner CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Planner(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("buckets", Buckets); writer.WriteCollectionOfObjectValues("plans", Plans); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerAppliedCategories.cs b/src/Microsoft.Graph/Generated/Models/PlannerAppliedCategories.cs index ebbfcc0c232..786b24f7d60 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerAppliedCategories.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerAppliedCategories.cs @@ -52,7 +52,7 @@ public PlannerAppliedCategories() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerAppliedCategories CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerAppliedCategories(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerApprovalRequirement.cs b/src/Microsoft.Graph/Generated/Models/PlannerApprovalRequirement.cs index 736db7af849..d1323edeff5 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerApprovalRequirement.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerApprovalRequirement.cs @@ -58,7 +58,7 @@ public PlannerApprovalRequirement() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerApprovalRequirement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerApprovalRequirement(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isApprovalRequired", IsApprovalRequired); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerArchivalInfo.cs b/src/Microsoft.Graph/Generated/Models/PlannerArchivalInfo.cs index ed079024fc9..f165a9ffc37 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerArchivalInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerArchivalInfo.cs @@ -90,7 +90,7 @@ public PlannerArchivalInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerArchivalInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerArchivalInfo(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("justification", Justification); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("statusChangedBy", StatusChangedBy); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerAssignedToTaskBoardTaskFormat.cs b/src/Microsoft.Graph/Generated/Models/PlannerAssignedToTaskBoardTaskFormat.cs index cd048ba1536..3c87cf62e97 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerAssignedToTaskBoardTaskFormat.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerAssignedToTaskBoardTaskFormat.cs @@ -51,7 +51,7 @@ public string UnassignedOrderHint /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("orderHintsByAssignee", OrderHintsByAssignee); writer.WriteStringValue("unassignedOrderHint", UnassignedOrderHint); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerAssignments.cs b/src/Microsoft.Graph/Generated/Models/PlannerAssignments.cs index 006bf0d1001..bff5aff024c 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerAssignments.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerAssignments.cs @@ -52,7 +52,7 @@ public PlannerAssignments() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerAssignments CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerAssignments(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerBaseApprovalAttachment.cs b/src/Microsoft.Graph/Generated/Models/PlannerBaseApprovalAttachment.cs index 35c22ffbaf4..5700d7c2f25 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerBaseApprovalAttachment.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerBaseApprovalAttachment.cs @@ -58,7 +58,7 @@ public PlannerBaseApprovalAttachment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerBaseApprovalAttachment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -84,7 +84,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("status", Status); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerBasicApprovalAttachment.cs b/src/Microsoft.Graph/Generated/Models/PlannerBasicApprovalAttachment.cs index 10672c5f97d..ecfcd3a068c 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerBasicApprovalAttachment.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerBasicApprovalAttachment.cs @@ -42,7 +42,7 @@ public PlannerBasicApprovalAttachment() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerBasicApprovalAttachment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerBasicApprovalAttachment(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("approvalId", ApprovalId); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerBucket.cs b/src/Microsoft.Graph/Generated/Models/PlannerBucket.cs index 82c3a891421..227c1a4c49d 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerBucket.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerBucket.cs @@ -121,7 +121,7 @@ public string PlanId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerBucket CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerBucket(); } /// @@ -147,7 +147,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("archivalInfo", ArchivalInfo); writer.WriteObjectValue("creationSource", CreationSource); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerBucketCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PlannerBucketCollectionResponse.cs index b4debc6f274..fb9410b18f8 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerBucketCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerBucketCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PlannerBucketCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerBucketCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerBucketCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerBucketCreation.cs b/src/Microsoft.Graph/Generated/Models/PlannerBucketCreation.cs index 0cb771814e9..19cfe1c6c29 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerBucketCreation.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerBucketCreation.cs @@ -58,7 +58,7 @@ public PlannerBucketCreation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerBucketCreation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -84,7 +84,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("creationSourceKind", CreationSourceKind); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerBucketTaskBoardTaskFormat.cs b/src/Microsoft.Graph/Generated/Models/PlannerBucketTaskBoardTaskFormat.cs index c86792dc569..a42f5251445 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerBucketTaskBoardTaskFormat.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerBucketTaskBoardTaskFormat.cs @@ -35,7 +35,7 @@ public string OrderHint /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("orderHint", OrderHint); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerCategoryDescriptions.cs b/src/Microsoft.Graph/Generated/Models/PlannerCategoryDescriptions.cs index 0b4b64167c4..136703689c0 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerCategoryDescriptions.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerCategoryDescriptions.cs @@ -452,7 +452,7 @@ public PlannerCategoryDescriptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerCategoryDescriptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerCategoryDescriptions(); } /// @@ -497,7 +497,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("category1", Category1); writer.WriteStringValue("category10", Category10); writer.WriteStringValue("category11", Category11); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerChecklistItems.cs b/src/Microsoft.Graph/Generated/Models/PlannerChecklistItems.cs index 21dd1055b67..3a1792084da 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerChecklistItems.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerChecklistItems.cs @@ -52,7 +52,7 @@ public PlannerChecklistItems() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerChecklistItems CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerChecklistItems(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerChecklistRequirement.cs b/src/Microsoft.Graph/Generated/Models/PlannerChecklistRequirement.cs index 4fe8740ac02..32088698754 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerChecklistRequirement.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerChecklistRequirement.cs @@ -68,7 +68,7 @@ public PlannerChecklistRequirement() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerChecklistRequirement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerChecklistRequirement(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("requiredChecklistItemIds", RequiredChecklistItemIds); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerDelta.cs b/src/Microsoft.Graph/Generated/Models/PlannerDelta.cs index c61c61b5598..75cdf033ada 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerDelta.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerDelta.cs @@ -19,7 +19,7 @@ public partial class PlannerDelta : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerDelta CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerDeltaCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PlannerDeltaCollectionResponse.cs index 3995b9e6480..01279cd4420 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerDeltaCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerDeltaCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PlannerDeltaCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerDeltaCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerDeltaCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerExternalBucketSource.cs b/src/Microsoft.Graph/Generated/Models/PlannerExternalBucketSource.cs index ddfafbe8471..b35517abc69 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerExternalBucketSource.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerExternalBucketSource.cs @@ -74,7 +74,7 @@ public PlannerExternalBucketSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerExternalBucketSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerExternalBucketSource(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contextScenarioId", ContextScenarioId); writer.WriteStringValue("externalContextId", ExternalContextId); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerExternalPlanSource.cs b/src/Microsoft.Graph/Generated/Models/PlannerExternalPlanSource.cs index 0a01c2f36f0..b76805dea74 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerExternalPlanSource.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerExternalPlanSource.cs @@ -74,7 +74,7 @@ public PlannerExternalPlanSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerExternalPlanSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerExternalPlanSource(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contextScenarioId", ContextScenarioId); writer.WriteStringValue("externalContextId", ExternalContextId); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerExternalReferences.cs b/src/Microsoft.Graph/Generated/Models/PlannerExternalReferences.cs index b4f77fe9ca2..fb2054d1f16 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerExternalReferences.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerExternalReferences.cs @@ -52,7 +52,7 @@ public PlannerExternalReferences() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerExternalReferences CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerExternalReferences(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerExternalTaskSource.cs b/src/Microsoft.Graph/Generated/Models/PlannerExternalTaskSource.cs index e172877023f..c737bd5ef0d 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerExternalTaskSource.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerExternalTaskSource.cs @@ -128,7 +128,7 @@ public PlannerExternalTaskSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerExternalTaskSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerExternalTaskSource(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contextScenarioId", ContextScenarioId); writer.WriteEnumValue("displayLinkType", DisplayLinkType); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerFavoritePlanReferenceCollection.cs b/src/Microsoft.Graph/Generated/Models/PlannerFavoritePlanReferenceCollection.cs index 5cc2db56be8..6ae27d91b7d 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerFavoritePlanReferenceCollection.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerFavoritePlanReferenceCollection.cs @@ -52,7 +52,7 @@ public PlannerFavoritePlanReferenceCollection() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerFavoritePlanReferenceCollection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerFavoritePlanReferenceCollection(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerFieldRules.cs b/src/Microsoft.Graph/Generated/Models/PlannerFieldRules.cs index 89565064b21..9043207f978 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerFieldRules.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerFieldRules.cs @@ -84,7 +84,7 @@ public PlannerFieldRules() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerFieldRules CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerFieldRules(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("defaultRules", DefaultRules); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("overrides", Overrides); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerFormsDictionary.cs b/src/Microsoft.Graph/Generated/Models/PlannerFormsDictionary.cs index a7a5298cc4d..e2d158b43f3 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerFormsDictionary.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerFormsDictionary.cs @@ -19,7 +19,7 @@ public partial class PlannerFormsDictionary : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerFormsDictionary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerFormsDictionary(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerFormsRequirement.cs b/src/Microsoft.Graph/Generated/Models/PlannerFormsRequirement.cs index c11688e1217..f8ef123215c 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerFormsRequirement.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerFormsRequirement.cs @@ -68,7 +68,7 @@ public PlannerFormsRequirement() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerFormsRequirement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerFormsRequirement(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("requiredForms", RequiredForms); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerGroup.cs b/src/Microsoft.Graph/Generated/Models/PlannerGroup.cs index 7af62de169a..63c0de38b12 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerGroup.cs @@ -35,7 +35,7 @@ public partial class PlannerGroup : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerGroup(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("plans", Plans); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerOrderHintsByAssignee.cs b/src/Microsoft.Graph/Generated/Models/PlannerOrderHintsByAssignee.cs index d1f5cc676d8..6b7926aae5a 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerOrderHintsByAssignee.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerOrderHintsByAssignee.cs @@ -52,7 +52,7 @@ public PlannerOrderHintsByAssignee() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerOrderHintsByAssignee CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerOrderHintsByAssignee(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerPlan.cs b/src/Microsoft.Graph/Generated/Models/PlannerPlan.cs index 98a546dede8..bbcc6f2757c 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerPlan.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerPlan.cs @@ -207,7 +207,7 @@ public string Title /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerPlan CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerPlan(); } /// @@ -239,7 +239,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("archivalInfo", ArchivalInfo); writer.WriteCollectionOfObjectValues("buckets", Buckets); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerPlanCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PlannerPlanCollectionResponse.cs index 48c69f634af..ed07240ffee 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerPlanCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerPlanCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PlannerPlanCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerPlanCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerPlanCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerPlanConfiguration.cs b/src/Microsoft.Graph/Generated/Models/PlannerPlanConfiguration.cs index fecd5aa9ef7..14ebe7fdffd 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerPlanConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerPlanConfiguration.cs @@ -111,7 +111,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerPlanConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerPlanConfiguration(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("buckets", Buckets); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationBucketDefinition.cs b/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationBucketDefinition.cs index 15f3f3c4e5c..f15fc2d5421 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationBucketDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationBucketDefinition.cs @@ -68,7 +68,7 @@ public PlannerPlanConfigurationBucketDefinition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerPlanConfigurationBucketDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerPlanConfigurationBucketDefinition(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("externalBucketId", ExternalBucketId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationBucketLocalization.cs b/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationBucketLocalization.cs index e22dc8779f0..5d165d74eeb 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationBucketLocalization.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationBucketLocalization.cs @@ -84,7 +84,7 @@ public PlannerPlanConfigurationBucketLocalization() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerPlanConfigurationBucketLocalization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerPlanConfigurationBucketLocalization(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("externalBucketId", ExternalBucketId); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationLocalization.cs b/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationLocalization.cs index a073a66d927..d4186346cc1 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationLocalization.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationLocalization.cs @@ -67,7 +67,7 @@ public string PlanTitle /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerPlanConfigurationLocalization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerPlanConfigurationLocalization(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("buckets", Buckets); writer.WriteStringValue("languageTag", LanguageTag); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationLocalizationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationLocalizationCollectionResponse.cs index 842d28208dd..92a0a3efccc 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationLocalizationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerPlanConfigurationLocalizationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PlannerPlanConfigurationLocalizationCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerPlanConfigurationLocalizationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerPlanConfigurationLocalizationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerPlanContainer.cs b/src/Microsoft.Graph/Generated/Models/PlannerPlanContainer.cs index df8a45194c8..478c66a56f6 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerPlanContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerPlanContainer.cs @@ -90,7 +90,7 @@ public PlannerPlanContainer() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerPlanContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -118,7 +118,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("containerId", ContainerId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerPlanContextCollection.cs b/src/Microsoft.Graph/Generated/Models/PlannerPlanContextCollection.cs index 10b80ecb681..dcd4d5034ed 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerPlanContextCollection.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerPlanContextCollection.cs @@ -52,7 +52,7 @@ public PlannerPlanContextCollection() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerPlanContextCollection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerPlanContextCollection(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerPlanContextDetailsCollection.cs b/src/Microsoft.Graph/Generated/Models/PlannerPlanContextDetailsCollection.cs index e0f2d2a15a2..de5d7b07543 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerPlanContextDetailsCollection.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerPlanContextDetailsCollection.cs @@ -52,7 +52,7 @@ public PlannerPlanContextDetailsCollection() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerPlanContextDetailsCollection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerPlanContextDetailsCollection(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerPlanCreation.cs b/src/Microsoft.Graph/Generated/Models/PlannerPlanCreation.cs index cdf8aa7f33e..12c1d49650d 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerPlanCreation.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerPlanCreation.cs @@ -58,7 +58,7 @@ public PlannerPlanCreation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerPlanCreation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -84,7 +84,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("creationSourceKind", CreationSourceKind); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerPlanDetails.cs b/src/Microsoft.Graph/Generated/Models/PlannerPlanDetails.cs index 6d5042a07fe..9fcbefde9d3 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerPlanDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerPlanDetails.cs @@ -67,7 +67,7 @@ public partial class PlannerPlanDetails : global::Microsoft.Graph.Beta.Models.Pl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerPlanDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerPlanDetails(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("categoryDescriptions", CategoryDescriptions); writer.WriteObjectValue("contextDetails", ContextDetails); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerProgressTaskBoardTaskFormat.cs b/src/Microsoft.Graph/Generated/Models/PlannerProgressTaskBoardTaskFormat.cs index 022ca348da4..4304de00a97 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerProgressTaskBoardTaskFormat.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerProgressTaskBoardTaskFormat.cs @@ -35,7 +35,7 @@ public string OrderHint /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("orderHint", OrderHint); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerPropertyRule.cs b/src/Microsoft.Graph/Generated/Models/PlannerPropertyRule.cs index ec6aab51bc1..db311bb8c37 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerPropertyRule.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerPropertyRule.cs @@ -58,7 +58,7 @@ public PlannerPropertyRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerPropertyRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -84,7 +84,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("ruleKind", RuleKind); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerRecentPlanReferenceCollection.cs b/src/Microsoft.Graph/Generated/Models/PlannerRecentPlanReferenceCollection.cs index 634c6cb1229..b447421440a 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerRecentPlanReferenceCollection.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerRecentPlanReferenceCollection.cs @@ -52,7 +52,7 @@ public PlannerRecentPlanReferenceCollection() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerRecentPlanReferenceCollection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerRecentPlanReferenceCollection(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerRecurrenceSchedule.cs b/src/Microsoft.Graph/Generated/Models/PlannerRecurrenceSchedule.cs index 682da4e6e56..c68762f42c2 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerRecurrenceSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerRecurrenceSchedule.cs @@ -80,7 +80,7 @@ public PlannerRecurrenceSchedule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerRecurrenceSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerRecurrenceSchedule(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("nextOccurrenceDateTime", NextOccurrenceDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("pattern", Pattern); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerRelationshipBasedUserType.cs b/src/Microsoft.Graph/Generated/Models/PlannerRelationshipBasedUserType.cs index 478089d2579..fc6b57c6b12 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerRelationshipBasedUserType.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerRelationshipBasedUserType.cs @@ -32,7 +32,7 @@ public PlannerRelationshipBasedUserType() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerRelationshipBasedUserType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerRelationshipBasedUserType(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("role", Role); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerRoster.cs b/src/Microsoft.Graph/Generated/Models/PlannerRoster.cs index 48c9be55cbf..193f76b872a 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerRoster.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerRoster.cs @@ -67,7 +67,7 @@ public partial class PlannerRoster : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerRoster CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerRoster(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("assignedSensitivityLabel", AssignedSensitivityLabel); writer.WriteCollectionOfObjectValues("members", Members); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerRosterCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PlannerRosterCollectionResponse.cs index 00a0dbacea8..a9767a525be 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerRosterCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerRosterCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PlannerRosterCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerRosterCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerRosterCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerRosterMember.cs b/src/Microsoft.Graph/Generated/Models/PlannerRosterMember.cs index a494fa05203..65274b180ce 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerRosterMember.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerRosterMember.cs @@ -67,7 +67,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerRosterMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerRosterMember(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("roles", Roles); writer.WriteStringValue("tenantId", TenantId); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerRosterMemberCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PlannerRosterMemberCollectionResponse.cs index f3816768937..10d52e60340 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerRosterMemberCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerRosterMemberCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PlannerRosterMemberCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerRosterMemberCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerRosterMemberCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerRuleOverride.cs b/src/Microsoft.Graph/Generated/Models/PlannerRuleOverride.cs index 2d98a32fa37..d6e5f88b92e 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerRuleOverride.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerRuleOverride.cs @@ -84,7 +84,7 @@ public PlannerRuleOverride() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerRuleOverride CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerRuleOverride(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("rules", Rules); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerSharedWithContainer.cs b/src/Microsoft.Graph/Generated/Models/PlannerSharedWithContainer.cs index 309e9c9de21..938ffe876f3 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerSharedWithContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerSharedWithContainer.cs @@ -32,7 +32,7 @@ public PlannerSharedWithContainer() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerSharedWithContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerSharedWithContainer(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessLevel", AccessLevel); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerTask.cs b/src/Microsoft.Graph/Generated/Models/PlannerTask.cs index 37357b16c54..3661fd894d1 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerTask.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerTask.cs @@ -404,7 +404,7 @@ public string Title /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerTask CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -462,7 +462,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activeChecklistItemCount", ActiveChecklistItemCount); writer.WriteObjectValue("appliedCategories", AppliedCategories); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerTaskCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PlannerTaskCollectionResponse.cs index ae1943aba52..4f8f1f5e431 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerTaskCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerTaskCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PlannerTaskCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerTaskCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerTaskCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerTaskCompletionRequirementDetails.cs b/src/Microsoft.Graph/Generated/Models/PlannerTaskCompletionRequirementDetails.cs index 32ae1374c60..3bf32efc982 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerTaskCompletionRequirementDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerTaskCompletionRequirementDetails.cs @@ -100,7 +100,7 @@ public PlannerTaskCompletionRequirementDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerTaskCompletionRequirementDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerTaskCompletionRequirementDetails(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("approvalRequirement", ApprovalRequirement); writer.WriteObjectValue("checklistRequirement", ChecklistRequirement); writer.WriteObjectValue("formsRequirement", FormsRequirement); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerTaskConfiguration.cs b/src/Microsoft.Graph/Generated/Models/PlannerTaskConfiguration.cs index a8457d83a17..38f6454b0ee 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerTaskConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerTaskConfiguration.cs @@ -35,7 +35,7 @@ public partial class PlannerTaskConfiguration : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerTaskConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerTaskConfiguration(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("editPolicy", EditPolicy); } diff --git a/src/Microsoft.Graph/Generated/Models/PlannerTaskConfigurationRoleBase.cs b/src/Microsoft.Graph/Generated/Models/PlannerTaskConfigurationRoleBase.cs index a9eb1b0b7f0..511087c083b 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerTaskConfigurationRoleBase.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerTaskConfigurationRoleBase.cs @@ -58,7 +58,7 @@ public PlannerTaskConfigurationRoleBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerTaskConfigurationRoleBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -84,7 +84,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("roleKind", RoleKind); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerTaskCreation.cs b/src/Microsoft.Graph/Generated/Models/PlannerTaskCreation.cs index 815ee52e7e9..435c0e4493f 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerTaskCreation.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerTaskCreation.cs @@ -74,7 +74,7 @@ public PlannerTaskCreation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerTaskCreation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -102,7 +102,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("creationSourceKind", CreationSourceKind); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("teamsPublicationInfo", TeamsPublicationInfo); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerTaskDetails.cs b/src/Microsoft.Graph/Generated/Models/PlannerTaskDetails.cs index 5d1a8b89c82..b32c147eb41 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerTaskDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerTaskDetails.cs @@ -137,7 +137,7 @@ public string Description /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerTaskDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerTaskDetails(); } /// @@ -164,7 +164,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("approvalAttachment", ApprovalAttachment); writer.WriteObjectValue("checklist", Checklist); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerTaskPolicy.cs b/src/Microsoft.Graph/Generated/Models/PlannerTaskPolicy.cs index d02b1c5bfad..f1c90d48632 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerTaskPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerTaskPolicy.cs @@ -68,7 +68,7 @@ public PlannerTaskPolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerTaskPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerTaskPolicy(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("rules", Rules); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerTaskPropertyRule.cs b/src/Microsoft.Graph/Generated/Models/PlannerTaskPropertyRule.cs index 58e75f56256..386852b3d32 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerTaskPropertyRule.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerTaskPropertyRule.cs @@ -298,7 +298,7 @@ public PlannerTaskPropertyRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerTaskPropertyRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerTaskPropertyRule(); } /// @@ -334,7 +334,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("appliedCategories", AppliedCategories); writer.WriteObjectValue("approvalAttachment", ApprovalAttachment); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerTaskRecurrence.cs b/src/Microsoft.Graph/Generated/Models/PlannerTaskRecurrence.cs index 5f9897331f7..e9f5ee47864 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerTaskRecurrence.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerTaskRecurrence.cs @@ -128,7 +128,7 @@ public PlannerTaskRecurrence() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerTaskRecurrence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerTaskRecurrence(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("nextInSeriesTaskId", NextInSeriesTaskId); writer.WriteIntValue("occurrenceId", OccurrenceId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerTaskRoleBasedRule.cs b/src/Microsoft.Graph/Generated/Models/PlannerTaskRoleBasedRule.cs index 488ff5143e2..99c86fc66e0 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerTaskRoleBasedRule.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerTaskRoleBasedRule.cs @@ -100,7 +100,7 @@ public PlannerTaskRoleBasedRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerTaskRoleBasedRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerTaskRoleBasedRule(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("defaultRule", DefaultRule); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("propertyRule", PropertyRule); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerTeamsPublicationInfo.cs b/src/Microsoft.Graph/Generated/Models/PlannerTeamsPublicationInfo.cs index 0405ed0b5ea..1ce0aa9a59f 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerTeamsPublicationInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerTeamsPublicationInfo.cs @@ -128,7 +128,7 @@ public PlannerTeamsPublicationInfo() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerTeamsPublicationInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerTeamsPublicationInfo(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerUser.cs b/src/Microsoft.Graph/Generated/Models/PlannerUser.cs index fc8bdfa2bbc..59281ecd13c 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerUser.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerUser.cs @@ -163,7 +163,7 @@ public partial class PlannerUser : global::Microsoft.Graph.Beta.Models.PlannerDe /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlannerUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerUser(); } /// @@ -191,7 +191,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("all", All); writer.WriteObjectValue("favoritePlanReferences", FavoritePlanReferences); diff --git a/src/Microsoft.Graph/Generated/Models/PlannerUserIds.cs b/src/Microsoft.Graph/Generated/Models/PlannerUserIds.cs index 2caa01c0af8..759c517f832 100644 --- a/src/Microsoft.Graph/Generated/Models/PlannerUserIds.cs +++ b/src/Microsoft.Graph/Generated/Models/PlannerUserIds.cs @@ -52,7 +52,7 @@ public PlannerUserIds() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PlannerUserIds CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlannerUserIds(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/PlatformCredentialAuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/PlatformCredentialAuthenticationMethod.cs index 51a5e51d906..916d9cc69eb 100644 --- a/src/Microsoft.Graph/Generated/Models/PlatformCredentialAuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/PlatformCredentialAuthenticationMethod.cs @@ -70,7 +70,7 @@ public PlatformCredentialAuthenticationMethod() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlatformCredentialAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlatformCredentialAuthenticationMethod(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("device", Device); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/PlatformCredentialAuthenticationMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PlatformCredentialAuthenticationMethodCollectionResponse.cs index 05843de895c..90870287d99 100644 --- a/src/Microsoft.Graph/Generated/Models/PlatformCredentialAuthenticationMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PlatformCredentialAuthenticationMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PlatformCredentialAuthenticationMethodCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlatformCredentialAuthenticationMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlatformCredentialAuthenticationMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PlayPromptOperation.cs b/src/Microsoft.Graph/Generated/Models/PlayPromptOperation.cs index f52da6d02fd..649777a41e7 100644 --- a/src/Microsoft.Graph/Generated/Models/PlayPromptOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/PlayPromptOperation.cs @@ -25,7 +25,7 @@ public partial class PlayPromptOperation : global::Microsoft.Graph.Beta.Models.C /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PlayPromptOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PlayPromptOperation(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("completionReason", CompletionReason); } diff --git a/src/Microsoft.Graph/Generated/Models/PolicyBase.cs b/src/Microsoft.Graph/Generated/Models/PolicyBase.cs index 098f253874f..bfc20eda61a 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicyBase.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicyBase.cs @@ -58,7 +58,7 @@ public PolicyBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicyBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -98,7 +98,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/PolicyBinding.cs b/src/Microsoft.Graph/Generated/Models/PolicyBinding.cs index 529de1f99ca..76ee755407a 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicyBinding.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicyBinding.cs @@ -84,7 +84,7 @@ public PolicyBinding() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PolicyBinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicyBinding(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("exclusions", Exclusions); writer.WriteCollectionOfObjectValues("inclusions", Inclusions); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PolicyFile.cs b/src/Microsoft.Graph/Generated/Models/PolicyFile.cs index 8922cf368f2..5da83aefa04 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicyFile.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicyFile.cs @@ -63,7 +63,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicyFile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicyFile(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); writer.WriteEnumValue("fileType", FileType); diff --git a/src/Microsoft.Graph/Generated/Models/PolicyFileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PolicyFileCollectionResponse.cs index 2957817061c..85b20db5873 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicyFileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicyFileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PolicyFileCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicyFileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicyFileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PolicyLocation.cs b/src/Microsoft.Graph/Generated/Models/PolicyLocation.cs index e93b3c1815e..573bc4be1fe 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicyLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicyLocation.cs @@ -68,7 +68,7 @@ public PolicyLocation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PolicyLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PolicyLocationApplication.cs b/src/Microsoft.Graph/Generated/Models/PolicyLocationApplication.cs index 7e3dba2946e..a793e84d54c 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicyLocationApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicyLocationApplication.cs @@ -26,7 +26,7 @@ public PolicyLocationApplication() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicyLocationApplication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicyLocationApplication(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PolicyLocationDomain.cs b/src/Microsoft.Graph/Generated/Models/PolicyLocationDomain.cs index 7b451401b7a..8ccb44b2790 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicyLocationDomain.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicyLocationDomain.cs @@ -26,7 +26,7 @@ public PolicyLocationDomain() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicyLocationDomain CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicyLocationDomain(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PolicyLocationUrl.cs b/src/Microsoft.Graph/Generated/Models/PolicyLocationUrl.cs index 6d49a94366f..376cec5c3d9 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicyLocationUrl.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicyLocationUrl.cs @@ -26,7 +26,7 @@ public PolicyLocationUrl() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicyLocationUrl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicyLocationUrl(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PolicyRoot.cs b/src/Microsoft.Graph/Generated/Models/PolicyRoot.cs index 73fabc1db0f..993121cadb5 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicyRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicyRoot.cs @@ -467,7 +467,7 @@ public partial class PolicyRoot : global::Microsoft.Graph.Beta.Models.Entity, IP /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicyRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicyRoot(); } /// @@ -514,7 +514,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("accessReviewPolicy", AccessReviewPolicy); writer.WriteCollectionOfObjectValues("activityBasedTimeoutPolicies", ActivityBasedTimeoutPolicies); diff --git a/src/Microsoft.Graph/Generated/Models/PolicyScopeBase.cs b/src/Microsoft.Graph/Generated/Models/PolicyScopeBase.cs index 7bb6495ab05..fbef732224b 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicyScopeBase.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicyScopeBase.cs @@ -96,7 +96,7 @@ public PolicyScopeBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PolicyScopeBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -126,7 +126,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("activities", Activities); writer.WriteEnumValue("executionMode", ExecutionMode); writer.WriteCollectionOfObjectValues("locations", Locations); diff --git a/src/Microsoft.Graph/Generated/Models/PolicySet.cs b/src/Microsoft.Graph/Generated/Models/PolicySet.cs index 19db8c87caf..89b2d78e6f2 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicySet.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicySet.cs @@ -140,7 +140,7 @@ public List RoleScopeTags /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicySet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicySet(); } /// @@ -169,7 +169,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/PolicySetAssignment.cs b/src/Microsoft.Graph/Generated/Models/PolicySetAssignment.cs index cbf8d468ac1..4292004f94d 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicySetAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicySetAssignment.cs @@ -42,7 +42,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicySetAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicySetAssignment(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteObjectValue("target", Target); diff --git a/src/Microsoft.Graph/Generated/Models/PolicySetAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PolicySetAssignmentCollectionResponse.cs index 94b0de69ab6..54ed41634ff 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicySetAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicySetAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PolicySetAssignmentCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicySetAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicySetAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PolicySetCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PolicySetCollectionResponse.cs index 1d3eaa81db7..b5f83a2d3e0 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicySetCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicySetCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PolicySetCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicySetCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicySetCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PolicySetItem.cs b/src/Microsoft.Graph/Generated/Models/PolicySetItem.cs index 577100b00c1..8294345b1b7 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicySetItem.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicySetItem.cs @@ -108,7 +108,7 @@ public string PayloadId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicySetItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -152,7 +152,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/PolicySetItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PolicySetItemCollectionResponse.cs index 05deb22714d..d051a416c66 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicySetItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicySetItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PolicySetItemCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicySetItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicySetItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PolicyTemplate.cs b/src/Microsoft.Graph/Generated/Models/PolicyTemplate.cs index 1dcb2e29bac..1e11326dfa7 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicyTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicyTemplate.cs @@ -51,7 +51,7 @@ public partial class PolicyTemplate : global::Microsoft.Graph.Beta.Models.Entity /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicyTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicyTemplate(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("multiTenantOrganizationIdentitySynchronization", MultiTenantOrganizationIdentitySynchronization); writer.WriteObjectValue("multiTenantOrganizationPartnerConfiguration", MultiTenantOrganizationPartnerConfiguration); diff --git a/src/Microsoft.Graph/Generated/Models/PolicyTenantScope.cs b/src/Microsoft.Graph/Generated/Models/PolicyTenantScope.cs index 72c5e5c9d29..07933565f34 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicyTenantScope.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicyTenantScope.cs @@ -42,7 +42,7 @@ public PolicyTenantScope() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicyTenantScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicyTenantScope(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("policyScope", PolicyScope); } diff --git a/src/Microsoft.Graph/Generated/Models/PolicyUserScope.cs b/src/Microsoft.Graph/Generated/Models/PolicyUserScope.cs index c67f7dc4f24..3519f3acfdc 100644 --- a/src/Microsoft.Graph/Generated/Models/PolicyUserScope.cs +++ b/src/Microsoft.Graph/Generated/Models/PolicyUserScope.cs @@ -26,7 +26,7 @@ public PolicyUserScope() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PolicyUserScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PolicyUserScope(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PositionDetail.cs b/src/Microsoft.Graph/Generated/Models/PositionDetail.cs index fa80824855e..7920253a8f8 100644 --- a/src/Microsoft.Graph/Generated/Models/PositionDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/PositionDetail.cs @@ -231,7 +231,7 @@ public PositionDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PositionDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PositionDetail(); } /// @@ -264,7 +264,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("company", Company); writer.WriteStringValue("description", Description); writer.WriteStringValue("employeeId", EmployeeId); diff --git a/src/Microsoft.Graph/Generated/Models/PositiveReinforcementNotification.cs b/src/Microsoft.Graph/Generated/Models/PositiveReinforcementNotification.cs index 2e69b04fc76..00759b9ca2c 100644 --- a/src/Microsoft.Graph/Generated/Models/PositiveReinforcementNotification.cs +++ b/src/Microsoft.Graph/Generated/Models/PositiveReinforcementNotification.cs @@ -32,7 +32,7 @@ public PositiveReinforcementNotification() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PositiveReinforcementNotification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PositiveReinforcementNotification(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("deliveryPreference", DeliveryPreference); } diff --git a/src/Microsoft.Graph/Generated/Models/Post.cs b/src/Microsoft.Graph/Generated/Models/Post.cs index 7c96cc059be..a2a6e9ecf66 100644 --- a/src/Microsoft.Graph/Generated/Models/Post.cs +++ b/src/Microsoft.Graph/Generated/Models/Post.cs @@ -236,7 +236,7 @@ public Post() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Post CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Post(); } /// @@ -270,7 +270,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("attachments", Attachments); writer.WriteObjectValue("body", Body); diff --git a/src/Microsoft.Graph/Generated/Models/PostCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PostCollectionResponse.cs index 95832573c6d..c5864e522a4 100644 --- a/src/Microsoft.Graph/Generated/Models/PostCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PostCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PostCollectionResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PostCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PostCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PostalAddressType.cs b/src/Microsoft.Graph/Generated/Models/PostalAddressType.cs index be9ee273db7..d26a7bee2ca 100644 --- a/src/Microsoft.Graph/Generated/Models/PostalAddressType.cs +++ b/src/Microsoft.Graph/Generated/Models/PostalAddressType.cs @@ -132,7 +132,7 @@ public PostalAddressType() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PostalAddressType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PostalAddressType(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("city", City); writer.WriteStringValue("countryLetterCode", CountryLetterCode); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PowerliftAppDiagnosticDownloadRequest.cs b/src/Microsoft.Graph/Generated/Models/PowerliftAppDiagnosticDownloadRequest.cs index 7f616d4d41e..03765f7360e 100644 --- a/src/Microsoft.Graph/Generated/Models/PowerliftAppDiagnosticDownloadRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/PowerliftAppDiagnosticDownloadRequest.cs @@ -85,7 +85,7 @@ public PowerliftAppDiagnosticDownloadRequest() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PowerliftAppDiagnosticDownloadRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PowerliftAppDiagnosticDownloadRequest(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("files", Files); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("powerliftId", PowerliftId); diff --git a/src/Microsoft.Graph/Generated/Models/PowerliftDownloadRequest.cs b/src/Microsoft.Graph/Generated/Models/PowerliftDownloadRequest.cs index 5018ae134c7..23268f7d4b7 100644 --- a/src/Microsoft.Graph/Generated/Models/PowerliftDownloadRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/PowerliftDownloadRequest.cs @@ -75,7 +75,7 @@ public PowerliftDownloadRequest() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PowerliftDownloadRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PowerliftDownloadRequest(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("files", Files); writer.WriteStringValue("@odata.type", OdataType); writer.WriteGuidValue("powerliftId", PowerliftId); diff --git a/src/Microsoft.Graph/Generated/Models/PowerliftIncidentDetail.cs b/src/Microsoft.Graph/Generated/Models/PowerliftIncidentDetail.cs index 4b639659ad7..37da8f1bb80 100644 --- a/src/Microsoft.Graph/Generated/Models/PowerliftIncidentDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/PowerliftIncidentDetail.cs @@ -171,7 +171,7 @@ public PowerliftIncidentDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PowerliftIncidentDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PowerliftIncidentDetail(); } /// @@ -199,7 +199,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applicationName", ApplicationName); writer.WriteStringValue("clientApplicationVersion", ClientApplicationVersion); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/PowerliftIncidentMetadata.cs b/src/Microsoft.Graph/Generated/Models/PowerliftIncidentMetadata.cs index 7cde0432d7a..d7e952c9db6 100644 --- a/src/Microsoft.Graph/Generated/Models/PowerliftIncidentMetadata.cs +++ b/src/Microsoft.Graph/Generated/Models/PowerliftIncidentMetadata.cs @@ -161,7 +161,7 @@ public PowerliftIncidentMetadata() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PowerliftIncidentMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PowerliftIncidentMetadata(); } /// @@ -189,7 +189,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("application", Application); writer.WriteStringValue("clientVersion", ClientVersion); writer.WriteDateTimeOffsetValue("createdAtDateTime", CreatedAtDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/PreApprovalDetail.cs b/src/Microsoft.Graph/Generated/Models/PreApprovalDetail.cs index 789faa01282..e60cf3d4460 100644 --- a/src/Microsoft.Graph/Generated/Models/PreApprovalDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/PreApprovalDetail.cs @@ -90,7 +90,7 @@ public PreApprovalDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PreApprovalDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PreApprovalDetail(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("permissions", Permissions); writer.WriteEnumValue("scopeType", ScopeType); diff --git a/src/Microsoft.Graph/Generated/Models/PreApprovedPermissions.cs b/src/Microsoft.Graph/Generated/Models/PreApprovedPermissions.cs index ed43b21a04c..460f70d773f 100644 --- a/src/Microsoft.Graph/Generated/Models/PreApprovedPermissions.cs +++ b/src/Microsoft.Graph/Generated/Models/PreApprovedPermissions.cs @@ -64,7 +64,7 @@ public PreApprovedPermissions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PreApprovedPermissions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("permissionKind", PermissionKind); writer.WriteEnumValue("permissionType", PermissionType); diff --git a/src/Microsoft.Graph/Generated/Models/PreAuthorizedApplication.cs b/src/Microsoft.Graph/Generated/Models/PreAuthorizedApplication.cs index 27c1c8fabc7..0b228f66e72 100644 --- a/src/Microsoft.Graph/Generated/Models/PreAuthorizedApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/PreAuthorizedApplication.cs @@ -84,7 +84,7 @@ public PreAuthorizedApplication() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PreAuthorizedApplication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PreAuthorizedApplication(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("permissionIds", PermissionIds); diff --git a/src/Microsoft.Graph/Generated/Models/Presence.cs b/src/Microsoft.Graph/Generated/Models/Presence.cs index 6e565c4e530..eeed46f4bf1 100644 --- a/src/Microsoft.Graph/Generated/Models/Presence.cs +++ b/src/Microsoft.Graph/Generated/Models/Presence.cs @@ -99,7 +99,7 @@ public string SequenceNumber /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Presence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Presence(); } /// @@ -123,7 +123,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("activity", Activity); writer.WriteStringValue("availability", Availability); diff --git a/src/Microsoft.Graph/Generated/Models/PresenceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PresenceCollectionResponse.cs index ffd65cd4e4a..8dd1d23e9f5 100644 --- a/src/Microsoft.Graph/Generated/Models/PresenceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PresenceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PresenceCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PresenceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PresenceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PresenceStatusMessage.cs b/src/Microsoft.Graph/Generated/Models/PresenceStatusMessage.cs index fb8c8fbc3e1..62e8431744c 100644 --- a/src/Microsoft.Graph/Generated/Models/PresenceStatusMessage.cs +++ b/src/Microsoft.Graph/Generated/Models/PresenceStatusMessage.cs @@ -90,7 +90,7 @@ public PresenceStatusMessage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PresenceStatusMessage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PresenceStatusMessage(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("expiryDateTime", ExpiryDateTime); writer.WriteObjectValue("message", Message); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Presentation.cs b/src/Microsoft.Graph/Generated/Models/Presentation.cs index e2185f498ea..bc7f6fac434 100644 --- a/src/Microsoft.Graph/Generated/Models/Presentation.cs +++ b/src/Microsoft.Graph/Generated/Models/Presentation.cs @@ -35,7 +35,7 @@ public partial class Presentation : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Presentation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Presentation(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("comments", Comments); } diff --git a/src/Microsoft.Graph/Generated/Models/PrincipalResourceMembershipsScope.cs b/src/Microsoft.Graph/Generated/Models/PrincipalResourceMembershipsScope.cs index a93586d6b13..3ae2c005527 100644 --- a/src/Microsoft.Graph/Generated/Models/PrincipalResourceMembershipsScope.cs +++ b/src/Microsoft.Graph/Generated/Models/PrincipalResourceMembershipsScope.cs @@ -58,7 +58,7 @@ public PrincipalResourceMembershipsScope() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrincipalResourceMembershipsScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrincipalResourceMembershipsScope(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("principalScopes", PrincipalScopes); writer.WriteCollectionOfObjectValues("resourceScopes", ResourceScopes); diff --git a/src/Microsoft.Graph/Generated/Models/Print.cs b/src/Microsoft.Graph/Generated/Models/Print.cs index 540ae700de4..447a5fb5210 100644 --- a/src/Microsoft.Graph/Generated/Models/Print.cs +++ b/src/Microsoft.Graph/Generated/Models/Print.cs @@ -180,7 +180,7 @@ public Print() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Print CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Print(); } /// @@ -208,7 +208,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("connectors", Connectors); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("operations", Operations); diff --git a/src/Microsoft.Graph/Generated/Models/PrintCertificateSigningRequest.cs b/src/Microsoft.Graph/Generated/Models/PrintCertificateSigningRequest.cs index 7937e0dbf09..09f49c2e75d 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintCertificateSigningRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintCertificateSigningRequest.cs @@ -84,7 +84,7 @@ public PrintCertificateSigningRequest() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrintCertificateSigningRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintCertificateSigningRequest(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("content", Content); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("transportKey", TransportKey); diff --git a/src/Microsoft.Graph/Generated/Models/PrintConnector.cs b/src/Microsoft.Graph/Generated/Models/PrintConnector.cs index 390da3a17f5..8f13d56a503 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintConnector.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintConnector.cs @@ -137,7 +137,7 @@ public DateTimeOffset? RegisteredDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintConnector CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintConnector(); } /// @@ -164,7 +164,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appVersion", AppVersion); writer.WriteObjectValue("deviceHealth", DeviceHealth); diff --git a/src/Microsoft.Graph/Generated/Models/PrintConnectorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrintConnectorCollectionResponse.cs index b0fa221c233..a93136154f0 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintConnectorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintConnectorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrintConnectorCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintConnectorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintConnectorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrintDocument.cs b/src/Microsoft.Graph/Generated/Models/PrintDocument.cs index ca7fc177700..02f031099ec 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintDocument.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintDocument.cs @@ -85,7 +85,7 @@ public DateTimeOffset? UploadedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintDocument CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintDocument(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("configuration", Configuration); writer.WriteStringValue("contentType", ContentType); diff --git a/src/Microsoft.Graph/Generated/Models/PrintDocumentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrintDocumentCollectionResponse.cs index a99a0f82e36..b199a848f6e 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintDocumentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintDocumentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrintDocumentCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintDocumentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintDocumentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrintDocumentUploadProperties.cs b/src/Microsoft.Graph/Generated/Models/PrintDocumentUploadProperties.cs index 12cceafa9ef..cf33a0c50ea 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintDocumentUploadProperties.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintDocumentUploadProperties.cs @@ -90,7 +90,7 @@ public PrintDocumentUploadProperties() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrintDocumentUploadProperties CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintDocumentUploadProperties(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("contentType", ContentType); writer.WriteStringValue("documentName", DocumentName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PrintJob.cs b/src/Microsoft.Graph/Generated/Models/PrintJob.cs index f7dc1ce3f77..739525fdd5e 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintJob.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintJob.cs @@ -177,7 +177,7 @@ public string RedirectedTo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintJob CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintJob(); } /// @@ -209,7 +209,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("acknowledgedDateTime", AcknowledgedDateTime); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/PrintJobCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrintJobCollectionResponse.cs index decd24aa694..44bf6cd964d 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintJobCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintJobCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrintJobCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintJobCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintJobCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrintJobConfiguration.cs b/src/Microsoft.Graph/Generated/Models/PrintJobConfiguration.cs index 8178d5cd72c..afd80d48d6b 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintJobConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintJobConfiguration.cs @@ -236,7 +236,7 @@ public PrintJobConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrintJobConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintJobConfiguration(); } /// @@ -275,7 +275,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("collate", Collate); writer.WriteEnumValue("colorMode", ColorMode); writer.WriteIntValue("copies", Copies); diff --git a/src/Microsoft.Graph/Generated/Models/PrintJobStatus.cs b/src/Microsoft.Graph/Generated/Models/PrintJobStatus.cs index 430b03db478..2950ca93e9b 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintJobStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintJobStatus.cs @@ -124,7 +124,7 @@ public PrintJobStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrintJobStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintJobStatus(); } /// @@ -151,7 +151,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("acquiredByPrinter", AcquiredByPrinter); writer.WriteStringValue("description", Description); writer.WriteCollectionOfEnumValues("details", Details); diff --git a/src/Microsoft.Graph/Generated/Models/PrintMargin.cs b/src/Microsoft.Graph/Generated/Models/PrintMargin.cs index 29c6a0682d8..fbcfe7a0791 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintMargin.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintMargin.cs @@ -76,7 +76,7 @@ public PrintMargin() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrintMargin CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintMargin(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("bottom", Bottom); writer.WriteIntValue("left", Left); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PrintOperation.cs b/src/Microsoft.Graph/Generated/Models/PrintOperation.cs index 66387125c68..a56f5d8a13c 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintOperation.cs @@ -41,7 +41,7 @@ public DateTimeOffset? CreatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteObjectValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/PrintOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrintOperationCollectionResponse.cs index ceaf6d60521..974b97a6a0b 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrintOperationCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrintOperationStatus.cs b/src/Microsoft.Graph/Generated/Models/PrintOperationStatus.cs index 14737a55c66..5fc2074258f 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintOperationStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintOperationStatus.cs @@ -74,7 +74,7 @@ public PrintOperationStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrintOperationStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintOperationStatus(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("state", State); diff --git a/src/Microsoft.Graph/Generated/Models/PrintService.cs b/src/Microsoft.Graph/Generated/Models/PrintService.cs index 33fa6f6396f..ab37fd53545 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintService.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintService.cs @@ -35,7 +35,7 @@ public partial class PrintService : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintService CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintService(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("endpoints", Endpoints); } diff --git a/src/Microsoft.Graph/Generated/Models/PrintServiceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrintServiceCollectionResponse.cs index 8cd4251aa79..80a54e16b5e 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintServiceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintServiceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrintServiceCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintServiceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintServiceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrintServiceEndpoint.cs b/src/Microsoft.Graph/Generated/Models/PrintServiceEndpoint.cs index 46443aebbfb..0f43257e7b0 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintServiceEndpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintServiceEndpoint.cs @@ -67,7 +67,7 @@ public string Uri /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintServiceEndpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintServiceEndpoint(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/PrintServiceEndpointCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrintServiceEndpointCollectionResponse.cs index f13dd467707..f20fbbf2498 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintServiceEndpointCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintServiceEndpointCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrintServiceEndpointCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintServiceEndpointCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintServiceEndpointCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrintSettings.cs b/src/Microsoft.Graph/Generated/Models/PrintSettings.cs index c9d1ed6057f..53a5f78f9f9 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintSettings.cs @@ -74,7 +74,7 @@ public PrintSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrintSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintSettings(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("documentConversionEnabled", DocumentConversionEnabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("printerDiscoverySettings", PrinterDiscoverySettings); diff --git a/src/Microsoft.Graph/Generated/Models/PrintTask.cs b/src/Microsoft.Graph/Generated/Models/PrintTask.cs index 149c74e8849..c6406ef6f3b 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintTask.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintTask.cs @@ -83,7 +83,7 @@ public string ParentUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintTask CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintTask(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("definition", Definition); writer.WriteStringValue("parentUrl", ParentUrl); diff --git a/src/Microsoft.Graph/Generated/Models/PrintTaskCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrintTaskCollectionResponse.cs index 250bd3b4863..bb756f133fe 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintTaskCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintTaskCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrintTaskCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintTaskCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintTaskCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrintTaskDefinition.cs b/src/Microsoft.Graph/Generated/Models/PrintTaskDefinition.cs index e8c4ec08544..76635f5ef74 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintTaskDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintTaskDefinition.cs @@ -67,7 +67,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintTaskDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintTaskDefinition(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/PrintTaskDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrintTaskDefinitionCollectionResponse.cs index f0dc8bf6afe..be4c93388a4 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintTaskDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintTaskDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrintTaskDefinitionCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintTaskDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintTaskDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrintTaskStatus.cs b/src/Microsoft.Graph/Generated/Models/PrintTaskStatus.cs index 0378e6fe8f2..59008682325 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintTaskStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintTaskStatus.cs @@ -74,7 +74,7 @@ public PrintTaskStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrintTaskStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintTaskStatus(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("state", State); diff --git a/src/Microsoft.Graph/Generated/Models/PrintTaskTrigger.cs b/src/Microsoft.Graph/Generated/Models/PrintTaskTrigger.cs index 6221d39b104..814ab6181c6 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintTaskTrigger.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintTaskTrigger.cs @@ -41,7 +41,7 @@ public partial class PrintTaskTrigger : global::Microsoft.Graph.Beta.Models.Enti /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintTaskTrigger CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintTaskTrigger(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("definition", Definition); writer.WriteEnumValue("event", Event); diff --git a/src/Microsoft.Graph/Generated/Models/PrintTaskTriggerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrintTaskTriggerCollectionResponse.cs index ddd994aec10..d731bbd6cd3 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintTaskTriggerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintTaskTriggerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrintTaskTriggerCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintTaskTriggerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintTaskTriggerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrintUsage.cs b/src/Microsoft.Graph/Generated/Models/PrintUsage.cs index ac16d3dd0f3..93875fe90b6 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintUsage.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintUsage.cs @@ -86,7 +86,7 @@ public Date? UsageDate /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintUsage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -122,7 +122,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("blackAndWhitePageCount", BlackAndWhitePageCount); writer.WriteLongValue("colorPageCount", ColorPageCount); diff --git a/src/Microsoft.Graph/Generated/Models/PrintUsageByPrinter.cs b/src/Microsoft.Graph/Generated/Models/PrintUsageByPrinter.cs index 23045e5a076..af40686df31 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintUsageByPrinter.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintUsageByPrinter.cs @@ -51,7 +51,7 @@ public string PrinterName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("printerId", PrinterId); writer.WriteStringValue("printerName", PrinterName); diff --git a/src/Microsoft.Graph/Generated/Models/PrintUsageByPrinterCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrintUsageByPrinterCollectionResponse.cs index 1437ab439fe..548797d4bda 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintUsageByPrinterCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintUsageByPrinterCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrintUsageByPrinterCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintUsageByPrinterCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintUsageByPrinterCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrintUsageByUser.cs b/src/Microsoft.Graph/Generated/Models/PrintUsageByUser.cs index 2a7d1ed62a2..5040146ee07 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintUsageByUser.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintUsageByUser.cs @@ -35,7 +35,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintUsageByUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintUsageByUser(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userPrincipalName", UserPrincipalName); } diff --git a/src/Microsoft.Graph/Generated/Models/PrintUsageByUserCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrintUsageByUserCollectionResponse.cs index 110db7dc025..41e67d9821a 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintUsageByUserCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintUsageByUserCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrintUsageByUserCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintUsageByUserCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintUsageByUserCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrintUsageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrintUsageCollectionResponse.cs index 177d9fbf335..fa36df36b02 100644 --- a/src/Microsoft.Graph/Generated/Models/PrintUsageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrintUsageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrintUsageCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrintUsageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrintUsageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Printer.cs b/src/Microsoft.Graph/Generated/Models/Printer.cs index 7b83227bf01..7895bb8a893 100644 --- a/src/Microsoft.Graph/Generated/Models/Printer.cs +++ b/src/Microsoft.Graph/Generated/Models/Printer.cs @@ -120,7 +120,7 @@ public Printer() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Printer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Printer(); } /// @@ -148,7 +148,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("acceptingJobs", AcceptingJobs); writer.WriteCollectionOfObjectValues("connectors", Connectors); diff --git a/src/Microsoft.Graph/Generated/Models/PrinterBase.cs b/src/Microsoft.Graph/Generated/Models/PrinterBase.cs index ec501f8385d..e0aa58c0a87 100644 --- a/src/Microsoft.Graph/Generated/Models/PrinterBase.cs +++ b/src/Microsoft.Graph/Generated/Models/PrinterBase.cs @@ -169,7 +169,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrinterBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -204,7 +204,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("capabilities", Capabilities); writer.WriteObjectValue("defaults", Defaults); diff --git a/src/Microsoft.Graph/Generated/Models/PrinterCapabilities.cs b/src/Microsoft.Graph/Generated/Models/PrinterCapabilities.cs index 37f2189918f..0aac03a9323 100644 --- a/src/Microsoft.Graph/Generated/Models/PrinterCapabilities.cs +++ b/src/Microsoft.Graph/Generated/Models/PrinterCapabilities.cs @@ -636,7 +636,7 @@ public PrinterCapabilities() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrinterCapabilities CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrinterCapabilities(); } /// @@ -695,7 +695,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("bottomMargins", BottomMargins); writer.WriteBoolValue("collation", Collation); writer.WriteCollectionOfEnumValues("colorModes", ColorModes); diff --git a/src/Microsoft.Graph/Generated/Models/PrinterCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrinterCollectionResponse.cs index 80db016e649..003485b225f 100644 --- a/src/Microsoft.Graph/Generated/Models/PrinterCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrinterCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrinterCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrinterCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrinterCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrinterCreateOperation.cs b/src/Microsoft.Graph/Generated/Models/PrinterCreateOperation.cs index 0265cf6b025..f5e40c38cb2 100644 --- a/src/Microsoft.Graph/Generated/Models/PrinterCreateOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/PrinterCreateOperation.cs @@ -58,7 +58,7 @@ public PrinterCreateOperation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrinterCreateOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrinterCreateOperation(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certificate", Certificate); writer.WriteObjectValue("printer", Printer); diff --git a/src/Microsoft.Graph/Generated/Models/PrinterDefaults.cs b/src/Microsoft.Graph/Generated/Models/PrinterDefaults.cs index a856fd32e30..81f46f02fb8 100644 --- a/src/Microsoft.Graph/Generated/Models/PrinterDefaults.cs +++ b/src/Microsoft.Graph/Generated/Models/PrinterDefaults.cs @@ -270,7 +270,7 @@ public PrinterDefaults() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrinterDefaults CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrinterDefaults(); } /// @@ -313,7 +313,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("colorMode", ColorMode); writer.WriteStringValue("contentType", ContentType); writer.WriteIntValue("copiesPerJob", CopiesPerJob); diff --git a/src/Microsoft.Graph/Generated/Models/PrinterDiscoverySettings.cs b/src/Microsoft.Graph/Generated/Models/PrinterDiscoverySettings.cs index 114aee75023..ca970d96852 100644 --- a/src/Microsoft.Graph/Generated/Models/PrinterDiscoverySettings.cs +++ b/src/Microsoft.Graph/Generated/Models/PrinterDiscoverySettings.cs @@ -68,7 +68,7 @@ public PrinterDiscoverySettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrinterDiscoverySettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrinterDiscoverySettings(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("airPrint", AirPrint); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PrinterDocumentConfiguration.cs b/src/Microsoft.Graph/Generated/Models/PrinterDocumentConfiguration.cs index eb52a65dbb7..a5b080f770f 100644 --- a/src/Microsoft.Graph/Generated/Models/PrinterDocumentConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/PrinterDocumentConfiguration.cs @@ -242,7 +242,7 @@ public PrinterDocumentConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrinterDocumentConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrinterDocumentConfiguration(); } /// @@ -282,7 +282,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("collate", Collate); writer.WriteEnumValue("colorMode", ColorMode); writer.WriteIntValue("copies", Copies); diff --git a/src/Microsoft.Graph/Generated/Models/PrinterLocation.cs b/src/Microsoft.Graph/Generated/Models/PrinterLocation.cs index 4f27e7fa30d..54728fcc0dc 100644 --- a/src/Microsoft.Graph/Generated/Models/PrinterLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/PrinterLocation.cs @@ -306,7 +306,7 @@ public PrinterLocation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrinterLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrinterLocation(); } /// @@ -345,7 +345,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("altitudeInMeters", AltitudeInMeters); writer.WriteStringValue("building", Building); writer.WriteStringValue("city", City); diff --git a/src/Microsoft.Graph/Generated/Models/PrinterShare.cs b/src/Microsoft.Graph/Generated/Models/PrinterShare.cs index 7c1dc1aff1d..eed9f5497e8 100644 --- a/src/Microsoft.Graph/Generated/Models/PrinterShare.cs +++ b/src/Microsoft.Graph/Generated/Models/PrinterShare.cs @@ -102,7 +102,7 @@ public PrinterShare() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrinterShare CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrinterShare(); } /// @@ -127,7 +127,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowAllUsers", AllowAllUsers); writer.WriteCollectionOfObjectValues("allowedGroups", AllowedGroups); diff --git a/src/Microsoft.Graph/Generated/Models/PrinterShareCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrinterShareCollectionResponse.cs index 3c0ac6e7ffb..89451d41081 100644 --- a/src/Microsoft.Graph/Generated/Models/PrinterShareCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrinterShareCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrinterShareCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrinterShareCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrinterShareCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrinterShareViewpoint.cs b/src/Microsoft.Graph/Generated/Models/PrinterShareViewpoint.cs index 72e5cb7d9a0..551f9c1161b 100644 --- a/src/Microsoft.Graph/Generated/Models/PrinterShareViewpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/PrinterShareViewpoint.cs @@ -58,7 +58,7 @@ public PrinterShareViewpoint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrinterShareViewpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrinterShareViewpoint(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastUsedDateTime", LastUsedDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PrinterStatus.cs b/src/Microsoft.Graph/Generated/Models/PrinterStatus.cs index f3993ae593c..52822f39e0e 100644 --- a/src/Microsoft.Graph/Generated/Models/PrinterStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/PrinterStatus.cs @@ -128,7 +128,7 @@ public PrinterStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrinterStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrinterStatus(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteCollectionOfEnumValues("details", Details); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Privacy.cs b/src/Microsoft.Graph/Generated/Models/Privacy.cs index ed5fa98edd8..1a4c9a3c4b9 100644 --- a/src/Microsoft.Graph/Generated/Models/Privacy.cs +++ b/src/Microsoft.Graph/Generated/Models/Privacy.cs @@ -68,7 +68,7 @@ public Privacy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Privacy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Privacy(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("subjectRightsRequests", SubjectRightsRequests); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PrivacyProfile.cs b/src/Microsoft.Graph/Generated/Models/PrivacyProfile.cs index 58f1a91c0a2..9c562d32fe8 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivacyProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivacyProfile.cs @@ -84,7 +84,7 @@ public PrivacyProfile() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrivacyProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivacyProfile(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("contactEmail", ContactEmail); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("statementUrl", StatementUrl); diff --git a/src/Microsoft.Graph/Generated/Models/PrivateLinkDetails.cs b/src/Microsoft.Graph/Generated/Models/PrivateLinkDetails.cs index 144d82a128a..36ef5bb552a 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivateLinkDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivateLinkDetails.cs @@ -116,7 +116,7 @@ public PrivateLinkDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PrivateLinkDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivateLinkDetails(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("policyId", PolicyId); writer.WriteStringValue("policyName", PolicyName); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegeEscalation.cs b/src/Microsoft.Graph/Generated/Models/PrivilegeEscalation.cs index 673eb4d475a..d150bd2db6e 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegeEscalation.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegeEscalation.cs @@ -83,7 +83,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegeEscalation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegeEscalation(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("actions", Actions); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationAwsResourceFinding.cs b/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationAwsResourceFinding.cs index 6bcca3c0a55..2b8ecc911b7 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationAwsResourceFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationAwsResourceFinding.cs @@ -19,7 +19,7 @@ public partial class PrivilegeEscalationAwsResourceFinding : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegeEscalationAwsResourceFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegeEscalationAwsResourceFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationAwsRoleFinding.cs b/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationAwsRoleFinding.cs index 5b901424e8f..a1ded271218 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationAwsRoleFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationAwsRoleFinding.cs @@ -19,7 +19,7 @@ public partial class PrivilegeEscalationAwsRoleFinding : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegeEscalationAwsRoleFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegeEscalationAwsRoleFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationFinding.cs b/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationFinding.cs index 71c8a72c2ab..e103c621ea7 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationFinding.cs @@ -83,7 +83,7 @@ public partial class PrivilegeEscalationFinding : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegeEscalationFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -114,7 +114,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("identity", Identity); writer.WriteObjectValue("identityDetails", IdentityDetails); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationGcpServiceAccountFinding.cs b/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationGcpServiceAccountFinding.cs index ac059a70d47..6ab974af384 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationGcpServiceAccountFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationGcpServiceAccountFinding.cs @@ -19,7 +19,7 @@ public partial class PrivilegeEscalationGcpServiceAccountFinding : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegeEscalationGcpServiceAccountFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegeEscalationGcpServiceAccountFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationUserFinding.cs b/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationUserFinding.cs index f107eb924bb..88ac23aadf2 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationUserFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegeEscalationUserFinding.cs @@ -19,7 +19,7 @@ public partial class PrivilegeEscalationUserFinding : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegeEscalationUserFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegeEscalationUserFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevation.cs b/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevation.cs index 38fb3fc1811..89b86e59b15 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevation.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevation.cs @@ -312,7 +312,7 @@ public string Upn /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevation(); } /// @@ -353,7 +353,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certificatePayload", CertificatePayload); writer.WriteStringValue("companyName", CompanyName); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevationCollectionResponse.cs index 0d24bfaec23..a62be4d7542 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegeManagementElevationCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevationRequest.cs b/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevationRequest.cs index 679e88e8832..377ba5fdb69 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevationRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevationRequest.cs @@ -194,7 +194,7 @@ public string ReviewerJustification /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevationRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevationRequest(); } /// @@ -227,7 +227,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("applicationDetail", ApplicationDetail); writer.WriteStringValue("deviceName", DeviceName); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevationRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevationRequestCollectionResponse.cs index fc0b9e0bb0a..0734b1f2d02 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevationRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegeManagementElevationRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegeManagementElevationRequestCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevationRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegeManagementElevationRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccess.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccess.cs index a48a3219928..8cab04ebac8 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccess.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccess.cs @@ -115,7 +115,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccess CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccess(); } /// @@ -140,7 +140,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfObjectValues("resources", Resources); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessCollectionResponse.cs index 0dcea27ebd1..5c97ce24401 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegedAccessCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroup.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroup.cs index e78176a4ae3..2ccd23aad81 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroup.cs @@ -131,7 +131,7 @@ public partial class PrivilegedAccessGroup : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroup(); } /// @@ -157,7 +157,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignmentApprovals", AssignmentApprovals); writer.WriteCollectionOfObjectValues("assignmentScheduleInstances", AssignmentScheduleInstances); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentSchedule.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentSchedule.cs index e2d2ef33e5f..7da67589def 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentSchedule.cs @@ -124,7 +124,7 @@ public PrivilegedAccessGroupAssignmentSchedule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentSchedule(); } /// @@ -151,7 +151,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessId", AccessId); writer.WriteObjectValue("activatedUsing", ActivatedUsing); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleCollectionResponse.cs index 89041dc6aee..b4230b417c5 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegedAccessGroupAssignmentScheduleCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleInstance.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleInstance.cs index 831df66d41a..76f58d9feb9 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleInstance.cs @@ -140,7 +140,7 @@ public PrivilegedAccessGroupAssignmentScheduleInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleInstance(); } /// @@ -168,7 +168,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessId", AccessId); writer.WriteObjectValue("activatedUsing", ActivatedUsing); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse.cs index 6d51c2e2da0..7ecb7b19bde 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegedAccessGroupAssignmentScheduleInstanceCollectionRe /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleRequest.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleRequest.cs index ab35a22acf4..5c0863d36e1 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleRequest.cs @@ -144,7 +144,7 @@ public PrivilegedAccessGroupAssignmentScheduleRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleRequest(); } /// @@ -171,7 +171,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessId", AccessId); writer.WriteObjectValue("activatedUsing", ActivatedUsing); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse.cs index a63e5432a71..f767a09aaed 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegedAccessGroupAssignmentScheduleRequestCollectionRes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilitySchedule.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilitySchedule.cs index 5d52768adfe..c0c489ba7af 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilitySchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilitySchedule.cs @@ -102,7 +102,7 @@ public PrivilegedAccessGroupEligibilitySchedule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilitySchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilitySchedule(); } /// @@ -127,7 +127,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessId", AccessId); writer.WriteObjectValue("group", Group); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleCollectionResponse.cs index b2fe76f2a0f..c9db4e23f4e 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegedAccessGroupEligibilityScheduleCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleInstance.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleInstance.cs index 57a89570489..661d62aeb48 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleInstance.cs @@ -118,7 +118,7 @@ public PrivilegedAccessGroupEligibilityScheduleInstance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleInstance(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessId", AccessId); writer.WriteStringValue("eligibilityScheduleId", EligibilityScheduleId); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse.cs index 57681aabb6c..1ae2fb75b8b 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegedAccessGroupEligibilityScheduleInstanceCollectionR /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleRequest.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleRequest.cs index f5d7bcffa8b..2c0b6ce7618 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleRequest.cs @@ -128,7 +128,7 @@ public PrivilegedAccessGroupEligibilityScheduleRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleRequest(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessId", AccessId); writer.WriteObjectValue("group", Group); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse.cs index 2b1ffe537d7..0b8ad05a5a6 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegedAccessGroupEligibilityScheduleRequestCollectionRe /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessRoot.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessRoot.cs index 926209d255f..9354ac09e9a 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessRoot.cs @@ -35,7 +35,7 @@ public partial class PrivilegedAccessRoot : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedAccessRoot(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("group", Group); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessSchedule.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessSchedule.cs index 57ac8ff9bd4..668a4a722a0 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessSchedule.cs @@ -79,7 +79,7 @@ public string Status /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -109,7 +109,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("createdUsing", CreatedUsing); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessScheduleInstance.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessScheduleInstance.cs index 67a6550213e..45ec64ded8e 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessScheduleInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessScheduleInstance.cs @@ -31,7 +31,7 @@ public DateTimeOffset? StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessScheduleInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -58,7 +58,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessScheduleRequest.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessScheduleRequest.cs index 9b2ea457b4a..38e62a36650 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedAccessScheduleRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedAccessScheduleRequest.cs @@ -86,7 +86,7 @@ public PrivilegedAccessScheduleRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedAccessScheduleRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -116,7 +116,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("action", Action); writer.WriteBoolValue("isValidationOnly", IsValidationOnly); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedApproval.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedApproval.cs index 8f63498ca23..6a81ce889b8 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedApproval.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedApproval.cs @@ -155,7 +155,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedApproval CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedApproval(); } /// @@ -185,7 +185,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeSpanValue("approvalDuration", ApprovalDuration); writer.WriteEnumValue("approvalState", ApprovalState); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedApprovalCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedApprovalCollectionResponse.cs index 5b33a99df44..89f5d5326f3 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedApprovalCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedApprovalCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegedApprovalCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedApprovalCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedApprovalCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedOperationEvent.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedOperationEvent.cs index 4b731fba59a..499b05e6a10 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedOperationEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedOperationEvent.cs @@ -223,7 +223,7 @@ public string UserName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedOperationEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedOperationEvent(); } /// @@ -256,7 +256,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("additionalInformation", AdditionalInformation); writer.WriteDateTimeOffsetValue("creationDateTime", CreationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedOperationEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedOperationEventCollectionResponse.cs index 6087373c72f..f4075568771 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedOperationEventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedOperationEventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegedOperationEventCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedOperationEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedOperationEventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedRole.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedRole.cs index f0b05eb373c..4f5fec01e75 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedRole.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedRole.cs @@ -83,7 +83,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedRole CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedRole(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignment.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignment.cs index ba848f43520..723faffb597 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignment.cs @@ -95,7 +95,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignment(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteBoolValue("isElevated", IsElevated); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignmentCollectionResponse.cs index a028c93dd1e..78ebfe827ea 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegedRoleAssignmentCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignmentRequest.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignmentRequest.cs index 8f5eee1345b..4c385eed6b4 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignmentRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignmentRequest.cs @@ -201,7 +201,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignmentRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignmentRequest(); } /// @@ -232,7 +232,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assignmentState", AssignmentState); writer.WriteStringValue("duration", Duration); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignmentRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignmentRequestCollectionResponse.cs index 43588773bcb..3c96b50f961 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignmentRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedRoleAssignmentRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegedRoleAssignmentRequestCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignmentRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignmentRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedRoleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedRoleCollectionResponse.cs index ee0354dd3aa..f39e4bab3b3 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedRoleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedRoleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegedRoleCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedRoleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedRoleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedRoleSettings.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedRoleSettings.cs index 31f4e9f2a18..04d209376af 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedRoleSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedRoleSettings.cs @@ -89,7 +89,7 @@ public bool? TicketingInfoOnElevation /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedRoleSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedRoleSettings(); } /// @@ -118,7 +118,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("approvalOnElevation", ApprovalOnElevation); writer.WriteCollectionOfPrimitiveValues("approverIds", ApproverIds); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedRoleSummary.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedRoleSummary.cs index 9c8d5da8c9d..e9771eb35e0 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedRoleSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedRoleSummary.cs @@ -49,7 +49,7 @@ public int? UsersCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedRoleSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedRoleSummary(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("elevatedCount", ElevatedCount); writer.WriteIntValue("managedCount", ManagedCount); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedSignupStatus.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedSignupStatus.cs index d9c34d10251..2a4bc1b74db 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedSignupStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedSignupStatus.cs @@ -31,7 +31,7 @@ public bool? IsRegistered /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedSignupStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedSignupStatus(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isRegistered", IsRegistered); writer.WriteEnumValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/PrivilegedSignupStatusCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PrivilegedSignupStatusCollectionResponse.cs index 8fd8ba58d5a..c53b9f83ef1 100644 --- a/src/Microsoft.Graph/Generated/Models/PrivilegedSignupStatusCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PrivilegedSignupStatusCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PrivilegedSignupStatusCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PrivilegedSignupStatusCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PrivilegedSignupStatusCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Process.cs b/src/Microsoft.Graph/Generated/Models/Process.cs index 900dc267275..55c788dd3c9 100644 --- a/src/Microsoft.Graph/Generated/Models/Process.cs +++ b/src/Microsoft.Graph/Generated/Models/Process.cs @@ -184,7 +184,7 @@ public Process() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Process CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Process(); } /// @@ -216,7 +216,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("accountName", AccountName); writer.WriteStringValue("commandLine", CommandLine); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ProcessContentBatchRequest.cs b/src/Microsoft.Graph/Generated/Models/ProcessContentBatchRequest.cs index beb916f0754..4fc6420c733 100644 --- a/src/Microsoft.Graph/Generated/Models/ProcessContentBatchRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/ProcessContentBatchRequest.cs @@ -100,7 +100,7 @@ public ProcessContentBatchRequest() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProcessContentBatchRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProcessContentBatchRequest(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentToProcess", ContentToProcess); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("requestId", RequestId); diff --git a/src/Microsoft.Graph/Generated/Models/ProcessContentMetadataBase.cs b/src/Microsoft.Graph/Generated/Models/ProcessContentMetadataBase.cs index b8bc6305889..b84bc98288f 100644 --- a/src/Microsoft.Graph/Generated/Models/ProcessContentMetadataBase.cs +++ b/src/Microsoft.Graph/Generated/Models/ProcessContentMetadataBase.cs @@ -146,7 +146,7 @@ public ProcessContentMetadataBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProcessContentMetadataBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -181,7 +181,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("content", Content); writer.WriteStringValue("correlationId", CorrelationId); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ProcessContentRequest.cs b/src/Microsoft.Graph/Generated/Models/ProcessContentRequest.cs index e1e79766cd0..a7260cbef13 100644 --- a/src/Microsoft.Graph/Generated/Models/ProcessContentRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/ProcessContentRequest.cs @@ -132,7 +132,7 @@ public ProcessContentRequest() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProcessContentRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProcessContentRequest(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("activityMetadata", ActivityMetadata); writer.WriteCollectionOfObjectValues("contentEntries", ContentEntries); writer.WriteObjectValue("deviceMetadata", DeviceMetadata); diff --git a/src/Microsoft.Graph/Generated/Models/ProcessContentResponse.cs b/src/Microsoft.Graph/Generated/Models/ProcessContentResponse.cs index 229e763c26c..6770c8b88f9 100644 --- a/src/Microsoft.Graph/Generated/Models/ProcessContentResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ProcessContentResponse.cs @@ -90,7 +90,7 @@ public ProcessContentResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProcessContentResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProcessContentResponse(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("policyActions", PolicyActions); writer.WriteCollectionOfObjectValues("processingErrors", ProcessingErrors); diff --git a/src/Microsoft.Graph/Generated/Models/ProcessContentResponses.cs b/src/Microsoft.Graph/Generated/Models/ProcessContentResponses.cs index 5af6ee557c7..29c8adf3c0a 100644 --- a/src/Microsoft.Graph/Generated/Models/ProcessContentResponses.cs +++ b/src/Microsoft.Graph/Generated/Models/ProcessContentResponses.cs @@ -84,7 +84,7 @@ public ProcessContentResponses() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProcessContentResponses CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProcessContentResponses(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("requestId", RequestId); writer.WriteObjectValue("results", Results); diff --git a/src/Microsoft.Graph/Generated/Models/ProcessConversationMetadata.cs b/src/Microsoft.Graph/Generated/Models/ProcessConversationMetadata.cs index a777049cf77..20ba324fa60 100644 --- a/src/Microsoft.Graph/Generated/Models/ProcessConversationMetadata.cs +++ b/src/Microsoft.Graph/Generated/Models/ProcessConversationMetadata.cs @@ -74,7 +74,7 @@ public ProcessConversationMetadata() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProcessConversationMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProcessConversationMetadata(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("accessedResources", AccessedResources); writer.WriteStringValue("parentMessageId", ParentMessageId); diff --git a/src/Microsoft.Graph/Generated/Models/ProcessFileMetadata.cs b/src/Microsoft.Graph/Generated/Models/ProcessFileMetadata.cs index b5a0e594098..c6cb172a58b 100644 --- a/src/Microsoft.Graph/Generated/Models/ProcessFileMetadata.cs +++ b/src/Microsoft.Graph/Generated/Models/ProcessFileMetadata.cs @@ -58,7 +58,7 @@ public ProcessFileMetadata() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProcessFileMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProcessFileMetadata(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("customProperties", CustomProperties); writer.WriteStringValue("ownerId", OwnerId); diff --git a/src/Microsoft.Graph/Generated/Models/ProcessingError.cs b/src/Microsoft.Graph/Generated/Models/ProcessingError.cs index 736f5c7a2ed..f625f3aeabe 100644 --- a/src/Microsoft.Graph/Generated/Models/ProcessingError.cs +++ b/src/Microsoft.Graph/Generated/Models/ProcessingError.cs @@ -32,7 +32,7 @@ public ProcessingError() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProcessingError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProcessingError(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("errorType", ErrorType); } diff --git a/src/Microsoft.Graph/Generated/Models/Profile.cs b/src/Microsoft.Graph/Generated/Models/Profile.cs index 4c796dcc046..d570c5b5132 100644 --- a/src/Microsoft.Graph/Generated/Models/Profile.cs +++ b/src/Microsoft.Graph/Generated/Models/Profile.cs @@ -323,7 +323,7 @@ public partial class Profile : global::Microsoft.Graph.Beta.Models.Entity, IPars /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Profile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Profile(); } /// @@ -361,7 +361,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("account", Account); writer.WriteCollectionOfObjectValues("addresses", Addresses); diff --git a/src/Microsoft.Graph/Generated/Models/ProfileCardAnnotation.cs b/src/Microsoft.Graph/Generated/Models/ProfileCardAnnotation.cs index d09c39eb6b1..9cae74a7ba1 100644 --- a/src/Microsoft.Graph/Generated/Models/ProfileCardAnnotation.cs +++ b/src/Microsoft.Graph/Generated/Models/ProfileCardAnnotation.cs @@ -84,7 +84,7 @@ public ProfileCardAnnotation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProfileCardAnnotation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProfileCardAnnotation(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfObjectValues("localizations", Localizations); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ProfileCardProperty.cs b/src/Microsoft.Graph/Generated/Models/ProfileCardProperty.cs index fa4ee7432c3..544001256f3 100644 --- a/src/Microsoft.Graph/Generated/Models/ProfileCardProperty.cs +++ b/src/Microsoft.Graph/Generated/Models/ProfileCardProperty.cs @@ -51,7 +51,7 @@ public string DirectoryPropertyName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProfileCardProperty CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProfileCardProperty(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("annotations", Annotations); writer.WriteStringValue("directoryPropertyName", DirectoryPropertyName); diff --git a/src/Microsoft.Graph/Generated/Models/ProfileCardPropertyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ProfileCardPropertyCollectionResponse.cs index 8506b0a16db..72f27e1b1de 100644 --- a/src/Microsoft.Graph/Generated/Models/ProfileCardPropertyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ProfileCardPropertyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProfileCardPropertyCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProfileCardPropertyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProfileCardPropertyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ProfilePhoto.cs b/src/Microsoft.Graph/Generated/Models/ProfilePhoto.cs index 23da37d80c7..1747d9dd3af 100644 --- a/src/Microsoft.Graph/Generated/Models/ProfilePhoto.cs +++ b/src/Microsoft.Graph/Generated/Models/ProfilePhoto.cs @@ -31,7 +31,7 @@ public int? Width /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProfilePhoto CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProfilePhoto(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("height", Height); writer.WriteIntValue("width", Width); diff --git a/src/Microsoft.Graph/Generated/Models/ProfilePhotoCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ProfilePhotoCollectionResponse.cs index 5b9c7bd1b1e..c42875f3eb9 100644 --- a/src/Microsoft.Graph/Generated/Models/ProfilePhotoCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ProfilePhotoCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProfilePhotoCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProfilePhotoCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProfilePhotoCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ProfilePropertySetting.cs b/src/Microsoft.Graph/Generated/Models/ProfilePropertySetting.cs index df48cb682dd..01ccca6d816 100644 --- a/src/Microsoft.Graph/Generated/Models/ProfilePropertySetting.cs +++ b/src/Microsoft.Graph/Generated/Models/ProfilePropertySetting.cs @@ -63,7 +63,7 @@ public List PrioritizedSourceUrls /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProfilePropertySetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProfilePropertySetting(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("allowedAudiences", AllowedAudiences); writer.WriteBoolValue("isUserOverrideForAudienceEnabled", IsUserOverrideForAudienceEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/ProfilePropertySettingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ProfilePropertySettingCollectionResponse.cs index d1f7371ffca..dca5a58acb8 100644 --- a/src/Microsoft.Graph/Generated/Models/ProfilePropertySettingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ProfilePropertySettingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProfilePropertySettingCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProfilePropertySettingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProfilePropertySettingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ProfileSource.cs b/src/Microsoft.Graph/Generated/Models/ProfileSource.cs index da0ae568c12..115bfd828b2 100644 --- a/src/Microsoft.Graph/Generated/Models/ProfileSource.cs +++ b/src/Microsoft.Graph/Generated/Models/ProfileSource.cs @@ -99,7 +99,7 @@ public string WebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProfileSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProfileSource(); } /// @@ -123,7 +123,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("kind", Kind); diff --git a/src/Microsoft.Graph/Generated/Models/ProfileSourceAnnotation.cs b/src/Microsoft.Graph/Generated/Models/ProfileSourceAnnotation.cs index fa2957852c9..1ffe6ecf382 100644 --- a/src/Microsoft.Graph/Generated/Models/ProfileSourceAnnotation.cs +++ b/src/Microsoft.Graph/Generated/Models/ProfileSourceAnnotation.cs @@ -90,7 +90,7 @@ public ProfileSourceAnnotation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProfileSourceAnnotation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProfileSourceAnnotation(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isDefaultSource", IsDefaultSource); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("properties", Properties); diff --git a/src/Microsoft.Graph/Generated/Models/ProfileSourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ProfileSourceCollectionResponse.cs index 66dcbb052d5..82c76718934 100644 --- a/src/Microsoft.Graph/Generated/Models/ProfileSourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ProfileSourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProfileSourceCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProfileSourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProfileSourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ProfileSourceLocalization.cs b/src/Microsoft.Graph/Generated/Models/ProfileSourceLocalization.cs index 2d371e02a2e..1b74e1fd306 100644 --- a/src/Microsoft.Graph/Generated/Models/ProfileSourceLocalization.cs +++ b/src/Microsoft.Graph/Generated/Models/ProfileSourceLocalization.cs @@ -100,7 +100,7 @@ public ProfileSourceLocalization() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProfileSourceLocalization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProfileSourceLocalization(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("languageTag", LanguageTag); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Program.cs b/src/Microsoft.Graph/Generated/Models/Program.cs index a5a769bfe30..322a853c3b8 100644 --- a/src/Microsoft.Graph/Generated/Models/Program.cs +++ b/src/Microsoft.Graph/Generated/Models/Program.cs @@ -67,7 +67,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Program CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Program(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("controls", Controls); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/ProgramCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ProgramCollectionResponse.cs index e0ed3c6ca3e..4570d089804 100644 --- a/src/Microsoft.Graph/Generated/Models/ProgramCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ProgramCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProgramCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProgramCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProgramCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ProgramControl.cs b/src/Microsoft.Graph/Generated/Models/ProgramControl.cs index dfa2dced16c..0796c3c3735 100644 --- a/src/Microsoft.Graph/Generated/Models/ProgramControl.cs +++ b/src/Microsoft.Graph/Generated/Models/ProgramControl.cs @@ -153,7 +153,7 @@ public string Status /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProgramControl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProgramControl(); } /// @@ -181,7 +181,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("controlId", ControlId); writer.WriteStringValue("controlTypeId", ControlTypeId); diff --git a/src/Microsoft.Graph/Generated/Models/ProgramControlCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ProgramControlCollectionResponse.cs index e530d74fcc5..62ebf2adad2 100644 --- a/src/Microsoft.Graph/Generated/Models/ProgramControlCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ProgramControlCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProgramControlCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProgramControlCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProgramControlCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ProgramControlType.cs b/src/Microsoft.Graph/Generated/Models/ProgramControlType.cs index 773d678fa0a..64339f89056 100644 --- a/src/Microsoft.Graph/Generated/Models/ProgramControlType.cs +++ b/src/Microsoft.Graph/Generated/Models/ProgramControlType.cs @@ -51,7 +51,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProgramControlType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProgramControlType(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("controlTypeGroupId", ControlTypeGroupId); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ProgramControlTypeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ProgramControlTypeCollectionResponse.cs index b2a27d8e596..d6a859181f8 100644 --- a/src/Microsoft.Graph/Generated/Models/ProgramControlTypeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ProgramControlTypeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProgramControlTypeCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProgramControlTypeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProgramControlTypeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ProgramResource.cs b/src/Microsoft.Graph/Generated/Models/ProgramResource.cs index eba43e66475..603b6c80029 100644 --- a/src/Microsoft.Graph/Generated/Models/ProgramResource.cs +++ b/src/Microsoft.Graph/Generated/Models/ProgramResource.cs @@ -42,7 +42,7 @@ public ProgramResource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProgramResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProgramResource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("type", Type); } diff --git a/src/Microsoft.Graph/Generated/Models/ProjectParticipation.cs b/src/Microsoft.Graph/Generated/Models/ProjectParticipation.cs index 3fe8764c35d..887d5dc4af6 100644 --- a/src/Microsoft.Graph/Generated/Models/ProjectParticipation.cs +++ b/src/Microsoft.Graph/Generated/Models/ProjectParticipation.cs @@ -154,7 +154,7 @@ public ProjectParticipation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProjectParticipation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProjectParticipation(); } /// @@ -181,7 +181,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("categories", Categories); writer.WriteObjectValue("client", Client); diff --git a/src/Microsoft.Graph/Generated/Models/ProjectParticipationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ProjectParticipationCollectionResponse.cs index 761b7189a51..cdf28aa4d33 100644 --- a/src/Microsoft.Graph/Generated/Models/ProjectParticipationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ProjectParticipationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProjectParticipationCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProjectParticipationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProjectParticipationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Prompt.cs b/src/Microsoft.Graph/Generated/Models/Prompt.cs index 837a2f4a629..6e2ab7eba59 100644 --- a/src/Microsoft.Graph/Generated/Models/Prompt.cs +++ b/src/Microsoft.Graph/Generated/Models/Prompt.cs @@ -52,7 +52,7 @@ public Prompt() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Prompt CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/PronounsSettings.cs b/src/Microsoft.Graph/Generated/Models/PronounsSettings.cs index 59c6cf9b1cf..7ddb6ce5233 100644 --- a/src/Microsoft.Graph/Generated/Models/PronounsSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/PronounsSettings.cs @@ -25,7 +25,7 @@ public bool? IsEnabledInOrganization /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PronounsSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PronounsSettings(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isEnabledInOrganization", IsEnabledInOrganization); } diff --git a/src/Microsoft.Graph/Generated/Models/Properties.cs b/src/Microsoft.Graph/Generated/Models/Properties.cs index 4e0cd455d84..a3340e1638c 100644 --- a/src/Microsoft.Graph/Generated/Models/Properties.cs +++ b/src/Microsoft.Graph/Generated/Models/Properties.cs @@ -52,7 +52,7 @@ public Properties() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Properties CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Properties(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Property.cs b/src/Microsoft.Graph/Generated/Models/Property.cs index 906d95dd9f3..2ccbe59d6c1 100644 --- a/src/Microsoft.Graph/Generated/Models/Property.cs +++ b/src/Microsoft.Graph/Generated/Models/Property.cs @@ -130,7 +130,7 @@ public Property() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Property CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Property(); } /// @@ -158,7 +158,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("aliases", Aliases); writer.WriteBoolValue("isQueryable", IsQueryable); writer.WriteBoolValue("isRefinable", IsRefinable); diff --git a/src/Microsoft.Graph/Generated/Models/PropertyToEvaluate.cs b/src/Microsoft.Graph/Generated/Models/PropertyToEvaluate.cs index af752e7e509..dfce66dbe4e 100644 --- a/src/Microsoft.Graph/Generated/Models/PropertyToEvaluate.cs +++ b/src/Microsoft.Graph/Generated/Models/PropertyToEvaluate.cs @@ -84,7 +84,7 @@ public PropertyToEvaluate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PropertyToEvaluate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PropertyToEvaluate(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("propertyName", PropertyName); writer.WriteStringValue("propertyValue", PropertyValue); diff --git a/src/Microsoft.Graph/Generated/Models/ProtectAdhocAction.cs b/src/Microsoft.Graph/Generated/Models/ProtectAdhocAction.cs index 54d552cb4ea..c2ad3f23fcb 100644 --- a/src/Microsoft.Graph/Generated/Models/ProtectAdhocAction.cs +++ b/src/Microsoft.Graph/Generated/Models/ProtectAdhocAction.cs @@ -26,7 +26,7 @@ public ProtectAdhocAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProtectAdhocAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProtectAdhocAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ProtectByTemplateAction.cs b/src/Microsoft.Graph/Generated/Models/ProtectByTemplateAction.cs index 0ebdb2e815f..98d4397a00d 100644 --- a/src/Microsoft.Graph/Generated/Models/ProtectByTemplateAction.cs +++ b/src/Microsoft.Graph/Generated/Models/ProtectByTemplateAction.cs @@ -42,7 +42,7 @@ public ProtectByTemplateAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProtectByTemplateAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProtectByTemplateAction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("templateId", TemplateId); } diff --git a/src/Microsoft.Graph/Generated/Models/ProtectDoNotForwardAction.cs b/src/Microsoft.Graph/Generated/Models/ProtectDoNotForwardAction.cs index 5c8daca3821..37e23cea0ca 100644 --- a/src/Microsoft.Graph/Generated/Models/ProtectDoNotForwardAction.cs +++ b/src/Microsoft.Graph/Generated/Models/ProtectDoNotForwardAction.cs @@ -26,7 +26,7 @@ public ProtectDoNotForwardAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProtectDoNotForwardAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProtectDoNotForwardAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ProtectGroup.cs b/src/Microsoft.Graph/Generated/Models/ProtectGroup.cs index affc7151e04..b3a3899249f 100644 --- a/src/Microsoft.Graph/Generated/Models/ProtectGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/ProtectGroup.cs @@ -44,7 +44,7 @@ public ProtectGroup() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProtectGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProtectGroup(); } /// @@ -66,7 +66,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowEmailFromGuestUsers", AllowEmailFromGuestUsers); writer.WriteBoolValue("allowGuestUsers", AllowGuestUsers); diff --git a/src/Microsoft.Graph/Generated/Models/ProtectOnlineMeetingAction.cs b/src/Microsoft.Graph/Generated/Models/ProtectOnlineMeetingAction.cs index 1a967f62e6a..39b8e13b16d 100644 --- a/src/Microsoft.Graph/Generated/Models/ProtectOnlineMeetingAction.cs +++ b/src/Microsoft.Graph/Generated/Models/ProtectOnlineMeetingAction.cs @@ -66,7 +66,7 @@ public ProtectOnlineMeetingAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProtectOnlineMeetingAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProtectOnlineMeetingAction(); } /// @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("allowedForwarders", AllowedForwarders); writer.WriteEnumValue("allowedPresenters", AllowedPresenters); diff --git a/src/Microsoft.Graph/Generated/Models/ProtectSite.cs b/src/Microsoft.Graph/Generated/Models/ProtectSite.cs index af21067ea2e..68b74d566f1 100644 --- a/src/Microsoft.Graph/Generated/Models/ProtectSite.cs +++ b/src/Microsoft.Graph/Generated/Models/ProtectSite.cs @@ -48,7 +48,7 @@ public ProtectSite() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProtectSite CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProtectSite(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessType", AccessType); writer.WriteStringValue("conditionalAccessProtectionLevelId", ConditionalAccessProtectionLevelId); diff --git a/src/Microsoft.Graph/Generated/Models/ProtectedApplicationMetadata.cs b/src/Microsoft.Graph/Generated/Models/ProtectedApplicationMetadata.cs index f7b392bbcb1..1a3e23dcd0f 100644 --- a/src/Microsoft.Graph/Generated/Models/ProtectedApplicationMetadata.cs +++ b/src/Microsoft.Graph/Generated/Models/ProtectedApplicationMetadata.cs @@ -42,7 +42,7 @@ public ProtectedApplicationMetadata() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProtectedApplicationMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProtectedApplicationMetadata(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("applicationLocation", ApplicationLocation); } diff --git a/src/Microsoft.Graph/Generated/Models/ProtectedContent.cs b/src/Microsoft.Graph/Generated/Models/ProtectedContent.cs index f0dbbf90e68..4d1b5b7cc81 100644 --- a/src/Microsoft.Graph/Generated/Models/ProtectedContent.cs +++ b/src/Microsoft.Graph/Generated/Models/ProtectedContent.cs @@ -100,7 +100,7 @@ public ProtectedContent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProtectedContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProtectedContent(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("cid", Cid); writer.WriteStringValue("format", Format); writer.WriteStringValue("labelId", LabelId); diff --git a/src/Microsoft.Graph/Generated/Models/ProtectionPolicyBase.cs b/src/Microsoft.Graph/Generated/Models/ProtectionPolicyBase.cs index a05dbd7fd03..faaed7b8726 100644 --- a/src/Microsoft.Graph/Generated/Models/ProtectionPolicyBase.cs +++ b/src/Microsoft.Graph/Generated/Models/ProtectionPolicyBase.cs @@ -117,7 +117,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProtectionPolicyBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -151,7 +151,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("billingPolicyId", BillingPolicyId); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/ProtectionPolicyBaseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ProtectionPolicyBaseCollectionResponse.cs index 98ed870b3d3..c17829e3470 100644 --- a/src/Microsoft.Graph/Generated/Models/ProtectionPolicyBaseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ProtectionPolicyBaseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProtectionPolicyBaseCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProtectionPolicyBaseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProtectionPolicyBaseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ProtectionRuleBase.cs b/src/Microsoft.Graph/Generated/Models/ProtectionRuleBase.cs index 111b871e872..892d6fe3200 100644 --- a/src/Microsoft.Graph/Generated/Models/ProtectionRuleBase.cs +++ b/src/Microsoft.Graph/Generated/Models/ProtectionRuleBase.cs @@ -91,7 +91,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProtectionRuleBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -124,7 +124,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ProtectionUnitBase.cs b/src/Microsoft.Graph/Generated/Models/ProtectionUnitBase.cs index 38fc7a5c9b1..e8a48f673db 100644 --- a/src/Microsoft.Graph/Generated/Models/ProtectionUnitBase.cs +++ b/src/Microsoft.Graph/Generated/Models/ProtectionUnitBase.cs @@ -113,7 +113,7 @@ public string PolicyId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProtectionUnitBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -148,7 +148,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ProtectionUnitBaseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ProtectionUnitBaseCollectionResponse.cs index 86178673fd8..83d034f0af7 100644 --- a/src/Microsoft.Graph/Generated/Models/ProtectionUnitBaseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ProtectionUnitBaseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProtectionUnitBaseCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProtectionUnitBaseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProtectionUnitBaseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ProtectionUnitsBulkJobBase.cs b/src/Microsoft.Graph/Generated/Models/ProtectionUnitsBulkJobBase.cs index 6a3205dda0d..6bdc70c4385 100644 --- a/src/Microsoft.Graph/Generated/Models/ProtectionUnitsBulkJobBase.cs +++ b/src/Microsoft.Graph/Generated/Models/ProtectionUnitsBulkJobBase.cs @@ -101,7 +101,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProtectionUnitsBulkJobBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -134,7 +134,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ProviderTenantSetting.cs b/src/Microsoft.Graph/Generated/Models/ProviderTenantSetting.cs index 3aabf220d35..975f8fb011b 100644 --- a/src/Microsoft.Graph/Generated/Models/ProviderTenantSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/ProviderTenantSetting.cs @@ -79,7 +79,7 @@ public string Vendor /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProviderTenantSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProviderTenantSetting(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("azureTenantId", AzureTenantId); writer.WriteBoolValue("enabled", Enabled); diff --git a/src/Microsoft.Graph/Generated/Models/ProviderTenantSettingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ProviderTenantSettingCollectionResponse.cs index bea3f0ab021..d9ed5b26c09 100644 --- a/src/Microsoft.Graph/Generated/Models/ProviderTenantSettingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ProviderTenantSettingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProviderTenantSettingCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProviderTenantSettingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProviderTenantSettingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ProvisionChannelEmailResult.cs b/src/Microsoft.Graph/Generated/Models/ProvisionChannelEmailResult.cs index 8b0836b3de4..bfe73646af1 100644 --- a/src/Microsoft.Graph/Generated/Models/ProvisionChannelEmailResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ProvisionChannelEmailResult.cs @@ -68,7 +68,7 @@ public ProvisionChannelEmailResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProvisionChannelEmailResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProvisionChannelEmailResult(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("email", Email); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ProvisionedIdentity.cs b/src/Microsoft.Graph/Generated/Models/ProvisionedIdentity.cs index 15b09a2aa8c..6bdc39c824e 100644 --- a/src/Microsoft.Graph/Generated/Models/ProvisionedIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/ProvisionedIdentity.cs @@ -58,7 +58,7 @@ public ProvisionedIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProvisionedIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProvisionedIdentity(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("details", Details); writer.WriteStringValue("identityType", IdentityType); diff --git a/src/Microsoft.Graph/Generated/Models/ProvisionedPlan.cs b/src/Microsoft.Graph/Generated/Models/ProvisionedPlan.cs index 5b8da39760e..01a05afab5d 100644 --- a/src/Microsoft.Graph/Generated/Models/ProvisionedPlan.cs +++ b/src/Microsoft.Graph/Generated/Models/ProvisionedPlan.cs @@ -100,7 +100,7 @@ public ProvisionedPlan() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProvisionedPlan CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProvisionedPlan(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("capabilityStatus", CapabilityStatus); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("provisioningStatus", ProvisioningStatus); diff --git a/src/Microsoft.Graph/Generated/Models/ProvisioningErrorInfo.cs b/src/Microsoft.Graph/Generated/Models/ProvisioningErrorInfo.cs index 0008b83ada9..4677757ad2b 100644 --- a/src/Microsoft.Graph/Generated/Models/ProvisioningErrorInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ProvisioningErrorInfo.cs @@ -122,7 +122,7 @@ public ProvisioningErrorInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProvisioningErrorInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProvisioningErrorInfo(); } /// @@ -147,7 +147,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("additionalDetails", AdditionalDetails); writer.WriteEnumValue("errorCategory", ErrorCategory); writer.WriteStringValue("errorCode", ErrorCode); diff --git a/src/Microsoft.Graph/Generated/Models/ProvisioningObjectSummary.cs b/src/Microsoft.Graph/Generated/Models/ProvisioningObjectSummary.cs index 68222b668a1..35081caced1 100644 --- a/src/Microsoft.Graph/Generated/Models/ProvisioningObjectSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/ProvisioningObjectSummary.cs @@ -277,7 +277,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProvisioningObjectSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProvisioningObjectSummary(); } /// @@ -314,7 +314,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("action", Action); writer.WriteDateTimeOffsetValue("activityDateTime", ActivityDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ProvisioningObjectSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ProvisioningObjectSummaryCollectionResponse.cs index dcb9c75c1ac..c2bb9b5f07e 100644 --- a/src/Microsoft.Graph/Generated/Models/ProvisioningObjectSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ProvisioningObjectSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProvisioningObjectSummaryCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProvisioningObjectSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProvisioningObjectSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ProvisioningServicePrincipal.cs b/src/Microsoft.Graph/Generated/Models/ProvisioningServicePrincipal.cs index 8e7c11d3a84..46501ebeff7 100644 --- a/src/Microsoft.Graph/Generated/Models/ProvisioningServicePrincipal.cs +++ b/src/Microsoft.Graph/Generated/Models/ProvisioningServicePrincipal.cs @@ -26,7 +26,7 @@ public ProvisioningServicePrincipal() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProvisioningServicePrincipal CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProvisioningServicePrincipal(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ProvisioningStatusInfo.cs b/src/Microsoft.Graph/Generated/Models/ProvisioningStatusInfo.cs index 6df7921d025..7a67fd42c4b 100644 --- a/src/Microsoft.Graph/Generated/Models/ProvisioningStatusInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ProvisioningStatusInfo.cs @@ -74,7 +74,7 @@ public ProvisioningStatusInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProvisioningStatusInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProvisioningStatusInfo(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("errorInformation", ErrorInformation); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/ProvisioningStep.cs b/src/Microsoft.Graph/Generated/Models/ProvisioningStep.cs index bd7e71d629a..354fd631c84 100644 --- a/src/Microsoft.Graph/Generated/Models/ProvisioningStep.cs +++ b/src/Microsoft.Graph/Generated/Models/ProvisioningStep.cs @@ -112,7 +112,7 @@ public ProvisioningStep() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProvisioningStep CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProvisioningStep(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteObjectValue("details", Details); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/ProvisioningSystem.cs b/src/Microsoft.Graph/Generated/Models/ProvisioningSystem.cs index 4e3e19a5226..ac363893ed7 100644 --- a/src/Microsoft.Graph/Generated/Models/ProvisioningSystem.cs +++ b/src/Microsoft.Graph/Generated/Models/ProvisioningSystem.cs @@ -42,7 +42,7 @@ public ProvisioningSystem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ProvisioningSystem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProvisioningSystem(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("details", Details); } diff --git a/src/Microsoft.Graph/Generated/Models/ProxiedDomain.cs b/src/Microsoft.Graph/Generated/Models/ProxiedDomain.cs index 4174b8ba38b..6261c26a788 100644 --- a/src/Microsoft.Graph/Generated/Models/ProxiedDomain.cs +++ b/src/Microsoft.Graph/Generated/Models/ProxiedDomain.cs @@ -85,7 +85,7 @@ public ProxiedDomain() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ProxiedDomain CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ProxiedDomain(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("ipAddressOrFQDN", IpAddressOrFQDN); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("proxy", Proxy); diff --git a/src/Microsoft.Graph/Generated/Models/PublicClientApplication.cs b/src/Microsoft.Graph/Generated/Models/PublicClientApplication.cs index 6ff16ea52ed..63dd7c62abf 100644 --- a/src/Microsoft.Graph/Generated/Models/PublicClientApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/PublicClientApplication.cs @@ -68,7 +68,7 @@ public PublicClientApplication() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PublicClientApplication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PublicClientApplication(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("redirectUris", RedirectUris); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/PublicError.cs b/src/Microsoft.Graph/Generated/Models/PublicError.cs index c544e391c0b..e0cfe8a9315 100644 --- a/src/Microsoft.Graph/Generated/Models/PublicError.cs +++ b/src/Microsoft.Graph/Generated/Models/PublicError.cs @@ -132,7 +132,7 @@ public PublicError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PublicError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PublicError(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteCollectionOfObjectValues("details", Details); writer.WriteObjectValue("innerError", InnerError); diff --git a/src/Microsoft.Graph/Generated/Models/PublicErrorDetail.cs b/src/Microsoft.Graph/Generated/Models/PublicErrorDetail.cs index bc11c2b3127..2fa4bc6cc10 100644 --- a/src/Microsoft.Graph/Generated/Models/PublicErrorDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/PublicErrorDetail.cs @@ -100,7 +100,7 @@ public PublicErrorDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PublicErrorDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PublicErrorDetail(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PublicInnerError.cs b/src/Microsoft.Graph/Generated/Models/PublicInnerError.cs index a138bde9d14..605c82b2052 100644 --- a/src/Microsoft.Graph/Generated/Models/PublicInnerError.cs +++ b/src/Microsoft.Graph/Generated/Models/PublicInnerError.cs @@ -116,7 +116,7 @@ public PublicInnerError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PublicInnerError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PublicInnerError(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteCollectionOfObjectValues("details", Details); writer.WriteStringValue("message", Message); diff --git a/src/Microsoft.Graph/Generated/Models/PublicKeyInfrastructureRoot.cs b/src/Microsoft.Graph/Generated/Models/PublicKeyInfrastructureRoot.cs index 89b11a3f0b8..e137a21d007 100644 --- a/src/Microsoft.Graph/Generated/Models/PublicKeyInfrastructureRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/PublicKeyInfrastructureRoot.cs @@ -35,7 +35,7 @@ public partial class PublicKeyInfrastructureRoot : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PublicKeyInfrastructureRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PublicKeyInfrastructureRoot(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("certificateBasedAuthConfigurations", CertificateBasedAuthConfigurations); } diff --git a/src/Microsoft.Graph/Generated/Models/PublicationFacet.cs b/src/Microsoft.Graph/Generated/Models/PublicationFacet.cs index 25d184eb58e..b12688ef3e6 100644 --- a/src/Microsoft.Graph/Generated/Models/PublicationFacet.cs +++ b/src/Microsoft.Graph/Generated/Models/PublicationFacet.cs @@ -100,7 +100,7 @@ public PublicationFacet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PublicationFacet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PublicationFacet(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("checkedOutBy", CheckedOutBy); writer.WriteStringValue("level", Level); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/PublishedResource.cs b/src/Microsoft.Graph/Generated/Models/PublishedResource.cs index 30ad107a857..4d52159e7b5 100644 --- a/src/Microsoft.Graph/Generated/Models/PublishedResource.cs +++ b/src/Microsoft.Graph/Generated/Models/PublishedResource.cs @@ -73,7 +73,7 @@ public string ResourceName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PublishedResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PublishedResource(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("agentGroups", AgentGroups); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/PublishedResourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PublishedResourceCollectionResponse.cs index bf1369c4c29..d06495904c3 100644 --- a/src/Microsoft.Graph/Generated/Models/PublishedResourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PublishedResourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PublishedResourceCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PublishedResourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PublishedResourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PurchaseInvoice.cs b/src/Microsoft.Graph/Generated/Models/PurchaseInvoice.cs index 34779f44908..6d487816e06 100644 --- a/src/Microsoft.Graph/Generated/Models/PurchaseInvoice.cs +++ b/src/Microsoft.Graph/Generated/Models/PurchaseInvoice.cs @@ -403,7 +403,7 @@ public PurchaseInvoice() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.PurchaseInvoice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PurchaseInvoice(); } /// @@ -453,7 +453,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("buyFromAddress", BuyFromAddress); writer.WriteObjectValue("currency", Currency); writer.WriteStringValue("currencyCode", CurrencyCode); diff --git a/src/Microsoft.Graph/Generated/Models/PurchaseInvoiceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PurchaseInvoiceCollectionResponse.cs index 1917018c5b0..ce193f5dca5 100644 --- a/src/Microsoft.Graph/Generated/Models/PurchaseInvoiceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PurchaseInvoiceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PurchaseInvoiceCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PurchaseInvoiceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PurchaseInvoiceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/PurchaseInvoiceLine.cs b/src/Microsoft.Graph/Generated/Models/PurchaseInvoiceLine.cs index cd6c349f90a..2c49be98157 100644 --- a/src/Microsoft.Graph/Generated/Models/PurchaseInvoiceLine.cs +++ b/src/Microsoft.Graph/Generated/Models/PurchaseInvoiceLine.cs @@ -208,7 +208,7 @@ public decimal? UnitCost /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PurchaseInvoiceLine CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PurchaseInvoiceLine(); } /// @@ -250,7 +250,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("account", Account); writer.WriteGuidValue("accountId", AccountId); diff --git a/src/Microsoft.Graph/Generated/Models/PurchaseInvoiceLineCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/PurchaseInvoiceLineCollectionResponse.cs index 20bad9d267c..924458cfb29 100644 --- a/src/Microsoft.Graph/Generated/Models/PurchaseInvoiceLineCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/PurchaseInvoiceLineCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PurchaseInvoiceLineCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.PurchaseInvoiceLineCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.PurchaseInvoiceLineCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/QrCode.cs b/src/Microsoft.Graph/Generated/Models/QrCode.cs index d10ef21d980..e9caf8b9a56 100644 --- a/src/Microsoft.Graph/Generated/Models/QrCode.cs +++ b/src/Microsoft.Graph/Generated/Models/QrCode.cs @@ -59,7 +59,7 @@ public DateTimeOffset? StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.QrCode CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.QrCode(); } /// @@ -83,7 +83,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("expireDateTime", ExpireDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/QrCodeImageDetails.cs b/src/Microsoft.Graph/Generated/Models/QrCodeImageDetails.cs index 39a1046edd0..dd9f6ecdb6f 100644 --- a/src/Microsoft.Graph/Generated/Models/QrCodeImageDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/QrCodeImageDetails.cs @@ -96,7 +96,7 @@ public QrCodeImageDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.QrCodeImageDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.QrCodeImageDetails(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("binaryValue", BinaryValue); writer.WriteEnumValue("errorCorrectionLevel", ErrorCorrectionLevel); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/QrCodePinAuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/QrCodePinAuthenticationMethod.cs index 6c78f2b7dae..13b1370b4bf 100644 --- a/src/Microsoft.Graph/Generated/Models/QrCodePinAuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/QrCodePinAuthenticationMethod.cs @@ -74,7 +74,7 @@ public QrCodePinAuthenticationMethod() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.QrCodePinAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.QrCodePinAuthenticationMethod(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("pin", Pin); writer.WriteObjectValue("standardQRCode", StandardQRCode); diff --git a/src/Microsoft.Graph/Generated/Models/QrCodePinAuthenticationMethodConfiguration.cs b/src/Microsoft.Graph/Generated/Models/QrCodePinAuthenticationMethodConfiguration.cs index 7d61440d694..600a75da66b 100644 --- a/src/Microsoft.Graph/Generated/Models/QrCodePinAuthenticationMethodConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/QrCodePinAuthenticationMethodConfiguration.cs @@ -54,7 +54,7 @@ public QrCodePinAuthenticationMethodConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.QrCodePinAuthenticationMethodConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.QrCodePinAuthenticationMethodConfiguration(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("includeTargets", IncludeTargets); writer.WriteIntValue("pinLength", PinLength); diff --git a/src/Microsoft.Graph/Generated/Models/QrPin.cs b/src/Microsoft.Graph/Generated/Models/QrPin.cs index 4a16e91cfb8..57ef631bbc1 100644 --- a/src/Microsoft.Graph/Generated/Models/QrPin.cs +++ b/src/Microsoft.Graph/Generated/Models/QrPin.cs @@ -53,7 +53,7 @@ public DateTimeOffset? UpdatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.QrPin CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.QrPin(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("code", Code); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Quota.cs b/src/Microsoft.Graph/Generated/Models/Quota.cs index 4eeaba47306..d630bb54410 100644 --- a/src/Microsoft.Graph/Generated/Models/Quota.cs +++ b/src/Microsoft.Graph/Generated/Models/Quota.cs @@ -108,7 +108,7 @@ public Quota() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Quota CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Quota(); } /// @@ -134,7 +134,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("deleted", Deleted); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("remaining", Remaining); diff --git a/src/Microsoft.Graph/Generated/Models/RankedEmailAddress.cs b/src/Microsoft.Graph/Generated/Models/RankedEmailAddress.cs index 48b0ca9bf7a..38c33da43d2 100644 --- a/src/Microsoft.Graph/Generated/Models/RankedEmailAddress.cs +++ b/src/Microsoft.Graph/Generated/Models/RankedEmailAddress.cs @@ -74,7 +74,7 @@ public RankedEmailAddress() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RankedEmailAddress CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RankedEmailAddress(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("address", Address); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDoubleValue("rank", Rank); diff --git a/src/Microsoft.Graph/Generated/Models/RbacApplication.cs b/src/Microsoft.Graph/Generated/Models/RbacApplication.cs index e3f0798d4ba..5b56f1cd1f7 100644 --- a/src/Microsoft.Graph/Generated/Models/RbacApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/RbacApplication.cs @@ -195,7 +195,7 @@ public partial class RbacApplication : global::Microsoft.Graph.Beta.Models.Entit /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RbacApplication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RbacApplication(); } /// @@ -225,7 +225,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("resourceNamespaces", ResourceNamespaces); writer.WriteCollectionOfObjectValues("roleAssignmentApprovals", RoleAssignmentApprovals); diff --git a/src/Microsoft.Graph/Generated/Models/RbacApplicationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RbacApplicationCollectionResponse.cs index 1a1811f47ce..4ceb0c9e439 100644 --- a/src/Microsoft.Graph/Generated/Models/RbacApplicationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RbacApplicationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RbacApplicationCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RbacApplicationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RbacApplicationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RbacApplicationMultiple.cs b/src/Microsoft.Graph/Generated/Models/RbacApplicationMultiple.cs index 8ad449a51aa..e95791bb829 100644 --- a/src/Microsoft.Graph/Generated/Models/RbacApplicationMultiple.cs +++ b/src/Microsoft.Graph/Generated/Models/RbacApplicationMultiple.cs @@ -67,7 +67,7 @@ public partial class RbacApplicationMultiple : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RbacApplicationMultiple CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("resourceNamespaces", ResourceNamespaces); writer.WriteCollectionOfObjectValues("roleAssignments", RoleAssignments); diff --git a/src/Microsoft.Graph/Generated/Models/ReactionsFacet.cs b/src/Microsoft.Graph/Generated/Models/ReactionsFacet.cs index 58b32186af9..da8ad708da8 100644 --- a/src/Microsoft.Graph/Generated/Models/ReactionsFacet.cs +++ b/src/Microsoft.Graph/Generated/Models/ReactionsFacet.cs @@ -70,7 +70,7 @@ public ReactionsFacet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ReactionsFacet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReactionsFacet(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("commentCount", CommentCount); writer.WriteIntValue("likeCount", LikeCount); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ReadingAssignmentSubmission.cs b/src/Microsoft.Graph/Generated/Models/ReadingAssignmentSubmission.cs index 5ad46997062..d7c70d6e587 100644 --- a/src/Microsoft.Graph/Generated/Models/ReadingAssignmentSubmission.cs +++ b/src/Microsoft.Graph/Generated/Models/ReadingAssignmentSubmission.cs @@ -205,7 +205,7 @@ public double? WordsPerMinute /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ReadingAssignmentSubmission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReadingAssignmentSubmission(); } /// @@ -245,7 +245,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDoubleValue("accuracyScore", AccuracyScore); writer.WriteStringValue("action", Action); diff --git a/src/Microsoft.Graph/Generated/Models/ReadingAssignmentSubmissionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ReadingAssignmentSubmissionCollectionResponse.cs index 7e31b3ba163..8920730dbf8 100644 --- a/src/Microsoft.Graph/Generated/Models/ReadingAssignmentSubmissionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ReadingAssignmentSubmissionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ReadingAssignmentSubmissionCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ReadingAssignmentSubmissionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReadingAssignmentSubmissionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ReadingCoachPassage.cs b/src/Microsoft.Graph/Generated/Models/ReadingCoachPassage.cs index 94af8495c6d..b382e8eca2b 100644 --- a/src/Microsoft.Graph/Generated/Models/ReadingCoachPassage.cs +++ b/src/Microsoft.Graph/Generated/Models/ReadingCoachPassage.cs @@ -103,7 +103,7 @@ public double? WordsPerMinute /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ReadingCoachPassage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReadingCoachPassage(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isReadingCompleted", IsReadingCompleted); writer.WriteStringValue("languageTag", LanguageTag); diff --git a/src/Microsoft.Graph/Generated/Models/ReadingCoachPassageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ReadingCoachPassageCollectionResponse.cs index 3a118549171..829d5f8251c 100644 --- a/src/Microsoft.Graph/Generated/Models/ReadingCoachPassageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ReadingCoachPassageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ReadingCoachPassageCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ReadingCoachPassageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReadingCoachPassageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RealTimeTranscript.cs b/src/Microsoft.Graph/Generated/Models/RealTimeTranscript.cs new file mode 100644 index 00000000000..c7d1cae4772 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/RealTimeTranscript.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Microsoft.Graph.Beta.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RealTimeTranscript : global::Microsoft.Graph.Beta.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The payloads property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Payloads + { + get { return BackingStore?.Get?>("payloads"); } + set { BackingStore?.Set("payloads", value); } + } +#nullable restore +#else + public List Payloads + { + get { return BackingStore?.Get>("payloads"); } + set { BackingStore?.Set("payloads", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Microsoft.Graph.Beta.Models.RealTimeTranscript CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Microsoft.Graph.Beta.Models.RealTimeTranscript(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "payloads", n => { Payloads = n.GetCollectionOfObjectValues(global::Microsoft.Graph.Beta.Models.TranscriptPayload.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("payloads", Payloads); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Microsoft.Graph/Generated/Models/RealtimeActivityFeedRoot.cs b/src/Microsoft.Graph/Generated/Models/RealtimeActivityFeedRoot.cs new file mode 100644 index 00000000000..799877e4ce4 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/RealtimeActivityFeedRoot.cs @@ -0,0 +1,82 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Microsoft.Graph.Beta.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RealtimeActivityFeedRoot : global::Microsoft.Graph.Beta.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The meetings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Meetings + { + get { return BackingStore?.Get?>("meetings"); } + set { BackingStore?.Set("meetings", value); } + } +#nullable restore +#else + public List Meetings + { + get { return BackingStore?.Get>("meetings"); } + set { BackingStore?.Set("meetings", value); } + } +#endif + /// The multiActivitySubscriptions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? MultiActivitySubscriptions + { + get { return BackingStore?.Get?>("multiActivitySubscriptions"); } + set { BackingStore?.Set("multiActivitySubscriptions", value); } + } +#nullable restore +#else + public List MultiActivitySubscriptions + { + get { return BackingStore?.Get>("multiActivitySubscriptions"); } + set { BackingStore?.Set("multiActivitySubscriptions", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Microsoft.Graph.Beta.Models.RealtimeActivityFeedRoot CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Microsoft.Graph.Beta.Models.RealtimeActivityFeedRoot(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "meetings", n => { Meetings = n.GetCollectionOfObjectValues(global::Microsoft.Graph.Beta.Models.RealtimeActivityMeeting.CreateFromDiscriminatorValue)?.AsList(); } }, + { "multiActivitySubscriptions", n => { MultiActivitySubscriptions = n.GetCollectionOfObjectValues(global::Microsoft.Graph.Beta.Models.MultiActivitySubscription.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("meetings", Meetings); + writer.WriteCollectionOfObjectValues("multiActivitySubscriptions", MultiActivitySubscriptions); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Microsoft.Graph/Generated/Models/RealtimeActivityMeeting.cs b/src/Microsoft.Graph/Generated/Models/RealtimeActivityMeeting.cs new file mode 100644 index 00000000000..785b298b0bf --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/RealtimeActivityMeeting.cs @@ -0,0 +1,64 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Microsoft.Graph.Beta.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class RealtimeActivityMeeting : global::Microsoft.Graph.Beta.Models.Entity, IParsable + #pragma warning restore CS1591 + { + /// The transcripts property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Transcripts + { + get { return BackingStore?.Get?>("transcripts"); } + set { BackingStore?.Set("transcripts", value); } + } +#nullable restore +#else + public List Transcripts + { + get { return BackingStore?.Get>("transcripts"); } + set { BackingStore?.Set("transcripts", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Microsoft.Graph.Beta.Models.RealtimeActivityMeeting CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Microsoft.Graph.Beta.Models.RealtimeActivityMeeting(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + { "transcripts", n => { Transcripts = n.GetCollectionOfObjectValues(global::Microsoft.Graph.Beta.Models.RealTimeTranscript.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("transcripts", Transcripts); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Microsoft.Graph/Generated/Models/RecentNotebook.cs b/src/Microsoft.Graph/Generated/Models/RecentNotebook.cs index cebe74963cb..da6726e96f8 100644 --- a/src/Microsoft.Graph/Generated/Models/RecentNotebook.cs +++ b/src/Microsoft.Graph/Generated/Models/RecentNotebook.cs @@ -96,7 +96,7 @@ public RecentNotebook() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RecentNotebook CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecentNotebook(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("lastAccessedTime", LastAccessedTime); writer.WriteObjectValue("links", Links); diff --git a/src/Microsoft.Graph/Generated/Models/RecentNotebookLinks.cs b/src/Microsoft.Graph/Generated/Models/RecentNotebookLinks.cs index 805b7f54c0a..6045b7e3ed8 100644 --- a/src/Microsoft.Graph/Generated/Models/RecentNotebookLinks.cs +++ b/src/Microsoft.Graph/Generated/Models/RecentNotebookLinks.cs @@ -84,7 +84,7 @@ public RecentNotebookLinks() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RecentNotebookLinks CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecentNotebookLinks(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("oneNoteClientUrl", OneNoteClientUrl); writer.WriteObjectValue("oneNoteWebUrl", OneNoteWebUrl); diff --git a/src/Microsoft.Graph/Generated/Models/Recipient.cs b/src/Microsoft.Graph/Generated/Models/Recipient.cs index 5ad45f8798f..2a79b5e31a8 100644 --- a/src/Microsoft.Graph/Generated/Models/Recipient.cs +++ b/src/Microsoft.Graph/Generated/Models/Recipient.cs @@ -68,7 +68,7 @@ public Recipient() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Recipient CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -95,7 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("emailAddress", EmailAddress); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/RecommendLabelAction.cs b/src/Microsoft.Graph/Generated/Models/RecommendLabelAction.cs index 41bc448085c..78452f764b2 100644 --- a/src/Microsoft.Graph/Generated/Models/RecommendLabelAction.cs +++ b/src/Microsoft.Graph/Generated/Models/RecommendLabelAction.cs @@ -80,7 +80,7 @@ public RecommendLabelAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RecommendLabelAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecommendLabelAction(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("actions", Actions); writer.WriteEnumValue("actionSource", ActionSource); diff --git a/src/Microsoft.Graph/Generated/Models/Recommendation.cs b/src/Microsoft.Graph/Generated/Models/Recommendation.cs index 1c0e732822e..46b4b5f9d4b 100644 --- a/src/Microsoft.Graph/Generated/Models/Recommendation.cs +++ b/src/Microsoft.Graph/Generated/Models/Recommendation.cs @@ -19,7 +19,7 @@ public partial class Recommendation : global::Microsoft.Graph.Beta.Models.Recomm /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Recommendation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Recommendation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/RecommendationBase.cs b/src/Microsoft.Graph/Generated/Models/RecommendationBase.cs index 5e845148f16..edb29b38647 100644 --- a/src/Microsoft.Graph/Generated/Models/RecommendationBase.cs +++ b/src/Microsoft.Graph/Generated/Models/RecommendationBase.cs @@ -251,7 +251,7 @@ public string RemediationImpact /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RecommendationBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -297,7 +297,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("actionSteps", ActionSteps); writer.WriteStringValue("benefits", Benefits); diff --git a/src/Microsoft.Graph/Generated/Models/RecommendationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RecommendationCollectionResponse.cs index 9c05811d324..12e68e333d5 100644 --- a/src/Microsoft.Graph/Generated/Models/RecommendationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RecommendationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RecommendationCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RecommendationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecommendationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RecommendationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/RecommendationConfiguration.cs index d84eac12bfd..b19296f7518 100644 --- a/src/Microsoft.Graph/Generated/Models/RecommendationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/RecommendationConfiguration.cs @@ -25,7 +25,7 @@ public bool? IsNotificationEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RecommendationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecommendationConfiguration(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isNotificationEnabled", IsNotificationEnabled); } diff --git a/src/Microsoft.Graph/Generated/Models/RecommendedAction.cs b/src/Microsoft.Graph/Generated/Models/RecommendedAction.cs index e96a677f149..c6bff970b6c 100644 --- a/src/Microsoft.Graph/Generated/Models/RecommendedAction.cs +++ b/src/Microsoft.Graph/Generated/Models/RecommendedAction.cs @@ -90,7 +90,7 @@ public RecommendedAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RecommendedAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecommendedAction(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("actionWebUrl", ActionWebUrl); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDoubleValue("potentialScoreImpact", PotentialScoreImpact); diff --git a/src/Microsoft.Graph/Generated/Models/RecordOperation.cs b/src/Microsoft.Graph/Generated/Models/RecordOperation.cs index dd7f1943fcb..e70f128e127 100644 --- a/src/Microsoft.Graph/Generated/Models/RecordOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/RecordOperation.cs @@ -57,7 +57,7 @@ public string RecordingLocation /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RecordOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecordOperation(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("completionReason", CompletionReason); writer.WriteStringValue("recordingAccessToken", RecordingAccessToken); diff --git a/src/Microsoft.Graph/Generated/Models/RecordingInfo.cs b/src/Microsoft.Graph/Generated/Models/RecordingInfo.cs index eb8778ccfc5..9828b23d91a 100644 --- a/src/Microsoft.Graph/Generated/Models/RecordingInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/RecordingInfo.cs @@ -90,7 +90,7 @@ public RecordingInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RecordingInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecordingInfo(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("initiatedBy", InitiatedBy); writer.WriteObjectValue("initiator", Initiator); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/RecordingState.cs b/src/Microsoft.Graph/Generated/Models/RecordingState.cs index 399cc61777a..71a07276c7f 100644 --- a/src/Microsoft.Graph/Generated/Models/RecordingState.cs +++ b/src/Microsoft.Graph/Generated/Models/RecordingState.cs @@ -64,7 +64,7 @@ public RecordingState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RecordingState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecordingState(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("sequenceNumber", SequenceNumber); writer.WriteEnumValue("state", State); diff --git a/src/Microsoft.Graph/Generated/Models/RecurrencePattern.cs b/src/Microsoft.Graph/Generated/Models/RecurrencePattern.cs index 2ad8e84403f..16614ade8f6 100644 --- a/src/Microsoft.Graph/Generated/Models/RecurrencePattern.cs +++ b/src/Microsoft.Graph/Generated/Models/RecurrencePattern.cs @@ -104,7 +104,7 @@ public RecurrencePattern() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RecurrencePattern CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecurrencePattern(); } /// @@ -131,7 +131,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("dayOfMonth", DayOfMonth); writer.WriteCollectionOfEnumValues("daysOfWeek", DaysOfWeek); writer.WriteEnumValue("firstDayOfWeek", FirstDayOfWeek); diff --git a/src/Microsoft.Graph/Generated/Models/RecurrenceRange.cs b/src/Microsoft.Graph/Generated/Models/RecurrenceRange.cs index 6248ef2e90a..750d41503d7 100644 --- a/src/Microsoft.Graph/Generated/Models/RecurrenceRange.cs +++ b/src/Microsoft.Graph/Generated/Models/RecurrenceRange.cs @@ -93,7 +93,7 @@ public RecurrenceRange() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RecurrenceRange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecurrenceRange(); } /// @@ -118,7 +118,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateValue("endDate", EndDate); writer.WriteIntValue("numberOfOccurrences", NumberOfOccurrences); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/RecycleBin.cs b/src/Microsoft.Graph/Generated/Models/RecycleBin.cs index 9cc4e5a7650..4689127f58a 100644 --- a/src/Microsoft.Graph/Generated/Models/RecycleBin.cs +++ b/src/Microsoft.Graph/Generated/Models/RecycleBin.cs @@ -58,7 +58,7 @@ public RecycleBin() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RecycleBin CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecycleBin(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("items", Items); writer.WriteObjectValue("settings", Settings); diff --git a/src/Microsoft.Graph/Generated/Models/RecycleBinItem.cs b/src/Microsoft.Graph/Generated/Models/RecycleBinItem.cs index 45645194873..c785e724145 100644 --- a/src/Microsoft.Graph/Generated/Models/RecycleBinItem.cs +++ b/src/Microsoft.Graph/Generated/Models/RecycleBinItem.cs @@ -54,7 +54,7 @@ public RecycleBinItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RecycleBinItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecycleBinItem(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("deletedDateTime", DeletedDateTime); writer.WriteStringValue("deletedFromLocation", DeletedFromLocation); diff --git a/src/Microsoft.Graph/Generated/Models/RecycleBinItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RecycleBinItemCollectionResponse.cs index 5a253093e64..805aa74e9df 100644 --- a/src/Microsoft.Graph/Generated/Models/RecycleBinItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RecycleBinItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RecycleBinItemCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RecycleBinItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecycleBinItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RecycleBinSettings.cs b/src/Microsoft.Graph/Generated/Models/RecycleBinSettings.cs index 7c6fd73ddb9..64d4635f074 100644 --- a/src/Microsoft.Graph/Generated/Models/RecycleBinSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/RecycleBinSettings.cs @@ -58,7 +58,7 @@ public RecycleBinSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RecycleBinSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RecycleBinSettings(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("retentionPeriodOverrideDays", RetentionPeriodOverrideDays); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/RedirectSingleSignOnExtension.cs b/src/Microsoft.Graph/Generated/Models/RedirectSingleSignOnExtension.cs index 72bb32e8662..0dc0a94069c 100644 --- a/src/Microsoft.Graph/Generated/Models/RedirectSingleSignOnExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/RedirectSingleSignOnExtension.cs @@ -91,7 +91,7 @@ public RedirectSingleSignOnExtension() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RedirectSingleSignOnExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RedirectSingleSignOnExtension(); } /// @@ -114,7 +114,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("configurations", Configurations); writer.WriteStringValue("extensionIdentifier", ExtensionIdentifier); diff --git a/src/Microsoft.Graph/Generated/Models/RedirectUriSettings.cs b/src/Microsoft.Graph/Generated/Models/RedirectUriSettings.cs index 22a7dee9516..e5e8bf72e72 100644 --- a/src/Microsoft.Graph/Generated/Models/RedirectUriSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/RedirectUriSettings.cs @@ -74,7 +74,7 @@ public RedirectUriSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RedirectUriSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RedirectUriSettings(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("index", Index); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("uri", Uri); diff --git a/src/Microsoft.Graph/Generated/Models/RedundantAssignmentAlertConfiguration.cs b/src/Microsoft.Graph/Generated/Models/RedundantAssignmentAlertConfiguration.cs index 00eaccde40f..b94a817c654 100644 --- a/src/Microsoft.Graph/Generated/Models/RedundantAssignmentAlertConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/RedundantAssignmentAlertConfiguration.cs @@ -32,7 +32,7 @@ public RedundantAssignmentAlertConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RedundantAssignmentAlertConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RedundantAssignmentAlertConfiguration(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeSpanValue("duration", Duration); } diff --git a/src/Microsoft.Graph/Generated/Models/RedundantAssignmentAlertIncident.cs b/src/Microsoft.Graph/Generated/Models/RedundantAssignmentAlertIncident.cs index b625b88a6b5..b46b108652d 100644 --- a/src/Microsoft.Graph/Generated/Models/RedundantAssignmentAlertIncident.cs +++ b/src/Microsoft.Graph/Generated/Models/RedundantAssignmentAlertIncident.cs @@ -128,7 +128,7 @@ public RedundantAssignmentAlertIncident() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RedundantAssignmentAlertIncident CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RedundantAssignmentAlertIncident(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assigneeDisplayName", AssigneeDisplayName); writer.WriteStringValue("assigneeId", AssigneeId); diff --git a/src/Microsoft.Graph/Generated/Models/ReferenceAttachment.cs b/src/Microsoft.Graph/Generated/Models/ReferenceAttachment.cs index 9b7a64d1927..b4504bd62ff 100644 --- a/src/Microsoft.Graph/Generated/Models/ReferenceAttachment.cs +++ b/src/Microsoft.Graph/Generated/Models/ReferenceAttachment.cs @@ -92,7 +92,7 @@ public ReferenceAttachment() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ReferenceAttachment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReferenceAttachment(); } /// @@ -117,7 +117,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isFolder", IsFolder); writer.WriteEnumValue("permission", Permission); diff --git a/src/Microsoft.Graph/Generated/Models/ReferenceCreate.cs b/src/Microsoft.Graph/Generated/Models/ReferenceCreate.cs index ebcde2ebf38..c2bb673e4bf 100644 --- a/src/Microsoft.Graph/Generated/Models/ReferenceCreate.cs +++ b/src/Microsoft.Graph/Generated/Models/ReferenceCreate.cs @@ -52,7 +52,7 @@ public ReferenceCreate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ReferenceCreate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReferenceCreate(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.id", OdataId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/ReferenceUpdate.cs b/src/Microsoft.Graph/Generated/Models/ReferenceUpdate.cs index 3a002096a48..e7c4fda330a 100644 --- a/src/Microsoft.Graph/Generated/Models/ReferenceUpdate.cs +++ b/src/Microsoft.Graph/Generated/Models/ReferenceUpdate.cs @@ -68,7 +68,7 @@ public ReferenceUpdate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ReferenceUpdate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReferenceUpdate(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.id", OdataId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ReferencedObject.cs b/src/Microsoft.Graph/Generated/Models/ReferencedObject.cs index a2376d1e683..5d672bf5112 100644 --- a/src/Microsoft.Graph/Generated/Models/ReferencedObject.cs +++ b/src/Microsoft.Graph/Generated/Models/ReferencedObject.cs @@ -84,7 +84,7 @@ public ReferencedObject() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ReferencedObject CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReferencedObject(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("referencedObjectName", ReferencedObjectName); writer.WriteStringValue("referencedProperty", ReferencedProperty); diff --git a/src/Microsoft.Graph/Generated/Models/ReflectCheckInResponse.cs b/src/Microsoft.Graph/Generated/Models/ReflectCheckInResponse.cs index 3f958817da9..273b7770e4c 100644 --- a/src/Microsoft.Graph/Generated/Models/ReflectCheckInResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ReflectCheckInResponse.cs @@ -129,7 +129,7 @@ public DateTimeOffset? SubmitDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ReflectCheckInResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReflectCheckInResponse(); } /// @@ -158,7 +158,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("checkInId", CheckInId); writer.WriteStringValue("checkInTitle", CheckInTitle); diff --git a/src/Microsoft.Graph/Generated/Models/ReflectCheckInResponseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ReflectCheckInResponseCollectionResponse.cs index 138fc2bcb0d..70ee06c1035 100644 --- a/src/Microsoft.Graph/Generated/Models/ReflectCheckInResponseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ReflectCheckInResponseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ReflectCheckInResponseCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ReflectCheckInResponseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReflectCheckInResponseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RegexReplaceTransformation.cs b/src/Microsoft.Graph/Generated/Models/RegexReplaceTransformation.cs index 772af3b5467..e6f68e1e05a 100644 --- a/src/Microsoft.Graph/Generated/Models/RegexReplaceTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/RegexReplaceTransformation.cs @@ -74,7 +74,7 @@ public RegexReplaceTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RegexReplaceTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RegexReplaceTransformation(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("additionalAttributes", AdditionalAttributes); writer.WriteStringValue("regex", Regex); diff --git a/src/Microsoft.Graph/Generated/Models/RegionalAndLanguageSettings.cs b/src/Microsoft.Graph/Generated/Models/RegionalAndLanguageSettings.cs index 8cb818e440c..7d92d660a3b 100644 --- a/src/Microsoft.Graph/Generated/Models/RegionalAndLanguageSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/RegionalAndLanguageSettings.cs @@ -131,7 +131,7 @@ public partial class RegionalAndLanguageSettings : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RegionalAndLanguageSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RegionalAndLanguageSettings(); } /// @@ -157,7 +157,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("authoringLanguages", AuthoringLanguages); writer.WriteObjectValue("defaultDisplayLanguage", DefaultDisplayLanguage); diff --git a/src/Microsoft.Graph/Generated/Models/RegionalFormatOverrides.cs b/src/Microsoft.Graph/Generated/Models/RegionalFormatOverrides.cs index 4999ed24836..8b9da503cef 100644 --- a/src/Microsoft.Graph/Generated/Models/RegionalFormatOverrides.cs +++ b/src/Microsoft.Graph/Generated/Models/RegionalFormatOverrides.cs @@ -164,7 +164,7 @@ public RegionalFormatOverrides() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RegionalFormatOverrides CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RegionalFormatOverrides(); } /// @@ -191,7 +191,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("calendar", Calendar); writer.WriteStringValue("firstDayOfWeek", FirstDayOfWeek); writer.WriteStringValue("longDateFormat", LongDateFormat); diff --git a/src/Microsoft.Graph/Generated/Models/RegistrationEnforcement.cs b/src/Microsoft.Graph/Generated/Models/RegistrationEnforcement.cs index c193145fca8..4103f4880ea 100644 --- a/src/Microsoft.Graph/Generated/Models/RegistrationEnforcement.cs +++ b/src/Microsoft.Graph/Generated/Models/RegistrationEnforcement.cs @@ -68,7 +68,7 @@ public RegistrationEnforcement() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RegistrationEnforcement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RegistrationEnforcement(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("authenticationMethodsRegistrationCampaign", AuthenticationMethodsRegistrationCampaign); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/RegistryKeyState.cs b/src/Microsoft.Graph/Generated/Models/RegistryKeyState.cs index 294540094cd..3bd93bb4215 100644 --- a/src/Microsoft.Graph/Generated/Models/RegistryKeyState.cs +++ b/src/Microsoft.Graph/Generated/Models/RegistryKeyState.cs @@ -172,7 +172,7 @@ public RegistryKeyState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RegistryKeyState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RegistryKeyState(); } /// @@ -202,7 +202,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("hive", Hive); writer.WriteStringValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/RelatedContact.cs b/src/Microsoft.Graph/Generated/Models/RelatedContact.cs index dad5a91c967..3fe4faab506 100644 --- a/src/Microsoft.Graph/Generated/Models/RelatedContact.cs +++ b/src/Microsoft.Graph/Generated/Models/RelatedContact.cs @@ -128,7 +128,7 @@ public RelatedContact() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RelatedContact CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RelatedContact(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("accessConsent", AccessConsent); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("emailAddress", EmailAddress); diff --git a/src/Microsoft.Graph/Generated/Models/RelatedPerson.cs b/src/Microsoft.Graph/Generated/Models/RelatedPerson.cs index bca9d934b49..630cffb89dd 100644 --- a/src/Microsoft.Graph/Generated/Models/RelatedPerson.cs +++ b/src/Microsoft.Graph/Generated/Models/RelatedPerson.cs @@ -106,7 +106,7 @@ public RelatedPerson() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RelatedPerson CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RelatedPerson(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("relationship", Relationship); diff --git a/src/Microsoft.Graph/Generated/Models/RelyingPartyDetailedSummary.cs b/src/Microsoft.Graph/Generated/Models/RelyingPartyDetailedSummary.cs index 6dda4423021..c79f7910965 100644 --- a/src/Microsoft.Graph/Generated/Models/RelyingPartyDetailedSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/RelyingPartyDetailedSummary.cs @@ -135,7 +135,7 @@ public long? UniqueUserCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RelyingPartyDetailedSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RelyingPartyDetailedSummary(); } /// @@ -165,7 +165,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("failedSignInCount", FailedSignInCount); writer.WriteEnumValue("migrationStatus", MigrationStatus); diff --git a/src/Microsoft.Graph/Generated/Models/Reminder.cs b/src/Microsoft.Graph/Generated/Models/Reminder.cs index 5485f3d41d5..25e1034713f 100644 --- a/src/Microsoft.Graph/Generated/Models/Reminder.cs +++ b/src/Microsoft.Graph/Generated/Models/Reminder.cs @@ -180,7 +180,7 @@ public Reminder() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Reminder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Reminder(); } /// @@ -208,7 +208,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("changeKey", ChangeKey); writer.WriteObjectValue("eventEndTime", EventEndTime); writer.WriteStringValue("eventId", EventId); diff --git a/src/Microsoft.Graph/Generated/Models/RemoteActionAudit.cs b/src/Microsoft.Graph/Generated/Models/RemoteActionAudit.cs index 206525684c6..73ba353e482 100644 --- a/src/Microsoft.Graph/Generated/Models/RemoteActionAudit.cs +++ b/src/Microsoft.Graph/Generated/Models/RemoteActionAudit.cs @@ -156,7 +156,7 @@ public string UserName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RemoteActionAudit CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RemoteActionAudit(); } /// @@ -186,7 +186,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("action", Action); writer.WriteEnumValue("actionState", ActionState); diff --git a/src/Microsoft.Graph/Generated/Models/RemoteActionAuditCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RemoteActionAuditCollectionResponse.cs index 9c05ae0c72f..0cee062b1fc 100644 --- a/src/Microsoft.Graph/Generated/Models/RemoteActionAuditCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RemoteActionAuditCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RemoteActionAuditCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RemoteActionAuditCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RemoteActionAuditCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RemoteAssistancePartner.cs b/src/Microsoft.Graph/Generated/Models/RemoteAssistancePartner.cs index e0c12fcbaa3..7ac4c28b913 100644 --- a/src/Microsoft.Graph/Generated/Models/RemoteAssistancePartner.cs +++ b/src/Microsoft.Graph/Generated/Models/RemoteAssistancePartner.cs @@ -70,7 +70,7 @@ public string OnboardingUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RemoteAssistancePartner CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RemoteAssistancePartner(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("lastConnectionDateTime", LastConnectionDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/RemoteAssistancePartnerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RemoteAssistancePartnerCollectionResponse.cs index 013b231fc4f..5ce0ec6d9bc 100644 --- a/src/Microsoft.Graph/Generated/Models/RemoteAssistancePartnerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RemoteAssistancePartnerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RemoteAssistancePartnerCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RemoteAssistancePartnerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RemoteAssistancePartnerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RemoteAssistanceSettings.cs b/src/Microsoft.Graph/Generated/Models/RemoteAssistanceSettings.cs index f14547a51d7..b7e7d46db66 100644 --- a/src/Microsoft.Graph/Generated/Models/RemoteAssistanceSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/RemoteAssistanceSettings.cs @@ -38,7 +38,7 @@ public bool? BlockChat /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RemoteAssistanceSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RemoteAssistanceSettings(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowSessionsToUnenrolledDevices", AllowSessionsToUnenrolledDevices); writer.WriteBoolValue("blockChat", BlockChat); diff --git a/src/Microsoft.Graph/Generated/Models/RemoteDesktopSecurityConfiguration.cs b/src/Microsoft.Graph/Generated/Models/RemoteDesktopSecurityConfiguration.cs index b3084f2dcbf..f4bbc701bf3 100644 --- a/src/Microsoft.Graph/Generated/Models/RemoteDesktopSecurityConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/RemoteDesktopSecurityConfiguration.cs @@ -57,7 +57,7 @@ public bool? IsRemoteDesktopProtocolEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RemoteDesktopSecurityConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RemoteDesktopSecurityConfiguration(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("approvedClientApps", ApprovedClientApps); writer.WriteBoolValue("isRemoteDesktopProtocolEnabled", IsRemoteDesktopProtocolEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/RemoteItem.cs b/src/Microsoft.Graph/Generated/Models/RemoteItem.cs index a79f8fa83b6..9e745d0eb02 100644 --- a/src/Microsoft.Graph/Generated/Models/RemoteItem.cs +++ b/src/Microsoft.Graph/Generated/Models/RemoteItem.cs @@ -326,7 +326,7 @@ public RemoteItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RemoteItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RemoteItem(); } /// @@ -365,7 +365,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteObjectValue("file", File); diff --git a/src/Microsoft.Graph/Generated/Models/RemoteLockActionResult.cs b/src/Microsoft.Graph/Generated/Models/RemoteLockActionResult.cs index cf8a4b959fe..dabfb566298 100644 --- a/src/Microsoft.Graph/Generated/Models/RemoteLockActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/RemoteLockActionResult.cs @@ -36,7 +36,7 @@ public string UnlockPin /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RemoteLockActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RemoteLockActionResult(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("unlockPin", UnlockPin); } diff --git a/src/Microsoft.Graph/Generated/Models/RemoveAccessApplyAction.cs b/src/Microsoft.Graph/Generated/Models/RemoveAccessApplyAction.cs index 3a74ecc07be..a35e5a2fa8b 100644 --- a/src/Microsoft.Graph/Generated/Models/RemoveAccessApplyAction.cs +++ b/src/Microsoft.Graph/Generated/Models/RemoveAccessApplyAction.cs @@ -26,7 +26,7 @@ public RemoveAccessApplyAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RemoveAccessApplyAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RemoveAccessApplyAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/RemoveContentFooterAction.cs b/src/Microsoft.Graph/Generated/Models/RemoveContentFooterAction.cs index 7fbcfab9512..96558505c71 100644 --- a/src/Microsoft.Graph/Generated/Models/RemoveContentFooterAction.cs +++ b/src/Microsoft.Graph/Generated/Models/RemoveContentFooterAction.cs @@ -42,7 +42,7 @@ public RemoveContentFooterAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RemoveContentFooterAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RemoveContentFooterAction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("uiElementNames", UiElementNames); } diff --git a/src/Microsoft.Graph/Generated/Models/RemoveContentHeaderAction.cs b/src/Microsoft.Graph/Generated/Models/RemoveContentHeaderAction.cs index 2cb76e174e3..44dd7fd23d9 100644 --- a/src/Microsoft.Graph/Generated/Models/RemoveContentHeaderAction.cs +++ b/src/Microsoft.Graph/Generated/Models/RemoveContentHeaderAction.cs @@ -42,7 +42,7 @@ public RemoveContentHeaderAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RemoveContentHeaderAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RemoveContentHeaderAction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("uiElementNames", UiElementNames); } diff --git a/src/Microsoft.Graph/Generated/Models/RemoveProtectionAction.cs b/src/Microsoft.Graph/Generated/Models/RemoveProtectionAction.cs index bbd752d5622..bdd24fc058b 100644 --- a/src/Microsoft.Graph/Generated/Models/RemoveProtectionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/RemoveProtectionAction.cs @@ -26,7 +26,7 @@ public RemoveProtectionAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RemoveProtectionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RemoveProtectionAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/RemoveWatermarkAction.cs b/src/Microsoft.Graph/Generated/Models/RemoveWatermarkAction.cs index e6bd2ebab77..72dfbf93309 100644 --- a/src/Microsoft.Graph/Generated/Models/RemoveWatermarkAction.cs +++ b/src/Microsoft.Graph/Generated/Models/RemoveWatermarkAction.cs @@ -42,7 +42,7 @@ public RemoveWatermarkAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RemoveWatermarkAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RemoveWatermarkAction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("uiElementNames", UiElementNames); } diff --git a/src/Microsoft.Graph/Generated/Models/RemovedState.cs b/src/Microsoft.Graph/Generated/Models/RemovedState.cs index 6cd44b3065d..b5a70ade815 100644 --- a/src/Microsoft.Graph/Generated/Models/RemovedState.cs +++ b/src/Microsoft.Graph/Generated/Models/RemovedState.cs @@ -68,7 +68,7 @@ public RemovedState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RemovedState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RemovedState(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("reason", Reason); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/RenameAction.cs b/src/Microsoft.Graph/Generated/Models/RenameAction.cs index 425501ccec0..ba07569c6ab 100644 --- a/src/Microsoft.Graph/Generated/Models/RenameAction.cs +++ b/src/Microsoft.Graph/Generated/Models/RenameAction.cs @@ -84,7 +84,7 @@ public RenameAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RenameAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RenameAction(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("newName", NewName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("oldName", OldName); diff --git a/src/Microsoft.Graph/Generated/Models/Report.cs b/src/Microsoft.Graph/Generated/Models/Report.cs index e0e6ffe84f5..fd05cd55f55 100644 --- a/src/Microsoft.Graph/Generated/Models/Report.cs +++ b/src/Microsoft.Graph/Generated/Models/Report.cs @@ -22,7 +22,7 @@ public IDictionary AdditionalData } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// Report content; details vary by report type. + /// The http content that has the data #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public byte[]? Content @@ -69,7 +69,7 @@ public Report() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Report CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Report(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("content", Content); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ReportRoot.cs b/src/Microsoft.Graph/Generated/Models/ReportRoot.cs index 7b804649c71..0480fe652fc 100644 --- a/src/Microsoft.Graph/Generated/Models/ReportRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/ReportRoot.cs @@ -357,7 +357,7 @@ public partial class ReportRoot : global::Microsoft.Graph.Beta.Models.Entity, IP /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ReportRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReportRoot(); } /// @@ -397,7 +397,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("appCredentialSignInActivities", AppCredentialSignInActivities); writer.WriteCollectionOfObjectValues("applicationSignInDetailedSummary", ApplicationSignInDetailedSummary); diff --git a/src/Microsoft.Graph/Generated/Models/ReportSuspiciousActivitySettings.cs b/src/Microsoft.Graph/Generated/Models/ReportSuspiciousActivitySettings.cs index 4e5263e4989..b3332331461 100644 --- a/src/Microsoft.Graph/Generated/Models/ReportSuspiciousActivitySettings.cs +++ b/src/Microsoft.Graph/Generated/Models/ReportSuspiciousActivitySettings.cs @@ -80,7 +80,7 @@ public ReportSuspiciousActivitySettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ReportSuspiciousActivitySettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReportSuspiciousActivitySettings(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("includeTarget", IncludeTarget); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("state", State); diff --git a/src/Microsoft.Graph/Generated/Models/ReportsRoot.cs b/src/Microsoft.Graph/Generated/Models/ReportsRoot.cs index 2d9997fe033..5771691876f 100644 --- a/src/Microsoft.Graph/Generated/Models/ReportsRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/ReportsRoot.cs @@ -83,7 +83,7 @@ public partial class ReportsRoot : global::Microsoft.Graph.Beta.Models.Entity, I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ReportsRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReportsRoot(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("readingAssignmentSubmissions", ReadingAssignmentSubmissions); writer.WriteCollectionOfObjectValues("readingCoachPassages", ReadingCoachPassages); diff --git a/src/Microsoft.Graph/Generated/Models/ReputationCategory.cs b/src/Microsoft.Graph/Generated/Models/ReputationCategory.cs index 139eaa6756b..8817faad109 100644 --- a/src/Microsoft.Graph/Generated/Models/ReputationCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/ReputationCategory.cs @@ -100,7 +100,7 @@ public ReputationCategory() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ReputationCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReputationCategory(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Request.cs b/src/Microsoft.Graph/Generated/Models/Request.cs index 7a0cff7e268..50dc40e433a 100644 --- a/src/Microsoft.Graph/Generated/Models/Request.cs +++ b/src/Microsoft.Graph/Generated/Models/Request.cs @@ -95,7 +95,7 @@ public string Status /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Request CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("approvalId", ApprovalId); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/RequestActivity.cs b/src/Microsoft.Graph/Generated/Models/RequestActivity.cs index b8e693d8bbf..9f77964cd46 100644 --- a/src/Microsoft.Graph/Generated/Models/RequestActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/RequestActivity.cs @@ -128,7 +128,7 @@ public RequestActivity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RequestActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RequestActivity(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("action", Action); writer.WriteDateTimeOffsetValue("actionDateTime", ActionDateTime); writer.WriteStringValue("detail", Detail); diff --git a/src/Microsoft.Graph/Generated/Models/RequestSchedule.cs b/src/Microsoft.Graph/Generated/Models/RequestSchedule.cs index 50f49160740..468c7698b3e 100644 --- a/src/Microsoft.Graph/Generated/Models/RequestSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/RequestSchedule.cs @@ -90,7 +90,7 @@ public RequestSchedule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RequestSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RequestSchedule(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("expiration", Expiration); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("recurrence", Recurrence); diff --git a/src/Microsoft.Graph/Generated/Models/RequestSignatureVerification.cs b/src/Microsoft.Graph/Generated/Models/RequestSignatureVerification.cs index 0c21de6bb7e..9b776703b23 100644 --- a/src/Microsoft.Graph/Generated/Models/RequestSignatureVerification.cs +++ b/src/Microsoft.Graph/Generated/Models/RequestSignatureVerification.cs @@ -64,7 +64,7 @@ public RequestSignatureVerification() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RequestSignatureVerification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RequestSignatureVerification(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("allowedWeakAlgorithms", AllowedWeakAlgorithms); writer.WriteBoolValue("isSignedRequestRequired", IsSignedRequestRequired); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/RequestorManager.cs b/src/Microsoft.Graph/Generated/Models/RequestorManager.cs index a4d62bab1ad..808c7d97702 100644 --- a/src/Microsoft.Graph/Generated/Models/RequestorManager.cs +++ b/src/Microsoft.Graph/Generated/Models/RequestorManager.cs @@ -32,7 +32,7 @@ public RequestorManager() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RequestorManager CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RequestorManager(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("managerLevel", ManagerLevel); } diff --git a/src/Microsoft.Graph/Generated/Models/RequestorSettings.cs b/src/Microsoft.Graph/Generated/Models/RequestorSettings.cs index b19bb4e2068..61483364a8e 100644 --- a/src/Microsoft.Graph/Generated/Models/RequestorSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/RequestorSettings.cs @@ -90,7 +90,7 @@ public RequestorSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RequestorSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RequestorSettings(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("acceptRequests", AcceptRequests); writer.WriteCollectionOfObjectValues("allowedRequestors", AllowedRequestors); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/RequiredResourceAccess.cs b/src/Microsoft.Graph/Generated/Models/RequiredResourceAccess.cs index 2fa44ed5621..c71b9f8c669 100644 --- a/src/Microsoft.Graph/Generated/Models/RequiredResourceAccess.cs +++ b/src/Microsoft.Graph/Generated/Models/RequiredResourceAccess.cs @@ -84,7 +84,7 @@ public RequiredResourceAccess() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RequiredResourceAccess CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RequiredResourceAccess(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("resourceAccess", ResourceAccess); writer.WriteStringValue("resourceAppId", ResourceAppId); diff --git a/src/Microsoft.Graph/Generated/Models/ResellerDelegatedAdminRelationship.cs b/src/Microsoft.Graph/Generated/Models/ResellerDelegatedAdminRelationship.cs index d398cab8ea1..8b00bd17f1e 100644 --- a/src/Microsoft.Graph/Generated/Models/ResellerDelegatedAdminRelationship.cs +++ b/src/Microsoft.Graph/Generated/Models/ResellerDelegatedAdminRelationship.cs @@ -41,7 +41,7 @@ public bool? IsPartnerConsentPending /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ResellerDelegatedAdminRelationship CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResellerDelegatedAdminRelationship(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("indirectProviderTenantId", IndirectProviderTenantId); writer.WriteBoolValue("isPartnerConsentPending", IsPartnerConsentPending); diff --git a/src/Microsoft.Graph/Generated/Models/ReservablePlaceMode.cs b/src/Microsoft.Graph/Generated/Models/ReservablePlaceMode.cs index 0e2c0df545d..a4738072126 100644 --- a/src/Microsoft.Graph/Generated/Models/ReservablePlaceMode.cs +++ b/src/Microsoft.Graph/Generated/Models/ReservablePlaceMode.cs @@ -26,7 +26,7 @@ public ReservablePlaceMode() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ReservablePlaceMode CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ReservablePlaceMode(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ResetPasscodeActionResult.cs b/src/Microsoft.Graph/Generated/Models/ResetPasscodeActionResult.cs index 31a3959eff9..97ff7669f86 100644 --- a/src/Microsoft.Graph/Generated/Models/ResetPasscodeActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ResetPasscodeActionResult.cs @@ -42,7 +42,7 @@ public string Passcode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ResetPasscodeActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResetPasscodeActionResult(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("errorCode", ErrorCode); writer.WriteStringValue("passcode", Passcode); diff --git a/src/Microsoft.Graph/Generated/Models/ResourceAccess.cs b/src/Microsoft.Graph/Generated/Models/ResourceAccess.cs index ccb26c3bad9..2843baf8f66 100644 --- a/src/Microsoft.Graph/Generated/Models/ResourceAccess.cs +++ b/src/Microsoft.Graph/Generated/Models/ResourceAccess.cs @@ -74,7 +74,7 @@ public ResourceAccess() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ResourceAccess CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResourceAccess(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteGuidValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/Models/ResourceAction.cs b/src/Microsoft.Graph/Generated/Models/ResourceAction.cs index 479fcbf5cbc..3ff0dce184e 100644 --- a/src/Microsoft.Graph/Generated/Models/ResourceAction.cs +++ b/src/Microsoft.Graph/Generated/Models/ResourceAction.cs @@ -85,7 +85,7 @@ public ResourceAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ResourceAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResourceAction(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("allowedResourceActions", AllowedResourceActions); writer.WriteCollectionOfPrimitiveValues("notAllowedResourceActions", NotAllowedResourceActions); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ResourceLink.cs b/src/Microsoft.Graph/Generated/Models/ResourceLink.cs index a44ff3ee45f..d11fafde4ba 100644 --- a/src/Microsoft.Graph/Generated/Models/ResourceLink.cs +++ b/src/Microsoft.Graph/Generated/Models/ResourceLink.cs @@ -90,7 +90,7 @@ public ResourceLink() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ResourceLink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResourceLink(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("linkType", LinkType); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ResourceOperation.cs b/src/Microsoft.Graph/Generated/Models/ResourceOperation.cs index e761c90dc24..d7a6814345d 100644 --- a/src/Microsoft.Graph/Generated/Models/ResourceOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/ResourceOperation.cs @@ -90,7 +90,7 @@ public string ResourceName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ResourceOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResourceOperation(); } /// @@ -114,7 +114,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("actionName", ActionName); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/ResourceOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ResourceOperationCollectionResponse.cs index 33dbd4d46ce..31c0b393d04 100644 --- a/src/Microsoft.Graph/Generated/Models/ResourceOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ResourceOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ResourceOperationCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ResourceOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResourceOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ResourceReference.cs b/src/Microsoft.Graph/Generated/Models/ResourceReference.cs index ca65b3ad3cc..7c9a9e51219 100644 --- a/src/Microsoft.Graph/Generated/Models/ResourceReference.cs +++ b/src/Microsoft.Graph/Generated/Models/ResourceReference.cs @@ -100,7 +100,7 @@ public ResourceReference() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ResourceReference CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResourceReference(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/Models/ResourceSpecificPermissionGrant.cs b/src/Microsoft.Graph/Generated/Models/ResourceSpecificPermissionGrant.cs index 7f433ced3d4..3a72944c365 100644 --- a/src/Microsoft.Graph/Generated/Models/ResourceSpecificPermissionGrant.cs +++ b/src/Microsoft.Graph/Generated/Models/ResourceSpecificPermissionGrant.cs @@ -106,7 +106,7 @@ public ResourceSpecificPermissionGrant() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("clientAppId", ClientAppId); writer.WriteStringValue("clientId", ClientId); diff --git a/src/Microsoft.Graph/Generated/Models/ResourceSpecificPermissionGrantCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ResourceSpecificPermissionGrantCollectionResponse.cs index 4a13eacdafb..065af70aea9 100644 --- a/src/Microsoft.Graph/Generated/Models/ResourceSpecificPermissionGrantCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ResourceSpecificPermissionGrantCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ResourceSpecificPermissionGrantCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrantCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrantCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ResourceVisualization.cs b/src/Microsoft.Graph/Generated/Models/ResourceVisualization.cs index adb64840a42..94a93ae5c9b 100644 --- a/src/Microsoft.Graph/Generated/Models/ResourceVisualization.cs +++ b/src/Microsoft.Graph/Generated/Models/ResourceVisualization.cs @@ -180,7 +180,7 @@ public ResourceVisualization() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ResourceVisualization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResourceVisualization(); } /// @@ -208,7 +208,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("containerDisplayName", ContainerDisplayName); writer.WriteStringValue("containerType", ContainerType); writer.WriteStringValue("containerWebUrl", ContainerWebUrl); diff --git a/src/Microsoft.Graph/Generated/Models/ResponseStatus.cs b/src/Microsoft.Graph/Generated/Models/ResponseStatus.cs index 226b6eb9114..b4a6fd2be83 100644 --- a/src/Microsoft.Graph/Generated/Models/ResponseStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/ResponseStatus.cs @@ -64,7 +64,7 @@ public ResponseStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ResponseStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResponseStatus(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("response", Response); writer.WriteDateTimeOffsetValue("time", Time); diff --git a/src/Microsoft.Graph/Generated/Models/ResponsiblePolicy.cs b/src/Microsoft.Graph/Generated/Models/ResponsiblePolicy.cs index d6ce0f5f997..024303046a2 100644 --- a/src/Microsoft.Graph/Generated/Models/ResponsiblePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/ResponsiblePolicy.cs @@ -84,7 +84,7 @@ public ResponsiblePolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ResponsiblePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResponsiblePolicy(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ResponsibleSensitiveType.cs b/src/Microsoft.Graph/Generated/Models/ResponsibleSensitiveType.cs index 89b98bea75b..c93ad2d59d2 100644 --- a/src/Microsoft.Graph/Generated/Models/ResponsibleSensitiveType.cs +++ b/src/Microsoft.Graph/Generated/Models/ResponsibleSensitiveType.cs @@ -148,7 +148,7 @@ public ResponsibleSensitiveType() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ResponsibleSensitiveType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResponsibleSensitiveType(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("id", Id); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/RestoreAction.cs b/src/Microsoft.Graph/Generated/Models/RestoreAction.cs index 9af6b11f36c..7a083a4bb0c 100644 --- a/src/Microsoft.Graph/Generated/Models/RestoreAction.cs +++ b/src/Microsoft.Graph/Generated/Models/RestoreAction.cs @@ -52,7 +52,7 @@ public RestoreAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RestoreAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RestoreAction(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/RestoreArtifactBase.cs b/src/Microsoft.Graph/Generated/Models/RestoreArtifactBase.cs index 26ce86b0b60..3ef431f616f 100644 --- a/src/Microsoft.Graph/Generated/Models/RestoreArtifactBase.cs +++ b/src/Microsoft.Graph/Generated/Models/RestoreArtifactBase.cs @@ -75,7 +75,7 @@ public DateTimeOffset? StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RestoreArtifactBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -108,7 +108,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completionDateTime", CompletionDateTime); writer.WriteEnumValue("destinationType", DestinationType); diff --git a/src/Microsoft.Graph/Generated/Models/RestoreArtifactsBulkRequestBase.cs b/src/Microsoft.Graph/Generated/Models/RestoreArtifactsBulkRequestBase.cs index a2a7fee9fa2..231da2f8d92 100644 --- a/src/Microsoft.Graph/Generated/Models/RestoreArtifactsBulkRequestBase.cs +++ b/src/Microsoft.Graph/Generated/Models/RestoreArtifactsBulkRequestBase.cs @@ -151,7 +151,7 @@ public List ProtectionUnitIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RestoreArtifactsBulkRequestBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -189,7 +189,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/RestorePoint.cs b/src/Microsoft.Graph/Generated/Models/RestorePoint.cs index 5d8af5b31aa..b0a263c8047 100644 --- a/src/Microsoft.Graph/Generated/Models/RestorePoint.cs +++ b/src/Microsoft.Graph/Generated/Models/RestorePoint.cs @@ -53,7 +53,7 @@ public DateTimeOffset? ProtectionDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RestorePoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RestorePoint(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteDateTimeOffsetValue("protectionDateTime", ProtectionDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/RestorePointCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RestorePointCollectionResponse.cs index 1cb71fc1a69..587eb3c5ee0 100644 --- a/src/Microsoft.Graph/Generated/Models/RestorePointCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RestorePointCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RestorePointCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RestorePointCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RestorePointCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RestorePointSearchResponse.cs b/src/Microsoft.Graph/Generated/Models/RestorePointSearchResponse.cs index 8d6a8320fdd..aeee40ce14a 100644 --- a/src/Microsoft.Graph/Generated/Models/RestorePointSearchResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RestorePointSearchResponse.cs @@ -100,7 +100,7 @@ public RestorePointSearchResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RestorePointSearchResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RestorePointSearchResponse(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("noResultProtectionUnitIds", NoResultProtectionUnitIds); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("searchResponseId", SearchResponseId); diff --git a/src/Microsoft.Graph/Generated/Models/RestorePointSearchResult.cs b/src/Microsoft.Graph/Generated/Models/RestorePointSearchResult.cs index ef1a71af708..bc41d539eec 100644 --- a/src/Microsoft.Graph/Generated/Models/RestorePointSearchResult.cs +++ b/src/Microsoft.Graph/Generated/Models/RestorePointSearchResult.cs @@ -74,7 +74,7 @@ public RestorePointSearchResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RestorePointSearchResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RestorePointSearchResult(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("artifactHitCount", ArtifactHitCount); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("restorePoint", RestorePoint); diff --git a/src/Microsoft.Graph/Generated/Models/RestoreSessionArtifactCount.cs b/src/Microsoft.Graph/Generated/Models/RestoreSessionArtifactCount.cs index b673d5af1d5..850a7904c37 100644 --- a/src/Microsoft.Graph/Generated/Models/RestoreSessionArtifactCount.cs +++ b/src/Microsoft.Graph/Generated/Models/RestoreSessionArtifactCount.cs @@ -76,7 +76,7 @@ public RestoreSessionArtifactCount() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RestoreSessionArtifactCount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RestoreSessionArtifactCount(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("completed", Completed); writer.WriteIntValue("failed", Failed); writer.WriteIntValue("inProgress", InProgress); diff --git a/src/Microsoft.Graph/Generated/Models/RestoreSessionBase.cs b/src/Microsoft.Graph/Generated/Models/RestoreSessionBase.cs index ccf52155d76..0815cb0e5d2 100644 --- a/src/Microsoft.Graph/Generated/Models/RestoreSessionBase.cs +++ b/src/Microsoft.Graph/Generated/Models/RestoreSessionBase.cs @@ -113,7 +113,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RestoreSessionBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -148,7 +148,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/RestoreSessionBaseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RestoreSessionBaseCollectionResponse.cs index 5f8489d0d56..e353d251fac 100644 --- a/src/Microsoft.Graph/Generated/Models/RestoreSessionBaseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RestoreSessionBaseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RestoreSessionBaseCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RestoreSessionBaseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RestoreSessionBaseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RestrictAccessAction.cs b/src/Microsoft.Graph/Generated/Models/RestrictAccessAction.cs index 5d47029afe1..c3177ce0b5e 100644 --- a/src/Microsoft.Graph/Generated/Models/RestrictAccessAction.cs +++ b/src/Microsoft.Graph/Generated/Models/RestrictAccessAction.cs @@ -26,7 +26,7 @@ public RestrictAccessAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RestrictAccessAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RestrictAccessAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/RestrictAccessActionBase.cs b/src/Microsoft.Graph/Generated/Models/RestrictAccessActionBase.cs index 6a998f9b575..31a6396af52 100644 --- a/src/Microsoft.Graph/Generated/Models/RestrictAccessActionBase.cs +++ b/src/Microsoft.Graph/Generated/Models/RestrictAccessActionBase.cs @@ -25,7 +25,7 @@ public partial class RestrictAccessActionBase : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RestrictAccessActionBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -50,7 +50,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("restrictionAction", RestrictionAction); } diff --git a/src/Microsoft.Graph/Generated/Models/RestrictedAppsViolation.cs b/src/Microsoft.Graph/Generated/Models/RestrictedAppsViolation.cs index cca6acf877f..5d6a6e50451 100644 --- a/src/Microsoft.Graph/Generated/Models/RestrictedAppsViolation.cs +++ b/src/Microsoft.Graph/Generated/Models/RestrictedAppsViolation.cs @@ -144,7 +144,7 @@ public string UserName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RestrictedAppsViolation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RestrictedAppsViolation(); } /// @@ -172,7 +172,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceConfigurationId", DeviceConfigurationId); writer.WriteStringValue("deviceConfigurationName", DeviceConfigurationName); diff --git a/src/Microsoft.Graph/Generated/Models/RestrictedAppsViolationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RestrictedAppsViolationCollectionResponse.cs index b015984a066..3428ec0ed5b 100644 --- a/src/Microsoft.Graph/Generated/Models/RestrictedAppsViolationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RestrictedAppsViolationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RestrictedAppsViolationCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RestrictedAppsViolationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RestrictedAppsViolationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ResultInfo.cs b/src/Microsoft.Graph/Generated/Models/ResultInfo.cs index 9f91f4d2d75..183d876731f 100644 --- a/src/Microsoft.Graph/Generated/Models/ResultInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ResultInfo.cs @@ -80,7 +80,7 @@ public ResultInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ResultInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResultInfo(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("code", Code); writer.WriteStringValue("message", Message); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ResultTemplateDictionary.cs b/src/Microsoft.Graph/Generated/Models/ResultTemplateDictionary.cs index 57386ae23ce..a2dfea0f59c 100644 --- a/src/Microsoft.Graph/Generated/Models/ResultTemplateDictionary.cs +++ b/src/Microsoft.Graph/Generated/Models/ResultTemplateDictionary.cs @@ -19,7 +19,7 @@ public partial class ResultTemplateDictionary : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ResultTemplateDictionary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResultTemplateDictionary(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ResultTemplateOption.cs b/src/Microsoft.Graph/Generated/Models/ResultTemplateOption.cs index cd0fadb1a1e..151dc690f28 100644 --- a/src/Microsoft.Graph/Generated/Models/ResultTemplateOption.cs +++ b/src/Microsoft.Graph/Generated/Models/ResultTemplateOption.cs @@ -58,7 +58,7 @@ public ResultTemplateOption() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ResultTemplateOption CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ResultTemplateOption(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("enableResultTemplate", EnableResultTemplate); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/RetentionLabelSettings.cs b/src/Microsoft.Graph/Generated/Models/RetentionLabelSettings.cs index 2d47727b3d3..aa5d70e8376 100644 --- a/src/Microsoft.Graph/Generated/Models/RetentionLabelSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/RetentionLabelSettings.cs @@ -89,7 +89,7 @@ public RetentionLabelSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RetentionLabelSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RetentionLabelSettings(); } /// @@ -115,7 +115,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("behaviorDuringRetentionPeriod", BehaviorDuringRetentionPeriod); writer.WriteBoolValue("isContentUpdateAllowed", IsContentUpdateAllowed); writer.WriteBoolValue("isDeleteAllowed", IsDeleteAllowed); diff --git a/src/Microsoft.Graph/Generated/Models/RetentionSetting.cs b/src/Microsoft.Graph/Generated/Models/RetentionSetting.cs index 6e154546a28..e01255a5767 100644 --- a/src/Microsoft.Graph/Generated/Models/RetentionSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/RetentionSetting.cs @@ -74,7 +74,7 @@ public RetentionSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RetentionSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RetentionSetting(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("interval", Interval); writer.WriteStringValue("@odata.type", OdataType); writer.WriteTimeSpanValue("period", Period); diff --git a/src/Microsoft.Graph/Generated/Models/RetireScheduledManagedDevice.cs b/src/Microsoft.Graph/Generated/Models/RetireScheduledManagedDevice.cs index 6fc72ac9fbb..766bf012148 100644 --- a/src/Microsoft.Graph/Generated/Models/RetireScheduledManagedDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/RetireScheduledManagedDevice.cs @@ -179,7 +179,7 @@ public RetireScheduledManagedDevice() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RetireScheduledManagedDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RetireScheduledManagedDevice(); } /// @@ -210,7 +210,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("complianceState", ComplianceState); writer.WriteStringValue("deviceCompliancePolicyId", DeviceCompliancePolicyId); writer.WriteStringValue("deviceCompliancePolicyName", DeviceCompliancePolicyName); diff --git a/src/Microsoft.Graph/Generated/Models/RevokeAppleVppLicensesActionResult.cs b/src/Microsoft.Graph/Generated/Models/RevokeAppleVppLicensesActionResult.cs index e62fbe2ced1..3b5a1514cc4 100644 --- a/src/Microsoft.Graph/Generated/Models/RevokeAppleVppLicensesActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/RevokeAppleVppLicensesActionResult.cs @@ -32,7 +32,7 @@ public int? TotalLicensesCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RevokeAppleVppLicensesActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RevokeAppleVppLicensesActionResult(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("failedLicensesCount", FailedLicensesCount); writer.WriteIntValue("totalLicensesCount", TotalLicensesCount); diff --git a/src/Microsoft.Graph/Generated/Models/RgbColor.cs b/src/Microsoft.Graph/Generated/Models/RgbColor.cs index 02697184edf..9526397fdd8 100644 --- a/src/Microsoft.Graph/Generated/Models/RgbColor.cs +++ b/src/Microsoft.Graph/Generated/Models/RgbColor.cs @@ -71,7 +71,7 @@ public RgbColor() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RgbColor CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RgbColor(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteValue("b", B); writer.WriteByteValue("g", G); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/RichLongRunningOperation.cs b/src/Microsoft.Graph/Generated/Models/RichLongRunningOperation.cs index b91fd8bd119..7197f2dc629 100644 --- a/src/Microsoft.Graph/Generated/Models/RichLongRunningOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/RichLongRunningOperation.cs @@ -74,7 +74,7 @@ public string Type /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RichLongRunningOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RichLongRunningOperation(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("error", Error); writer.WriteIntValue("percentageComplete", PercentageComplete); diff --git a/src/Microsoft.Graph/Generated/Models/RichLongRunningOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RichLongRunningOperationCollectionResponse.cs index ad6b74f93e3..622da83f813 100644 --- a/src/Microsoft.Graph/Generated/Models/RichLongRunningOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RichLongRunningOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RichLongRunningOperationCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RichLongRunningOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RichLongRunningOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RiskDetection.cs b/src/Microsoft.Graph/Generated/Models/RiskDetection.cs index 9f7ba337c92..2f948d7d0a5 100644 --- a/src/Microsoft.Graph/Generated/Models/RiskDetection.cs +++ b/src/Microsoft.Graph/Generated/Models/RiskDetection.cs @@ -255,7 +255,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RiskDetection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RiskDetection(); } /// @@ -295,7 +295,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("activity", Activity); writer.WriteDateTimeOffsetValue("activityDateTime", ActivityDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/RiskDetectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RiskDetectionCollectionResponse.cs index a46f72c10e9..00f0c1ea357 100644 --- a/src/Microsoft.Graph/Generated/Models/RiskDetectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RiskDetectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RiskDetectionCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RiskDetectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RiskDetectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RiskProfile.cs b/src/Microsoft.Graph/Generated/Models/RiskProfile.cs index abb23f4d0f4..4f1524e8c17 100644 --- a/src/Microsoft.Graph/Generated/Models/RiskProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/RiskProfile.cs @@ -64,7 +64,7 @@ public RiskProfile() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RiskProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RiskProfile(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("humanCount", HumanCount); writer.WriteIntValue("nonHumanCount", NonHumanCount); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/RiskServicePrincipalActivity.cs b/src/Microsoft.Graph/Generated/Models/RiskServicePrincipalActivity.cs index 184c30a8975..d51ba85e100 100644 --- a/src/Microsoft.Graph/Generated/Models/RiskServicePrincipalActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/RiskServicePrincipalActivity.cs @@ -74,7 +74,7 @@ public RiskServicePrincipalActivity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RiskServicePrincipalActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RiskServicePrincipalActivity(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("detail", Detail); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("riskEventTypes", RiskEventTypes); diff --git a/src/Microsoft.Graph/Generated/Models/RiskUserActivity.cs b/src/Microsoft.Graph/Generated/Models/RiskUserActivity.cs index aba5667d905..25084a2eaf6 100644 --- a/src/Microsoft.Graph/Generated/Models/RiskUserActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/RiskUserActivity.cs @@ -90,7 +90,7 @@ public RiskUserActivity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RiskUserActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RiskUserActivity(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("detail", Detail); writer.WriteCollectionOfEnumValues("eventTypes", EventTypes); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipal.cs b/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipal.cs index 8f52cd6a329..497d8c2030b 100644 --- a/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipal.cs +++ b/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipal.cs @@ -125,7 +125,7 @@ public string ServicePrincipalType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RiskyServicePrincipal CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -160,7 +160,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("accountEnabled", AccountEnabled); writer.WriteStringValue("appId", AppId); diff --git a/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipalCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipalCollectionResponse.cs index 0d2c18e4d3b..12ce41abcbe 100644 --- a/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipalCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipalCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RiskyServicePrincipalCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RiskyServicePrincipalCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RiskyServicePrincipalCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipalHistoryItem.cs b/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipalHistoryItem.cs index ad2440a3f08..5f631a7aaee 100644 --- a/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipalHistoryItem.cs +++ b/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipalHistoryItem.cs @@ -67,7 +67,7 @@ public string ServicePrincipalId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RiskyServicePrincipalHistoryItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RiskyServicePrincipalHistoryItem(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("activity", Activity); writer.WriteStringValue("initiatedBy", InitiatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipalHistoryItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipalHistoryItemCollectionResponse.cs index 5069b7947fc..7a22855d6bf 100644 --- a/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipalHistoryItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RiskyServicePrincipalHistoryItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RiskyServicePrincipalHistoryItemCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RiskyServicePrincipalHistoryItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RiskyServicePrincipalHistoryItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RiskyUser.cs b/src/Microsoft.Graph/Generated/Models/RiskyUser.cs index 34e224f6bbb..db67493ba86 100644 --- a/src/Microsoft.Graph/Generated/Models/RiskyUser.cs +++ b/src/Microsoft.Graph/Generated/Models/RiskyUser.cs @@ -103,7 +103,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RiskyUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -136,7 +136,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("history", History); writer.WriteBoolValue("isDeleted", IsDeleted); diff --git a/src/Microsoft.Graph/Generated/Models/RiskyUserCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RiskyUserCollectionResponse.cs index 8c5f91cfd65..60239f7e9b4 100644 --- a/src/Microsoft.Graph/Generated/Models/RiskyUserCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RiskyUserCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RiskyUserCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RiskyUserCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RiskyUserCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RiskyUserHistoryItem.cs b/src/Microsoft.Graph/Generated/Models/RiskyUserHistoryItem.cs index 986d0141c8c..a760f427097 100644 --- a/src/Microsoft.Graph/Generated/Models/RiskyUserHistoryItem.cs +++ b/src/Microsoft.Graph/Generated/Models/RiskyUserHistoryItem.cs @@ -67,7 +67,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RiskyUserHistoryItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RiskyUserHistoryItem(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("activity", Activity); writer.WriteStringValue("initiatedBy", InitiatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/RiskyUserHistoryItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RiskyUserHistoryItemCollectionResponse.cs index 06b70c59b3b..fbbb61558c6 100644 --- a/src/Microsoft.Graph/Generated/Models/RiskyUserHistoryItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RiskyUserHistoryItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RiskyUserHistoryItemCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RiskyUserHistoryItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RiskyUserHistoryItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RoleAssignment.cs b/src/Microsoft.Graph/Generated/Models/RoleAssignment.cs index 934d0190b9c..163475ad0ae 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleAssignment.cs @@ -106,7 +106,7 @@ public List ScopeMembers /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RoleAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -136,7 +136,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/RoleAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RoleAssignmentCollectionResponse.cs index 8e37f90e2fb..a78704ebbbd 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RoleAssignmentCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RoleAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RoleAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs b/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs index b583f3687e1..2608ae2f289 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs @@ -128,7 +128,7 @@ public List RoleScopeTagIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RoleDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -160,7 +160,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/RoleDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RoleDefinitionCollectionResponse.cs index b66bfcbc282..fb4469a5eb7 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RoleDefinitionCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RoleDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RoleDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RoleManagement.cs b/src/Microsoft.Graph/Generated/Models/RoleManagement.cs index 98a36199fb4..7cb598fceb9 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleManagement.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleManagement.cs @@ -164,7 +164,7 @@ public RoleManagement() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RoleManagement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RoleManagement(); } /// @@ -191,7 +191,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cloudPC", CloudPC); writer.WriteObjectValue("defender", Defender); writer.WriteObjectValue("deviceManagement", DeviceManagement); diff --git a/src/Microsoft.Graph/Generated/Models/RoleManagementAlert.cs b/src/Microsoft.Graph/Generated/Models/RoleManagementAlert.cs index 2a4e7ff50bf..383b37e2336 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleManagementAlert.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleManagementAlert.cs @@ -83,7 +83,7 @@ public partial class RoleManagementAlert : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RoleManagementAlert CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RoleManagementAlert(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("alertConfigurations", AlertConfigurations); writer.WriteCollectionOfObjectValues("alertDefinitions", AlertDefinitions); diff --git a/src/Microsoft.Graph/Generated/Models/RoleMembershipGovernanceCriteria.cs b/src/Microsoft.Graph/Generated/Models/RoleMembershipGovernanceCriteria.cs index 2b3dd47cffe..8866883df76 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleMembershipGovernanceCriteria.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleMembershipGovernanceCriteria.cs @@ -58,7 +58,7 @@ public RoleMembershipGovernanceCriteria() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RoleMembershipGovernanceCriteria CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RoleMembershipGovernanceCriteria(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("roleId", RoleId); writer.WriteStringValue("roleTemplateId", RoleTemplateId); diff --git a/src/Microsoft.Graph/Generated/Models/RolePermission.cs b/src/Microsoft.Graph/Generated/Models/RolePermission.cs index d4a006f8f3f..e2dee8900c7 100644 --- a/src/Microsoft.Graph/Generated/Models/RolePermission.cs +++ b/src/Microsoft.Graph/Generated/Models/RolePermission.cs @@ -85,7 +85,7 @@ public RolePermission() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RolePermission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RolePermission(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("actions", Actions); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("resourceActions", ResourceActions); diff --git a/src/Microsoft.Graph/Generated/Models/RoleScopeTag.cs b/src/Microsoft.Graph/Generated/Models/RoleScopeTag.cs index 0fe9ec9ce86..a505349846d 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleScopeTag.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleScopeTag.cs @@ -74,7 +74,7 @@ public bool? IsBuiltIn /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RoleScopeTag CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RoleScopeTag(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/RoleScopeTagAutoAssignment.cs b/src/Microsoft.Graph/Generated/Models/RoleScopeTagAutoAssignment.cs index 7968c33b8ec..dd9d03f3152 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleScopeTagAutoAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleScopeTagAutoAssignment.cs @@ -36,7 +36,7 @@ public partial class RoleScopeTagAutoAssignment : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RoleScopeTagAutoAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RoleScopeTagAutoAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/RoleScopeTagAutoAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RoleScopeTagAutoAssignmentCollectionResponse.cs index 74b8003037d..ca5ae6bbc5f 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleScopeTagAutoAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleScopeTagAutoAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RoleScopeTagAutoAssignmentCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RoleScopeTagAutoAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RoleScopeTagAutoAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RoleScopeTagCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RoleScopeTagCollectionResponse.cs index 4c49e1f4523..458fc226ac0 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleScopeTagCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleScopeTagCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RoleScopeTagCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RoleScopeTagCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RoleScopeTagCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RoleScopeTagInfo.cs b/src/Microsoft.Graph/Generated/Models/RoleScopeTagInfo.cs index c5ec0496c7f..2bef50fa009 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleScopeTagInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleScopeTagInfo.cs @@ -85,7 +85,7 @@ public RoleScopeTagInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RoleScopeTagInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RoleScopeTagInfo(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("roleScopeTagId", RoleScopeTagId); diff --git a/src/Microsoft.Graph/Generated/Models/RoleSuccessStatistics.cs b/src/Microsoft.Graph/Generated/Models/RoleSuccessStatistics.cs index 35269bb7eeb..22b88993ca5 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleSuccessStatistics.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleSuccessStatistics.cs @@ -126,7 +126,7 @@ public RoleSuccessStatistics() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RoleSuccessStatistics CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RoleSuccessStatistics(); } /// @@ -155,7 +155,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("permanentFail", PermanentFail); writer.WriteLongValue("permanentSuccess", PermanentSuccess); diff --git a/src/Microsoft.Graph/Generated/Models/RolesAssignedOutsidePrivilegedIdentityManagementAlertConfiguration.cs b/src/Microsoft.Graph/Generated/Models/RolesAssignedOutsidePrivilegedIdentityManagementAlertConfiguration.cs index 66390285dc2..2ca160d6e9f 100644 --- a/src/Microsoft.Graph/Generated/Models/RolesAssignedOutsidePrivilegedIdentityManagementAlertConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/RolesAssignedOutsidePrivilegedIdentityManagementAlertConfiguration.cs @@ -26,7 +26,7 @@ public RolesAssignedOutsidePrivilegedIdentityManagementAlertConfiguration() : ba /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RolesAssignedOutsidePrivilegedIdentityManagementAlertConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RolesAssignedOutsidePrivilegedIdentityManagementAlertConfiguration(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/RolesAssignedOutsidePrivilegedIdentityManagementAlertIncident.cs b/src/Microsoft.Graph/Generated/Models/RolesAssignedOutsidePrivilegedIdentityManagementAlertIncident.cs index c38d0ba37f4..a2f665e88e2 100644 --- a/src/Microsoft.Graph/Generated/Models/RolesAssignedOutsidePrivilegedIdentityManagementAlertIncident.cs +++ b/src/Microsoft.Graph/Generated/Models/RolesAssignedOutsidePrivilegedIdentityManagementAlertIncident.cs @@ -128,7 +128,7 @@ public RolesAssignedOutsidePrivilegedIdentityManagementAlertIncident() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RolesAssignedOutsidePrivilegedIdentityManagementAlertIncident CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RolesAssignedOutsidePrivilegedIdentityManagementAlertIncident(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assigneeDisplayName", AssigneeDisplayName); writer.WriteStringValue("assigneeId", AssigneeId); diff --git a/src/Microsoft.Graph/Generated/Models/Room.cs b/src/Microsoft.Graph/Generated/Models/Room.cs index e5a658ba8c6..a26ad71a864 100644 --- a/src/Microsoft.Graph/Generated/Models/Room.cs +++ b/src/Microsoft.Graph/Generated/Models/Room.cs @@ -162,7 +162,7 @@ public Room() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Room CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Room(); } /// @@ -192,7 +192,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("audioDeviceName", AudioDeviceName); writer.WriteEnumValue("bookingType", BookingType); diff --git a/src/Microsoft.Graph/Generated/Models/RoomCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RoomCollectionResponse.cs index 3f4b9c98044..e128555750c 100644 --- a/src/Microsoft.Graph/Generated/Models/RoomCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RoomCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RoomCollectionResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RoomCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RoomCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/RoomList.cs b/src/Microsoft.Graph/Generated/Models/RoomList.cs index 0cd00227276..6727759e763 100644 --- a/src/Microsoft.Graph/Generated/Models/RoomList.cs +++ b/src/Microsoft.Graph/Generated/Models/RoomList.cs @@ -74,7 +74,7 @@ public RoomList() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RoomList CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RoomList(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("emailAddress", EmailAddress); writer.WriteCollectionOfObjectValues("rooms", Rooms); diff --git a/src/Microsoft.Graph/Generated/Models/RoomListCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/RoomListCollectionResponse.cs index 1767d159d1d..11df00d07d4 100644 --- a/src/Microsoft.Graph/Generated/Models/RoomListCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/RoomListCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RoomListCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RoomListCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RoomListCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Root.cs b/src/Microsoft.Graph/Generated/Models/Root.cs index 559e2190ccc..8808e167cd8 100644 --- a/src/Microsoft.Graph/Generated/Models/Root.cs +++ b/src/Microsoft.Graph/Generated/Models/Root.cs @@ -52,7 +52,7 @@ public Root() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Root CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Root(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/RotateBitLockerKeysDeviceActionResult.cs b/src/Microsoft.Graph/Generated/Models/RotateBitLockerKeysDeviceActionResult.cs index d87311be36a..3fbd646a690 100644 --- a/src/Microsoft.Graph/Generated/Models/RotateBitLockerKeysDeviceActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/RotateBitLockerKeysDeviceActionResult.cs @@ -26,7 +26,7 @@ public int? ErrorCode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.RotateBitLockerKeysDeviceActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RotateBitLockerKeysDeviceActionResult(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("errorCode", ErrorCode); } diff --git a/src/Microsoft.Graph/Generated/Models/RubricCriterion.cs b/src/Microsoft.Graph/Generated/Models/RubricCriterion.cs index 0ac8e4640cb..d0eda820411 100644 --- a/src/Microsoft.Graph/Generated/Models/RubricCriterion.cs +++ b/src/Microsoft.Graph/Generated/Models/RubricCriterion.cs @@ -68,7 +68,7 @@ public RubricCriterion() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RubricCriterion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RubricCriterion(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("description", Description); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/RubricLevel.cs b/src/Microsoft.Graph/Generated/Models/RubricLevel.cs index 8230bbac003..b2d0d47fe21 100644 --- a/src/Microsoft.Graph/Generated/Models/RubricLevel.cs +++ b/src/Microsoft.Graph/Generated/Models/RubricLevel.cs @@ -116,7 +116,7 @@ public RubricLevel() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RubricLevel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RubricLevel(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteObjectValue("grading", Grading); diff --git a/src/Microsoft.Graph/Generated/Models/RubricQuality.cs b/src/Microsoft.Graph/Generated/Models/RubricQuality.cs index 94e242644a9..82191abc80e 100644 --- a/src/Microsoft.Graph/Generated/Models/RubricQuality.cs +++ b/src/Microsoft.Graph/Generated/Models/RubricQuality.cs @@ -122,7 +122,7 @@ public RubricQuality() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RubricQuality CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RubricQuality(); } /// @@ -147,7 +147,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("criteria", Criteria); writer.WriteObjectValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/RubricQualityFeedbackModel.cs b/src/Microsoft.Graph/Generated/Models/RubricQualityFeedbackModel.cs index bf672e02bb2..ba95c445e91 100644 --- a/src/Microsoft.Graph/Generated/Models/RubricQualityFeedbackModel.cs +++ b/src/Microsoft.Graph/Generated/Models/RubricQualityFeedbackModel.cs @@ -84,7 +84,7 @@ public RubricQualityFeedbackModel() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RubricQualityFeedbackModel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RubricQualityFeedbackModel(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("feedback", Feedback); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("qualityId", QualityId); diff --git a/src/Microsoft.Graph/Generated/Models/RubricQualitySelectedColumnModel.cs b/src/Microsoft.Graph/Generated/Models/RubricQualitySelectedColumnModel.cs index d1ea69fc0ec..c2a939a2c9e 100644 --- a/src/Microsoft.Graph/Generated/Models/RubricQualitySelectedColumnModel.cs +++ b/src/Microsoft.Graph/Generated/Models/RubricQualitySelectedColumnModel.cs @@ -84,7 +84,7 @@ public RubricQualitySelectedColumnModel() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.RubricQualitySelectedColumnModel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.RubricQualitySelectedColumnModel(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("columnId", ColumnId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("qualityId", QualityId); diff --git a/src/Microsoft.Graph/Generated/Models/SalesCreditMemo.cs b/src/Microsoft.Graph/Generated/Models/SalesCreditMemo.cs index 5a8de205d8b..1c82ba6fe91 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesCreditMemo.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesCreditMemo.cs @@ -431,7 +431,7 @@ public SalesCreditMemo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SalesCreditMemo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesCreditMemo(); } /// @@ -484,7 +484,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("billingPostalAddress", BillingPostalAddress); writer.WriteGuidValue("billToCustomerId", BillToCustomerId); writer.WriteStringValue("billToCustomerNumber", BillToCustomerNumber); diff --git a/src/Microsoft.Graph/Generated/Models/SalesCreditMemoCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SalesCreditMemoCollectionResponse.cs index 0a194ab1743..4afc22a819d 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesCreditMemoCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesCreditMemoCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SalesCreditMemoCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SalesCreditMemoCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesCreditMemoCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SalesCreditMemoLine.cs b/src/Microsoft.Graph/Generated/Models/SalesCreditMemoLine.cs index 9f8010db7f3..3e9b688ea6a 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesCreditMemoLine.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesCreditMemoLine.cs @@ -214,7 +214,7 @@ public decimal? UnitPrice /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SalesCreditMemoLine CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesCreditMemoLine(); } /// @@ -257,7 +257,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("account", Account); writer.WriteGuidValue("accountId", AccountId); diff --git a/src/Microsoft.Graph/Generated/Models/SalesCreditMemoLineCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SalesCreditMemoLineCollectionResponse.cs index 5abb93a0328..abbeb82b511 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesCreditMemoLineCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesCreditMemoLineCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SalesCreditMemoLineCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SalesCreditMemoLineCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesCreditMemoLineCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SalesInvoice.cs b/src/Microsoft.Graph/Generated/Models/SalesInvoice.cs index 41ccf23a3af..fca835c4081 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesInvoice.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesInvoice.cs @@ -517,7 +517,7 @@ public SalesInvoice() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SalesInvoice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesInvoice(); } /// @@ -576,7 +576,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("billingPostalAddress", BillingPostalAddress); writer.WriteGuidValue("billToCustomerId", BillToCustomerId); writer.WriteStringValue("billToCustomerNumber", BillToCustomerNumber); diff --git a/src/Microsoft.Graph/Generated/Models/SalesInvoiceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SalesInvoiceCollectionResponse.cs index b91e68fac14..90a359d7a56 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesInvoiceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesInvoiceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SalesInvoiceCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SalesInvoiceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesInvoiceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SalesInvoiceLine.cs b/src/Microsoft.Graph/Generated/Models/SalesInvoiceLine.cs index 268e14aef7d..5ecf495aec1 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesInvoiceLine.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesInvoiceLine.cs @@ -214,7 +214,7 @@ public decimal? UnitPrice /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SalesInvoiceLine CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesInvoiceLine(); } /// @@ -257,7 +257,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("account", Account); writer.WriteGuidValue("accountId", AccountId); diff --git a/src/Microsoft.Graph/Generated/Models/SalesInvoiceLineCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SalesInvoiceLineCollectionResponse.cs index a0afd9e7f52..765782d0521 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesInvoiceLineCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesInvoiceLineCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SalesInvoiceLineCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SalesInvoiceLineCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesInvoiceLineCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SalesOrder.cs b/src/Microsoft.Graph/Generated/Models/SalesOrder.cs index 943d833c324..3c3cdfc3b09 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesOrder.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesOrder.cs @@ -469,7 +469,7 @@ public SalesOrder() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SalesOrder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesOrder(); } /// @@ -525,7 +525,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("billingPostalAddress", BillingPostalAddress); writer.WriteGuidValue("billToCustomerId", BillToCustomerId); writer.WriteStringValue("billToCustomerNumber", BillToCustomerNumber); diff --git a/src/Microsoft.Graph/Generated/Models/SalesOrderCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SalesOrderCollectionResponse.cs index a47206e6c5e..871ce8b90bc 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesOrderCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesOrderCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SalesOrderCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SalesOrderCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesOrderCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SalesOrderLine.cs b/src/Microsoft.Graph/Generated/Models/SalesOrderLine.cs index f3ba4109415..07f6bc87387 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesOrderLine.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesOrderLine.cs @@ -238,7 +238,7 @@ public decimal? UnitPrice /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SalesOrderLine CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesOrderLine(); } /// @@ -285,7 +285,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("account", Account); writer.WriteGuidValue("accountId", AccountId); diff --git a/src/Microsoft.Graph/Generated/Models/SalesOrderLineCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SalesOrderLineCollectionResponse.cs index c4d031465b1..ad3343bfa31 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesOrderLineCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesOrderLineCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SalesOrderLineCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SalesOrderLineCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesOrderLineCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SalesQuote.cs b/src/Microsoft.Graph/Generated/Models/SalesQuote.cs index de4092e1258..08267fffa38 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesQuote.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesQuote.cs @@ -485,7 +485,7 @@ public SalesQuote() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SalesQuote CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesQuote(); } /// @@ -542,7 +542,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateValue("acceptedDate", AcceptedDate); writer.WriteObjectValue("billingPostalAddress", BillingPostalAddress); writer.WriteGuidValue("billToCustomerId", BillToCustomerId); diff --git a/src/Microsoft.Graph/Generated/Models/SalesQuoteCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SalesQuoteCollectionResponse.cs index 99aaa70cd75..6d25f031052 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesQuoteCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesQuoteCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SalesQuoteCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SalesQuoteCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesQuoteCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SalesQuoteLine.cs b/src/Microsoft.Graph/Generated/Models/SalesQuoteLine.cs index 890e870dbc1..9ddd7f88e75 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesQuoteLine.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesQuoteLine.cs @@ -201,7 +201,7 @@ public decimal? UnitPrice /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SalesQuoteLine CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesQuoteLine(); } /// @@ -242,7 +242,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("account", Account); writer.WriteGuidValue("accountId", AccountId); diff --git a/src/Microsoft.Graph/Generated/Models/SalesQuoteLineCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SalesQuoteLineCollectionResponse.cs index 62abfe0a033..7376e2f752c 100644 --- a/src/Microsoft.Graph/Generated/Models/SalesQuoteLineCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SalesQuoteLineCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SalesQuoteLineCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SalesQuoteLineCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SalesQuoteLineCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SamlIdentitySource.cs b/src/Microsoft.Graph/Generated/Models/SamlIdentitySource.cs index f71fc4be838..b35b377d5e5 100644 --- a/src/Microsoft.Graph/Generated/Models/SamlIdentitySource.cs +++ b/src/Microsoft.Graph/Generated/Models/SamlIdentitySource.cs @@ -26,7 +26,7 @@ public SamlIdentitySource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SamlIdentitySource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SamlIdentitySource(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SamlNameIdClaim.cs b/src/Microsoft.Graph/Generated/Models/SamlNameIdClaim.cs index e42ecc1a814..241d055ae89 100644 --- a/src/Microsoft.Graph/Generated/Models/SamlNameIdClaim.cs +++ b/src/Microsoft.Graph/Generated/Models/SamlNameIdClaim.cs @@ -48,7 +48,7 @@ public SamlNameIdClaim() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SamlNameIdClaim CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SamlNameIdClaim(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("nameIdFormat", NameIdFormat); writer.WriteStringValue("serviceProviderNameQualifier", ServiceProviderNameQualifier); diff --git a/src/Microsoft.Graph/Generated/Models/SamlOrWsFedExternalDomainFederation.cs b/src/Microsoft.Graph/Generated/Models/SamlOrWsFedExternalDomainFederation.cs index 106aa2e52c8..53b8106393b 100644 --- a/src/Microsoft.Graph/Generated/Models/SamlOrWsFedExternalDomainFederation.cs +++ b/src/Microsoft.Graph/Generated/Models/SamlOrWsFedExternalDomainFederation.cs @@ -42,7 +42,7 @@ public SamlOrWsFedExternalDomainFederation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SamlOrWsFedExternalDomainFederation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SamlOrWsFedExternalDomainFederation(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("domains", Domains); } diff --git a/src/Microsoft.Graph/Generated/Models/SamlOrWsFedProvider.cs b/src/Microsoft.Graph/Generated/Models/SamlOrWsFedProvider.cs index b469e0d5a3f..9e0acbedb9b 100644 --- a/src/Microsoft.Graph/Generated/Models/SamlOrWsFedProvider.cs +++ b/src/Microsoft.Graph/Generated/Models/SamlOrWsFedProvider.cs @@ -96,7 +96,7 @@ public SamlOrWsFedProvider() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SamlOrWsFedProvider CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -126,7 +126,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("issuerUri", IssuerUri); writer.WriteStringValue("metadataExchangeUri", MetadataExchangeUri); diff --git a/src/Microsoft.Graph/Generated/Models/SamlSingleSignOnSettings.cs b/src/Microsoft.Graph/Generated/Models/SamlSingleSignOnSettings.cs index 07568973e18..6431da31622 100644 --- a/src/Microsoft.Graph/Generated/Models/SamlSingleSignOnSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/SamlSingleSignOnSettings.cs @@ -68,7 +68,7 @@ public SamlSingleSignOnSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SamlSingleSignOnSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SamlSingleSignOnSettings(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("relayState", RelayState); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Schedule.cs b/src/Microsoft.Graph/Generated/Models/Schedule.cs index 3c9f0812818..876a751cd3d 100644 --- a/src/Microsoft.Graph/Generated/Models/Schedule.cs +++ b/src/Microsoft.Graph/Generated/Models/Schedule.cs @@ -347,7 +347,7 @@ public List WorkforceIntegrationIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Schedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Schedule(); } /// @@ -394,7 +394,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("activitiesIncludedWhenCopyingShiftsEnabled", ActivitiesIncludedWhenCopyingShiftsEnabled); writer.WriteCollectionOfObjectValues("dayNotes", DayNotes); diff --git a/src/Microsoft.Graph/Generated/Models/ScheduleChangeRequest.cs b/src/Microsoft.Graph/Generated/Models/ScheduleChangeRequest.cs index 70621e1e1e0..6435a9522cf 100644 --- a/src/Microsoft.Graph/Generated/Models/ScheduleChangeRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/ScheduleChangeRequest.cs @@ -114,7 +114,7 @@ public ScheduleChangeRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ScheduleChangeRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -149,7 +149,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("assignedTo", AssignedTo); writer.WriteStringValue("managerActionMessage", ManagerActionMessage); diff --git a/src/Microsoft.Graph/Generated/Models/ScheduleEntity.cs b/src/Microsoft.Graph/Generated/Models/ScheduleEntity.cs index 4df4697234e..4d8ae54a4fe 100644 --- a/src/Microsoft.Graph/Generated/Models/ScheduleEntity.cs +++ b/src/Microsoft.Graph/Generated/Models/ScheduleEntity.cs @@ -70,7 +70,7 @@ public ScheduleEntity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ScheduleEntity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ScheduleInformation.cs b/src/Microsoft.Graph/Generated/Models/ScheduleInformation.cs index 2ce18d5517c..6a5758832ed 100644 --- a/src/Microsoft.Graph/Generated/Models/ScheduleInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ScheduleInformation.cs @@ -132,7 +132,7 @@ public ScheduleInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ScheduleInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ScheduleInformation(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("availabilityView", AvailabilityView); writer.WriteObjectValue("error", Error); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ScheduleItem.cs b/src/Microsoft.Graph/Generated/Models/ScheduleItem.cs index 377931a5646..f88e0c2fc29 100644 --- a/src/Microsoft.Graph/Generated/Models/ScheduleItem.cs +++ b/src/Microsoft.Graph/Generated/Models/ScheduleItem.cs @@ -128,7 +128,7 @@ public ScheduleItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ScheduleItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ScheduleItem(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("end", End); writer.WriteBoolValue("isPrivate", IsPrivate); writer.WriteStringValue("location", Location); diff --git a/src/Microsoft.Graph/Generated/Models/ScheduledPermissionsRequest.cs b/src/Microsoft.Graph/Generated/Models/ScheduledPermissionsRequest.cs index e62cde21250..4e911f0bc39 100644 --- a/src/Microsoft.Graph/Generated/Models/ScheduledPermissionsRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/ScheduledPermissionsRequest.cs @@ -117,7 +117,7 @@ public string Notes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ScheduledPermissionsRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ScheduledPermissionsRequest(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("action", Action); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ScheduledPermissionsRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ScheduledPermissionsRequestCollectionResponse.cs index 1602b3a9593..b508af9fe15 100644 --- a/src/Microsoft.Graph/Generated/Models/ScheduledPermissionsRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ScheduledPermissionsRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ScheduledPermissionsRequestCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ScheduledPermissionsRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ScheduledPermissionsRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SchedulingGroup.cs b/src/Microsoft.Graph/Generated/Models/SchedulingGroup.cs index 4402b7043f5..84de06c74e0 100644 --- a/src/Microsoft.Graph/Generated/Models/SchedulingGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/SchedulingGroup.cs @@ -80,7 +80,7 @@ public SchedulingGroup() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SchedulingGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SchedulingGroup(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("code", Code); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/SchedulingGroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SchedulingGroupCollectionResponse.cs index 157d5dc4044..3a7f9364ca2 100644 --- a/src/Microsoft.Graph/Generated/Models/SchedulingGroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SchedulingGroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SchedulingGroupCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SchedulingGroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SchedulingGroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SchedulingGroupInfo.cs b/src/Microsoft.Graph/Generated/Models/SchedulingGroupInfo.cs index 00c1e518292..8d62618df0b 100644 --- a/src/Microsoft.Graph/Generated/Models/SchedulingGroupInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/SchedulingGroupInfo.cs @@ -100,7 +100,7 @@ public SchedulingGroupInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SchedulingGroupInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SchedulingGroupInfo(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Schema.cs b/src/Microsoft.Graph/Generated/Models/Schema.cs index ad7c2d97e54..59d7e6d74c6 100644 --- a/src/Microsoft.Graph/Generated/Models/Schema.cs +++ b/src/Microsoft.Graph/Generated/Models/Schema.cs @@ -51,7 +51,7 @@ public string BaseType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Schema CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Schema(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("baseType", BaseType); writer.WriteCollectionOfObjectValues("properties", Properties); diff --git a/src/Microsoft.Graph/Generated/Models/SchemaExtension.cs b/src/Microsoft.Graph/Generated/Models/SchemaExtension.cs index aba9e79e7b1..d9d3d5aa9b3 100644 --- a/src/Microsoft.Graph/Generated/Models/SchemaExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/SchemaExtension.cs @@ -99,7 +99,7 @@ public List TargetTypes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SchemaExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SchemaExtension(); } /// @@ -123,7 +123,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("owner", Owner); diff --git a/src/Microsoft.Graph/Generated/Models/SchemaExtensionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SchemaExtensionCollectionResponse.cs index f7101f4a153..30789b7a42d 100644 --- a/src/Microsoft.Graph/Generated/Models/SchemaExtensionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SchemaExtensionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SchemaExtensionCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SchemaExtensionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SchemaExtensionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ScopeBase.cs b/src/Microsoft.Graph/Generated/Models/ScopeBase.cs index 8ad2e0e6ecd..558a51be6a0 100644 --- a/src/Microsoft.Graph/Generated/Models/ScopeBase.cs +++ b/src/Microsoft.Graph/Generated/Models/ScopeBase.cs @@ -68,7 +68,7 @@ public ScopeBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ScopeBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("identity", Identity); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ScopeSensitivityLabels.cs b/src/Microsoft.Graph/Generated/Models/ScopeSensitivityLabels.cs index 5ac1c318d93..14da09dff15 100644 --- a/src/Microsoft.Graph/Generated/Models/ScopeSensitivityLabels.cs +++ b/src/Microsoft.Graph/Generated/Models/ScopeSensitivityLabels.cs @@ -58,7 +58,7 @@ public ScopeSensitivityLabels() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ScopeSensitivityLabels CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -85,7 +85,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("labelKind", LabelKind); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ScopedRoleMembership.cs b/src/Microsoft.Graph/Generated/Models/ScopedRoleMembership.cs index 71b65e5f04b..7b66c6fca7e 100644 --- a/src/Microsoft.Graph/Generated/Models/ScopedRoleMembership.cs +++ b/src/Microsoft.Graph/Generated/Models/ScopedRoleMembership.cs @@ -67,7 +67,7 @@ public string RoleId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ScopedRoleMembership CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ScopedRoleMembership(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("administrativeUnitId", AdministrativeUnitId); writer.WriteStringValue("roleId", RoleId); diff --git a/src/Microsoft.Graph/Generated/Models/ScopedRoleMembershipCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ScopedRoleMembershipCollectionResponse.cs index 4e918219909..a7cc6756eec 100644 --- a/src/Microsoft.Graph/Generated/Models/ScopedRoleMembershipCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ScopedRoleMembershipCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ScopedRoleMembershipCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ScopedRoleMembershipCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ScopedRoleMembershipCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Search/Acronym.cs b/src/Microsoft.Graph/Generated/Models/Search/Acronym.cs index 4a03ac84033..1cce329038a 100644 --- a/src/Microsoft.Graph/Generated/Models/Search/Acronym.cs +++ b/src/Microsoft.Graph/Generated/Models/Search/Acronym.cs @@ -41,7 +41,7 @@ public string StandsFor /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Search.Acronym CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Search.Acronym(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("standsFor", StandsFor); writer.WriteEnumValue("state", State); diff --git a/src/Microsoft.Graph/Generated/Models/Search/AcronymCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Search/AcronymCollectionResponse.cs index ba66f20f040..3a25b1d1eff 100644 --- a/src/Microsoft.Graph/Generated/Models/Search/AcronymCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Search/AcronymCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AcronymCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Search.AcronymCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Search.AcronymCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Search/AnswerKeyword.cs b/src/Microsoft.Graph/Generated/Models/Search/AnswerKeyword.cs index 7901ff122b9..e99ce3ad30a 100644 --- a/src/Microsoft.Graph/Generated/Models/Search/AnswerKeyword.cs +++ b/src/Microsoft.Graph/Generated/Models/Search/AnswerKeyword.cs @@ -90,7 +90,7 @@ public AnswerKeyword() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Search.AnswerKeyword CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Search.AnswerKeyword(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("keywords", Keywords); writer.WriteBoolValue("matchSimilarKeywords", MatchSimilarKeywords); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Search/AnswerVariant.cs b/src/Microsoft.Graph/Generated/Models/Search/AnswerVariant.cs index d5b4085403e..b735a1fabef 100644 --- a/src/Microsoft.Graph/Generated/Models/Search/AnswerVariant.cs +++ b/src/Microsoft.Graph/Generated/Models/Search/AnswerVariant.cs @@ -122,7 +122,7 @@ public AnswerVariant() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Search.AnswerVariant CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Search.AnswerVariant(); } /// @@ -147,7 +147,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("languageTag", LanguageTag); diff --git a/src/Microsoft.Graph/Generated/Models/Search/Bookmark.cs b/src/Microsoft.Graph/Generated/Models/Search/Bookmark.cs index 561b923b38f..388deed97f0 100644 --- a/src/Microsoft.Graph/Generated/Models/Search/Bookmark.cs +++ b/src/Microsoft.Graph/Generated/Models/Search/Bookmark.cs @@ -155,7 +155,7 @@ public List PowerAppIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Search.Bookmark CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Search.Bookmark(); } /// @@ -185,7 +185,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("availabilityEndDateTime", AvailabilityEndDateTime); writer.WriteDateTimeOffsetValue("availabilityStartDateTime", AvailabilityStartDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Search/BookmarkCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Search/BookmarkCollectionResponse.cs index cd924d10a00..440b53bbbdb 100644 --- a/src/Microsoft.Graph/Generated/Models/Search/BookmarkCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Search/BookmarkCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class BookmarkCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Search.BookmarkCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Search.BookmarkCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Search/Identity.cs b/src/Microsoft.Graph/Generated/Models/Search/Identity.cs index acc3634c6e2..f5e13637430 100644 --- a/src/Microsoft.Graph/Generated/Models/Search/Identity.cs +++ b/src/Microsoft.Graph/Generated/Models/Search/Identity.cs @@ -84,7 +84,7 @@ public Identity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Search.Identity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Search.Identity(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Search/IdentitySet.cs b/src/Microsoft.Graph/Generated/Models/Search/IdentitySet.cs index 0c9ca307a54..042799e18ee 100644 --- a/src/Microsoft.Graph/Generated/Models/Search/IdentitySet.cs +++ b/src/Microsoft.Graph/Generated/Models/Search/IdentitySet.cs @@ -100,7 +100,7 @@ public IdentitySet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Search.IdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Search.IdentitySet(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("application", Application); writer.WriteObjectValue("device", Device); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Search/Qna.cs b/src/Microsoft.Graph/Generated/Models/Search/Qna.cs index 4a593ccb207..5a9d025318a 100644 --- a/src/Microsoft.Graph/Generated/Models/Search/Qna.cs +++ b/src/Microsoft.Graph/Generated/Models/Search/Qna.cs @@ -123,7 +123,7 @@ public List LanguageTags /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Search.Qna CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Search.Qna(); } /// @@ -151,7 +151,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("availabilityEndDateTime", AvailabilityEndDateTime); writer.WriteDateTimeOffsetValue("availabilityStartDateTime", AvailabilityStartDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Search/QnaCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Search/QnaCollectionResponse.cs index b6c22a5614d..3a2a0f9ea52 100644 --- a/src/Microsoft.Graph/Generated/Models/Search/QnaCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Search/QnaCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class QnaCollectionResponse : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Search.QnaCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Search.QnaCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Search/SearchAnswer.cs b/src/Microsoft.Graph/Generated/Models/Search/SearchAnswer.cs index 5447bf6fdd7..30dd38bd483 100644 --- a/src/Microsoft.Graph/Generated/Models/Search/SearchAnswer.cs +++ b/src/Microsoft.Graph/Generated/Models/Search/SearchAnswer.cs @@ -89,7 +89,7 @@ public string WebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Search.SearchAnswer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/SearchAggregation.cs b/src/Microsoft.Graph/Generated/Models/SearchAggregation.cs index 4efe1cc3866..f51f9990918 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchAggregation.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchAggregation.cs @@ -84,7 +84,7 @@ public SearchAggregation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SearchAggregation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SearchAggregation(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("buckets", Buckets); writer.WriteStringValue("field", Field); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SearchAlteration.cs b/src/Microsoft.Graph/Generated/Models/SearchAlteration.cs index 5f0d185352a..83cc7a944b4 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchAlteration.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchAlteration.cs @@ -100,7 +100,7 @@ public SearchAlteration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SearchAlteration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SearchAlteration(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("alteredHighlightedQueryString", AlteredHighlightedQueryString); writer.WriteStringValue("alteredQueryString", AlteredQueryString); writer.WriteCollectionOfObjectValues("alteredQueryTokens", AlteredQueryTokens); diff --git a/src/Microsoft.Graph/Generated/Models/SearchAlterationOptions.cs b/src/Microsoft.Graph/Generated/Models/SearchAlterationOptions.cs index 1392f257d0e..83d8c4487a4 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchAlterationOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchAlterationOptions.cs @@ -64,7 +64,7 @@ public SearchAlterationOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SearchAlterationOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SearchAlterationOptions(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("enableModification", EnableModification); writer.WriteBoolValue("enableSuggestion", EnableSuggestion); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SearchBucket.cs b/src/Microsoft.Graph/Generated/Models/SearchBucket.cs index 996674e4262..7faa547334c 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchBucket.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchBucket.cs @@ -90,7 +90,7 @@ public SearchBucket() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SearchBucket CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SearchBucket(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("aggregationFilterToken", AggregationFilterToken); writer.WriteIntValue("count", Count); writer.WriteStringValue("key", Key); diff --git a/src/Microsoft.Graph/Generated/Models/SearchEntity.cs b/src/Microsoft.Graph/Generated/Models/SearchEntity.cs index d310b1fe805..3336063aae9 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchEntity.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchEntity.cs @@ -68,7 +68,7 @@ public partial class SearchEntity : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SearchEntity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SearchEntity(); } /// @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("acronyms", Acronyms); writer.WriteCollectionOfObjectValues("bookmarks", Bookmarks); diff --git a/src/Microsoft.Graph/Generated/Models/SearchHit.cs b/src/Microsoft.Graph/Generated/Models/SearchHit.cs index c6750b35f7a..38e2c74cb1d 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchHit.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchHit.cs @@ -198,7 +198,7 @@ public SearchHit() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SearchHit CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SearchHit(); } /// @@ -229,7 +229,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("_summary", _summary); writer.WriteStringValue("contentSource", ContentSource); writer.WriteStringValue("hitId", HitId); diff --git a/src/Microsoft.Graph/Generated/Models/SearchHitsContainer.cs b/src/Microsoft.Graph/Generated/Models/SearchHitsContainer.cs index 7ac949a1be6..4ba51126d15 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchHitsContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchHitsContainer.cs @@ -96,7 +96,7 @@ public SearchHitsContainer() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SearchHitsContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SearchHitsContainer(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("aggregations", Aggregations); writer.WriteCollectionOfObjectValues("hits", Hits); writer.WriteBoolValue("moreResultsAvailable", MoreResultsAvailable); diff --git a/src/Microsoft.Graph/Generated/Models/SearchQuery.cs b/src/Microsoft.Graph/Generated/Models/SearchQuery.cs index 572ac1d3253..303377b0e53 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchQuery.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchQuery.cs @@ -84,7 +84,7 @@ public SearchQuery() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SearchQuery CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SearchQuery(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("queryString", QueryString); writer.WriteStringValue("queryTemplate", QueryTemplate); diff --git a/src/Microsoft.Graph/Generated/Models/SearchRequest.cs b/src/Microsoft.Graph/Generated/Models/SearchRequest.cs index 474c1187301..e69716f3b81 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchRequest.cs @@ -284,7 +284,7 @@ public SearchRequest() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SearchRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SearchRequest(); } /// @@ -321,7 +321,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("aggregationFilters", AggregationFilters); writer.WriteCollectionOfObjectValues("aggregations", Aggregations); writer.WriteCollectionOfObjectValues("collapseProperties", CollapseProperties); diff --git a/src/Microsoft.Graph/Generated/Models/SearchResponse.cs b/src/Microsoft.Graph/Generated/Models/SearchResponse.cs index 18c272f1976..eee311222c7 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchResponse.cs @@ -116,7 +116,7 @@ public SearchResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SearchResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SearchResponse(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("hitsContainers", HitsContainers); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("queryAlterationResponse", QueryAlterationResponse); diff --git a/src/Microsoft.Graph/Generated/Models/SearchResult.cs b/src/Microsoft.Graph/Generated/Models/SearchResult.cs index 47d8c58004a..e94576be79e 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchResult.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchResult.cs @@ -68,7 +68,7 @@ public SearchResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SearchResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SearchResult(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("onClickTelemetryUrl", OnClickTelemetryUrl); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsResourceFinding.cs b/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsResourceFinding.cs index 972045b3cd1..fbf6e94d3c4 100644 --- a/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsResourceFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsResourceFinding.cs @@ -19,7 +19,7 @@ public partial class SecretInformationAccessAwsResourceFinding : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecretInformationAccessAwsResourceFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecretInformationAccessAwsResourceFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsRoleFinding.cs b/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsRoleFinding.cs index 9f0fe991046..d9dddeaaf86 100644 --- a/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsRoleFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsRoleFinding.cs @@ -19,7 +19,7 @@ public partial class SecretInformationAccessAwsRoleFinding : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecretInformationAccessAwsRoleFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecretInformationAccessAwsRoleFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsServerlessFunctionFinding.cs b/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsServerlessFunctionFinding.cs index e92bec90a26..1d88677f751 100644 --- a/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsServerlessFunctionFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsServerlessFunctionFinding.cs @@ -19,7 +19,7 @@ public partial class SecretInformationAccessAwsServerlessFunctionFinding : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecretInformationAccessAwsServerlessFunctionFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecretInformationAccessAwsServerlessFunctionFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsUserFinding.cs b/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsUserFinding.cs index 8eecddce382..dab70a59d29 100644 --- a/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsUserFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/SecretInformationAccessAwsUserFinding.cs @@ -19,7 +19,7 @@ public partial class SecretInformationAccessAwsUserFinding : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecretInformationAccessAwsUserFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecretInformationAccessAwsUserFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Section.cs b/src/Microsoft.Graph/Generated/Models/Section.cs index c842b95076b..d101b0ae3ea 100644 --- a/src/Microsoft.Graph/Generated/Models/Section.cs +++ b/src/Microsoft.Graph/Generated/Models/Section.cs @@ -26,7 +26,7 @@ public Section() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Section CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Section(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SectionGroup.cs b/src/Microsoft.Graph/Generated/Models/SectionGroup.cs index 07c6764f7d7..bec6343548b 100644 --- a/src/Microsoft.Graph/Generated/Models/SectionGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/SectionGroup.cs @@ -122,7 +122,7 @@ public SectionGroup() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SectionGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SectionGroup(); } /// @@ -147,7 +147,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("parentNotebook", ParentNotebook); writer.WriteObjectValue("parentSectionGroup", ParentSectionGroup); diff --git a/src/Microsoft.Graph/Generated/Models/SectionGroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SectionGroupCollectionResponse.cs index 740657672f8..217a3955b2f 100644 --- a/src/Microsoft.Graph/Generated/Models/SectionGroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SectionGroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SectionGroupCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SectionGroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SectionGroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SectionLinks.cs b/src/Microsoft.Graph/Generated/Models/SectionLinks.cs index df71ad11902..87c3ccb8ed5 100644 --- a/src/Microsoft.Graph/Generated/Models/SectionLinks.cs +++ b/src/Microsoft.Graph/Generated/Models/SectionLinks.cs @@ -84,7 +84,7 @@ public SectionLinks() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SectionLinks CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SectionLinks(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("oneNoteClientUrl", OneNoteClientUrl); writer.WriteObjectValue("oneNoteWebUrl", OneNoteWebUrl); diff --git a/src/Microsoft.Graph/Generated/Models/SecureScore.cs b/src/Microsoft.Graph/Generated/Models/SecureScore.cs index a3e80b54901..6a50f98ed25 100644 --- a/src/Microsoft.Graph/Generated/Models/SecureScore.cs +++ b/src/Microsoft.Graph/Generated/Models/SecureScore.cs @@ -129,7 +129,7 @@ public double? MaxScore /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecureScore CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecureScore(); } /// @@ -158,7 +158,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activeUserCount", ActiveUserCount); writer.WriteCollectionOfObjectValues("averageComparativeScores", AverageComparativeScores); diff --git a/src/Microsoft.Graph/Generated/Models/SecureScoreCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SecureScoreCollectionResponse.cs index f7b6167e6b8..7de6bbe899b 100644 --- a/src/Microsoft.Graph/Generated/Models/SecureScoreCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SecureScoreCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SecureScoreCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecureScoreCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecureScoreCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SecureScoreControlProfile.cs b/src/Microsoft.Graph/Generated/Models/SecureScoreControlProfile.cs index 9c0e86f92a6..8b5d9ed33e1 100644 --- a/src/Microsoft.Graph/Generated/Models/SecureScoreControlProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/SecureScoreControlProfile.cs @@ -283,7 +283,7 @@ public string UserImpact /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecureScoreControlProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecureScoreControlProfile(); } /// @@ -321,7 +321,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("actionType", ActionType); writer.WriteStringValue("actionUrl", ActionUrl); diff --git a/src/Microsoft.Graph/Generated/Models/SecureScoreControlProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SecureScoreControlProfileCollectionResponse.cs index 52488be73ec..086011de784 100644 --- a/src/Microsoft.Graph/Generated/Models/SecureScoreControlProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SecureScoreControlProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SecureScoreControlProfileCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecureScoreControlProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecureScoreControlProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SecureScoreControlStateUpdate.cs b/src/Microsoft.Graph/Generated/Models/SecureScoreControlStateUpdate.cs index 2c051c95b0f..2215f8784f4 100644 --- a/src/Microsoft.Graph/Generated/Models/SecureScoreControlStateUpdate.cs +++ b/src/Microsoft.Graph/Generated/Models/SecureScoreControlStateUpdate.cs @@ -122,7 +122,7 @@ public SecureScoreControlStateUpdate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SecureScoreControlStateUpdate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecureScoreControlStateUpdate(); } /// @@ -147,7 +147,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("assignedTo", AssignedTo); writer.WriteStringValue("comment", Comment); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SecureSignInSessionControl.cs b/src/Microsoft.Graph/Generated/Models/SecureSignInSessionControl.cs index 060a4a6f934..fd50803bc59 100644 --- a/src/Microsoft.Graph/Generated/Models/SecureSignInSessionControl.cs +++ b/src/Microsoft.Graph/Generated/Models/SecureSignInSessionControl.cs @@ -26,7 +26,7 @@ public SecureSignInSessionControl() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecureSignInSessionControl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecureSignInSessionControl(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AadRiskDetectionAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/AadRiskDetectionAuditRecord.cs index adf0bb14c4a..821bc98397a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AadRiskDetectionAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AadRiskDetectionAuditRecord.cs @@ -26,7 +26,7 @@ public AadRiskDetectionAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AadRiskDetectionAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AadRiskDetectionAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Account.cs b/src/Microsoft.Graph/Generated/Models/Security/Account.cs index ec249cfac88..43402c2e917 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Account.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Account.cs @@ -13,7 +13,7 @@ namespace Microsoft.Graph.Beta.Models.Security public partial class Account : IAdditionalDataHolder, IBackedModel, IParsable #pragma warning restore CS1591 { - /// The actions property + /// List of the type of action. The possible values are: disable, enable, forcePasswordReset, revokeAllSessions, requireUserToSignInAgain, markUserAsCompromised. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? Actions @@ -37,7 +37,7 @@ public IDictionary AdditionalData } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// The identifier property + /// The account ID. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Identifier @@ -90,7 +90,7 @@ public Account() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.Account CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Account(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfEnumValues("actions", Actions); writer.WriteStringValue("identifier", Identifier); writer.WriteEnumValue("identityProvider", IdentityProvider); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AddContentFooterAction.cs b/src/Microsoft.Graph/Generated/Models/Security/AddContentFooterAction.cs index 4da27ff9850..5dc7d60fcff 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AddContentFooterAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AddContentFooterAction.cs @@ -108,7 +108,7 @@ public AddContentFooterAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AddContentFooterAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AddContentFooterAction(); } /// @@ -134,7 +134,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("alignment", Alignment); writer.WriteStringValue("fontColor", FontColor); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AddContentHeaderAction.cs b/src/Microsoft.Graph/Generated/Models/Security/AddContentHeaderAction.cs index a83a18738b2..9a2217ceaa1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AddContentHeaderAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AddContentHeaderAction.cs @@ -108,7 +108,7 @@ public AddContentHeaderAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AddContentHeaderAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AddContentHeaderAction(); } /// @@ -134,7 +134,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("alignment", Alignment); writer.WriteStringValue("fontColor", FontColor); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AddWatermarkAction.cs b/src/Microsoft.Graph/Generated/Models/Security/AddWatermarkAction.cs index 6d06ce79c54..5ea0a045a64 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AddWatermarkAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AddWatermarkAction.cs @@ -102,7 +102,7 @@ public AddWatermarkAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AddWatermarkAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AddWatermarkAction(); } /// @@ -127,7 +127,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fontColor", FontColor); writer.WriteStringValue("fontName", FontName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AedAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/AedAuditRecord.cs index 76bce5b9e97..fa738d1a198 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AedAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AedAuditRecord.cs @@ -26,7 +26,7 @@ public AedAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AedAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AedAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AiAppInteractionAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/AiAppInteractionAuditRecord.cs index 6082f00886c..0f2b20524f2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AiAppInteractionAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AiAppInteractionAuditRecord.cs @@ -26,7 +26,7 @@ public AiAppInteractionAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AiAppInteractionAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AiAppInteractionAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AipFileDeleted.cs b/src/Microsoft.Graph/Generated/Models/Security/AipFileDeleted.cs index e512c33988d..0f6b0b577da 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AipFileDeleted.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AipFileDeleted.cs @@ -26,7 +26,7 @@ public AipFileDeleted() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AipFileDeleted CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AipFileDeleted(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AipHeartBeat.cs b/src/Microsoft.Graph/Generated/Models/Security/AipHeartBeat.cs index a3af4cc7125..111e5f408f1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AipHeartBeat.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AipHeartBeat.cs @@ -26,7 +26,7 @@ public AipHeartBeat() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AipHeartBeat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AipHeartBeat(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AipProtectionActionLogRequest.cs b/src/Microsoft.Graph/Generated/Models/Security/AipProtectionActionLogRequest.cs index c08c3e2e7c8..ecd58d9cb2d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AipProtectionActionLogRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AipProtectionActionLogRequest.cs @@ -26,7 +26,7 @@ public AipProtectionActionLogRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AipProtectionActionLogRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AipProtectionActionLogRequest(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AipScannerDiscoverEvent.cs b/src/Microsoft.Graph/Generated/Models/Security/AipScannerDiscoverEvent.cs index a1d98e9a436..18488662e29 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AipScannerDiscoverEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AipScannerDiscoverEvent.cs @@ -26,7 +26,7 @@ public AipScannerDiscoverEvent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AipScannerDiscoverEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AipScannerDiscoverEvent(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AipSensitivityLabelActionLogRequest.cs b/src/Microsoft.Graph/Generated/Models/Security/AipSensitivityLabelActionLogRequest.cs index 6210f0631dd..b9fed04424a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AipSensitivityLabelActionLogRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AipSensitivityLabelActionLogRequest.cs @@ -26,7 +26,7 @@ public AipSensitivityLabelActionLogRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AipSensitivityLabelActionLogRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AipSensitivityLabelActionLogRequest(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AirAdminActionInvestigationData.cs b/src/Microsoft.Graph/Generated/Models/Security/AirAdminActionInvestigationData.cs index f6753aadd90..c1280f610c4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AirAdminActionInvestigationData.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AirAdminActionInvestigationData.cs @@ -26,7 +26,7 @@ public AirAdminActionInvestigationData() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AirAdminActionInvestigationData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AirAdminActionInvestigationData(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AirInvestigationData.cs b/src/Microsoft.Graph/Generated/Models/Security/AirInvestigationData.cs index 991e3cc21c6..1d21e6faa0d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AirInvestigationData.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AirInvestigationData.cs @@ -26,7 +26,7 @@ public AirInvestigationData() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AirInvestigationData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AirInvestigationData(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AirManualInvestigationData.cs b/src/Microsoft.Graph/Generated/Models/Security/AirManualInvestigationData.cs index bc4692d47f9..58b3dab886b 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AirManualInvestigationData.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AirManualInvestigationData.cs @@ -26,7 +26,7 @@ public AirManualInvestigationData() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AirManualInvestigationData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AirManualInvestigationData(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Alert.cs b/src/Microsoft.Graph/Generated/Models/Security/Alert.cs index 50f4161e4e3..c1d800c5565 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Alert.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Alert.cs @@ -437,7 +437,7 @@ public string Title /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Alert CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Alert(); } /// @@ -489,7 +489,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("actorDisplayName", ActorDisplayName); writer.WriteObjectValue("additionalData", AdditionalDataProperty); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AlertCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/AlertCollectionResponse.cs index 22bdb625614..6e208e3e1e5 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AlertCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AlertCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AlertCollectionResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AlertCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AlertCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AlertComment.cs b/src/Microsoft.Graph/Generated/Models/Security/AlertComment.cs index 6dc245f219d..81f50e8ca4e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AlertComment.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AlertComment.cs @@ -90,7 +90,7 @@ public AlertComment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.AlertComment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AlertComment(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("comment", Comment); writer.WriteStringValue("createdByDisplayName", CreatedByDisplayName); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AlertEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/AlertEvidence.cs index dc891fda093..0e8afbadabd 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AlertEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AlertEvidence.cs @@ -134,7 +134,7 @@ public AlertEvidence() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.AlertEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -211,7 +211,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteCollectionOfPrimitiveValues("detailedRoles", DetailedRoles); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AlertTemplate.cs b/src/Microsoft.Graph/Generated/Models/Security/AlertTemplate.cs index 123a2386192..54f2ee919a1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AlertTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AlertTemplate.cs @@ -154,7 +154,7 @@ public AlertTemplate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.AlertTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AlertTemplate(); } /// @@ -181,7 +181,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("category", Category); writer.WriteStringValue("description", Description); writer.WriteCollectionOfObjectValues("impactedAssets", ImpactedAssets); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AllowFileResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/AllowFileResponseAction.cs index 4a17b7091d3..3b0384e7ac2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AllowFileResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AllowFileResponseAction.cs @@ -48,7 +48,7 @@ public AllowFileResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AllowFileResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AllowFileResponseAction(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("deviceGroupNames", DeviceGroupNames); writer.WriteEnumValue("identifier", Identifier); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AmazonResourceEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/AmazonResourceEvidence.cs index 169f683694b..f5f77f3a33d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AmazonResourceEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AmazonResourceEvidence.cs @@ -90,7 +90,7 @@ public AmazonResourceEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AmazonResourceEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AmazonResourceEvidence(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("amazonAccountId", AmazonAccountId); writer.WriteStringValue("amazonResourceId", AmazonResourceId); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmail.cs b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmail.cs index 5ff1370c2bf..66e2a1dca11 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmail.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmail.cs @@ -581,7 +581,7 @@ public string Subject /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmail(); } /// @@ -637,7 +637,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("alertIds", AlertIds); writer.WriteCollectionOfObjectValues("attachments", Attachments); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailAttachment.cs b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailAttachment.cs index cd87049fcad..baf46bb23a8 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailAttachment.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailAttachment.cs @@ -176,7 +176,7 @@ public AnalyzedEmailAttachment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailAttachment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailAttachment(); } /// @@ -205,7 +205,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("detonationDetails", DetonationDetails); writer.WriteStringValue("fileExtension", FileExtension); writer.WriteStringValue("fileName", FileName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailAuthenticationDetail.cs b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailAuthenticationDetail.cs index 8c85c28e553..4bee3564faf 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailAuthenticationDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailAuthenticationDetail.cs @@ -116,7 +116,7 @@ public AnalyzedEmailAuthenticationDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailAuthenticationDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailAuthenticationDetail(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("compositeAuthentication", CompositeAuthentication); writer.WriteStringValue("dkim", Dkim); writer.WriteStringValue("dmarc", Dmarc); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailCollectionResponse.cs index c7eb114bf89..0ebe95a4b7d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AnalyzedEmailCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailDeliveryDetail.cs b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailDeliveryDetail.cs index 929482b690c..a6206d8b832 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailDeliveryDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailDeliveryDetail.cs @@ -96,7 +96,7 @@ public AnalyzedEmailDeliveryDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailDeliveryDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailDeliveryDetail(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteStringValue("latestThreats", LatestThreats); writer.WriteEnumValue("location", Location); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailDlpRuleInfo.cs b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailDlpRuleInfo.cs index a6f9ba09c26..0e4fbbed351 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailDlpRuleInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailDlpRuleInfo.cs @@ -84,7 +84,7 @@ public AnalyzedEmailDlpRuleInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailDlpRuleInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailDlpRuleInfo(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("ruleId", RuleId); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailExchangeTransportRuleInfo.cs b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailExchangeTransportRuleInfo.cs index 85b4f9d1d02..583a9add8cb 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailExchangeTransportRuleInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailExchangeTransportRuleInfo.cs @@ -84,7 +84,7 @@ public AnalyzedEmailExchangeTransportRuleInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailExchangeTransportRuleInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailExchangeTransportRuleInfo(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("ruleId", RuleId); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailRecipientDetail.cs b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailRecipientDetail.cs index d7e72f58eac..7f751b12dc5 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailRecipientDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailRecipientDetail.cs @@ -84,7 +84,7 @@ public AnalyzedEmailRecipientDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailRecipientDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailRecipientDetail(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ccRecipients", CcRecipients); writer.WriteStringValue("domainName", DomainName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailSenderDetail.cs b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailSenderDetail.cs index 33935fe5ff2..24e9eb6cf86 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailSenderDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailSenderDetail.cs @@ -186,7 +186,7 @@ public AnalyzedEmailSenderDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailSenderDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailSenderDetail(); } /// @@ -215,7 +215,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("domainCreationDateTime", DomainCreationDateTime); writer.WriteStringValue("domainName", DomainName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailUrl.cs b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailUrl.cs index c387f3cec1d..3342bf5e4d9 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailUrl.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedEmailUrl.cs @@ -122,7 +122,7 @@ public AnalyzedEmailUrl() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailUrl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AnalyzedEmailUrl(); } /// @@ -147,7 +147,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("detectionMethod", DetectionMethod); writer.WriteObjectValue("detonationDetails", DetonationDetails); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedMessageEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedMessageEvidence.cs index 937a7aec041..dd95e76a8d4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AnalyzedMessageEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AnalyzedMessageEvidence.cs @@ -284,7 +284,7 @@ public AnalyzedMessageEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AnalyzedMessageEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AnalyzedMessageEvidence(); } /// @@ -321,7 +321,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("antiSpamDirection", AntiSpamDirection); writer.WriteLongValue("attachmentsCount", AttachmentsCount); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ApplyLabelAction.cs b/src/Microsoft.Graph/Generated/Models/Security/ApplyLabelAction.cs index 0bc9d615d2c..7e0610eeb46 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ApplyLabelAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ApplyLabelAction.cs @@ -80,7 +80,7 @@ public ApplyLabelAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ApplyLabelAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ApplyLabelAction(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("actions", Actions); writer.WriteEnumValue("actionSource", ActionSource); diff --git a/src/Microsoft.Graph/Generated/Models/Security/Article.cs b/src/Microsoft.Graph/Generated/Models/Security/Article.cs index 86ed92cf5c5..acf1a67c100 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Article.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Article.cs @@ -133,7 +133,7 @@ public string Title /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Article CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Article(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("body", Body); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ArticleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/ArticleCollectionResponse.cs index 65049f550b9..9e3d033a1f4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ArticleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ArticleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ArticleCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ArticleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ArticleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ArticleIndicator.cs b/src/Microsoft.Graph/Generated/Models/Security/ArticleIndicator.cs index 1b0f06f1b92..dac0cff77c2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ArticleIndicator.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ArticleIndicator.cs @@ -26,7 +26,7 @@ public ArticleIndicator() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ArticleIndicator CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ArticleIndicator(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ArticleIndicatorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/ArticleIndicatorCollectionResponse.cs index a9b5dc8add3..6fef6c95ffb 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ArticleIndicatorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ArticleIndicatorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ArticleIndicatorCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ArticleIndicatorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ArticleIndicatorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Artifact.cs b/src/Microsoft.Graph/Generated/Models/Security/Artifact.cs index 3cadfb94f0e..35c7dc7e807 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Artifact.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Artifact.cs @@ -19,7 +19,7 @@ public partial class Artifact : global::Microsoft.Graph.Beta.Models.Entity, IPar /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Artifact CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AttackSimAdminAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/AttackSimAdminAuditRecord.cs index 7e823e91baa..5197b72604a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AttackSimAdminAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AttackSimAdminAuditRecord.cs @@ -26,7 +26,7 @@ public AttackSimAdminAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AttackSimAdminAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AttackSimAdminAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AttackSimulationInfo.cs b/src/Microsoft.Graph/Generated/Models/Security/AttackSimulationInfo.cs index 5b65e35132e..0154cf6c38d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AttackSimulationInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AttackSimulationInfo.cs @@ -86,7 +86,7 @@ public AttackSimulationInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.AttackSimulationInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AttackSimulationInfo(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("attackSimDateTime", AttackSimDateTime); writer.WriteTimeSpanValue("attackSimDurationTime", AttackSimDurationTime); writer.WriteGuidValue("attackSimId", AttackSimId); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AuditCoreRoot.cs b/src/Microsoft.Graph/Generated/Models/Security/AuditCoreRoot.cs index 8e79028bf47..aea948daee7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AuditCoreRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AuditCoreRoot.cs @@ -35,7 +35,7 @@ public partial class AuditCoreRoot : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AuditCoreRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AuditCoreRoot(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("queries", Queries); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AuditData.cs b/src/Microsoft.Graph/Generated/Models/Security/AuditData.cs index 897a80d7b0b..f1e4c7627e4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AuditData.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AuditData.cs @@ -52,7 +52,7 @@ public AuditData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.AuditData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -348,7 +348,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AuditLogQuery.cs b/src/Microsoft.Graph/Generated/Models/Security/AuditLogQuery.cs index 17aea9262db..5d22ab46d2b 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AuditLogQuery.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AuditLogQuery.cs @@ -197,7 +197,7 @@ public List UserPrincipalNameFilters /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AuditLogQuery CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AuditLogQuery(); } /// @@ -229,7 +229,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("administrativeUnitIdFilters", AdministrativeUnitIdFilters); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AuditLogQueryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/AuditLogQueryCollectionResponse.cs index 70f91548c7b..6228f8d770a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AuditLogQueryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AuditLogQueryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuditLogQueryCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AuditLogQueryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AuditLogQueryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AuditLogRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/AuditLogRecord.cs index 9f0d29e07ea..c1883f819b9 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AuditLogRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AuditLogRecord.cs @@ -181,7 +181,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AuditLogRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AuditLogRecord(); } /// @@ -212,7 +212,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("administrativeUnits", AdministrativeUnits); writer.WriteObjectValue("auditData", AuditData); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AuditLogRecordCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/AuditLogRecordCollectionResponse.cs index fb77c305ccb..dbf4c981bfb 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AuditLogRecordCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AuditLogRecordCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuditLogRecordCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AuditLogRecordCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AuditLogRecordCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AuditSearchAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/AuditSearchAuditRecord.cs index 25cc64df419..a4182548772 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AuditSearchAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AuditSearchAuditRecord.cs @@ -26,7 +26,7 @@ public AuditSearchAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AuditSearchAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AuditSearchAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AuthorityTemplate.cs b/src/Microsoft.Graph/Generated/Models/Security/AuthorityTemplate.cs index d23edb3c3ab..6714750d8b0 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AuthorityTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AuthorityTemplate.cs @@ -19,7 +19,7 @@ public partial class AuthorityTemplate : global::Microsoft.Graph.Beta.Models.Sec /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AuthorityTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AuthorityTemplate(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AuthorityTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/AuthorityTemplateCollectionResponse.cs index 01255add53c..058fb095555 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AuthorityTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AuthorityTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class AuthorityTemplateCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AuthorityTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AuthorityTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AutonomousSystem.cs b/src/Microsoft.Graph/Generated/Models/Security/AutonomousSystem.cs index 4b8a6d9e136..3e2205a0609 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AutonomousSystem.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AutonomousSystem.cs @@ -106,7 +106,7 @@ public AutonomousSystem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.AutonomousSystem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AutonomousSystem(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteIntValue("number", Number); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryAccountLogonAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryAccountLogonAuditRecord.cs index ca124b95705..812df54900c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryAccountLogonAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryAccountLogonAuditRecord.cs @@ -26,7 +26,7 @@ public AzureActiveDirectoryAccountLogonAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AzureActiveDirectoryAccountLogonAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AzureActiveDirectoryAccountLogonAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryAuditRecord.cs index bb059778b75..35bc2533630 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryAuditRecord.cs @@ -26,7 +26,7 @@ public AzureActiveDirectoryAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AzureActiveDirectoryAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AzureActiveDirectoryAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryBaseAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryBaseAuditRecord.cs index fe91307d02e..1e60fc272b9 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryBaseAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryBaseAuditRecord.cs @@ -26,7 +26,7 @@ public AzureActiveDirectoryBaseAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AzureActiveDirectoryBaseAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AzureActiveDirectoryBaseAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryStsLogonAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryStsLogonAuditRecord.cs index e8d5ac6e62c..0b149a579b4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryStsLogonAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AzureActiveDirectoryStsLogonAuditRecord.cs @@ -26,7 +26,7 @@ public AzureActiveDirectoryStsLogonAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AzureActiveDirectoryStsLogonAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AzureActiveDirectoryStsLogonAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/AzureResourceEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/AzureResourceEvidence.cs index ea5b5de90a2..bc985ba1c09 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/AzureResourceEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/AzureResourceEvidence.cs @@ -74,7 +74,7 @@ public AzureResourceEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.AzureResourceEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.AzureResourceEvidence(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("resourceId", ResourceId); writer.WriteStringValue("resourceName", ResourceName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/BlobContainerEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/BlobContainerEvidence.cs index 04076818c0f..a3d76b7dbe9 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/BlobContainerEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/BlobContainerEvidence.cs @@ -74,7 +74,7 @@ public BlobContainerEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.BlobContainerEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.BlobContainerEvidence(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); writer.WriteObjectValue("storageResource", StorageResource); diff --git a/src/Microsoft.Graph/Generated/Models/Security/BlobEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/BlobEvidence.cs index b9cb2d8ac66..f5d554b91de 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/BlobEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/BlobEvidence.cs @@ -106,7 +106,7 @@ public BlobEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.BlobEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.BlobEvidence(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("blobContainer", BlobContainer); writer.WriteStringValue("etag", Etag); diff --git a/src/Microsoft.Graph/Generated/Models/Security/BlockFileResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/BlockFileResponseAction.cs index b834d625bc0..07d21f5cc6c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/BlockFileResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/BlockFileResponseAction.cs @@ -48,7 +48,7 @@ public BlockFileResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.BlockFileResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.BlockFileResponseAction(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("deviceGroupNames", DeviceGroupNames); writer.WriteEnumValue("identifier", Identifier); diff --git a/src/Microsoft.Graph/Generated/Models/Security/CampaignAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CampaignAuditRecord.cs index b940d0b4eca..577befef6ec 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CampaignAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CampaignAuditRecord.cs @@ -26,7 +26,7 @@ public CampaignAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CampaignAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CampaignAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Case.cs b/src/Microsoft.Graph/Generated/Models/Security/Case.cs index 1fd642b3f11..758dfb8d4cb 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Case.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Case.cs @@ -85,7 +85,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Case CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -115,7 +115,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/Security/CaseAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CaseAuditRecord.cs index b411d9b9924..f7862385747 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CaseAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CaseAuditRecord.cs @@ -26,7 +26,7 @@ public CaseAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CaseAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CaseAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CaseInvestigation.cs b/src/Microsoft.Graph/Generated/Models/Security/CaseInvestigation.cs index 8fb2774760f..f99e0a92421 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CaseInvestigation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CaseInvestigation.cs @@ -26,7 +26,7 @@ public CaseInvestigation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CaseInvestigation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CaseInvestigation(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CaseOperation.cs b/src/Microsoft.Graph/Generated/Models/Security/CaseOperation.cs index 9463185d032..9a67a925e35 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CaseOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CaseOperation.cs @@ -81,7 +81,7 @@ public int? PercentProgress /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CaseOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -119,7 +119,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("action", Action); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/CaseOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/CaseOperationCollectionResponse.cs index 1ec7ac574f7..36522bae726 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CaseOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CaseOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CaseOperationCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CaseOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CaseOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CasesRoot.cs b/src/Microsoft.Graph/Generated/Models/Security/CasesRoot.cs index 0aa3909d440..6ada3733ff5 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CasesRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CasesRoot.cs @@ -35,7 +35,7 @@ public partial class CasesRoot : global::Microsoft.Graph.Beta.Models.Entity, IPa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CasesRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CasesRoot(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("ediscoveryCases", EdiscoveryCases); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CategoryTemplate.cs b/src/Microsoft.Graph/Generated/Models/Security/CategoryTemplate.cs index 352db00d3e2..09ff4fcf685 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CategoryTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CategoryTemplate.cs @@ -35,7 +35,7 @@ public partial class CategoryTemplate : global::Microsoft.Graph.Beta.Models.Secu /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CategoryTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CategoryTemplate(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("subcategories", Subcategories); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CategoryTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/CategoryTemplateCollectionResponse.cs index fc8d52790b1..790ddce8e42 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CategoryTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CategoryTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CategoryTemplateCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CategoryTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CategoryTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CdpColdCrawlStatusRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CdpColdCrawlStatusRecord.cs index 8e9ef7f536e..6d5e1be3829 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CdpColdCrawlStatusRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CdpColdCrawlStatusRecord.cs @@ -26,7 +26,7 @@ public CdpColdCrawlStatusRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CdpColdCrawlStatusRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CdpColdCrawlStatusRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CdpContentExplorerAggregateRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CdpContentExplorerAggregateRecord.cs index 32c1a89c3db..dd3feda172d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CdpContentExplorerAggregateRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CdpContentExplorerAggregateRecord.cs @@ -26,7 +26,7 @@ public CdpContentExplorerAggregateRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CdpContentExplorerAggregateRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CdpContentExplorerAggregateRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CdpDlpSensitiveAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CdpDlpSensitiveAuditRecord.cs index a81ffe03576..2c89d8c0e57 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CdpDlpSensitiveAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CdpDlpSensitiveAuditRecord.cs @@ -26,7 +26,7 @@ public CdpDlpSensitiveAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CdpDlpSensitiveAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CdpDlpSensitiveAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CdpDlpSensitiveEndpointAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CdpDlpSensitiveEndpointAuditRecord.cs index 8e43adeb971..ed9d07d52ee 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CdpDlpSensitiveEndpointAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CdpDlpSensitiveEndpointAuditRecord.cs @@ -26,7 +26,7 @@ public CdpDlpSensitiveEndpointAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CdpDlpSensitiveEndpointAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CdpDlpSensitiveEndpointAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CdpLogRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CdpLogRecord.cs index 274c1d7e64c..64419f3bcfa 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CdpLogRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CdpLogRecord.cs @@ -26,7 +26,7 @@ public CdpLogRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CdpLogRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CdpLogRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CdpOcrBillingRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CdpOcrBillingRecord.cs index ca8f4393cf1..0fae96f95ec 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CdpOcrBillingRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CdpOcrBillingRecord.cs @@ -26,7 +26,7 @@ public CdpOcrBillingRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CdpOcrBillingRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CdpOcrBillingRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CdpResourceScopeChangeEventRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CdpResourceScopeChangeEventRecord.cs index ab220f471c6..a31943231ad 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CdpResourceScopeChangeEventRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CdpResourceScopeChangeEventRecord.cs @@ -26,7 +26,7 @@ public CdpResourceScopeChangeEventRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CdpResourceScopeChangeEventRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CdpResourceScopeChangeEventRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CernerSMSLinkRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CernerSMSLinkRecord.cs index fdc39b5dd31..d069798401c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CernerSMSLinkRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CernerSMSLinkRecord.cs @@ -26,7 +26,7 @@ public CernerSMSLinkRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CernerSMSLinkRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CernerSMSLinkRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CernerSMSSettingsUpdateRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CernerSMSSettingsUpdateRecord.cs index 9e0e73ea0f8..8edaca10af7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CernerSMSSettingsUpdateRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CernerSMSSettingsUpdateRecord.cs @@ -26,7 +26,7 @@ public CernerSMSSettingsUpdateRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CernerSMSSettingsUpdateRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CernerSMSSettingsUpdateRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CernerSMSUnlinkRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CernerSMSUnlinkRecord.cs index 45025a8ec76..9a62757dcdf 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CernerSMSUnlinkRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CernerSMSUnlinkRecord.cs @@ -26,7 +26,7 @@ public CernerSMSUnlinkRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CernerSMSUnlinkRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CernerSMSUnlinkRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CitationTemplate.cs b/src/Microsoft.Graph/Generated/Models/Security/CitationTemplate.cs index c45fc1e1536..c6a60d45c1d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CitationTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CitationTemplate.cs @@ -51,7 +51,7 @@ public string CitationUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CitationTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CitationTemplate(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("citationJurisdiction", CitationJurisdiction); writer.WriteStringValue("citationUrl", CitationUrl); diff --git a/src/Microsoft.Graph/Generated/Models/Security/CitationTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/CitationTemplateCollectionResponse.cs index e002e2a0dd6..28bc4448d2e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CitationTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CitationTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CitationTemplateCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CitationTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CitationTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ClassificationResult.cs b/src/Microsoft.Graph/Generated/Models/Security/ClassificationResult.cs index 77f397059a0..11b2a10a396 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ClassificationResult.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ClassificationResult.cs @@ -80,7 +80,7 @@ public ClassificationResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.ClassificationResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ClassificationResult(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("confidenceLevel", ConfidenceLevel); writer.WriteIntValue("count", Count); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/CloudAppDiscoveryReport.cs b/src/Microsoft.Graph/Generated/Models/Security/CloudAppDiscoveryReport.cs index 2fc0fb9627e..391fe199476 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CloudAppDiscoveryReport.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CloudAppDiscoveryReport.cs @@ -137,7 +137,7 @@ public int? LogFileCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CloudAppDiscoveryReport CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CloudAppDiscoveryReport(); } /// @@ -169,7 +169,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("anonymizeMachineData", AnonymizeMachineData); writer.WriteBoolValue("anonymizeUserData", AnonymizeUserData); diff --git a/src/Microsoft.Graph/Generated/Models/Security/CloudAppDiscoveryReportCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/CloudAppDiscoveryReportCollectionResponse.cs index 74ab15ec6b5..8bafd7d5c9c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CloudAppDiscoveryReportCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CloudAppDiscoveryReportCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CloudAppDiscoveryReportCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CloudAppDiscoveryReportCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CloudAppDiscoveryReportCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CloudApplicationEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/CloudApplicationEvidence.cs index f057b7af7b4..b302b6efa60 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CloudApplicationEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CloudApplicationEvidence.cs @@ -92,7 +92,7 @@ public CloudApplicationEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CloudApplicationEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CloudApplicationEvidence(); } /// @@ -117,7 +117,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("appId", AppId); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/CloudLogonRequestEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/CloudLogonRequestEvidence.cs index f610dac96c2..85642583d57 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CloudLogonRequestEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CloudLogonRequestEvidence.cs @@ -42,7 +42,7 @@ public CloudLogonRequestEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CloudLogonRequestEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CloudLogonRequestEvidence(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("requestId", RequestId); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CloudLogonSessionEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/CloudLogonSessionEvidence.cs index cde5392fab3..6550d981ce1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CloudLogonSessionEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CloudLogonSessionEvidence.cs @@ -150,7 +150,7 @@ public CloudLogonSessionEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CloudLogonSessionEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CloudLogonSessionEvidence(); } /// @@ -178,7 +178,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("account", Account); writer.WriteStringValue("browser", Browser); diff --git a/src/Microsoft.Graph/Generated/Models/Security/CollaborationRoot.cs b/src/Microsoft.Graph/Generated/Models/Security/CollaborationRoot.cs index f688238f207..4d1697fd49a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CollaborationRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CollaborationRoot.cs @@ -35,7 +35,7 @@ public partial class CollaborationRoot : global::Microsoft.Graph.Beta.Models.Ent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CollaborationRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CollaborationRoot(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("analyzedEmails", AnalyzedEmails); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CollectInvestigationPackageIncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/CollectInvestigationPackageIncidentTaskResponseAction.cs index c0da25112a5..1455a70f20f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CollectInvestigationPackageIncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CollectInvestigationPackageIncidentTaskResponseAction.cs @@ -26,7 +26,7 @@ public CollectInvestigationPackageIncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CollectInvestigationPackageIncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CollectInvestigationPackageIncidentTaskResponseAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CollectInvestigationPackageResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/CollectInvestigationPackageResponseAction.cs index 8420ce70902..cbe92054189 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CollectInvestigationPackageResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CollectInvestigationPackageResponseAction.cs @@ -32,7 +32,7 @@ public CollectInvestigationPackageResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CollectInvestigationPackageResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CollectInvestigationPackageResponseAction(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceConnectorAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceConnectorAuditRecord.cs index 830ca5deb3f..454216eb37c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceConnectorAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceConnectorAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceConnectorAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceConnectorAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceConnectorAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDLMExchangeAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDLMExchangeAuditRecord.cs index 67efa43ca3f..94fa9ad78e6 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDLMExchangeAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDLMExchangeAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceDLMExchangeAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDLMExchangeAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDLMExchangeAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDLMSharePointAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDLMSharePointAuditRecord.cs index 9faa5a7bc9f..1c1610ba99a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDLMSharePointAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDLMSharePointAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceDLMSharePointAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDLMSharePointAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDLMSharePointAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpApplicationsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpApplicationsAuditRecord.cs index fbfa5ba9d9f..5a8962e8371 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpApplicationsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpApplicationsAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceDlpApplicationsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpApplicationsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpApplicationsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpApplicationsClassificationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpApplicationsClassificationAuditRecord.cs index b8c92b035bb..818bc358c89 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpApplicationsClassificationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpApplicationsClassificationAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceDlpApplicationsClassificationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpApplicationsClassificationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpApplicationsClassificationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpBaseAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpBaseAuditRecord.cs index 81f02d1d3fd..f00f63e4809 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpBaseAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpBaseAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceDlpBaseAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpBaseAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpBaseAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpClassificationBaseAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpClassificationBaseAuditRecord.cs index c9f73fa1533..925202e9a71 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpClassificationBaseAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpClassificationBaseAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceDlpClassificationBaseAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpClassificationBaseAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpClassificationBaseAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpClassificationBaseCdpRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpClassificationBaseCdpRecord.cs index 911af3a9c06..8bb4c43ba93 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpClassificationBaseCdpRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpClassificationBaseCdpRecord.cs @@ -26,7 +26,7 @@ public ComplianceDlpClassificationBaseCdpRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpClassificationBaseCdpRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpClassificationBaseCdpRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpEndpointAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpEndpointAuditRecord.cs index 4587a2aab27..70cf189c29c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpEndpointAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpEndpointAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceDlpEndpointAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpEndpointAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpEndpointAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpEndpointDiscoveryAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpEndpointDiscoveryAuditRecord.cs index 7987508bc68..1a7164edfbe 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpEndpointDiscoveryAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpEndpointDiscoveryAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceDlpEndpointDiscoveryAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpEndpointDiscoveryAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpEndpointDiscoveryAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeAuditRecord.cs index b6ad0fd6511..3edd31d308c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceDlpExchangeAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpExchangeAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpExchangeAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeClassificationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeClassificationAuditRecord.cs index 1af0fc14428..7e4c7736eff 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeClassificationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeClassificationAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceDlpExchangeClassificationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpExchangeClassificationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpExchangeClassificationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeClassificationCdpRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeClassificationCdpRecord.cs index a8161fc5aae..272f9d55fa1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeClassificationCdpRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeClassificationCdpRecord.cs @@ -26,7 +26,7 @@ public ComplianceDlpExchangeClassificationCdpRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpExchangeClassificationCdpRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpExchangeClassificationCdpRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeDiscoveryAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeDiscoveryAuditRecord.cs index a559157d1b9..2d2a8edbffc 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeDiscoveryAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpExchangeDiscoveryAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceDlpExchangeDiscoveryAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpExchangeDiscoveryAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpExchangeDiscoveryAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpSharePointAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpSharePointAuditRecord.cs index 77e140a59a7..34f02b722c0 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpSharePointAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpSharePointAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceDlpSharePointAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpSharePointAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpSharePointAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpSharePointClassificationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpSharePointClassificationAuditRecord.cs index 1b7a7a55c90..4ef01a23208 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpSharePointClassificationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpSharePointClassificationAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceDlpSharePointClassificationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpSharePointClassificationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpSharePointClassificationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpSharePointClassificationExtendedAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpSharePointClassificationExtendedAuditRecord.cs index fbf769d3e6f..5e5a049c2dd 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpSharePointClassificationExtendedAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceDlpSharePointClassificationExtendedAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceDlpSharePointClassificationExtendedAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpSharePointClassificationExtendedAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceDlpSharePointClassificationExtendedAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceManagerActionRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceManagerActionRecord.cs index 74971fd4e6a..b50d90e69f4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceManagerActionRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceManagerActionRecord.cs @@ -26,7 +26,7 @@ public ComplianceManagerActionRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceManagerActionRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceManagerActionRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceSupervisionBaseAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceSupervisionBaseAuditRecord.cs index fd5b6290b95..452555ffa12 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceSupervisionBaseAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceSupervisionBaseAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceSupervisionBaseAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceSupervisionBaseAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceSupervisionBaseAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ComplianceSupervisionExchangeAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ComplianceSupervisionExchangeAuditRecord.cs index e5e0b69fc65..fbdb18f7f1e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ComplianceSupervisionExchangeAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ComplianceSupervisionExchangeAuditRecord.cs @@ -26,7 +26,7 @@ public ComplianceSupervisionExchangeAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ComplianceSupervisionExchangeAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ComplianceSupervisionExchangeAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CompromiseIndicator.cs b/src/Microsoft.Graph/Generated/Models/Security/CompromiseIndicator.cs index 6ef59956e11..db57b953d3c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CompromiseIndicator.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CompromiseIndicator.cs @@ -74,7 +74,7 @@ public CompromiseIndicator() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.CompromiseIndicator CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CompromiseIndicator(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); writer.WriteEnumValue("verdict", Verdict); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ConsumptionResourceAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ConsumptionResourceAuditRecord.cs index 65634411830..a7b075f82f2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ConsumptionResourceAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ConsumptionResourceAuditRecord.cs @@ -26,7 +26,7 @@ public ConsumptionResourceAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ConsumptionResourceAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ConsumptionResourceAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ContainerEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/ContainerEvidence.cs index 71ea7a64426..0fbdeb30141 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ContainerEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ContainerEvidence.cs @@ -128,7 +128,7 @@ public ContainerEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ContainerEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ContainerEvidence(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("args", Args); writer.WriteCollectionOfPrimitiveValues("command", Command); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ContainerImageEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/ContainerImageEvidence.cs index 96320c7dc02..1676d95d40e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ContainerImageEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ContainerImageEvidence.cs @@ -74,7 +74,7 @@ public ContainerImageEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ContainerImageEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ContainerImageEvidence(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("digestImage", DigestImage); writer.WriteStringValue("imageId", ImageId); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ContainerRegistryEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/ContainerRegistryEvidence.cs index 130c1c2fe7a..392d70d45da 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ContainerRegistryEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ContainerRegistryEvidence.cs @@ -42,7 +42,7 @@ public ContainerRegistryEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ContainerRegistryEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ContainerRegistryEvidence(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("registry", Registry); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ContentInfo.cs b/src/Microsoft.Graph/Generated/Models/Security/ContentInfo.cs index aefbf66955d..29671f62c30 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ContentInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ContentInfo.cs @@ -106,7 +106,7 @@ public ContentInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.ContentInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ContentInfo(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("contentFormat", ContentFormat); writer.WriteStringValue("identifier", Identifier); writer.WriteCollectionOfObjectValues("metadata", Metadata); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ContentLabel.cs b/src/Microsoft.Graph/Generated/Models/Security/ContentLabel.cs index 237fbf69bb4..bc1eef08b06 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ContentLabel.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ContentLabel.cs @@ -80,7 +80,7 @@ public ContentLabel() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.ContentLabel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ContentLabel(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("assignmentMethod", AssignmentMethod); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/CopilotInteractionAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CopilotInteractionAuditRecord.cs index 014d485dfb2..6d535dec50b 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CopilotInteractionAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CopilotInteractionAuditRecord.cs @@ -26,7 +26,7 @@ public CopilotInteractionAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CopilotInteractionAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CopilotInteractionAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CoreReportingSettingsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CoreReportingSettingsAuditRecord.cs index 59081e1b230..b42b042cc40 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CoreReportingSettingsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CoreReportingSettingsAuditRecord.cs @@ -26,7 +26,7 @@ public CoreReportingSettingsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CoreReportingSettingsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CoreReportingSettingsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CortanaBriefingAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CortanaBriefingAuditRecord.cs index 2603a477fc6..81e7ef6a613 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CortanaBriefingAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CortanaBriefingAuditRecord.cs @@ -26,7 +26,7 @@ public CortanaBriefingAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CortanaBriefingAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CortanaBriefingAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CpsCommonPolicyAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CpsCommonPolicyAuditRecord.cs index 84f1154bd77..2fc1e531ac7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CpsCommonPolicyAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CpsCommonPolicyAuditRecord.cs @@ -26,7 +26,7 @@ public CpsCommonPolicyAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CpsCommonPolicyAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CpsCommonPolicyAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CpsPolicyConfigAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CpsPolicyConfigAuditRecord.cs index 972adfdabd9..2610483ed31 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CpsPolicyConfigAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CpsPolicyConfigAuditRecord.cs @@ -26,7 +26,7 @@ public CpsPolicyConfigAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CpsPolicyConfigAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CpsPolicyConfigAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CrmBaseAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CrmBaseAuditRecord.cs index eacb6e319a4..d48afe75467 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CrmBaseAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CrmBaseAuditRecord.cs @@ -26,7 +26,7 @@ public CrmBaseAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CrmBaseAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CrmBaseAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CrmEntityOperationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CrmEntityOperationAuditRecord.cs index 2c4a4482363..1c1b0bb9da5 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CrmEntityOperationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CrmEntityOperationAuditRecord.cs @@ -26,7 +26,7 @@ public CrmEntityOperationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CrmEntityOperationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CrmEntityOperationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CustomAction.cs b/src/Microsoft.Graph/Generated/Models/Security/CustomAction.cs index 3229da8351d..07ca52535aa 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CustomAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CustomAction.cs @@ -58,7 +58,7 @@ public CustomAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CustomAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CustomAction(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); writer.WriteCollectionOfObjectValues("properties", Properties); diff --git a/src/Microsoft.Graph/Generated/Models/Security/CustomerKeyServiceEncryptionAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/CustomerKeyServiceEncryptionAuditRecord.cs index 10a004e1f73..7b2c408b05f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CustomerKeyServiceEncryptionAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CustomerKeyServiceEncryptionAuditRecord.cs @@ -26,7 +26,7 @@ public CustomerKeyServiceEncryptionAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.CustomerKeyServiceEncryptionAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CustomerKeyServiceEncryptionAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/CvssSummary.cs b/src/Microsoft.Graph/Generated/Models/Security/CvssSummary.cs index a859086c563..1f9400e0ffa 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/CvssSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/CvssSummary.cs @@ -80,7 +80,7 @@ public CvssSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.CvssSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.CvssSummary(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDoubleValue("score", Score); writer.WriteEnumValue("severity", Severity); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DataCenterSecurityBaseAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/DataCenterSecurityBaseAuditRecord.cs index 326e3e1d862..abf1fcaeed4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DataCenterSecurityBaseAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DataCenterSecurityBaseAuditRecord.cs @@ -26,7 +26,7 @@ public DataCenterSecurityBaseAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DataCenterSecurityBaseAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DataCenterSecurityBaseAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DataCenterSecurityCmdletAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/DataCenterSecurityCmdletAuditRecord.cs index 9816d2565df..6580aad396a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DataCenterSecurityCmdletAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DataCenterSecurityCmdletAuditRecord.cs @@ -26,7 +26,7 @@ public DataCenterSecurityCmdletAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DataCenterSecurityCmdletAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DataCenterSecurityCmdletAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DataDiscoveryReport.cs b/src/Microsoft.Graph/Generated/Models/Security/DataDiscoveryReport.cs index 40f159f375e..724a4806ab3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DataDiscoveryReport.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DataDiscoveryReport.cs @@ -35,7 +35,7 @@ public partial class DataDiscoveryReport : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DataDiscoveryReport CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DataDiscoveryReport(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("uploadedStreams", UploadedStreams); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DataDiscoveryRoot.cs b/src/Microsoft.Graph/Generated/Models/Security/DataDiscoveryRoot.cs index 034ef0127a5..3ed9defe4e1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DataDiscoveryRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DataDiscoveryRoot.cs @@ -35,7 +35,7 @@ public partial class DataDiscoveryRoot : global::Microsoft.Graph.Beta.Models.Ent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DataDiscoveryRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DataDiscoveryRoot(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("cloudAppDiscovery", CloudAppDiscovery); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DataGovernanceAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/DataGovernanceAuditRecord.cs index fefcb90b03f..66dacbd6a36 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DataGovernanceAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DataGovernanceAuditRecord.cs @@ -26,7 +26,7 @@ public DataGovernanceAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DataGovernanceAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DataGovernanceAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DataInsightsRestApiAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/DataInsightsRestApiAuditRecord.cs index cef4e3c8bcd..9bbb30f3483 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DataInsightsRestApiAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DataInsightsRestApiAuditRecord.cs @@ -26,7 +26,7 @@ public DataInsightsRestApiAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DataInsightsRestApiAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DataInsightsRestApiAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DataLakeExportOperationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/DataLakeExportOperationAuditRecord.cs index 815730a4f8b..3f5e14fe0d3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DataLakeExportOperationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DataLakeExportOperationAuditRecord.cs @@ -26,7 +26,7 @@ public DataLakeExportOperationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DataLakeExportOperationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DataLakeExportOperationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DataSet.cs b/src/Microsoft.Graph/Generated/Models/Security/DataSet.cs index 374060894e5..864405533b2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DataSet.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DataSet.cs @@ -73,7 +73,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DataSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DataShareOperationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/DataShareOperationAuditRecord.cs index b27117a797e..d577ed5503b 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DataShareOperationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DataShareOperationAuditRecord.cs @@ -26,7 +26,7 @@ public DataShareOperationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DataShareOperationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DataShareOperationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DataSource.cs b/src/Microsoft.Graph/Generated/Models/Security/DataSource.cs index affc33f3db5..e87464c4185 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DataSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DataSource.cs @@ -63,7 +63,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DataSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DataSourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/DataSourceCollectionResponse.cs index c204a89989d..f1790134869 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DataSourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DataSourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DataSourceCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DataSourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DataSourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DataSourceContainer.cs b/src/Microsoft.Graph/Generated/Models/Security/DataSourceContainer.cs index 212d8caf3d1..6fe905a6e1f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DataSourceContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DataSourceContainer.cs @@ -65,7 +65,7 @@ public DateTimeOffset? ReleasedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DataSourceContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DefaultAuditData.cs b/src/Microsoft.Graph/Generated/Models/Security/DefaultAuditData.cs index 429c6606a35..79691f4105e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DefaultAuditData.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DefaultAuditData.cs @@ -26,7 +26,7 @@ public DefaultAuditData() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DefaultAuditData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DefaultAuditData(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DefenderSecurityAlertBaseRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/DefenderSecurityAlertBaseRecord.cs index 5b84ce986e2..c5be248638a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DefenderSecurityAlertBaseRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DefenderSecurityAlertBaseRecord.cs @@ -26,7 +26,7 @@ public DefenderSecurityAlertBaseRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DefenderSecurityAlertBaseRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DefenderSecurityAlertBaseRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DeleteCertificateRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/DeleteCertificateRecord.cs index ad32c120513..077e6a0400f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DeleteCertificateRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DeleteCertificateRecord.cs @@ -26,7 +26,7 @@ public DeleteCertificateRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DeleteCertificateRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DeleteCertificateRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DepartmentTemplate.cs b/src/Microsoft.Graph/Generated/Models/Security/DepartmentTemplate.cs index b0bd36a28d8..eca38a4022a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DepartmentTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DepartmentTemplate.cs @@ -19,7 +19,7 @@ public partial class DepartmentTemplate : global::Microsoft.Graph.Beta.Models.Se /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DepartmentTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DepartmentTemplate(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DepartmentTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/DepartmentTemplateCollectionResponse.cs index 0faafbf4a36..003de23d35f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DepartmentTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DepartmentTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DepartmentTemplateCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DepartmentTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DepartmentTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DeploymentAccessKeyType.cs b/src/Microsoft.Graph/Generated/Models/Security/DeploymentAccessKeyType.cs index 71792ba0189..2797109c20f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DeploymentAccessKeyType.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DeploymentAccessKeyType.cs @@ -68,7 +68,7 @@ public DeploymentAccessKeyType() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.DeploymentAccessKeyType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DeploymentAccessKeyType(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deploymentAccessKey", DeploymentAccessKey); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DetectionAction.cs b/src/Microsoft.Graph/Generated/Models/Security/DetectionAction.cs index 8a5002151d5..26105ab4928 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DetectionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DetectionAction.cs @@ -100,7 +100,7 @@ public DetectionAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.DetectionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DetectionAction(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("alertTemplate", AlertTemplate); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("organizationalScope", OrganizationalScope); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DetectionRule.cs b/src/Microsoft.Graph/Generated/Models/Security/DetectionRule.cs index fda857815d9..a33f5d0ce76 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DetectionRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DetectionRule.cs @@ -106,7 +106,7 @@ public DetectionRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DetectionRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DetectionRule(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("detectionAction", DetectionAction); writer.WriteStringValue("detectorId", DetectorId); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DetectionRuleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/DetectionRuleCollectionResponse.cs index 67ab3596762..1ec0a7d6b8d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DetectionRuleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DetectionRuleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DetectionRuleCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DetectionRuleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DetectionRuleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DetonationBehaviourDetails.cs b/src/Microsoft.Graph/Generated/Models/Security/DetonationBehaviourDetails.cs index 6f063a3dfd7..b2c5d9bf267 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DetonationBehaviourDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DetonationBehaviourDetails.cs @@ -186,7 +186,7 @@ public DetonationBehaviourDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.DetonationBehaviourDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DetonationBehaviourDetails(); } /// @@ -215,7 +215,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("actionStatus", ActionStatus); writer.WriteStringValue("behaviourCapability", BehaviourCapability); writer.WriteStringValue("behaviourGroup", BehaviourGroup); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DetonationChain.cs b/src/Microsoft.Graph/Generated/Models/Security/DetonationChain.cs index 174e2aa99cf..c20526b7225 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DetonationChain.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DetonationChain.cs @@ -84,7 +84,7 @@ public DetonationChain() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.DetonationChain CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DetonationChain(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("childNodes", ChildNodes); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DetonationDetails.cs b/src/Microsoft.Graph/Generated/Models/Security/DetonationDetails.cs index aba5acbd308..5349542588c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DetonationDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DetonationDetails.cs @@ -170,7 +170,7 @@ public DetonationDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.DetonationDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DetonationDetails(); } /// @@ -198,7 +198,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("analysisDateTime", AnalysisDateTime); writer.WriteCollectionOfObjectValues("compromiseIndicators", CompromiseIndicators); writer.WriteObjectValue("detonationBehaviourDetails", DetonationBehaviourDetails); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DetonationObservables.cs b/src/Microsoft.Graph/Generated/Models/Security/DetonationObservables.cs index 5f99eba7c84..d32d0434e79 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DetonationObservables.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DetonationObservables.cs @@ -100,7 +100,7 @@ public DetonationObservables() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.DetonationObservables CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DetonationObservables(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("contactedIps", ContactedIps); writer.WriteCollectionOfPrimitiveValues("contactedUrls", ContactedUrls); writer.WriteCollectionOfPrimitiveValues("droppedfiles", Droppedfiles); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DeviceEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/DeviceEvidence.cs index 1e574522328..b9e8920fd1f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DeviceEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DeviceEvidence.cs @@ -292,7 +292,7 @@ public DeviceEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DeviceEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DeviceEvidence(); } /// @@ -332,7 +332,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("azureAdDeviceId", AzureAdDeviceId); writer.WriteEnumValue("defenderAvStatus", DefenderAvStatus); diff --git a/src/Microsoft.Graph/Generated/Models/Security/Dictionary.cs b/src/Microsoft.Graph/Generated/Models/Security/Dictionary.cs index 7946a353c0b..802de9eadca 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Dictionary.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Dictionary.cs @@ -52,7 +52,7 @@ public Dictionary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.Dictionary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Dictionary(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DisableConsentRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/DisableConsentRecord.cs index 37a712ca5ae..65f98e7bc16 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DisableConsentRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DisableConsentRecord.cs @@ -26,7 +26,7 @@ public DisableConsentRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DisableConsentRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DisableConsentRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DisableUserIncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/DisableUserIncidentTaskResponseAction.cs index 57f0c14b19b..1eb4b76af90 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DisableUserIncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DisableUserIncidentTaskResponseAction.cs @@ -26,7 +26,7 @@ public DisableUserIncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DisableUserIncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DisableUserIncidentTaskResponseAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DisableUserResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/DisableUserResponseAction.cs index eb4f779ab64..87a7d8f05ba 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DisableUserResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DisableUserResponseAction.cs @@ -32,7 +32,7 @@ public DisableUserResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DisableUserResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DisableUserResponseAction(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppDetail.cs b/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppDetail.cs index cbe03fb5798..2f3935a0136 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppDetail.cs @@ -185,7 +185,7 @@ public long? UserCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DiscoveredCloudAppDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -225,7 +225,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("appInfo", AppInfo); writer.WriteEnumValue("category", Category); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppDevice.cs b/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppDevice.cs index b948005cc32..48e729bc94e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppDevice.cs @@ -68,7 +68,7 @@ public DiscoveredCloudAppDevice() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.DiscoveredCloudAppDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DiscoveredCloudAppDevice(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppIPAddress.cs b/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppIPAddress.cs index 683f3592477..9896c1ffb7c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppIPAddress.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppIPAddress.cs @@ -68,7 +68,7 @@ public DiscoveredCloudAppIPAddress() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.DiscoveredCloudAppIPAddress CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DiscoveredCloudAppIPAddress(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("ipAddress", IpAddress); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppInfo.cs b/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppInfo.cs index 2aae2504aae..17a4d462c15 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppInfo.cs @@ -587,7 +587,7 @@ public string Vendor /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DiscoveredCloudAppInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DiscoveredCloudAppInfo(); } /// @@ -689,7 +689,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("csaStarLevel", CsaStarLevel); writer.WriteEnumValue("dataAtRestEncryptionMethod", DataAtRestEncryptionMethod); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppUser.cs b/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppUser.cs index a49fcbf2184..cc8f7664c0e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppUser.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DiscoveredCloudAppUser.cs @@ -68,7 +68,7 @@ public DiscoveredCloudAppUser() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.DiscoveredCloudAppUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DiscoveredCloudAppUser(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("userIdentifier", UserIdentifier); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DiscoveryAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/DiscoveryAuditRecord.cs index efe03ca0091..e9f4a91e3de 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DiscoveryAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DiscoveryAuditRecord.cs @@ -26,7 +26,7 @@ public DiscoveryAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DiscoveryAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DiscoveryAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DispositionReviewStage.cs b/src/Microsoft.Graph/Generated/Models/Security/DispositionReviewStage.cs index bbc82f6114d..dd49b1c22d5 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DispositionReviewStage.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DispositionReviewStage.cs @@ -67,7 +67,7 @@ public string StageNumber /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DispositionReviewStage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DispositionReviewStage(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); writer.WriteCollectionOfPrimitiveValues("reviewersEmailAddresses", ReviewersEmailAddresses); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DispositionReviewStageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/DispositionReviewStageCollectionResponse.cs index 0750c6558f9..4a24072c6a3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DispositionReviewStageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DispositionReviewStageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DispositionReviewStageCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DispositionReviewStageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DispositionReviewStageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DlpEndpointAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/DlpEndpointAuditRecord.cs index cad68018b43..de81665fe1f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DlpEndpointAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DlpEndpointAuditRecord.cs @@ -26,7 +26,7 @@ public DlpEndpointAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DlpEndpointAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DlpEndpointAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DlpSensitiveInformationTypeCmdletRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/DlpSensitiveInformationTypeCmdletRecord.cs index 53369937381..3bb78550635 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DlpSensitiveInformationTypeCmdletRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DlpSensitiveInformationTypeCmdletRecord.cs @@ -26,7 +26,7 @@ public DlpSensitiveInformationTypeCmdletRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DlpSensitiveInformationTypeCmdletRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DlpSensitiveInformationTypeCmdletRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DlpSensitiveInformationTypeRulePackageCmdletRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/DlpSensitiveInformationTypeRulePackageCmdletRecord.cs index d4ee2005989..e11df9535b7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DlpSensitiveInformationTypeRulePackageCmdletRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DlpSensitiveInformationTypeRulePackageCmdletRecord.cs @@ -26,7 +26,7 @@ public DlpSensitiveInformationTypeRulePackageCmdletRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DlpSensitiveInformationTypeRulePackageCmdletRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DlpSensitiveInformationTypeRulePackageCmdletRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/DnsEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/DnsEvidence.cs index 73143e34277..ee87442be70 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DnsEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DnsEvidence.cs @@ -90,7 +90,7 @@ public DnsEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DnsEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DnsEvidence(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("dnsServerIp", DnsServerIp); writer.WriteStringValue("domainName", DomainName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DowngradeJustification.cs b/src/Microsoft.Graph/Generated/Models/Security/DowngradeJustification.cs index 4dae14b21a6..cce6596f50d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DowngradeJustification.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DowngradeJustification.cs @@ -74,7 +74,7 @@ public DowngradeJustification() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.DowngradeJustification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DowngradeJustification(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isDowngradeJustified", IsDowngradeJustified); writer.WriteStringValue("justificationMessage", JustificationMessage); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/DownloadCertificateRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/DownloadCertificateRecord.cs index 245df9266eb..b6982cbf0ad 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/DownloadCertificateRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/DownloadCertificateRecord.cs @@ -26,7 +26,7 @@ public DownloadCertificateRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.DownloadCertificateRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.DownloadCertificateRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Dynamics365BusinessCentralAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/Dynamics365BusinessCentralAuditRecord.cs index fc0abb72f2e..fad6b780377 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Dynamics365BusinessCentralAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Dynamics365BusinessCentralAuditRecord.cs @@ -26,7 +26,7 @@ public Dynamics365BusinessCentralAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Dynamics365BusinessCentralAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Dynamics365BusinessCentralAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryAddToReviewSetOperation.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryAddToReviewSetOperation.cs index 9a752eb6012..598ff393d62 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryAddToReviewSetOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryAddToReviewSetOperation.cs @@ -91,7 +91,7 @@ public partial class EdiscoveryAddToReviewSetOperation : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryAddToReviewSetOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryAddToReviewSetOperation(); } /// @@ -117,7 +117,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("additionalDataOptions", AdditionalDataOptions); writer.WriteEnumValue("cloudAttachmentVersion", CloudAttachmentVersion); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCase.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCase.cs index b3a1babb9c7..385700cc017 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCase.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCase.cs @@ -208,7 +208,7 @@ public EdiscoveryCase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryCase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryCase(); } /// @@ -239,7 +239,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("caseMembers", CaseMembers); writer.WriteObjectValue("closedBy", ClosedBy); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseCollectionResponse.cs index 0a8c4a0ec7e..6edded67af0 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EdiscoveryCaseCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryCaseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryCaseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseMember.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseMember.cs index 1b7b75e5def..6eee47a3877 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseMember.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseMember.cs @@ -57,7 +57,7 @@ public string SmtpAddress /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryCaseMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryCaseMember(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteEnumValue("recipientType", RecipientType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseMemberCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseMemberCollectionResponse.cs index 9c6d3c6c54f..b365c9a5627 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseMemberCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseMemberCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EdiscoveryCaseMemberCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryCaseMemberCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryCaseMemberCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseSettings.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseSettings.cs index b6d0cfddf6a..dd0979b2d8f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCaseSettings.cs @@ -67,7 +67,7 @@ public partial class EdiscoveryCaseSettings : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryCaseSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryCaseSettings(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("ocr", Ocr); writer.WriteObjectValue("redundancyDetection", RedundancyDetection); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCustodian.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCustodian.cs index cfaaf761748..adf0881aa1c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCustodian.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCustodian.cs @@ -112,7 +112,7 @@ public EdiscoveryCustodian() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryCustodian CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryCustodian(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("acknowledgedDateTime", AcknowledgedDateTime); writer.WriteStringValue("email", Email); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCustodianCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCustodianCollectionResponse.cs index 0462f8e82e0..25c3e9ef5f2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCustodianCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryCustodianCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EdiscoveryCustodianCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryCustodianCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryCustodianCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryEstimateOperation.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryEstimateOperation.cs index d15472a8712..bf5a7d80516 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryEstimateOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryEstimateOperation.cs @@ -93,7 +93,7 @@ public long? UnindexedItemsSize /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryEstimateOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryEstimateOperation(); } /// @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("indexedItemCount", IndexedItemCount); writer.WriteLongValue("indexedItemsSize", IndexedItemsSize); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryExportOperation.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryExportOperation.cs index f63c1c603e8..cfcf39f8edf 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryExportOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryExportOperation.cs @@ -159,7 +159,7 @@ public string OutputName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryExportOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryExportOperation(); } /// @@ -188,7 +188,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("azureBlobContainer", AzureBlobContainer); writer.WriteStringValue("azureBlobToken", AzureBlobToken); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryFile.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryFile.cs index bbf4113e0d9..6bc4d613531 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryFile.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryFile.cs @@ -51,7 +51,7 @@ public partial class EdiscoveryFile : global::Microsoft.Graph.Beta.Models.Securi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryFile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryFile(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("custodian", Custodian); writer.WriteCollectionOfObjectValues("tags", Tags); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryFileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryFileCollectionResponse.cs index a982ffb865b..b3ae40deafd 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryFileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryFileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EdiscoveryFileCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryFileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryFileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryHoldOperation.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryHoldOperation.cs index 7049c86fd42..0e8b730ac5e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryHoldOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryHoldOperation.cs @@ -19,7 +19,7 @@ public partial class EdiscoveryHoldOperation : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryHoldOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryHoldOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryHoldPolicy.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryHoldPolicy.cs index 2ebc1a81155..9dbb9e6ca21 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryHoldPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryHoldPolicy.cs @@ -96,7 +96,7 @@ public EdiscoveryHoldPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryHoldPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryHoldPolicy(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contentQuery", ContentQuery); writer.WriteCollectionOfPrimitiveValues("errors", Errors); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryHoldPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryHoldPolicyCollectionResponse.cs index bde37994a15..6d66bdb5ce3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryHoldPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryHoldPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EdiscoveryHoldPolicyCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryHoldPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryHoldPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryIndexOperation.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryIndexOperation.cs index f1bdf2704bf..585fe8b6564 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryIndexOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryIndexOperation.cs @@ -19,7 +19,7 @@ public partial class EdiscoveryIndexOperation : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryIndexOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryIndexOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSource.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSource.cs index 6445cf8d6e5..bcbc13cbf63 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSource.cs @@ -58,7 +58,7 @@ public EdiscoveryNoncustodialDataSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryNoncustodialDataSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryNoncustodialDataSource(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("dataSource", DataSource); writer.WriteObjectValue("lastIndexOperation", LastIndexOperation); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSourceCollectionResponse.cs index 7d77be28e7b..b1e830be620 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EdiscoveryNoncustodialDataSourceCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryNoncustodialDataSourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryNoncustodialDataSourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryPurgeDataOperation.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryPurgeDataOperation.cs index 4649dd3f033..3fae2d27e21 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryPurgeDataOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryPurgeDataOperation.cs @@ -19,7 +19,7 @@ public partial class EdiscoveryPurgeDataOperation : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryPurgeDataOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryPurgeDataOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSet.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSet.cs index 67cce21bacc..58b29f9aa27 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSet.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSet.cs @@ -58,7 +58,7 @@ public EdiscoveryReviewSet() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryReviewSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryReviewSet(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("files", Files); writer.WriteCollectionOfObjectValues("queries", Queries); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetCollectionResponse.cs index 27adf881d4a..9a903b6b0a1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EdiscoveryReviewSetCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryReviewSetCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryReviewSetCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQuery.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQuery.cs index 61af6ec4886..d1f58828578 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQuery.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQuery.cs @@ -26,7 +26,7 @@ public EdiscoveryReviewSetQuery() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryReviewSetQuery CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryReviewSetQuery(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQueryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQueryCollectionResponse.cs index 854c9c8e3b0..131d8f067a1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQueryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewSetQueryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EdiscoveryReviewSetQueryCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryReviewSetQueryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryReviewSetQueryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewTag.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewTag.cs index 90817336bd0..bdd51eb1dd6 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewTag.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewTag.cs @@ -64,7 +64,7 @@ public EdiscoveryReviewTag() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryReviewTag CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryReviewTag(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("childSelectability", ChildSelectability); writer.WriteCollectionOfObjectValues("childTags", ChildTags); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewTagCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewTagCollectionResponse.cs index 83d19127bc0..290dcde7b34 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewTagCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryReviewTagCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EdiscoveryReviewTagCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryReviewTagCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryReviewTagCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearch.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearch.cs index dd888a87890..b843784bcce 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearch.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearch.cs @@ -112,7 +112,7 @@ public EdiscoverySearch() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoverySearch CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoverySearch(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("additionalSources", AdditionalSources); writer.WriteObjectValue("addToReviewSetOperation", AddToReviewSetOperation); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearchCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearchCollectionResponse.cs index c82619b0b30..55a37864dc2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearchCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearchCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EdiscoverySearchCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoverySearchCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoverySearchCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearchExportOperation.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearchExportOperation.cs index c6dfca1d7ea..f0d474ca4dc 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearchExportOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoverySearchExportOperation.cs @@ -125,7 +125,7 @@ public bool? ExportSingleItems /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoverySearchExportOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoverySearchExportOperation(); } /// @@ -155,7 +155,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("additionalOptions", AdditionalOptions); writer.WriteEnumValue("cloudAttachmentVersion", CloudAttachmentVersion); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryTagOperation.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryTagOperation.cs index 4e1771d54d9..c2fddf21da8 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryTagOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryTagOperation.cs @@ -19,7 +19,7 @@ public partial class EdiscoveryTagOperation : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryTagOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EdiscoveryTagOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EmailContentThreatSubmission.cs b/src/Microsoft.Graph/Generated/Models/Security/EmailContentThreatSubmission.cs index 1517da5c262..9890443480a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EmailContentThreatSubmission.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EmailContentThreatSubmission.cs @@ -42,7 +42,7 @@ public EmailContentThreatSubmission() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EmailContentThreatSubmission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EmailContentThreatSubmission(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fileContent", FileContent); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EmailSender.cs b/src/Microsoft.Graph/Generated/Models/Security/EmailSender.cs index 72bc38cc8f3..667ad617e50 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EmailSender.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EmailSender.cs @@ -100,7 +100,7 @@ public EmailSender() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.EmailSender CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EmailSender(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("domainName", DomainName); writer.WriteStringValue("emailAddress", EmailAddress); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmission.cs b/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmission.cs index 27ffcf55641..30f312c11fa 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmission.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmission.cs @@ -150,7 +150,7 @@ public EmailThreatSubmission() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EmailThreatSubmission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -184,7 +184,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("attackSimulationInfo", AttackSimulationInfo); writer.WriteStringValue("internetMessageId", InternetMessageId); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmissionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmissionCollectionResponse.cs index 47ad4b19bf0..a9f7d2b190d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmissionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmissionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EmailThreatSubmissionCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EmailThreatSubmissionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EmailThreatSubmissionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmissionPolicy.cs b/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmissionPolicy.cs index 3c71a32b828..a784e7ca717 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmissionPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmissionPolicy.cs @@ -117,7 +117,7 @@ public bool? IsReviewEmailNotificationEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EmailThreatSubmissionPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EmailThreatSubmissionPolicy(); } /// @@ -149,7 +149,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("customizedNotificationSenderEmailAddress", CustomizedNotificationSenderEmailAddress); writer.WriteStringValue("customizedReportRecipientEmailAddress", CustomizedReportRecipientEmailAddress); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmissionPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmissionPolicyCollectionResponse.cs index 01a9002a73d..f819550c9fc 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmissionPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EmailThreatSubmissionPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EmailThreatSubmissionPolicyCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EmailThreatSubmissionPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EmailThreatSubmissionPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EmailUrlThreatSubmission.cs b/src/Microsoft.Graph/Generated/Models/Security/EmailUrlThreatSubmission.cs index db742570abe..7e0197a9a7c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EmailUrlThreatSubmission.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EmailUrlThreatSubmission.cs @@ -42,7 +42,7 @@ public EmailUrlThreatSubmission() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EmailUrlThreatSubmission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EmailUrlThreatSubmission(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("messageUrl", MessageUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EnableConsentRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/EnableConsentRecord.cs index fbb32687747..c2b33d827ac 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EnableConsentRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EnableConsentRecord.cs @@ -26,7 +26,7 @@ public EnableConsentRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EnableConsentRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EnableConsentRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EnableUserIncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/EnableUserIncidentTaskResponseAction.cs index f1af1c80e86..b1b07f5dd12 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EnableUserIncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EnableUserIncidentTaskResponseAction.cs @@ -26,7 +26,7 @@ public EnableUserIncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EnableUserIncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EnableUserIncidentTaskResponseAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EndpointDiscoveredCloudAppDetail.cs b/src/Microsoft.Graph/Generated/Models/Security/EndpointDiscoveredCloudAppDetail.cs index 3aa36df698a..b01d506c397 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EndpointDiscoveredCloudAppDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EndpointDiscoveredCloudAppDetail.cs @@ -41,7 +41,7 @@ public long? DeviceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EndpointDiscoveredCloudAppDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EndpointDiscoveredCloudAppDetail(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("deviceCount", DeviceCount); writer.WriteCollectionOfObjectValues("devices", Devices); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EpicSMSLinkRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/EpicSMSLinkRecord.cs index 5237359a23b..69ef99d5cee 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EpicSMSLinkRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EpicSMSLinkRecord.cs @@ -26,7 +26,7 @@ public EpicSMSLinkRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EpicSMSLinkRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EpicSMSLinkRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EpicSMSSettingsUpdateRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/EpicSMSSettingsUpdateRecord.cs index 1b3805fac89..496bf823d73 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EpicSMSSettingsUpdateRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EpicSMSSettingsUpdateRecord.cs @@ -26,7 +26,7 @@ public EpicSMSSettingsUpdateRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EpicSMSSettingsUpdateRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EpicSMSSettingsUpdateRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EpicSMSUnlinkRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/EpicSMSUnlinkRecord.cs index 7ce11d1543f..0d26dec474e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EpicSMSUnlinkRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EpicSMSUnlinkRecord.cs @@ -26,7 +26,7 @@ public EpicSMSUnlinkRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.EpicSMSUnlinkRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EpicSMSUnlinkRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/EventPropagationResult.cs b/src/Microsoft.Graph/Generated/Models/Security/EventPropagationResult.cs index 2f300e9fa5c..3d7ed9206a7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EventPropagationResult.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EventPropagationResult.cs @@ -106,7 +106,7 @@ public EventPropagationResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.EventPropagationResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EventPropagationResult(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("location", Location); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("serviceName", ServiceName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EventQuery.cs b/src/Microsoft.Graph/Generated/Models/Security/EventQuery.cs index ef3435b294b..5a9052f0fd0 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EventQuery.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EventQuery.cs @@ -74,7 +74,7 @@ public EventQuery() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.EventQuery CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.EventQuery(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("query", Query); writer.WriteEnumValue("queryType", QueryType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ExchangeAdminAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ExchangeAdminAuditRecord.cs index 2c54ec8fbf4..fe48ca39d8e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ExchangeAdminAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ExchangeAdminAuditRecord.cs @@ -26,7 +26,7 @@ public ExchangeAdminAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ExchangeAdminAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ExchangeAdminAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ExchangeAggregatedMailboxAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ExchangeAggregatedMailboxAuditRecord.cs index a6741f4ec4c..03fb96a3600 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ExchangeAggregatedMailboxAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ExchangeAggregatedMailboxAuditRecord.cs @@ -26,7 +26,7 @@ public ExchangeAggregatedMailboxAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ExchangeAggregatedMailboxAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ExchangeAggregatedMailboxAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ExchangeAggregatedOperationRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ExchangeAggregatedOperationRecord.cs index 84623ff40e1..ba0dc5f14ac 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ExchangeAggregatedOperationRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ExchangeAggregatedOperationRecord.cs @@ -26,7 +26,7 @@ public ExchangeAggregatedOperationRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ExchangeAggregatedOperationRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ExchangeAggregatedOperationRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ExchangeMailboxAuditBaseRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ExchangeMailboxAuditBaseRecord.cs index aa71cb5dcb0..4bbde6a7a0f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ExchangeMailboxAuditBaseRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ExchangeMailboxAuditBaseRecord.cs @@ -26,7 +26,7 @@ public ExchangeMailboxAuditBaseRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ExchangeMailboxAuditBaseRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ExchangeMailboxAuditBaseRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ExchangeMailboxAuditGroupRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ExchangeMailboxAuditGroupRecord.cs index 43349916cd8..e4c1befbc46 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ExchangeMailboxAuditGroupRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ExchangeMailboxAuditGroupRecord.cs @@ -26,7 +26,7 @@ public ExchangeMailboxAuditGroupRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ExchangeMailboxAuditGroupRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ExchangeMailboxAuditGroupRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ExchangeMailboxAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ExchangeMailboxAuditRecord.cs index 973295b469e..005b97ac6d3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ExchangeMailboxAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ExchangeMailboxAuditRecord.cs @@ -26,7 +26,7 @@ public ExchangeMailboxAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ExchangeMailboxAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ExchangeMailboxAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ExportFileMetadata.cs b/src/Microsoft.Graph/Generated/Models/Security/ExportFileMetadata.cs index bf02488cb1c..b965aab931a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ExportFileMetadata.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ExportFileMetadata.cs @@ -90,7 +90,7 @@ public ExportFileMetadata() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.ExportFileMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ExportFileMetadata(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("downloadUrl", DownloadUrl); writer.WriteStringValue("fileName", FileName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlAddRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlAddRecord.cs index 9441f3a0950..a29d29e00e6 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlAddRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlAddRecord.cs @@ -26,7 +26,7 @@ public FhirBaseUrlAddRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FhirBaseUrlAddRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FhirBaseUrlAddRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlApproveRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlApproveRecord.cs index 15dca9605c6..3982ada8ab2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlApproveRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlApproveRecord.cs @@ -26,7 +26,7 @@ public FhirBaseUrlApproveRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FhirBaseUrlApproveRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FhirBaseUrlApproveRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlDeleteRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlDeleteRecord.cs index 73523bc8fc0..d6f6dc7d996 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlDeleteRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlDeleteRecord.cs @@ -26,7 +26,7 @@ public FhirBaseUrlDeleteRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FhirBaseUrlDeleteRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FhirBaseUrlDeleteRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlUpdateRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlUpdateRecord.cs index 28b44510aa6..fe442bf57be 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlUpdateRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FhirBaseUrlUpdateRecord.cs @@ -26,7 +26,7 @@ public FhirBaseUrlUpdateRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FhirBaseUrlUpdateRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FhirBaseUrlUpdateRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FileContentThreatSubmission.cs b/src/Microsoft.Graph/Generated/Models/Security/FileContentThreatSubmission.cs index 4e098d78f61..899c7b1f26b 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FileContentThreatSubmission.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FileContentThreatSubmission.cs @@ -42,7 +42,7 @@ public FileContentThreatSubmission() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FileContentThreatSubmission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FileContentThreatSubmission(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fileContent", FileContent); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FileDetails.cs b/src/Microsoft.Graph/Generated/Models/Security/FileDetails.cs index 05d31a84f8d..a4261a1e74d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FileDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FileDetails.cs @@ -202,7 +202,7 @@ public FileDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.FileDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FileDetails(); } /// @@ -232,7 +232,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("fileName", FileName); writer.WriteStringValue("filePath", FilePath); writer.WriteStringValue("filePublisher", FilePublisher); diff --git a/src/Microsoft.Graph/Generated/Models/Security/FileEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/FileEvidence.cs index 2dc31979333..25e848b4afe 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FileEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FileEvidence.cs @@ -64,7 +64,7 @@ public FileEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FileEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FileEvidence(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("detectionStatus", DetectionStatus); writer.WriteObjectValue("fileDetails", FileDetails); diff --git a/src/Microsoft.Graph/Generated/Models/Security/FileHash.cs b/src/Microsoft.Graph/Generated/Models/Security/FileHash.cs index e5892a7a248..482699d9f27 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FileHash.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FileHash.cs @@ -74,7 +74,7 @@ public FileHash() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.FileHash CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FileHash(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("algorithm", Algorithm); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/Security/FileHashEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/FileHashEvidence.cs index cec1242a39c..ab102dab706 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FileHashEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FileHashEvidence.cs @@ -48,7 +48,7 @@ public FileHashEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FileHashEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FileHashEvidence(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("algorithm", Algorithm); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/Security/FileObject.cs b/src/Microsoft.Graph/Generated/Models/Security/FileObject.cs index c84ae01c7f0..a7c04aded40 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FileObject.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FileObject.cs @@ -171,7 +171,7 @@ public string SubjectTitle /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FileObject CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -207,7 +207,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); writer.WriteDateTimeOffsetValue("dateTime", DateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/FilePlanAppliedCategory.cs b/src/Microsoft.Graph/Generated/Models/Security/FilePlanAppliedCategory.cs index 9ccb8b21368..64aea95e4ea 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FilePlanAppliedCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FilePlanAppliedCategory.cs @@ -35,7 +35,7 @@ public partial class FilePlanAppliedCategory : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FilePlanAppliedCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FilePlanAppliedCategory(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("subcategory", Subcategory); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FilePlanAuthority.cs b/src/Microsoft.Graph/Generated/Models/Security/FilePlanAuthority.cs index d6f2d002c6d..390a82cfa4f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FilePlanAuthority.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FilePlanAuthority.cs @@ -19,7 +19,7 @@ public partial class FilePlanAuthority : global::Microsoft.Graph.Beta.Models.Sec /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FilePlanAuthority CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FilePlanAuthority(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FilePlanCitation.cs b/src/Microsoft.Graph/Generated/Models/Security/FilePlanCitation.cs index bfa40e84a9f..8fdff07ff85 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FilePlanCitation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FilePlanCitation.cs @@ -51,7 +51,7 @@ public string CitationUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FilePlanCitation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FilePlanCitation(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("citationJurisdiction", CitationJurisdiction); writer.WriteStringValue("citationUrl", CitationUrl); diff --git a/src/Microsoft.Graph/Generated/Models/Security/FilePlanDepartment.cs b/src/Microsoft.Graph/Generated/Models/Security/FilePlanDepartment.cs index 08d77af45ae..cd5e1edc350 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FilePlanDepartment.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FilePlanDepartment.cs @@ -19,7 +19,7 @@ public partial class FilePlanDepartment : global::Microsoft.Graph.Beta.Models.Se /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FilePlanDepartment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FilePlanDepartment(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FilePlanDescriptor.cs b/src/Microsoft.Graph/Generated/Models/Security/FilePlanDescriptor.cs index 9f5568a2fd3..391b29af070 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FilePlanDescriptor.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FilePlanDescriptor.cs @@ -179,7 +179,7 @@ public partial class FilePlanDescriptor : global::Microsoft.Graph.Beta.Models.En /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FilePlanDescriptor CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FilePlanDescriptor(); } /// @@ -208,7 +208,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("authority", Authority); writer.WriteObjectValue("authorityTemplate", AuthorityTemplate); diff --git a/src/Microsoft.Graph/Generated/Models/Security/FilePlanDescriptorBase.cs b/src/Microsoft.Graph/Generated/Models/Security/FilePlanDescriptorBase.cs index ae43e2f960b..1b2e6f2c2c7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FilePlanDescriptorBase.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FilePlanDescriptorBase.cs @@ -68,7 +68,7 @@ public FilePlanDescriptorBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.FilePlanDescriptorBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -99,7 +99,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Security/FilePlanDescriptorTemplate.cs b/src/Microsoft.Graph/Generated/Models/Security/FilePlanDescriptorTemplate.cs index c94f0417c2a..ac2ed545298 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FilePlanDescriptorTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FilePlanDescriptorTemplate.cs @@ -57,7 +57,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FilePlanDescriptorTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/FilePlanReference.cs b/src/Microsoft.Graph/Generated/Models/Security/FilePlanReference.cs index 744f08313c0..fc3b8b174a7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FilePlanReference.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FilePlanReference.cs @@ -19,7 +19,7 @@ public partial class FilePlanReference : global::Microsoft.Graph.Beta.Models.Sec /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FilePlanReference CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FilePlanReference(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FilePlanReferenceTemplate.cs b/src/Microsoft.Graph/Generated/Models/Security/FilePlanReferenceTemplate.cs index 020aaa0d1a2..ca8fa49c731 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FilePlanReferenceTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FilePlanReferenceTemplate.cs @@ -19,7 +19,7 @@ public partial class FilePlanReferenceTemplate : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FilePlanReferenceTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FilePlanReferenceTemplate(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FilePlanReferenceTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/FilePlanReferenceTemplateCollectionResponse.cs index 293a208493c..1f5c3bf3069 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FilePlanReferenceTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FilePlanReferenceTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class FilePlanReferenceTemplateCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FilePlanReferenceTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FilePlanReferenceTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FilePlanSubcategory.cs b/src/Microsoft.Graph/Generated/Models/Security/FilePlanSubcategory.cs index a05a3c7360b..0c9b1c76a7f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FilePlanSubcategory.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FilePlanSubcategory.cs @@ -19,7 +19,7 @@ public partial class FilePlanSubcategory : global::Microsoft.Graph.Beta.Models.S /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FilePlanSubcategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FilePlanSubcategory(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FileThreatSubmission.cs b/src/Microsoft.Graph/Generated/Models/Security/FileThreatSubmission.cs index e7c62953a7d..1651bd4fedf 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FileThreatSubmission.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FileThreatSubmission.cs @@ -42,7 +42,7 @@ public FileThreatSubmission() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FileThreatSubmission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -68,7 +68,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fileName", FileName); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FileThreatSubmissionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/FileThreatSubmissionCollectionResponse.cs index 7e85146a117..39d68894a66 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FileThreatSubmissionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FileThreatSubmissionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class FileThreatSubmissionCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FileThreatSubmissionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FileThreatSubmissionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FileUrlThreatSubmission.cs b/src/Microsoft.Graph/Generated/Models/Security/FileUrlThreatSubmission.cs index 2bcd1055a72..2a4395d36de 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FileUrlThreatSubmission.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FileUrlThreatSubmission.cs @@ -42,7 +42,7 @@ public FileUrlThreatSubmission() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.FileUrlThreatSubmission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FileUrlThreatSubmission(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fileUrl", FileUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ForceUserPasswordResetIncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/ForceUserPasswordResetIncidentTaskResponseAction.cs index 78fe47a37a4..42c356d72df 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ForceUserPasswordResetIncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ForceUserPasswordResetIncidentTaskResponseAction.cs @@ -26,7 +26,7 @@ public ForceUserPasswordResetIncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ForceUserPasswordResetIncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ForceUserPasswordResetIncidentTaskResponseAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ForceUserPasswordResetResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/ForceUserPasswordResetResponseAction.cs index 5f329baff50..e935671ffc4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ForceUserPasswordResetResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ForceUserPasswordResetResponseAction.cs @@ -32,7 +32,7 @@ public ForceUserPasswordResetResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ForceUserPasswordResetResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ForceUserPasswordResetResponseAction(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/FormattedContent.cs b/src/Microsoft.Graph/Generated/Models/Security/FormattedContent.cs index 2b0137eb0fb..358d0dabf01 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/FormattedContent.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/FormattedContent.cs @@ -74,7 +74,7 @@ public FormattedContent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.FormattedContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.FormattedContent(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("content", Content); writer.WriteEnumValue("format", Format); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/GeoLocation.cs b/src/Microsoft.Graph/Generated/Models/Security/GeoLocation.cs index a11e6f56a7b..78dcf0bb8b5 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/GeoLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/GeoLocation.cs @@ -112,7 +112,7 @@ public GeoLocation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.GeoLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.GeoLocation(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("city", City); writer.WriteStringValue("countryName", CountryName); writer.WriteDoubleValue("latitude", Latitude); diff --git a/src/Microsoft.Graph/Generated/Models/Security/GitHubOrganizationEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/GitHubOrganizationEvidence.cs index 8887146fdcb..f9faa7af3ea 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/GitHubOrganizationEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/GitHubOrganizationEvidence.cs @@ -122,7 +122,7 @@ public GitHubOrganizationEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.GitHubOrganizationEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.GitHubOrganizationEvidence(); } /// @@ -147,7 +147,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("company", Company); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/GitHubRepoEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/GitHubRepoEvidence.cs index fcae7e2d519..d07ec8b29ad 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/GitHubRepoEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/GitHubRepoEvidence.cs @@ -106,7 +106,7 @@ public GitHubRepoEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.GitHubRepoEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.GitHubRepoEvidence(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("baseUrl", BaseUrl); writer.WriteStringValue("login", Login); diff --git a/src/Microsoft.Graph/Generated/Models/Security/GitHubUserEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/GitHubUserEvidence.cs index 17b5bc83f5c..bd0ea60f863 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/GitHubUserEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/GitHubUserEvidence.cs @@ -106,7 +106,7 @@ public GitHubUserEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.GitHubUserEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.GitHubUserEvidence(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("email", Email); writer.WriteStringValue("login", Login); diff --git a/src/Microsoft.Graph/Generated/Models/Security/GoogleCloudResourceEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/GoogleCloudResourceEvidence.cs index 425134ea446..00e4df46b6e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/GoogleCloudResourceEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/GoogleCloudResourceEvidence.cs @@ -118,7 +118,7 @@ public GoogleCloudResourceEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.GoogleCloudResourceEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.GoogleCloudResourceEvidence(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("fullResourceName", FullResourceName); writer.WriteStringValue("location", Location); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HardDeleteEmailIncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/HardDeleteEmailIncidentTaskResponseAction.cs index f422b4e009e..71c2bab99a3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HardDeleteEmailIncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HardDeleteEmailIncidentTaskResponseAction.cs @@ -26,7 +26,7 @@ public HardDeleteEmailIncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HardDeleteEmailIncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HardDeleteEmailIncidentTaskResponseAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/HardDeleteResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/HardDeleteResponseAction.cs index 446beb9025a..d4259f6a2f8 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HardDeleteResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HardDeleteResponseAction.cs @@ -32,7 +32,7 @@ public HardDeleteResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HardDeleteResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HardDeleteResponseAction(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/HealthIssue.cs b/src/Microsoft.Graph/Generated/Models/Security/HealthIssue.cs index e4494921836..4dcaa170b92 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HealthIssue.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HealthIssue.cs @@ -177,7 +177,7 @@ public List SensorDNSNames /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HealthIssue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HealthIssue(); } /// @@ -209,7 +209,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("additionalInformation", AdditionalInformation); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HealthIssueCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/HealthIssueCollectionResponse.cs index ea8367d793f..15921b5a3db 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HealthIssueCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HealthIssueCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HealthIssueCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HealthIssueCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HealthIssueCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/HealthcareSignalRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/HealthcareSignalRecord.cs index ee677d08f63..d5440da55bc 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HealthcareSignalRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HealthcareSignalRecord.cs @@ -26,7 +26,7 @@ public HealthcareSignalRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HealthcareSignalRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HealthcareSignalRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Host.cs b/src/Microsoft.Graph/Generated/Models/Security/Host.cs index d7a3672443c..34d339c72ab 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Host.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Host.cs @@ -246,7 +246,7 @@ public Host() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Host CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -286,7 +286,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("childHostPairs", ChildHostPairs); writer.WriteCollectionOfObjectValues("components", Components); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/HostCollectionResponse.cs index d5b4926e75f..5f4d58dba9f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HostCollectionResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostComponent.cs b/src/Microsoft.Graph/Generated/Models/Security/HostComponent.cs index 5337b4d88bd..45745443dfe 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostComponent.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostComponent.cs @@ -102,7 +102,7 @@ public HostComponent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostComponent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostComponent(); } /// @@ -127,7 +127,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("category", Category); writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostComponentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/HostComponentCollectionResponse.cs index 79525956887..50af9b05b32 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostComponentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostComponentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HostComponentCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostComponentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostComponentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostCookie.cs b/src/Microsoft.Graph/Generated/Models/Security/HostCookie.cs index 9aee5e74b46..ea6e5294646 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostCookie.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostCookie.cs @@ -86,7 +86,7 @@ public HostCookie() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostCookie CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostCookie(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("domain", Domain); writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostCookieCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/HostCookieCollectionResponse.cs index 6d7e6f76ab8..c7d1f5c63a6 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostCookieCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostCookieCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HostCookieCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostCookieCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostCookieCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostLogonSessionEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/HostLogonSessionEvidence.cs index b5f745fd86a..c606c380189 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostLogonSessionEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostLogonSessionEvidence.cs @@ -86,7 +86,7 @@ public HostLogonSessionEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostLogonSessionEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostLogonSessionEvidence(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("account", Account); writer.WriteDateTimeOffsetValue("endUtcDateTime", EndUtcDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostPair.cs b/src/Microsoft.Graph/Generated/Models/Security/HostPair.cs index 158024b7390..36a42884dde 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostPair.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostPair.cs @@ -79,7 +79,7 @@ public string LinkKind /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostPair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostPair(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("childHost", ChildHost); writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostPairCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/HostPairCollectionResponse.cs index 03c2b51a7ef..7401082b466 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostPairCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostPairCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HostPairCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostPairCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostPairCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostPort.cs b/src/Microsoft.Graph/Generated/Models/Security/HostPort.cs index 53af8737e05..7d0917c8a47 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostPort.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostPort.cs @@ -125,7 +125,7 @@ public int? TimesObserved /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostPort CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostPort(); } /// @@ -155,7 +155,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("banners", Banners); writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostPortBanner.cs b/src/Microsoft.Graph/Generated/Models/Security/HostPortBanner.cs index 102250d0a70..60599514fec 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostPortBanner.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostPortBanner.cs @@ -102,7 +102,7 @@ public HostPortBanner() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.HostPortBanner CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostPortBanner(); } /// @@ -127,7 +127,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("banner", Banner); writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); writer.WriteDateTimeOffsetValue("lastSeenDateTime", LastSeenDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostPortCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/HostPortCollectionResponse.cs index e5ead209c72..5ec207bee44 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostPortCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostPortCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HostPortCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostPortCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostPortCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostPortComponent.cs b/src/Microsoft.Graph/Generated/Models/Security/HostPortComponent.cs index c108dd5e20b..49cacae4883 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostPortComponent.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostPortComponent.cs @@ -86,7 +86,7 @@ public HostPortComponent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.HostPortComponent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostPortComponent(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("component", Component); writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); writer.WriteBoolValue("isRecent", IsRecent); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostReputation.cs b/src/Microsoft.Graph/Generated/Models/Security/HostReputation.cs index 1d746a80821..e2649f7e4a7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostReputation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostReputation.cs @@ -47,7 +47,7 @@ public int? Score /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostReputation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostReputation(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("classification", Classification); writer.WriteCollectionOfObjectValues("rules", Rules); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostReputationRule.cs b/src/Microsoft.Graph/Generated/Models/Security/HostReputationRule.cs index d38adabfccf..1dec2db067e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostReputationRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostReputationRule.cs @@ -106,7 +106,7 @@ public HostReputationRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.HostReputationRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostReputationRule(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostSslCertificate.cs b/src/Microsoft.Graph/Generated/Models/Security/HostSslCertificate.cs index c6908e71263..63015874c5a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostSslCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostSslCertificate.cs @@ -86,7 +86,7 @@ public HostSslCertificate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostSslCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostSslCertificate(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); writer.WriteObjectValue("host", Host); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostSslCertificateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/HostSslCertificateCollectionResponse.cs index 211c5ebca47..d52a1df9e28 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostSslCertificateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostSslCertificateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HostSslCertificateCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostSslCertificateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostSslCertificateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostSslCertificatePort.cs b/src/Microsoft.Graph/Generated/Models/Security/HostSslCertificatePort.cs index 0d7ddf07a0c..7c771354f45 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostSslCertificatePort.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostSslCertificatePort.cs @@ -70,7 +70,7 @@ public HostSslCertificatePort() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.HostSslCertificatePort CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostSslCertificatePort(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); writer.WriteDateTimeOffsetValue("lastSeenDateTime", LastSeenDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostTracker.cs b/src/Microsoft.Graph/Generated/Models/Security/HostTracker.cs index 9a2f290917b..9868614242a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostTracker.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostTracker.cs @@ -86,7 +86,7 @@ public HostTracker() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostTracker CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostTracker(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); writer.WriteObjectValue("host", Host); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostTrackerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/HostTrackerCollectionResponse.cs index cbbd641c83a..f4b9a75ef4c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostTrackerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostTrackerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class HostTrackerCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostTrackerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostTrackerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/HostedRpaAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/HostedRpaAuditRecord.cs index 156cba1c891..0c37ec376de 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HostedRpaAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HostedRpaAuditRecord.cs @@ -26,7 +26,7 @@ public HostedRpaAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HostedRpaAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HostedRpaAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Hostname.cs b/src/Microsoft.Graph/Generated/Models/Security/Hostname.cs index 9c2688e2749..d1a6eba0571 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Hostname.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Hostname.cs @@ -58,7 +58,7 @@ public Hostname() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Hostname CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Hostname(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("registrant", Registrant); writer.WriteStringValue("registrar", Registrar); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HrSignalAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/HrSignalAuditRecord.cs index 1d0a878b890..e95c50eda8b 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HrSignalAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HrSignalAuditRecord.cs @@ -26,7 +26,7 @@ public HrSignalAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HrSignalAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HrSignalAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/HuntingQueryResults.cs b/src/Microsoft.Graph/Generated/Models/Security/HuntingQueryResults.cs index cb0d56c29f3..a468556d3d8 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HuntingQueryResults.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HuntingQueryResults.cs @@ -84,7 +84,7 @@ public HuntingQueryResults() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.HuntingQueryResults CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HuntingQueryResults(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("results", Results); writer.WriteCollectionOfObjectValues("schema", Schema); diff --git a/src/Microsoft.Graph/Generated/Models/Security/HuntingRowResult.cs b/src/Microsoft.Graph/Generated/Models/Security/HuntingRowResult.cs index 1e05de5959f..886240d5286 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HuntingRowResult.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HuntingRowResult.cs @@ -52,7 +52,7 @@ public HuntingRowResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.HuntingRowResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HuntingRowResult(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/HygieneEventRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/HygieneEventRecord.cs index 3c283d2273c..08a8f84dffe 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/HygieneEventRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/HygieneEventRecord.cs @@ -26,7 +26,7 @@ public HygieneEventRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.HygieneEventRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.HygieneEventRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Hyperlink.cs b/src/Microsoft.Graph/Generated/Models/Security/Hyperlink.cs index fc55df22c54..e0c4489de9d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Hyperlink.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Hyperlink.cs @@ -84,7 +84,7 @@ public Hyperlink() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.Hyperlink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Hyperlink(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("url", Url); diff --git a/src/Microsoft.Graph/Generated/Models/Security/IdentityAccounts.cs b/src/Microsoft.Graph/Generated/Models/Security/IdentityAccounts.cs index bb8454604a9..23fed820583 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IdentityAccounts.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IdentityAccounts.cs @@ -12,7 +12,7 @@ namespace Microsoft.Graph.Beta.Models.Security public partial class IdentityAccounts : global::Microsoft.Graph.Beta.Models.Entity, IParsable #pragma warning restore CS1591 { - /// The accounts property + /// Collection of accounts of the identity in different identity providers. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? Accounts @@ -28,7 +28,7 @@ public partial class IdentityAccounts : global::Microsoft.Graph.Beta.Models.Enti set { BackingStore?.Set("accounts", value); } } #endif - /// The cloudSecurityIdentifier property + /// The cloud security identifier of the identityAccount. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? CloudSecurityIdentifier @@ -44,7 +44,7 @@ public string CloudSecurityIdentifier set { BackingStore?.Set("cloudSecurityIdentifier", value); } } #endif - /// The displayName property + /// The Active Directory display name of the identityAccount. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? DisplayName @@ -60,7 +60,7 @@ public string DisplayName set { BackingStore?.Set("displayName", value); } } #endif - /// The domain property + /// The Active Directory domain name of the identityAccount. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Domain @@ -76,13 +76,13 @@ public string Domain set { BackingStore?.Set("domain", value); } } #endif - /// The isEnabled property + /// Boolean indicating if the identityAccounts is enabled. public bool? IsEnabled { get { return BackingStore?.Get("isEnabled"); } set { BackingStore?.Set("isEnabled", value); } } - /// The onPremisesSecurityIdentifier property + /// The on-premises security identifier of the identityAccount. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? OnPremisesSecurityIdentifier @@ -105,7 +105,7 @@ public string OnPremisesSecurityIdentifier /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IdentityAccounts CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -135,7 +135,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("accounts", Accounts); writer.WriteStringValue("cloudSecurityIdentifier", CloudSecurityIdentifier); diff --git a/src/Microsoft.Graph/Generated/Models/Security/IdentityAccountsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/IdentityAccountsCollectionResponse.cs index 0a6603de81d..5021d3cd579 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IdentityAccountsCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IdentityAccountsCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IdentityAccountsCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IdentityAccountsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IdentityAccountsCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/IdentityContainer.cs b/src/Microsoft.Graph/Generated/Models/Security/IdentityContainer.cs index 9a536b1b424..dc07a7a0166 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IdentityContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IdentityContainer.cs @@ -28,7 +28,7 @@ public partial class IdentityContainer : global::Microsoft.Graph.Beta.Models.Ent set { BackingStore?.Set("healthIssues", value); } } #endif - /// The identityAccounts property + /// Represents an identity's details in the context of Microsoft Defender for Identity. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? IdentityAccounts @@ -67,7 +67,7 @@ public partial class IdentityContainer : global::Microsoft.Graph.Beta.Models.Ent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IdentityContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IdentityContainer(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("healthIssues", HealthIssues); writer.WriteCollectionOfObjectValues("identityAccounts", IdentityAccounts); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ImpactedAsset.cs b/src/Microsoft.Graph/Generated/Models/Security/ImpactedAsset.cs index 31f243d4ac3..ee99b3233d6 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ImpactedAsset.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ImpactedAsset.cs @@ -52,7 +52,7 @@ public ImpactedAsset() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.ImpactedAsset CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ImpactedDeviceAsset.cs b/src/Microsoft.Graph/Generated/Models/Security/ImpactedDeviceAsset.cs index fcb1c124c3f..fb406c1c290 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ImpactedDeviceAsset.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ImpactedDeviceAsset.cs @@ -32,7 +32,7 @@ public ImpactedDeviceAsset() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ImpactedDeviceAsset CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ImpactedDeviceAsset(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ImpactedMailboxAsset.cs b/src/Microsoft.Graph/Generated/Models/Security/ImpactedMailboxAsset.cs index 38b186bbe23..50db7d90bbb 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ImpactedMailboxAsset.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ImpactedMailboxAsset.cs @@ -32,7 +32,7 @@ public ImpactedMailboxAsset() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ImpactedMailboxAsset CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ImpactedMailboxAsset(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ImpactedUserAsset.cs b/src/Microsoft.Graph/Generated/Models/Security/ImpactedUserAsset.cs index 1c84770fa71..0d9c9201b74 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ImpactedUserAsset.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ImpactedUserAsset.cs @@ -32,7 +32,7 @@ public ImpactedUserAsset() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ImpactedUserAsset CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ImpactedUserAsset(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Incident.cs b/src/Microsoft.Graph/Generated/Models/Security/Incident.cs index 601685f9b21..a7f4f1c1b5a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Incident.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Incident.cs @@ -295,7 +295,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Incident CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Incident(); } /// @@ -335,7 +335,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("alerts", Alerts); writer.WriteStringValue("assignedTo", AssignedTo); diff --git a/src/Microsoft.Graph/Generated/Models/Security/IncidentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/IncidentCollectionResponse.cs index bbf96904b41..e150beba92e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IncidentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IncidentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IncidentCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IncidentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IncidentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/IncidentTask.cs b/src/Microsoft.Graph/Generated/Models/Security/IncidentTask.cs index dd5cbd58bde..4e86a4be48e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IncidentTask.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IncidentTask.cs @@ -151,7 +151,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IncidentTask CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IncidentTask(); } /// @@ -182,7 +182,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("actionStatus", ActionStatus); writer.WriteEnumValue("actionType", ActionType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/IncidentTaskCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/IncidentTaskCollectionResponse.cs index 155983282b2..0e150016366 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IncidentTaskCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IncidentTaskCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IncidentTaskCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IncidentTaskCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IncidentTaskCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/IncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/IncidentTaskResponseAction.cs index 55dcea8069a..cb9e8ffb0ac 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IncidentTaskResponseAction.cs @@ -42,7 +42,7 @@ public IncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("identifierValue", IdentifierValue); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Indicator.cs b/src/Microsoft.Graph/Generated/Models/Security/Indicator.cs index bf41dd8a814..512a4170623 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Indicator.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Indicator.cs @@ -41,7 +41,7 @@ public partial class Indicator : global::Microsoft.Graph.Beta.Models.Entity, IPa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Indicator CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -68,7 +68,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("artifact", Artifact); writer.WriteEnumValue("source", Source); diff --git a/src/Microsoft.Graph/Generated/Models/Security/InformationBarrierPolicyApplicationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/InformationBarrierPolicyApplicationAuditRecord.cs index 00e3c77e3ec..6557e0cc7d4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/InformationBarrierPolicyApplicationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/InformationBarrierPolicyApplicationAuditRecord.cs @@ -26,7 +26,7 @@ public InformationBarrierPolicyApplicationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.InformationBarrierPolicyApplicationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.InformationBarrierPolicyApplicationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/InformationProtection.cs b/src/Microsoft.Graph/Generated/Models/Security/InformationProtection.cs index 684038d07ba..433c120d37a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/InformationProtection.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/InformationProtection.cs @@ -51,7 +51,7 @@ public partial class InformationProtection : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.InformationProtection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.InformationProtection(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("labelPolicySettings", LabelPolicySettings); writer.WriteCollectionOfObjectValues("sensitivityLabels", SensitivityLabels); diff --git a/src/Microsoft.Graph/Generated/Models/Security/InformationProtectionAction.cs b/src/Microsoft.Graph/Generated/Models/Security/InformationProtectionAction.cs index 369d4f5b221..731f2b128aa 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/InformationProtectionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/InformationProtectionAction.cs @@ -52,7 +52,7 @@ public InformationProtectionAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.InformationProtectionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -91,7 +91,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/InformationProtectionPolicySetting.cs b/src/Microsoft.Graph/Generated/Models/Security/InformationProtectionPolicySetting.cs index c5b2b3d5228..29954ab4bdf 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/InformationProtectionPolicySetting.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/InformationProtectionPolicySetting.cs @@ -63,7 +63,7 @@ public string MoreInfoUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.InformationProtectionPolicySetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.InformationProtectionPolicySetting(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("defaultLabelId", DefaultLabelId); writer.WriteBoolValue("isDowngradeJustificationRequired", IsDowngradeJustificationRequired); diff --git a/src/Microsoft.Graph/Generated/Models/Security/InformationWorkerProtectionAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/InformationWorkerProtectionAuditRecord.cs index e69fb112544..099cc342b68 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/InformationWorkerProtectionAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/InformationWorkerProtectionAuditRecord.cs @@ -26,7 +26,7 @@ public InformationWorkerProtectionAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.InformationWorkerProtectionAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.InformationWorkerProtectionAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/InitiateInvestigationResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/InitiateInvestigationResponseAction.cs index 85b1f8b2873..9e70e8d6148 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/InitiateInvestigationResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/InitiateInvestigationResponseAction.cs @@ -32,7 +32,7 @@ public InitiateInvestigationResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.InitiateInvestigationResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.InitiateInvestigationResponseAction(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/InsiderRiskScopedUserInsightsRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/InsiderRiskScopedUserInsightsRecord.cs index 474d002268d..09cea3ac52a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/InsiderRiskScopedUserInsightsRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/InsiderRiskScopedUserInsightsRecord.cs @@ -26,7 +26,7 @@ public InsiderRiskScopedUserInsightsRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.InsiderRiskScopedUserInsightsRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.InsiderRiskScopedUserInsightsRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/InsiderRiskScopedUsersRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/InsiderRiskScopedUsersRecord.cs index bff22774ab0..27792313da9 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/InsiderRiskScopedUsersRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/InsiderRiskScopedUsersRecord.cs @@ -26,7 +26,7 @@ public InsiderRiskScopedUsersRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.InsiderRiskScopedUsersRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.InsiderRiskScopedUsersRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfile.cs b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfile.cs index 4c2d2b15e49..87fc853e7b0 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfile.cs @@ -159,7 +159,7 @@ public string Title /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IntelligenceProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IntelligenceProfile(); } /// @@ -188,7 +188,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("aliases", Aliases); writer.WriteCollectionOfObjectValues("countriesOrRegionsOfOrigin", CountriesOrRegionsOfOrigin); diff --git a/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileCollectionResponse.cs index 316a67697b8..24ce5ce696f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IntelligenceProfileCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IntelligenceProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IntelligenceProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileCountryOrRegionOfOrigin.cs b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileCountryOrRegionOfOrigin.cs index ded6b6dd458..7487536a7db 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileCountryOrRegionOfOrigin.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileCountryOrRegionOfOrigin.cs @@ -84,7 +84,7 @@ public IntelligenceProfileCountryOrRegionOfOrigin() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.IntelligenceProfileCountryOrRegionOfOrigin CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IntelligenceProfileCountryOrRegionOfOrigin(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("label", Label); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileIndicator.cs b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileIndicator.cs index ae4e6da3b18..4923a715684 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileIndicator.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileIndicator.cs @@ -38,7 +38,7 @@ public IntelligenceProfileIndicator() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IntelligenceProfileIndicator CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IntelligenceProfileIndicator(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); writer.WriteDateTimeOffsetValue("lastSeenDateTime", LastSeenDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileIndicatorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileIndicatorCollectionResponse.cs index e4f983bc639..98e127a9612 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileIndicatorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IntelligenceProfileIndicatorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class IntelligenceProfileIndicatorCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IntelligenceProfileIndicatorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IntelligenceProfileIndicatorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/InvokeActionResult.cs b/src/Microsoft.Graph/Generated/Models/Security/InvokeActionResult.cs index c12dfea93c7..9d6115fcb6f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/InvokeActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/InvokeActionResult.cs @@ -13,7 +13,7 @@ namespace Microsoft.Graph.Beta.Models.Security public partial class InvokeActionResult : IAdditionalDataHolder, IBackedModel, IParsable #pragma warning restore CS1591 { - /// The accountId property + /// The account ID. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? AccountId @@ -43,7 +43,7 @@ public IDictionary AdditionalData } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// The correlationId property + /// The unique identifier for tracking the request. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? CorrelationId @@ -96,7 +96,7 @@ public InvokeActionResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.InvokeActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.InvokeActionResult(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("accountId", AccountId); writer.WriteEnumValue("action", Action); writer.WriteStringValue("correlationId", CorrelationId); diff --git a/src/Microsoft.Graph/Generated/Models/Security/IoTDeviceEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/IoTDeviceEvidence.cs index 4b8a289e2f9..5706dfdaa71 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IoTDeviceEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IoTDeviceEvidence.cs @@ -402,7 +402,7 @@ public IoTDeviceEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IoTDeviceEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IoTDeviceEvidence(); } /// @@ -447,7 +447,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceId", DeviceId); writer.WriteStringValue("deviceName", DeviceName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/IpAddress.cs b/src/Microsoft.Graph/Generated/Models/Security/IpAddress.cs index 143f2dfcc79..de779a4b3f0 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IpAddress.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IpAddress.cs @@ -90,7 +90,7 @@ public IpAddress() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IpAddress CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IpAddress(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("autonomousSystem", AutonomousSystem); writer.WriteStringValue("countryOrRegion", CountryOrRegion); diff --git a/src/Microsoft.Graph/Generated/Models/Security/IpEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/IpEvidence.cs index 29aa0ea6c34..d735e8d31da 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IpEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IpEvidence.cs @@ -90,7 +90,7 @@ public IpEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IpEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IpEvidence(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("countryLetterCode", CountryLetterCode); writer.WriteStringValue("ipAddress", IpAddress); diff --git a/src/Microsoft.Graph/Generated/Models/Security/IrmSecurityAlertRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/IrmSecurityAlertRecord.cs index 7c4a4f048a6..2b4b12ef728 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IrmSecurityAlertRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IrmSecurityAlertRecord.cs @@ -26,7 +26,7 @@ public IrmSecurityAlertRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IrmSecurityAlertRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IrmSecurityAlertRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/IrmUserDefinedDetectionRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/IrmUserDefinedDetectionRecord.cs index fcaabd425b3..812d9dacf7a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IrmUserDefinedDetectionRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IrmUserDefinedDetectionRecord.cs @@ -26,7 +26,7 @@ public IrmUserDefinedDetectionRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IrmUserDefinedDetectionRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IrmUserDefinedDetectionRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/IsolateDeviceIncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/IsolateDeviceIncidentTaskResponseAction.cs index 87f0826757a..cf38bf13ecc 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IsolateDeviceIncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IsolateDeviceIncidentTaskResponseAction.cs @@ -32,7 +32,7 @@ public IsolateDeviceIncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IsolateDeviceIncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IsolateDeviceIncidentTaskResponseAction(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("isolationType", IsolationType); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/IsolateDeviceResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/IsolateDeviceResponseAction.cs index da5de2212a7..aada351724b 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/IsolateDeviceResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/IsolateDeviceResponseAction.cs @@ -38,7 +38,7 @@ public IsolateDeviceResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.IsolateDeviceResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.IsolateDeviceResponseAction(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); writer.WriteEnumValue("isolationType", IsolationType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/JustifyAction.cs b/src/Microsoft.Graph/Generated/Models/Security/JustifyAction.cs index 6c69c6c3043..8228c065c4f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/JustifyAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/JustifyAction.cs @@ -26,7 +26,7 @@ public JustifyAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.JustifyAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.JustifyAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/KaizalaAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/KaizalaAuditRecord.cs index 8d402db86ba..f2f7febbbf1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/KaizalaAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/KaizalaAuditRecord.cs @@ -26,7 +26,7 @@ public KaizalaAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.KaizalaAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.KaizalaAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/KeyValuePair.cs b/src/Microsoft.Graph/Generated/Models/Security/KeyValuePair.cs index fdbd3e895eb..ea09ac04933 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/KeyValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/KeyValuePair.cs @@ -84,7 +84,7 @@ public KeyValuePair() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.KeyValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.KeyValuePair(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/Security/KubernetesClusterEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/KubernetesClusterEvidence.cs index 816c8312a7e..6a016e7acf1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/KubernetesClusterEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/KubernetesClusterEvidence.cs @@ -96,7 +96,7 @@ public KubernetesClusterEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.KubernetesClusterEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.KubernetesClusterEvidence(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("cloudResource", CloudResource); writer.WriteStringValue("distribution", Distribution); diff --git a/src/Microsoft.Graph/Generated/Models/Security/KubernetesControllerEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/KubernetesControllerEvidence.cs index 3578a4058e9..234be73438f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/KubernetesControllerEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/KubernetesControllerEvidence.cs @@ -90,7 +90,7 @@ public KubernetesControllerEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.KubernetesControllerEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.KubernetesControllerEvidence(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("labels", Labels); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/Security/KubernetesNamespaceEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/KubernetesNamespaceEvidence.cs index 049d22fab24..4265d4de142 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/KubernetesNamespaceEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/KubernetesNamespaceEvidence.cs @@ -74,7 +74,7 @@ public KubernetesNamespaceEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.KubernetesNamespaceEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.KubernetesNamespaceEvidence(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("cluster", Cluster); writer.WriteObjectValue("labels", Labels); diff --git a/src/Microsoft.Graph/Generated/Models/Security/KubernetesPodEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/KubernetesPodEvidence.cs index ca7ae657c0c..f8be9a195d3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/KubernetesPodEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/KubernetesPodEvidence.cs @@ -170,7 +170,7 @@ public KubernetesPodEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.KubernetesPodEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.KubernetesPodEvidence(); } /// @@ -198,7 +198,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("containers", Containers); writer.WriteObjectValue("controller", Controller); diff --git a/src/Microsoft.Graph/Generated/Models/Security/KubernetesSecretEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/KubernetesSecretEvidence.cs index ae120458e95..2c4bd8eaa0f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/KubernetesSecretEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/KubernetesSecretEvidence.cs @@ -74,7 +74,7 @@ public KubernetesSecretEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.KubernetesSecretEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.KubernetesSecretEvidence(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); writer.WriteObjectValue("namespace", Namespace); diff --git a/src/Microsoft.Graph/Generated/Models/Security/KubernetesServiceAccountEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/KubernetesServiceAccountEvidence.cs index 692d403a519..c1b31e47a50 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/KubernetesServiceAccountEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/KubernetesServiceAccountEvidence.cs @@ -58,7 +58,7 @@ public KubernetesServiceAccountEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.KubernetesServiceAccountEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.KubernetesServiceAccountEvidence(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); writer.WriteObjectValue("namespace", Namespace); diff --git a/src/Microsoft.Graph/Generated/Models/Security/KubernetesServiceEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/KubernetesServiceEvidence.cs index 6d499026f88..b10762dd6b6 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/KubernetesServiceEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/KubernetesServiceEvidence.cs @@ -144,7 +144,7 @@ public KubernetesServiceEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.KubernetesServiceEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.KubernetesServiceEvidence(); } /// @@ -171,7 +171,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("clusterIP", ClusterIP); writer.WriteCollectionOfObjectValues("externalIPs", ExternalIPs); diff --git a/src/Microsoft.Graph/Generated/Models/Security/KubernetesServicePort.cs b/src/Microsoft.Graph/Generated/Models/Security/KubernetesServicePort.cs index f1a926c28b4..41a7ed207ef 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/KubernetesServicePort.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/KubernetesServicePort.cs @@ -118,7 +118,7 @@ public KubernetesServicePort() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.KubernetesServicePort CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.KubernetesServicePort(); } /// @@ -144,7 +144,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appProtocol", AppProtocol); writer.WriteStringValue("name", Name); writer.WriteIntValue("nodePort", NodePort); diff --git a/src/Microsoft.Graph/Generated/Models/Security/LabelAnalyticsAggregateAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/LabelAnalyticsAggregateAuditRecord.cs index d77a86a0876..f70824be33d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/LabelAnalyticsAggregateAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/LabelAnalyticsAggregateAuditRecord.cs @@ -26,7 +26,7 @@ public LabelAnalyticsAggregateAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.LabelAnalyticsAggregateAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.LabelAnalyticsAggregateAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/LabelContentExplorerAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/LabelContentExplorerAuditRecord.cs index a8607c36a7b..5ca2522d064 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/LabelContentExplorerAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/LabelContentExplorerAuditRecord.cs @@ -26,7 +26,7 @@ public LabelContentExplorerAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.LabelContentExplorerAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.LabelContentExplorerAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/LabelingOptions.cs b/src/Microsoft.Graph/Generated/Models/Security/LabelingOptions.cs index 97f3ee165aa..a03433cd25e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/LabelingOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/LabelingOptions.cs @@ -106,7 +106,7 @@ public LabelingOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.LabelingOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.LabelingOptions(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("assignmentMethod", AssignmentMethod); writer.WriteObjectValue("downgradeJustification", DowngradeJustification); writer.WriteCollectionOfObjectValues("extendedProperties", ExtendedProperties); diff --git a/src/Microsoft.Graph/Generated/Models/Security/LabelsRoot.cs b/src/Microsoft.Graph/Generated/Models/Security/LabelsRoot.cs index 348994d26ff..6db338eafb3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/LabelsRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/LabelsRoot.cs @@ -115,7 +115,7 @@ public partial class LabelsRoot : global::Microsoft.Graph.Beta.Models.Entity, IP /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.LabelsRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.LabelsRoot(); } /// @@ -140,7 +140,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("authorities", Authorities); writer.WriteCollectionOfObjectValues("categories", Categories); diff --git a/src/Microsoft.Graph/Generated/Models/Security/LargeContentMetadataAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/LargeContentMetadataAuditRecord.cs index 4917a06b42f..47ccc475fd3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/LargeContentMetadataAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/LargeContentMetadataAuditRecord.cs @@ -26,7 +26,7 @@ public LargeContentMetadataAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.LargeContentMetadataAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.LargeContentMetadataAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/LoggedOnUser.cs b/src/Microsoft.Graph/Generated/Models/Security/LoggedOnUser.cs index 5848e95ef89..f0e837e402f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/LoggedOnUser.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/LoggedOnUser.cs @@ -84,7 +84,7 @@ public LoggedOnUser() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.LoggedOnUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.LoggedOnUser(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("accountName", AccountName); writer.WriteStringValue("domainName", DomainName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/M365ComplianceConnectorAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/M365ComplianceConnectorAuditRecord.cs index aec8add6ed1..4e0d5c5b3bd 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/M365ComplianceConnectorAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/M365ComplianceConnectorAuditRecord.cs @@ -26,7 +26,7 @@ public M365ComplianceConnectorAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.M365ComplianceConnectorAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.M365ComplianceConnectorAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/M365DAADAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/M365DAADAuditRecord.cs index 5ccc6444f8e..2c8d870fcae 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/M365DAADAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/M365DAADAuditRecord.cs @@ -26,7 +26,7 @@ public M365DAADAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.M365DAADAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.M365DAADAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MS365DCustomDetectionAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MS365DCustomDetectionAuditRecord.cs index a5f3cf0585a..b2d20b4f410 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MS365DCustomDetectionAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MS365DCustomDetectionAuditRecord.cs @@ -26,7 +26,7 @@ public MS365DCustomDetectionAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MS365DCustomDetectionAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MS365DCustomDetectionAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MS365DIncidentAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MS365DIncidentAuditRecord.cs index 55e26fb3493..2c0dc0a787d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MS365DIncidentAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MS365DIncidentAuditRecord.cs @@ -26,7 +26,7 @@ public MS365DIncidentAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MS365DIncidentAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MS365DIncidentAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MS365DSuppressionRuleAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MS365DSuppressionRuleAuditRecord.cs index 76d40f05774..cb98a09ab4f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MS365DSuppressionRuleAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MS365DSuppressionRuleAuditRecord.cs @@ -26,7 +26,7 @@ public MS365DSuppressionRuleAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MS365DSuppressionRuleAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MS365DSuppressionRuleAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MailClusterEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/MailClusterEvidence.cs index 956f5bd653c..fa7518037dd 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MailClusterEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MailClusterEvidence.cs @@ -112,7 +112,7 @@ public MailClusterEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MailClusterEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MailClusterEvidence(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("clusterBy", ClusterBy); writer.WriteStringValue("clusterByValue", ClusterByValue); diff --git a/src/Microsoft.Graph/Generated/Models/Security/MailSubmissionData.cs b/src/Microsoft.Graph/Generated/Models/Security/MailSubmissionData.cs index 617e3ca8dd8..b55919dfd09 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MailSubmissionData.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MailSubmissionData.cs @@ -26,7 +26,7 @@ public MailSubmissionData() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MailSubmissionData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MailSubmissionData(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MailboxConfigurationEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/MailboxConfigurationEvidence.cs index db2d51a986a..bb3715b5516 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MailboxConfigurationEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MailboxConfigurationEvidence.cs @@ -102,7 +102,7 @@ public MailboxConfigurationEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MailboxConfigurationEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MailboxConfigurationEvidence(); } /// @@ -127,7 +127,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("configurationId", ConfigurationId); writer.WriteEnumValue("configurationType", ConfigurationType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/MailboxEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/MailboxEvidence.cs index c1aa81cb4d4..ba0ee36d624 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MailboxEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MailboxEvidence.cs @@ -90,7 +90,7 @@ public MailboxEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MailboxEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MailboxEvidence(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("primaryAddress", PrimaryAddress); diff --git a/src/Microsoft.Graph/Generated/Models/Security/MalwareEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/MalwareEvidence.cs index 89f8aedf23f..ce06efe2012 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MalwareEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MalwareEvidence.cs @@ -90,7 +90,7 @@ public MalwareEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MalwareEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MalwareEvidence(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("category", Category); writer.WriteCollectionOfObjectValues("files", Files); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ManagedServicesAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ManagedServicesAuditRecord.cs index 54914642ca3..dbf9c48d8ab 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ManagedServicesAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ManagedServicesAuditRecord.cs @@ -26,7 +26,7 @@ public ManagedServicesAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ManagedServicesAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ManagedServicesAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ManagedTenantsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ManagedTenantsAuditRecord.cs index 99cae6b8eaf..1bcd9a65eb3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ManagedTenantsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ManagedTenantsAuditRecord.cs @@ -26,7 +26,7 @@ public ManagedTenantsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ManagedTenantsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ManagedTenantsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MapgAlertsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MapgAlertsAuditRecord.cs index 45b9d5cff0e..190b24f7741 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MapgAlertsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MapgAlertsAuditRecord.cs @@ -26,7 +26,7 @@ public MapgAlertsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MapgAlertsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MapgAlertsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MapgOnboardAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MapgOnboardAuditRecord.cs index b325b270cde..3aba84d15f4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MapgOnboardAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MapgOnboardAuditRecord.cs @@ -26,7 +26,7 @@ public MapgOnboardAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MapgOnboardAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MapgOnboardAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MapgPolicyAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MapgPolicyAuditRecord.cs index 711820977d4..9f364c16258 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MapgPolicyAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MapgPolicyAuditRecord.cs @@ -26,7 +26,7 @@ public MapgPolicyAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MapgPolicyAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MapgPolicyAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MarkUserAsCompromisedIncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/MarkUserAsCompromisedIncidentTaskResponseAction.cs index 221abf5f556..11d4848b8d9 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MarkUserAsCompromisedIncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MarkUserAsCompromisedIncidentTaskResponseAction.cs @@ -26,7 +26,7 @@ public MarkUserAsCompromisedIncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MarkUserAsCompromisedIncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MarkUserAsCompromisedIncidentTaskResponseAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MarkUserAsCompromisedResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/MarkUserAsCompromisedResponseAction.cs index b8944c02f33..5243b8ca63a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MarkUserAsCompromisedResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MarkUserAsCompromisedResponseAction.cs @@ -32,7 +32,7 @@ public MarkUserAsCompromisedResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MarkUserAsCompromisedResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MarkUserAsCompromisedResponseAction(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/McasAlertsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/McasAlertsAuditRecord.cs index 4a4461b12db..dc0365f7505 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/McasAlertsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/McasAlertsAuditRecord.cs @@ -26,7 +26,7 @@ public McasAlertsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.McasAlertsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.McasAlertsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MdaDataSecuritySignalRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MdaDataSecuritySignalRecord.cs index cd4653a6ad1..558ac6e3431 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MdaDataSecuritySignalRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MdaDataSecuritySignalRecord.cs @@ -26,7 +26,7 @@ public MdaDataSecuritySignalRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MdaDataSecuritySignalRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MdaDataSecuritySignalRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MdatpAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MdatpAuditRecord.cs index 984392f966f..c6af0681a6d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MdatpAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MdatpAuditRecord.cs @@ -26,7 +26,7 @@ public MdatpAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MdatpAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MdatpAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MdcEventsRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MdcEventsRecord.cs index 57aaf367b4e..599caf35e67 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MdcEventsRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MdcEventsRecord.cs @@ -26,7 +26,7 @@ public MdcEventsRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MdcEventsRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MdcEventsRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MdiAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MdiAuditRecord.cs index 76addd886e9..b1ac3252e3b 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MdiAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MdiAuditRecord.cs @@ -26,7 +26,7 @@ public MdiAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MdiAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MdiAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MeshWorldsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MeshWorldsAuditRecord.cs index dafaa487d57..00f77d5df0c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MeshWorldsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MeshWorldsAuditRecord.cs @@ -26,7 +26,7 @@ public MeshWorldsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MeshWorldsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MeshWorldsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MetadataAction.cs b/src/Microsoft.Graph/Generated/Models/Security/MetadataAction.cs index b2d76806944..89cf3127186 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MetadataAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MetadataAction.cs @@ -58,7 +58,7 @@ public MetadataAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MetadataAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MetadataAction(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("metadataToAdd", MetadataToAdd); writer.WriteCollectionOfPrimitiveValues("metadataToRemove", MetadataToRemove); diff --git a/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupBackupItemAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupBackupItemAuditRecord.cs index 1a4305b3450..a2c467989ab 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupBackupItemAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupBackupItemAuditRecord.cs @@ -26,7 +26,7 @@ public Microsoft365BackupBackupItemAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Microsoft365BackupBackupItemAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Microsoft365BackupBackupItemAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupBackupPolicyAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupBackupPolicyAuditRecord.cs index d6559ff3612..9bb5900ca63 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupBackupPolicyAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupBackupPolicyAuditRecord.cs @@ -26,7 +26,7 @@ public Microsoft365BackupBackupPolicyAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Microsoft365BackupBackupPolicyAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Microsoft365BackupBackupPolicyAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupRestoreItemAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupRestoreItemAuditRecord.cs index 5ee255baaf1..3b59d2d531e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupRestoreItemAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupRestoreItemAuditRecord.cs @@ -26,7 +26,7 @@ public Microsoft365BackupRestoreItemAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Microsoft365BackupRestoreItemAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Microsoft365BackupRestoreItemAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupRestoreTaskAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupRestoreTaskAuditRecord.cs index 414c950ac24..f66b24991ac 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupRestoreTaskAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Microsoft365BackupRestoreTaskAuditRecord.cs @@ -26,7 +26,7 @@ public Microsoft365BackupRestoreTaskAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Microsoft365BackupRestoreTaskAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Microsoft365BackupRestoreTaskAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftDefenderExpertsBaseAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftDefenderExpertsBaseAuditRecord.cs index ddbb238e725..eba440d88ac 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftDefenderExpertsBaseAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftDefenderExpertsBaseAuditRecord.cs @@ -26,7 +26,7 @@ public MicrosoftDefenderExpertsBaseAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftDefenderExpertsBaseAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftDefenderExpertsBaseAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftDefenderExpertsXDRAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftDefenderExpertsXDRAuditRecord.cs index d54ea1fc27f..dbede922c76 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftDefenderExpertsXDRAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftDefenderExpertsXDRAuditRecord.cs @@ -26,7 +26,7 @@ public MicrosoftDefenderExpertsXDRAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftDefenderExpertsXDRAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftDefenderExpertsXDRAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftFlowAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftFlowAuditRecord.cs index bdf0f06dfa7..51d486d6881 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftFlowAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftFlowAuditRecord.cs @@ -26,7 +26,7 @@ public MicrosoftFlowAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftFlowAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftFlowAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftFormsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftFormsAuditRecord.cs index af777eb28eb..65ff792c077 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftFormsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftFormsAuditRecord.cs @@ -26,7 +26,7 @@ public MicrosoftFormsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftFormsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftFormsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftGraphDataConnectConsent.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftGraphDataConnectConsent.cs index 06bba64941e..b717d336359 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftGraphDataConnectConsent.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftGraphDataConnectConsent.cs @@ -26,7 +26,7 @@ public MicrosoftGraphDataConnectConsent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftGraphDataConnectConsent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftGraphDataConnectConsent(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftGraphDataConnectOperation.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftGraphDataConnectOperation.cs index 04a7c1457ad..a0648250333 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftGraphDataConnectOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftGraphDataConnectOperation.cs @@ -26,7 +26,7 @@ public MicrosoftGraphDataConnectOperation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftGraphDataConnectOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftGraphDataConnectOperation(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewDataMapOperationRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewDataMapOperationRecord.cs index cf8837fce95..be6d7bfe3d7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewDataMapOperationRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewDataMapOperationRecord.cs @@ -26,7 +26,7 @@ public MicrosoftPurviewDataMapOperationRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftPurviewDataMapOperationRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftPurviewDataMapOperationRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewMetadataPolicyOperationRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewMetadataPolicyOperationRecord.cs index 917b8a8b463..331df9d12a4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewMetadataPolicyOperationRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewMetadataPolicyOperationRecord.cs @@ -26,7 +26,7 @@ public MicrosoftPurviewMetadataPolicyOperationRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftPurviewMetadataPolicyOperationRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftPurviewMetadataPolicyOperationRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewPolicyOperationRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewPolicyOperationRecord.cs index a922af489b6..5fe0d14176b 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewPolicyOperationRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewPolicyOperationRecord.cs @@ -26,7 +26,7 @@ public MicrosoftPurviewPolicyOperationRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftPurviewPolicyOperationRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftPurviewPolicyOperationRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewPrivacyAuditEvent.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewPrivacyAuditEvent.cs index 8c8270f7029..1fd2a62ec08 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewPrivacyAuditEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftPurviewPrivacyAuditEvent.cs @@ -26,7 +26,7 @@ public MicrosoftPurviewPrivacyAuditEvent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftPurviewPrivacyAuditEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftPurviewPrivacyAuditEvent(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftStreamAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftStreamAuditRecord.cs index b522e46cd2b..92f74fffa97 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftStreamAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftStreamAuditRecord.cs @@ -26,7 +26,7 @@ public MicrosoftStreamAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftStreamAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftStreamAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsAdminAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsAdminAuditRecord.cs index 0756aeb4cd5..cd59e17e042 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsAdminAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsAdminAuditRecord.cs @@ -26,7 +26,7 @@ public MicrosoftTeamsAdminAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftTeamsAdminAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftTeamsAdminAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsAnalyticsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsAnalyticsAuditRecord.cs index 0a337d9fc5d..a0628d20fed 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsAnalyticsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsAnalyticsAuditRecord.cs @@ -26,7 +26,7 @@ public MicrosoftTeamsAnalyticsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftTeamsAnalyticsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftTeamsAnalyticsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsAuditRecord.cs index 6fbe56a06df..3d9932a05a1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsAuditRecord.cs @@ -26,7 +26,7 @@ public MicrosoftTeamsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftTeamsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftTeamsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsDeviceAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsDeviceAuditRecord.cs index 8575d27cc77..cf47a2a99dd 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsDeviceAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsDeviceAuditRecord.cs @@ -26,7 +26,7 @@ public MicrosoftTeamsDeviceAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftTeamsDeviceAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftTeamsDeviceAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsRetentionLabelActionAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsRetentionLabelActionAuditRecord.cs index 8efb40fef7d..6dc385e8eab 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsRetentionLabelActionAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsRetentionLabelActionAuditRecord.cs @@ -26,7 +26,7 @@ public MicrosoftTeamsRetentionLabelActionAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftTeamsRetentionLabelActionAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftTeamsRetentionLabelActionAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsSensitivityLabelActionAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsSensitivityLabelActionAuditRecord.cs index ecfc5a1cee8..c9d0d875bc8 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsSensitivityLabelActionAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsSensitivityLabelActionAuditRecord.cs @@ -26,7 +26,7 @@ public MicrosoftTeamsSensitivityLabelActionAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftTeamsSensitivityLabelActionAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftTeamsSensitivityLabelActionAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsShiftsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsShiftsAuditRecord.cs index 681ff15a30a..7387a4be1db 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsShiftsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MicrosoftTeamsShiftsAuditRecord.cs @@ -26,7 +26,7 @@ public MicrosoftTeamsShiftsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MicrosoftTeamsShiftsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MicrosoftTeamsShiftsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelExchangeItemAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelExchangeItemAuditRecord.cs index d8944d150a6..d353142a82c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelExchangeItemAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelExchangeItemAuditRecord.cs @@ -26,7 +26,7 @@ public MipAutoLabelExchangeItemAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelExchangeItemAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelExchangeItemAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelItemAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelItemAuditRecord.cs index 5ec71134db6..5004e1a4541 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelItemAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelItemAuditRecord.cs @@ -26,7 +26,7 @@ public MipAutoLabelItemAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelItemAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelItemAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelPolicyAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelPolicyAuditRecord.cs index 7049d6eb426..1d720b80da7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelPolicyAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelPolicyAuditRecord.cs @@ -26,7 +26,7 @@ public MipAutoLabelPolicyAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelPolicyAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelPolicyAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelProgressFeedbackAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelProgressFeedbackAuditRecord.cs index d23f1f07a94..5f3338bddef 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelProgressFeedbackAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelProgressFeedbackAuditRecord.cs @@ -26,7 +26,7 @@ public MipAutoLabelProgressFeedbackAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelProgressFeedbackAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelProgressFeedbackAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSharePointItemAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSharePointItemAuditRecord.cs index 5644e29972c..1d0899396d1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSharePointItemAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSharePointItemAuditRecord.cs @@ -26,7 +26,7 @@ public MipAutoLabelSharePointItemAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelSharePointItemAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelSharePointItemAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSharePointPolicyLocationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSharePointPolicyLocationAuditRecord.cs index 359bb9f32f9..7460b67c38a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSharePointPolicyLocationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSharePointPolicyLocationAuditRecord.cs @@ -26,7 +26,7 @@ public MipAutoLabelSharePointPolicyLocationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelSharePointPolicyLocationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelSharePointPolicyLocationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationSharePointCompletionRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationSharePointCompletionRecord.cs index 978b4504653..32fe4a41bb3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationSharePointCompletionRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationSharePointCompletionRecord.cs @@ -26,7 +26,7 @@ public MipAutoLabelSimulationSharePointCompletionRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelSimulationSharePointCompletionRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelSimulationSharePointCompletionRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationSharePointProgressRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationSharePointProgressRecord.cs index a951b75dd1c..4d040b07edc 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationSharePointProgressRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationSharePointProgressRecord.cs @@ -26,7 +26,7 @@ public MipAutoLabelSimulationSharePointProgressRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelSimulationSharePointProgressRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelSimulationSharePointProgressRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationStatisticsRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationStatisticsRecord.cs index 0ed9fec3f3e..a8f4427fcf1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationStatisticsRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationStatisticsRecord.cs @@ -26,7 +26,7 @@ public MipAutoLabelSimulationStatisticsRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelSimulationStatisticsRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelSimulationStatisticsRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationStatusRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationStatusRecord.cs index 55a6f60fab7..2ff62527cf8 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationStatusRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MipAutoLabelSimulationStatusRecord.cs @@ -26,7 +26,7 @@ public MipAutoLabelSimulationStatusRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelSimulationStatusRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MipAutoLabelSimulationStatusRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MipExactDataMatchAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MipExactDataMatchAuditRecord.cs index 1dd9d9d4a86..35de1c0f75b 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MipExactDataMatchAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MipExactDataMatchAuditRecord.cs @@ -26,7 +26,7 @@ public MipExactDataMatchAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MipExactDataMatchAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MipExactDataMatchAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MipLabelAnalyticsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MipLabelAnalyticsAuditRecord.cs index 73db15d3ad6..38504dd25ee 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MipLabelAnalyticsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MipLabelAnalyticsAuditRecord.cs @@ -26,7 +26,7 @@ public MipLabelAnalyticsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MipLabelAnalyticsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MipLabelAnalyticsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MipLabelAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MipLabelAuditRecord.cs index e691c14f5ea..357b3476c26 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MipLabelAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MipLabelAuditRecord.cs @@ -26,7 +26,7 @@ public MipLabelAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MipLabelAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MipLabelAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MoveToDeletedItemsResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/MoveToDeletedItemsResponseAction.cs index 30d1d987c45..d7f1d140ed7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MoveToDeletedItemsResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MoveToDeletedItemsResponseAction.cs @@ -32,7 +32,7 @@ public MoveToDeletedItemsResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MoveToDeletedItemsResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MoveToDeletedItemsResponseAction(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MoveToInboxResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/MoveToInboxResponseAction.cs index 4b4267fc1f4..c33c0fbc58c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MoveToInboxResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MoveToInboxResponseAction.cs @@ -32,7 +32,7 @@ public MoveToInboxResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MoveToInboxResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MoveToInboxResponseAction(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MoveToJunkResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/MoveToJunkResponseAction.cs index 84c02fdaf2b..e0afe7d8685 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MoveToJunkResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MoveToJunkResponseAction.cs @@ -32,7 +32,7 @@ public MoveToJunkResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MoveToJunkResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MoveToJunkResponseAction(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MsdeGeneralSettingsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MsdeGeneralSettingsAuditRecord.cs index 6f239a8ab43..ed76edc2c73 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MsdeGeneralSettingsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MsdeGeneralSettingsAuditRecord.cs @@ -26,7 +26,7 @@ public MsdeGeneralSettingsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MsdeGeneralSettingsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MsdeGeneralSettingsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MsdeIndicatorsSettingsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MsdeIndicatorsSettingsAuditRecord.cs index 8282967a98c..b4f62aad8b8 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MsdeIndicatorsSettingsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MsdeIndicatorsSettingsAuditRecord.cs @@ -26,7 +26,7 @@ public MsdeIndicatorsSettingsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MsdeIndicatorsSettingsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MsdeIndicatorsSettingsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MsdeResponseActionsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MsdeResponseActionsAuditRecord.cs index d181961dd17..8022a5b96f6 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MsdeResponseActionsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MsdeResponseActionsAuditRecord.cs @@ -26,7 +26,7 @@ public MsdeResponseActionsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MsdeResponseActionsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MsdeResponseActionsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MsdeRolesSettingsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MsdeRolesSettingsAuditRecord.cs index 85ada2dca4b..2ebe2221d5f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MsdeRolesSettingsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MsdeRolesSettingsAuditRecord.cs @@ -26,7 +26,7 @@ public MsdeRolesSettingsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MsdeRolesSettingsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MsdeRolesSettingsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MsticNationStateNotificationRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MsticNationStateNotificationRecord.cs index e60235f25dd..81b87948142 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MsticNationStateNotificationRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MsticNationStateNotificationRecord.cs @@ -26,7 +26,7 @@ public MsticNationStateNotificationRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MsticNationStateNotificationRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MsticNationStateNotificationRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MultiStageDispositionAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MultiStageDispositionAuditRecord.cs index 35a97ca90d6..7d4b06b554d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MultiStageDispositionAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MultiStageDispositionAuditRecord.cs @@ -26,7 +26,7 @@ public MultiStageDispositionAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MultiStageDispositionAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MultiStageDispositionAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/MyAnalyticsSettingsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/MyAnalyticsSettingsAuditRecord.cs index 20d4fb052f5..6a98492d788 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/MyAnalyticsSettingsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/MyAnalyticsSettingsAuditRecord.cs @@ -26,7 +26,7 @@ public MyAnalyticsSettingsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.MyAnalyticsSettingsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.MyAnalyticsSettingsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/NetworkAdapter.cs b/src/Microsoft.Graph/Generated/Models/Security/NetworkAdapter.cs index 4daca55bc1a..deb8e5ad01f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/NetworkAdapter.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/NetworkAdapter.cs @@ -41,7 +41,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.NetworkAdapter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.NetworkAdapter(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isEnabled", IsEnabled); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/Security/NetworkConnectionEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/NetworkConnectionEvidence.cs index b67b790dde5..80f11f7a4a4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/NetworkConnectionEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/NetworkConnectionEvidence.cs @@ -76,7 +76,7 @@ public NetworkConnectionEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.NetworkConnectionEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.NetworkConnectionEvidence(); } /// @@ -100,7 +100,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("destinationAddress", DestinationAddress); writer.WriteIntValue("destinationPort", DestinationPort); diff --git a/src/Microsoft.Graph/Generated/Models/Security/NicEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/NicEvidence.cs index 280de2161e9..9b15f9a6966 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/NicEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/NicEvidence.cs @@ -74,7 +74,7 @@ public NicEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.NicEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.NicEvidence(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("ipAddress", IpAddress); writer.WriteStringValue("macAddress", MacAddress); diff --git a/src/Microsoft.Graph/Generated/Models/Security/OauthApplicationEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/OauthApplicationEvidence.cs index 96de84093ff..7c9f6d411e8 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/OauthApplicationEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/OauthApplicationEvidence.cs @@ -90,7 +90,7 @@ public OauthApplicationEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.OauthApplicationEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.OauthApplicationEvidence(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/OcrSettings.cs b/src/Microsoft.Graph/Generated/Models/Security/OcrSettings.cs index ab11315a47f..24e84fd3ebf 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/OcrSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/OcrSettings.cs @@ -70,7 +70,7 @@ public OcrSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.OcrSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.OcrSettings(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isEnabled", IsEnabled); writer.WriteIntValue("maxImageSize", MaxImageSize); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/OfficeNativeAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/OfficeNativeAuditRecord.cs index 41a492cc2d8..85ace2f1d4e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/OfficeNativeAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/OfficeNativeAuditRecord.cs @@ -26,7 +26,7 @@ public OfficeNativeAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.OfficeNativeAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.OfficeNativeAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/OmePortalAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/OmePortalAuditRecord.cs index 732bb33499b..2d6e05920e9 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/OmePortalAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/OmePortalAuditRecord.cs @@ -26,7 +26,7 @@ public OmePortalAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.OmePortalAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.OmePortalAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/OnPremisesFileShareScannerDlpAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/OnPremisesFileShareScannerDlpAuditRecord.cs index 510a51fbcf0..1589217b890 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/OnPremisesFileShareScannerDlpAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/OnPremisesFileShareScannerDlpAuditRecord.cs @@ -26,7 +26,7 @@ public OnPremisesFileShareScannerDlpAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.OnPremisesFileShareScannerDlpAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.OnPremisesFileShareScannerDlpAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/OnPremisesScannerDlpAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/OnPremisesScannerDlpAuditRecord.cs index 16200b335cb..91b86146314 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/OnPremisesScannerDlpAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/OnPremisesScannerDlpAuditRecord.cs @@ -26,7 +26,7 @@ public OnPremisesScannerDlpAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.OnPremisesScannerDlpAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.OnPremisesScannerDlpAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/OnPremisesSharePointScannerDlpAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/OnPremisesSharePointScannerDlpAuditRecord.cs index 4736e78d131..9175a8dc1d4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/OnPremisesSharePointScannerDlpAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/OnPremisesSharePointScannerDlpAuditRecord.cs @@ -26,7 +26,7 @@ public OnPremisesSharePointScannerDlpAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.OnPremisesSharePointScannerDlpAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.OnPremisesSharePointScannerDlpAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/OneDriveAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/OneDriveAuditRecord.cs index 8d406c7f1c0..c96d04c0f38 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/OneDriveAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/OneDriveAuditRecord.cs @@ -26,7 +26,7 @@ public OneDriveAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.OneDriveAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.OneDriveAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/OrganizationalScope.cs b/src/Microsoft.Graph/Generated/Models/Security/OrganizationalScope.cs index 464f5979ee0..4c33cac417e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/OrganizationalScope.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/OrganizationalScope.cs @@ -74,7 +74,7 @@ public OrganizationalScope() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.OrganizationalScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.OrganizationalScope(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("scopeNames", ScopeNames); writer.WriteEnumValue("scopeType", ScopeType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/OwaGetAccessTokenForResourceAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/OwaGetAccessTokenForResourceAuditRecord.cs index 447a0e25ac4..1ef0262fdd7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/OwaGetAccessTokenForResourceAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/OwaGetAccessTokenForResourceAuditRecord.cs @@ -26,7 +26,7 @@ public OwaGetAccessTokenForResourceAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.OwaGetAccessTokenForResourceAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.OwaGetAccessTokenForResourceAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PassiveDnsRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PassiveDnsRecord.cs index 3aed2c79ae3..52d61125f2e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PassiveDnsRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PassiveDnsRecord.cs @@ -92,7 +92,7 @@ public PassiveDnsRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PassiveDnsRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PassiveDnsRecord(); } /// @@ -117,7 +117,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("artifact", Artifact); writer.WriteDateTimeOffsetValue("collectedDateTime", CollectedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/PassiveDnsRecordCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/PassiveDnsRecordCollectionResponse.cs index fb584e90ab1..178bc0336ca 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PassiveDnsRecordCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PassiveDnsRecordCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class PassiveDnsRecordCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PassiveDnsRecordCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PassiveDnsRecordCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PeopleAdminSettingsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PeopleAdminSettingsAuditRecord.cs index 6dede0b6bee..1bf89c64bdf 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PeopleAdminSettingsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PeopleAdminSettingsAuditRecord.cs @@ -26,7 +26,7 @@ public PeopleAdminSettingsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PeopleAdminSettingsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PeopleAdminSettingsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PhysicalBadgingSignalAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PhysicalBadgingSignalAuditRecord.cs index 1798984165e..dc4e234e2b9 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PhysicalBadgingSignalAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PhysicalBadgingSignalAuditRecord.cs @@ -26,7 +26,7 @@ public PhysicalBadgingSignalAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PhysicalBadgingSignalAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PhysicalBadgingSignalAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PlannerCopyPlanAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PlannerCopyPlanAuditRecord.cs index 6918904c3a1..affaf303179 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PlannerCopyPlanAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PlannerCopyPlanAuditRecord.cs @@ -26,7 +26,7 @@ public PlannerCopyPlanAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PlannerCopyPlanAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PlannerCopyPlanAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PlannerPlanAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PlannerPlanAuditRecord.cs index 52a0425c3ef..e9edaea25fe 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PlannerPlanAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PlannerPlanAuditRecord.cs @@ -26,7 +26,7 @@ public PlannerPlanAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PlannerPlanAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PlannerPlanAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PlannerPlanListAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PlannerPlanListAuditRecord.cs index 4d0c017f889..495b59a5c73 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PlannerPlanListAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PlannerPlanListAuditRecord.cs @@ -26,7 +26,7 @@ public PlannerPlanListAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PlannerPlanListAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PlannerPlanListAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PlannerRosterAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PlannerRosterAuditRecord.cs index 1b921c46177..5df18f0f08f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PlannerRosterAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PlannerRosterAuditRecord.cs @@ -26,7 +26,7 @@ public PlannerRosterAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PlannerRosterAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PlannerRosterAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PlannerRosterSensitivityLabelAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PlannerRosterSensitivityLabelAuditRecord.cs index 76ba2cd8aec..378e1cc3589 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PlannerRosterSensitivityLabelAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PlannerRosterSensitivityLabelAuditRecord.cs @@ -26,7 +26,7 @@ public PlannerRosterSensitivityLabelAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PlannerRosterSensitivityLabelAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PlannerRosterSensitivityLabelAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PlannerTaskAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PlannerTaskAuditRecord.cs index 5ba3e0d7c43..eedf903ea2f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PlannerTaskAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PlannerTaskAuditRecord.cs @@ -26,7 +26,7 @@ public PlannerTaskAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PlannerTaskAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PlannerTaskAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PlannerTaskListAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PlannerTaskListAuditRecord.cs index 84fea6cb3ca..33b37d2cef1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PlannerTaskListAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PlannerTaskListAuditRecord.cs @@ -26,7 +26,7 @@ public PlannerTaskListAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PlannerTaskListAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PlannerTaskListAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PlannerTenantSettingsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PlannerTenantSettingsAuditRecord.cs index 9d11df3e0c4..fd6fcf53a3f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PlannerTenantSettingsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PlannerTenantSettingsAuditRecord.cs @@ -26,7 +26,7 @@ public PlannerTenantSettingsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PlannerTenantSettingsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PlannerTenantSettingsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PolicyBase.cs b/src/Microsoft.Graph/Generated/Models/Security/PolicyBase.cs index 98feb3f7656..4aacaccee70 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PolicyBase.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PolicyBase.cs @@ -101,7 +101,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PolicyBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -132,7 +132,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/PowerAppsAuditAppRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PowerAppsAuditAppRecord.cs index 5f6fd1c7041..4b7af9c185c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PowerAppsAuditAppRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PowerAppsAuditAppRecord.cs @@ -26,7 +26,7 @@ public PowerAppsAuditAppRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PowerAppsAuditAppRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PowerAppsAuditAppRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PowerAppsAuditPlanRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PowerAppsAuditPlanRecord.cs index 30accb72605..a44ecb6849c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PowerAppsAuditPlanRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PowerAppsAuditPlanRecord.cs @@ -26,7 +26,7 @@ public PowerAppsAuditPlanRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PowerAppsAuditPlanRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PowerAppsAuditPlanRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PowerAppsAuditResourceRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PowerAppsAuditResourceRecord.cs index daaf031038b..0e8359cfda7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PowerAppsAuditResourceRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PowerAppsAuditResourceRecord.cs @@ -26,7 +26,7 @@ public PowerAppsAuditResourceRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PowerAppsAuditResourceRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PowerAppsAuditResourceRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PowerBiAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PowerBiAuditRecord.cs index 2a5ff355050..94c7cf7d3af 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PowerBiAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PowerBiAuditRecord.cs @@ -26,7 +26,7 @@ public PowerBiAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PowerBiAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PowerBiAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PowerBiDlpAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PowerBiDlpAuditRecord.cs index 191bb401a7e..94b17e957f4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PowerBiDlpAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PowerBiDlpAuditRecord.cs @@ -26,7 +26,7 @@ public PowerBiDlpAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PowerBiDlpAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PowerBiDlpAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PowerPagesSiteAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PowerPagesSiteAuditRecord.cs index 9cb3aafc67c..0d6cab8573d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PowerPagesSiteAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PowerPagesSiteAuditRecord.cs @@ -26,7 +26,7 @@ public PowerPagesSiteAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PowerPagesSiteAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PowerPagesSiteAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformAdminDlpAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformAdminDlpAuditRecord.cs index 08f3d46292b..3bc279751b2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformAdminDlpAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformAdminDlpAuditRecord.cs @@ -26,7 +26,7 @@ public PowerPlatformAdminDlpAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PowerPlatformAdminDlpAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PowerPlatformAdminDlpAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformAdminEnvironmentAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformAdminEnvironmentAuditRecord.cs index e04d55639eb..56116df7052 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformAdminEnvironmentAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformAdminEnvironmentAuditRecord.cs @@ -26,7 +26,7 @@ public PowerPlatformAdminEnvironmentAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PowerPlatformAdminEnvironmentAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PowerPlatformAdminEnvironmentAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformAdministratorActivityRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformAdministratorActivityRecord.cs index f02dd8e7488..55fba9d20cc 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformAdministratorActivityRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformAdministratorActivityRecord.cs @@ -26,7 +26,7 @@ public PowerPlatformAdministratorActivityRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PowerPlatformAdministratorActivityRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PowerPlatformAdministratorActivityRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformLockboxResourceAccessRequestAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformLockboxResourceAccessRequestAuditRecord.cs index 6079d35d6a6..50d4470672c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformLockboxResourceAccessRequestAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformLockboxResourceAccessRequestAuditRecord.cs @@ -26,7 +26,7 @@ public PowerPlatformLockboxResourceAccessRequestAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PowerPlatformLockboxResourceAccessRequestAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PowerPlatformLockboxResourceAccessRequestAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformLockboxResourceCommandAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformLockboxResourceCommandAuditRecord.cs index 95360a0a093..fdb22ad384f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformLockboxResourceCommandAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformLockboxResourceCommandAuditRecord.cs @@ -26,7 +26,7 @@ public PowerPlatformLockboxResourceCommandAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PowerPlatformLockboxResourceCommandAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PowerPlatformLockboxResourceCommandAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformServiceActivityAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformServiceActivityAuditRecord.cs index cf638debe7e..fb017412d10 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformServiceActivityAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PowerPlatformServiceActivityAuditRecord.cs @@ -26,7 +26,7 @@ public PowerPlatformServiceActivityAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PowerPlatformServiceActivityAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PowerPlatformServiceActivityAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PrivacyDataMatchAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PrivacyDataMatchAuditRecord.cs index 8cb06c2a74d..38e305fda96 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PrivacyDataMatchAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PrivacyDataMatchAuditRecord.cs @@ -26,7 +26,7 @@ public PrivacyDataMatchAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PrivacyDataMatchAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PrivacyDataMatchAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PrivacyDataMinimizationRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PrivacyDataMinimizationRecord.cs index d27fe7c63b4..424673d02c4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PrivacyDataMinimizationRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PrivacyDataMinimizationRecord.cs @@ -26,7 +26,7 @@ public PrivacyDataMinimizationRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PrivacyDataMinimizationRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PrivacyDataMinimizationRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PrivacyDigestEmailRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PrivacyDigestEmailRecord.cs index 6c1e54a2caa..71954c69af1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PrivacyDigestEmailRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PrivacyDigestEmailRecord.cs @@ -26,7 +26,7 @@ public PrivacyDigestEmailRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PrivacyDigestEmailRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PrivacyDigestEmailRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PrivacyOpenAccessAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PrivacyOpenAccessAuditRecord.cs index 717c70da866..e2e3462beef 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PrivacyOpenAccessAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PrivacyOpenAccessAuditRecord.cs @@ -26,7 +26,7 @@ public PrivacyOpenAccessAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PrivacyOpenAccessAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PrivacyOpenAccessAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PrivacyPortalAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PrivacyPortalAuditRecord.cs index c2e74858142..2f7efe29b13 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PrivacyPortalAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PrivacyPortalAuditRecord.cs @@ -26,7 +26,7 @@ public PrivacyPortalAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PrivacyPortalAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PrivacyPortalAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PrivacyRemediationActionRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PrivacyRemediationActionRecord.cs index df34787b6a0..a939ac98c6a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PrivacyRemediationActionRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PrivacyRemediationActionRecord.cs @@ -26,7 +26,7 @@ public PrivacyRemediationActionRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PrivacyRemediationActionRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PrivacyRemediationActionRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PrivacyRemediationRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PrivacyRemediationRecord.cs index 7abf123ad42..8a307e97195 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PrivacyRemediationRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PrivacyRemediationRecord.cs @@ -26,7 +26,7 @@ public PrivacyRemediationRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PrivacyRemediationRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PrivacyRemediationRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PrivacyTenantAuditHistoryRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PrivacyTenantAuditHistoryRecord.cs index 875b9b1ff00..fb8322d2b8b 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PrivacyTenantAuditHistoryRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PrivacyTenantAuditHistoryRecord.cs @@ -26,7 +26,7 @@ public PrivacyTenantAuditHistoryRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PrivacyTenantAuditHistoryRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PrivacyTenantAuditHistoryRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ProcessEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/ProcessEvidence.cs index d5d9a117c03..f2a607733df 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ProcessEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ProcessEvidence.cs @@ -136,7 +136,7 @@ public ProcessEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ProcessEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ProcessEvidence(); } /// @@ -165,7 +165,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("detectionStatus", DetectionStatus); writer.WriteObjectValue("imageFile", ImageFile); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ProjectAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ProjectAuditRecord.cs index 650b0e96491..45531193a01 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ProjectAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ProjectAuditRecord.cs @@ -26,7 +26,7 @@ public ProjectAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ProjectAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ProjectAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebAssignedToMeSettingsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebAssignedToMeSettingsAuditRecord.cs index a9b2fd9317f..3db9fc6ebb1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebAssignedToMeSettingsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebAssignedToMeSettingsAuditRecord.cs @@ -26,7 +26,7 @@ public ProjectForTheWebAssignedToMeSettingsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ProjectForTheWebAssignedToMeSettingsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ProjectForTheWebAssignedToMeSettingsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebProjectAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebProjectAuditRecord.cs index 3589ceee9df..4e1b74f627d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebProjectAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebProjectAuditRecord.cs @@ -26,7 +26,7 @@ public ProjectForTheWebProjectAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ProjectForTheWebProjectAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ProjectForTheWebProjectAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebProjectSettingsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebProjectSettingsAuditRecord.cs index 5442a4f9c69..960db55795c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebProjectSettingsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebProjectSettingsAuditRecord.cs @@ -26,7 +26,7 @@ public ProjectForTheWebProjectSettingsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ProjectForTheWebProjectSettingsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ProjectForTheWebProjectSettingsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebRoadmapAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebRoadmapAuditRecord.cs index 7f291f9eef7..8ba5b621707 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebRoadmapAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebRoadmapAuditRecord.cs @@ -26,7 +26,7 @@ public ProjectForTheWebRoadmapAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ProjectForTheWebRoadmapAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ProjectForTheWebRoadmapAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebRoadmapItemAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebRoadmapItemAuditRecord.cs index 052c426a8c3..7e3ae3752eb 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebRoadmapItemAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebRoadmapItemAuditRecord.cs @@ -26,7 +26,7 @@ public ProjectForTheWebRoadmapItemAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ProjectForTheWebRoadmapItemAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ProjectForTheWebRoadmapItemAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebRoadmapSettingsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebRoadmapSettingsAuditRecord.cs index 73954c8dca0..e0d2795911e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebRoadmapSettingsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebRoadmapSettingsAuditRecord.cs @@ -26,7 +26,7 @@ public ProjectForTheWebRoadmapSettingsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ProjectForTheWebRoadmapSettingsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ProjectForTheWebRoadmapSettingsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebTaskAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebTaskAuditRecord.cs index 2a8bd1d57a7..bb534baf7d1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebTaskAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ProjectForTheWebTaskAuditRecord.cs @@ -26,7 +26,7 @@ public ProjectForTheWebTaskAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ProjectForTheWebTaskAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ProjectForTheWebTaskAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ProtectAdhocAction.cs b/src/Microsoft.Graph/Generated/Models/Security/ProtectAdhocAction.cs index 8d1b88ab620..e6bb86a8336 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ProtectAdhocAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ProtectAdhocAction.cs @@ -26,7 +26,7 @@ public ProtectAdhocAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ProtectAdhocAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ProtectAdhocAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ProtectByTemplateAction.cs b/src/Microsoft.Graph/Generated/Models/Security/ProtectByTemplateAction.cs index ed97b660a34..e9fe7c33fcb 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ProtectByTemplateAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ProtectByTemplateAction.cs @@ -42,7 +42,7 @@ public ProtectByTemplateAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ProtectByTemplateAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ProtectByTemplateAction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("templateId", TemplateId); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ProtectDoNotForwardAction.cs b/src/Microsoft.Graph/Generated/Models/Security/ProtectDoNotForwardAction.cs index fded4b52a4d..c8b78e04f24 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ProtectDoNotForwardAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ProtectDoNotForwardAction.cs @@ -26,7 +26,7 @@ public ProtectDoNotForwardAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ProtectDoNotForwardAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ProtectDoNotForwardAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ProtectionRule.cs b/src/Microsoft.Graph/Generated/Models/Security/ProtectionRule.cs index fa0a019699e..ba7091e4310 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ProtectionRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ProtectionRule.cs @@ -85,7 +85,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ProtectionRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -115,7 +115,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/PublicFolderAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PublicFolderAuditRecord.cs index 55bc4fe332f..148327cdf3f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PublicFolderAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PublicFolderAuditRecord.cs @@ -26,7 +26,7 @@ public PublicFolderAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PublicFolderAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PublicFolderAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PurviewInsiderRiskAlertsRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PurviewInsiderRiskAlertsRecord.cs index 0336dc35601..4b274181d55 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PurviewInsiderRiskAlertsRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PurviewInsiderRiskAlertsRecord.cs @@ -26,7 +26,7 @@ public PurviewInsiderRiskAlertsRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PurviewInsiderRiskAlertsRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PurviewInsiderRiskAlertsRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/PurviewInsiderRiskCasesRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/PurviewInsiderRiskCasesRecord.cs index 1d328ea0804..1001a20c7f0 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/PurviewInsiderRiskCasesRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/PurviewInsiderRiskCasesRecord.cs @@ -26,7 +26,7 @@ public PurviewInsiderRiskCasesRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.PurviewInsiderRiskCasesRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.PurviewInsiderRiskCasesRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/QuarantineAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/QuarantineAuditRecord.cs index 09bb31a6ec4..44dca42701d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/QuarantineAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/QuarantineAuditRecord.cs @@ -26,7 +26,7 @@ public QuarantineAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.QuarantineAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.QuarantineAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/QueryCondition.cs b/src/Microsoft.Graph/Generated/Models/Security/QueryCondition.cs index 3a3d248adb3..cba270607b9 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/QueryCondition.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/QueryCondition.cs @@ -74,7 +74,7 @@ public QueryCondition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.QueryCondition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.QueryCondition(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("queryText", QueryText); diff --git a/src/Microsoft.Graph/Generated/Models/Security/RecommendLabelAction.cs b/src/Microsoft.Graph/Generated/Models/Security/RecommendLabelAction.cs index 4fbec9d90d6..039b898e35c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RecommendLabelAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RecommendLabelAction.cs @@ -80,7 +80,7 @@ public RecommendLabelAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RecommendLabelAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RecommendLabelAction(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("actions", Actions); writer.WriteEnumValue("actionSource", ActionSource); diff --git a/src/Microsoft.Graph/Generated/Models/Security/RecommendedHuntingQuery.cs b/src/Microsoft.Graph/Generated/Models/Security/RecommendedHuntingQuery.cs index d7c4a583b8e..4d3ee3b5ddf 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RecommendedHuntingQuery.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RecommendedHuntingQuery.cs @@ -68,7 +68,7 @@ public RecommendedHuntingQuery() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.RecommendedHuntingQuery CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RecommendedHuntingQuery(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("kqlText", KqlText); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Security/RecordsManagementAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/RecordsManagementAuditRecord.cs index e1c9a82d05e..f7d0caf624b 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RecordsManagementAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RecordsManagementAuditRecord.cs @@ -26,7 +26,7 @@ public RecordsManagementAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RecordsManagementAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RecordsManagementAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RedundancyDetectionSettings.cs b/src/Microsoft.Graph/Generated/Models/Security/RedundancyDetectionSettings.cs index 0fdb29d2d09..b1ea9a6b27a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RedundancyDetectionSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RedundancyDetectionSettings.cs @@ -76,7 +76,7 @@ public RedundancyDetectionSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.RedundancyDetectionSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RedundancyDetectionSettings(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isEnabled", IsEnabled); writer.WriteIntValue("maxWords", MaxWords); writer.WriteIntValue("minWords", MinWords); diff --git a/src/Microsoft.Graph/Generated/Models/Security/RegistryKeyEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/RegistryKeyEvidence.cs index 989c0ef500a..a6f5870c2e7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RegistryKeyEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RegistryKeyEvidence.cs @@ -58,7 +58,7 @@ public RegistryKeyEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RegistryKeyEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RegistryKeyEvidence(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("registryHive", RegistryHive); writer.WriteStringValue("registryKey", RegistryKey); diff --git a/src/Microsoft.Graph/Generated/Models/Security/RegistryValueEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/RegistryValueEvidence.cs index 961492be6cf..0dee2be8b2c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RegistryValueEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RegistryValueEvidence.cs @@ -122,7 +122,7 @@ public RegistryValueEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RegistryValueEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RegistryValueEvidence(); } /// @@ -147,7 +147,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("mdeDeviceId", MdeDeviceId); writer.WriteStringValue("registryHive", RegistryHive); diff --git a/src/Microsoft.Graph/Generated/Models/Security/RemoveContentFooterAction.cs b/src/Microsoft.Graph/Generated/Models/Security/RemoveContentFooterAction.cs index 9209161ca0f..e23fa6e4b93 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RemoveContentFooterAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RemoveContentFooterAction.cs @@ -42,7 +42,7 @@ public RemoveContentFooterAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RemoveContentFooterAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RemoveContentFooterAction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("uiElementNames", UiElementNames); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RemoveContentHeaderAction.cs b/src/Microsoft.Graph/Generated/Models/Security/RemoveContentHeaderAction.cs index 475cef15563..a56963422fb 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RemoveContentHeaderAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RemoveContentHeaderAction.cs @@ -42,7 +42,7 @@ public RemoveContentHeaderAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RemoveContentHeaderAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RemoveContentHeaderAction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("uiElementNames", UiElementNames); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RemoveProtectionAction.cs b/src/Microsoft.Graph/Generated/Models/Security/RemoveProtectionAction.cs index 47e294d2c39..fbcd1f0f3da 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RemoveProtectionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RemoveProtectionAction.cs @@ -26,7 +26,7 @@ public RemoveProtectionAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RemoveProtectionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RemoveProtectionAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RemoveWatermarkAction.cs b/src/Microsoft.Graph/Generated/Models/Security/RemoveWatermarkAction.cs index 202bab38354..39f3d2fcf71 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RemoveWatermarkAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RemoveWatermarkAction.cs @@ -42,7 +42,7 @@ public RemoveWatermarkAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RemoveWatermarkAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RemoveWatermarkAction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("uiElementNames", UiElementNames); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ReportFileMetadata.cs b/src/Microsoft.Graph/Generated/Models/Security/ReportFileMetadata.cs index f29eb8930a6..ffc2582a8ce 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ReportFileMetadata.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ReportFileMetadata.cs @@ -90,7 +90,7 @@ public ReportFileMetadata() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.ReportFileMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ReportFileMetadata(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("downloadUrl", DownloadUrl); writer.WriteStringValue("fileName", FileName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/RequireSignInIncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/RequireSignInIncidentTaskResponseAction.cs index 75ed0d12f22..39ec604a930 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RequireSignInIncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RequireSignInIncidentTaskResponseAction.cs @@ -26,7 +26,7 @@ public RequireSignInIncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RequireSignInIncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RequireSignInIncidentTaskResponseAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ResourceAccessEvent.cs b/src/Microsoft.Graph/Generated/Models/Security/ResourceAccessEvent.cs index ac644ce04a1..deca7703834 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ResourceAccessEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ResourceAccessEvent.cs @@ -106,7 +106,7 @@ public ResourceAccessEvent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.ResourceAccessEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ResourceAccessEvent(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("accessDateTime", AccessDateTime); writer.WriteStringValue("accountId", AccountId); writer.WriteStringValue("ipAddress", IpAddress); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/ResponseAction.cs index e4566f6da5c..4fc5bd01728 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ResponseAction.cs @@ -52,7 +52,7 @@ public ResponseAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.ResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RestrictAppExecutionIncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/RestrictAppExecutionIncidentTaskResponseAction.cs index 33e9d1258d9..0b2ef3aca76 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RestrictAppExecutionIncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RestrictAppExecutionIncidentTaskResponseAction.cs @@ -26,7 +26,7 @@ public RestrictAppExecutionIncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RestrictAppExecutionIncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RestrictAppExecutionIncidentTaskResponseAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RestrictAppExecutionResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/RestrictAppExecutionResponseAction.cs index 72e3ed769ad..c6b4a21d003 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RestrictAppExecutionResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RestrictAppExecutionResponseAction.cs @@ -32,7 +32,7 @@ public RestrictAppExecutionResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RestrictAppExecutionResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RestrictAppExecutionResponseAction(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RetentionDuration.cs b/src/Microsoft.Graph/Generated/Models/Security/RetentionDuration.cs index 1df91ff4b5b..94d36e85ff3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RetentionDuration.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RetentionDuration.cs @@ -52,7 +52,7 @@ public RetentionDuration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.RetentionDuration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RetentionDurationForever.cs b/src/Microsoft.Graph/Generated/Models/Security/RetentionDurationForever.cs index d61bbaa133d..fbe30808f31 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RetentionDurationForever.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RetentionDurationForever.cs @@ -26,7 +26,7 @@ public RetentionDurationForever() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RetentionDurationForever CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RetentionDurationForever(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RetentionDurationInDays.cs b/src/Microsoft.Graph/Generated/Models/Security/RetentionDurationInDays.cs index 0c211875de6..070ffd6bb98 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RetentionDurationInDays.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RetentionDurationInDays.cs @@ -32,7 +32,7 @@ public RetentionDurationInDays() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RetentionDurationInDays CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RetentionDurationInDays(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("days", Days); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RetentionEvent.cs b/src/Microsoft.Graph/Generated/Models/Security/RetentionEvent.cs index bfc2dc832f4..7b0c9f803e3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RetentionEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RetentionEvent.cs @@ -171,7 +171,7 @@ public DateTimeOffset? LastStatusUpdateDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RetentionEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RetentionEvent(); } /// @@ -202,7 +202,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/RetentionEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/RetentionEventCollectionResponse.cs index b1dc2a8a216..b69d342bc4e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RetentionEventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RetentionEventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RetentionEventCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RetentionEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RetentionEventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RetentionEventStatus.cs b/src/Microsoft.Graph/Generated/Models/Security/RetentionEventStatus.cs index 7b6373a6084..9ee84477daa 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RetentionEventStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RetentionEventStatus.cs @@ -74,7 +74,7 @@ public RetentionEventStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.RetentionEventStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RetentionEventStatus(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("error", Error); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/Security/RetentionEventType.cs b/src/Microsoft.Graph/Generated/Models/Security/RetentionEventType.cs index 5133de01773..08f5230c1c9 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RetentionEventType.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RetentionEventType.cs @@ -95,7 +95,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RetentionEventType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RetentionEventType(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/RetentionEventTypeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/RetentionEventTypeCollectionResponse.cs index c3d4ff385e7..f2c601bf385 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RetentionEventTypeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RetentionEventTypeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RetentionEventTypeCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RetentionEventTypeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RetentionEventTypeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RetentionLabel.cs b/src/Microsoft.Graph/Generated/Models/Security/RetentionLabel.cs index f53e51e6bbb..b156dc0116b 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RetentionLabel.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RetentionLabel.cs @@ -221,7 +221,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RetentionLabel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RetentionLabel(); } /// @@ -257,7 +257,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("actionAfterRetentionPeriod", ActionAfterRetentionPeriod); writer.WriteEnumValue("behaviorDuringRetentionPeriod", BehaviorDuringRetentionPeriod); diff --git a/src/Microsoft.Graph/Generated/Models/Security/RetentionLabelCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/RetentionLabelCollectionResponse.cs index a7658be40c7..6100db0ea62 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RetentionLabelCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RetentionLabelCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RetentionLabelCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RetentionLabelCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RetentionLabelCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RetentionPolicyAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/RetentionPolicyAuditRecord.cs index 1b129490321..1506a30a8a7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RetentionPolicyAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RetentionPolicyAuditRecord.cs @@ -26,7 +26,7 @@ public RetentionPolicyAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RetentionPolicyAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RetentionPolicyAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RuleSchedule.cs b/src/Microsoft.Graph/Generated/Models/Security/RuleSchedule.cs index 87b2ee61c49..6b5e4ca5eac 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RuleSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RuleSchedule.cs @@ -74,7 +74,7 @@ public RuleSchedule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.RuleSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RuleSchedule(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("nextRunDateTime", NextRunDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("period", Period); diff --git a/src/Microsoft.Graph/Generated/Models/Security/RulesRoot.cs b/src/Microsoft.Graph/Generated/Models/Security/RulesRoot.cs index a3eb84bfd5f..d82e8db0944 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RulesRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RulesRoot.cs @@ -35,7 +35,7 @@ public partial class RulesRoot : global::Microsoft.Graph.Beta.Models.Entity, IPa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RulesRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RulesRoot(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("detectionRules", DetectionRules); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RunAntivirusScanIncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/RunAntivirusScanIncidentTaskResponseAction.cs index 5708e1610d9..92bdea6aa5f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RunAntivirusScanIncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RunAntivirusScanIncidentTaskResponseAction.cs @@ -26,7 +26,7 @@ public RunAntivirusScanIncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RunAntivirusScanIncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RunAntivirusScanIncidentTaskResponseAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RunAntivirusScanResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/RunAntivirusScanResponseAction.cs index ffcaafdbc2a..aa8eb43bf0c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RunAntivirusScanResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RunAntivirusScanResponseAction.cs @@ -32,7 +32,7 @@ public RunAntivirusScanResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.RunAntivirusScanResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RunAntivirusScanResponseAction(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/RunDetails.cs b/src/Microsoft.Graph/Generated/Models/Security/RunDetails.cs index cc75575ef15..2622fd99f6e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/RunDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/RunDetails.cs @@ -86,7 +86,7 @@ public RunDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.RunDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.RunDetails(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("errorCode", ErrorCode); writer.WriteStringValue("failureReason", FailureReason); writer.WriteDateTimeOffsetValue("lastRunDateTime", LastRunDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/SasTokenEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/SasTokenEvidence.cs index e0ae824c6c7..45175c3d31e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SasTokenEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SasTokenEvidence.cs @@ -166,7 +166,7 @@ public SasTokenEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SasTokenEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SasTokenEvidence(); } /// @@ -195,7 +195,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("allowedIpAddresses", AllowedIpAddresses); writer.WriteCollectionOfPrimitiveValues("allowedResourceTypes", AllowedResourceTypes); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ScoreEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/ScoreEvidence.cs index 48bcffea751..d98a71595a6 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ScoreEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ScoreEvidence.cs @@ -26,7 +26,7 @@ public ScoreEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ScoreEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ScoreEvidence(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ScorePlatformGenericAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ScorePlatformGenericAuditRecord.cs index 3cdef943265..30950a1bff3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ScorePlatformGenericAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ScorePlatformGenericAuditRecord.cs @@ -26,7 +26,7 @@ public ScorePlatformGenericAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ScorePlatformGenericAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ScorePlatformGenericAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ScriptRunAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ScriptRunAuditRecord.cs index 3b10ef0c5e5..891bb16aca7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ScriptRunAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ScriptRunAuditRecord.cs @@ -26,7 +26,7 @@ public ScriptRunAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ScriptRunAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ScriptRunAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Search.cs b/src/Microsoft.Graph/Generated/Models/Security/Search.cs index 07234facead..8175a646147 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Search.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Search.cs @@ -111,7 +111,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Search CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -143,7 +143,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("contentQuery", ContentQuery); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/Security/SearchAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SearchAuditRecord.cs index 7e9d68a245b..057a14e2422 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SearchAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SearchAuditRecord.cs @@ -26,7 +26,7 @@ public SearchAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SearchAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SearchAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Security.cs b/src/Microsoft.Graph/Generated/Models/Security/Security.cs index 080c0e5d5dd..bb49c31670e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Security.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Security.cs @@ -35,7 +35,7 @@ public partial class Security : global::Microsoft.Graph.Beta.Models.Entity, IPar /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Security CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Security(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("informationProtection", InformationProtection); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceAlertRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceAlertRecord.cs index 361ef668bea..39350d4ad2d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceAlertRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceAlertRecord.cs @@ -26,7 +26,7 @@ public SecurityComplianceAlertRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SecurityComplianceAlertRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SecurityComplianceAlertRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceCenterEOPCmdletAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceCenterEOPCmdletAuditRecord.cs index abb7fff49f8..13413bffd66 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceCenterEOPCmdletAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceCenterEOPCmdletAuditRecord.cs @@ -26,7 +26,7 @@ public SecurityComplianceCenterEOPCmdletAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SecurityComplianceCenterEOPCmdletAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SecurityComplianceCenterEOPCmdletAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceInsightsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceInsightsAuditRecord.cs index 602f6fa99f0..6cc088dcacf 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceInsightsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceInsightsAuditRecord.cs @@ -26,7 +26,7 @@ public SecurityComplianceInsightsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SecurityComplianceInsightsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SecurityComplianceInsightsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceRBACAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceRBACAuditRecord.cs index 2083ca03472..ba2a0a47232 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceRBACAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceRBACAuditRecord.cs @@ -26,7 +26,7 @@ public SecurityComplianceRBACAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SecurityComplianceRBACAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SecurityComplianceRBACAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceUserChangeAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceUserChangeAuditRecord.cs index 4d84142e526..78c17ab84cd 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceUserChangeAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SecurityComplianceUserChangeAuditRecord.cs @@ -26,7 +26,7 @@ public SecurityComplianceUserChangeAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SecurityComplianceUserChangeAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SecurityComplianceUserChangeAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SecurityGroupEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/SecurityGroupEvidence.cs index ad740eed374..fdbd185338c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SecurityGroupEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SecurityGroupEvidence.cs @@ -58,7 +58,7 @@ public SecurityGroupEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SecurityGroupEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SecurityGroupEvidence(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("securityGroupId", SecurityGroupId); diff --git a/src/Microsoft.Graph/Generated/Models/Security/SensitivityLabel.cs b/src/Microsoft.Graph/Generated/Models/Security/SensitivityLabel.cs index 7bdb3748e20..1eb6207f48f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SensitivityLabel.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SensitivityLabel.cs @@ -139,7 +139,7 @@ public string Tooltip /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SensitivityLabel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SensitivityLabel(); } /// @@ -168,7 +168,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("color", Color); writer.WriteCollectionOfPrimitiveValues("contentFormats", ContentFormats); diff --git a/src/Microsoft.Graph/Generated/Models/Security/SensitivityLabelCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/SensitivityLabelCollectionResponse.cs index 7032b987eea..8c7bdcb9118 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SensitivityLabelCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SensitivityLabelCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SensitivityLabelCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SensitivityLabelCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SensitivityLabelCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Sensor.cs b/src/Microsoft.Graph/Generated/Models/Security/Sensor.cs index 926437f8a21..30ba9d8bb15 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Sensor.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Sensor.cs @@ -129,7 +129,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Sensor CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Sensor(); } /// @@ -158,7 +158,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteEnumValue("deploymentStatus", DeploymentStatus); diff --git a/src/Microsoft.Graph/Generated/Models/Security/SensorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/SensorCollectionResponse.cs index b1ad120417f..bb1e696a9d1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SensorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SensorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SensorCollectionResponse : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SensorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SensorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SensorDeploymentPackage.cs b/src/Microsoft.Graph/Generated/Models/Security/SensorDeploymentPackage.cs index b49d0421fa0..921140bae43 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SensorDeploymentPackage.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SensorDeploymentPackage.cs @@ -84,7 +84,7 @@ public SensorDeploymentPackage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.SensorDeploymentPackage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SensorDeploymentPackage(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("downloadUrl", DownloadUrl); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("version", Version); diff --git a/src/Microsoft.Graph/Generated/Models/Security/SensorSettings.cs b/src/Microsoft.Graph/Generated/Models/Security/SensorSettings.cs index 431ecbace16..829b7f72db3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SensorSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SensorSettings.cs @@ -106,7 +106,7 @@ public SensorSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.SensorSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SensorSettings(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteCollectionOfPrimitiveValues("domainControllerDnsNames", DomainControllerDnsNames); writer.WriteBoolValue("isDelayedDeploymentEnabled", IsDelayedDeploymentEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ServicePrincipalEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/ServicePrincipalEvidence.cs index 609743e37b9..ea2839c3422 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ServicePrincipalEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ServicePrincipalEvidence.cs @@ -112,7 +112,7 @@ public ServicePrincipalEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ServicePrincipalEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ServicePrincipalEvidence(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("appOwnerTenantId", AppOwnerTenantId); diff --git a/src/Microsoft.Graph/Generated/Models/Security/SharePointAppPermissionOperationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SharePointAppPermissionOperationAuditRecord.cs index 9613a17a949..3797adb1d64 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SharePointAppPermissionOperationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SharePointAppPermissionOperationAuditRecord.cs @@ -26,7 +26,7 @@ public SharePointAppPermissionOperationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SharePointAppPermissionOperationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SharePointAppPermissionOperationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SharePointAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SharePointAuditRecord.cs index ab9f52d8bb2..78f1e4a73f8 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SharePointAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SharePointAuditRecord.cs @@ -26,7 +26,7 @@ public SharePointAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SharePointAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SharePointAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SharePointCommentOperationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SharePointCommentOperationAuditRecord.cs index c6c6064c9a6..5ea97792db0 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SharePointCommentOperationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SharePointCommentOperationAuditRecord.cs @@ -26,7 +26,7 @@ public SharePointCommentOperationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SharePointCommentOperationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SharePointCommentOperationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SharePointContentTypeOperationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SharePointContentTypeOperationAuditRecord.cs index f40976c0547..e198439b397 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SharePointContentTypeOperationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SharePointContentTypeOperationAuditRecord.cs @@ -26,7 +26,7 @@ public SharePointContentTypeOperationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SharePointContentTypeOperationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SharePointContentTypeOperationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SharePointESignatureAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SharePointESignatureAuditRecord.cs index e426e16042f..08741799068 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SharePointESignatureAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SharePointESignatureAuditRecord.cs @@ -26,7 +26,7 @@ public SharePointESignatureAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SharePointESignatureAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SharePointESignatureAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SharePointFieldOperationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SharePointFieldOperationAuditRecord.cs index 063c0254337..51a6fb2d667 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SharePointFieldOperationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SharePointFieldOperationAuditRecord.cs @@ -26,7 +26,7 @@ public SharePointFieldOperationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SharePointFieldOperationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SharePointFieldOperationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SharePointFileOperationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SharePointFileOperationAuditRecord.cs index 5cbf12189a3..0df02860511 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SharePointFileOperationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SharePointFileOperationAuditRecord.cs @@ -26,7 +26,7 @@ public SharePointFileOperationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SharePointFileOperationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SharePointFileOperationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SharePointListOperationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SharePointListOperationAuditRecord.cs index 4c99746b35e..e244b931d82 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SharePointListOperationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SharePointListOperationAuditRecord.cs @@ -26,7 +26,7 @@ public SharePointListOperationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SharePointListOperationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SharePointListOperationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SharePointSharingOperationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SharePointSharingOperationAuditRecord.cs index 5ded9b4365d..cabf57609b9 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SharePointSharingOperationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SharePointSharingOperationAuditRecord.cs @@ -26,7 +26,7 @@ public SharePointSharingOperationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SharePointSharingOperationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SharePointSharingOperationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SinglePropertySchema.cs b/src/Microsoft.Graph/Generated/Models/Security/SinglePropertySchema.cs index 61a4b0a1e27..d619b46d6b8 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SinglePropertySchema.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SinglePropertySchema.cs @@ -84,7 +84,7 @@ public SinglePropertySchema() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.SinglePropertySchema CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SinglePropertySchema(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/Models/Security/SiteSource.cs b/src/Microsoft.Graph/Generated/Models/Security/SiteSource.cs index e1538c0fec9..aa527fd99c2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SiteSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SiteSource.cs @@ -42,7 +42,7 @@ public SiteSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SiteSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SiteSource(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("site", Site); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SiteSourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/SiteSourceCollectionResponse.cs index af13e47f6ed..3a84a8501a1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SiteSourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SiteSourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SiteSourceCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SiteSourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SiteSourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessBaseAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessBaseAuditRecord.cs index 2a6302f282d..611412e0794 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessBaseAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessBaseAuditRecord.cs @@ -26,7 +26,7 @@ public SkypeForBusinessBaseAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SkypeForBusinessBaseAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SkypeForBusinessBaseAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessCmdletsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessCmdletsAuditRecord.cs index 1325730c612..efc5195809d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessCmdletsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessCmdletsAuditRecord.cs @@ -26,7 +26,7 @@ public SkypeForBusinessCmdletsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SkypeForBusinessCmdletsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SkypeForBusinessCmdletsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessPSTNUsageAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessPSTNUsageAuditRecord.cs index 49a76fbc5a3..59234d87d5f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessPSTNUsageAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessPSTNUsageAuditRecord.cs @@ -26,7 +26,7 @@ public SkypeForBusinessPSTNUsageAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SkypeForBusinessPSTNUsageAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SkypeForBusinessPSTNUsageAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessUsersBlockedAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessUsersBlockedAuditRecord.cs index 115e8c83767..470d8b27d6d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessUsersBlockedAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SkypeForBusinessUsersBlockedAuditRecord.cs @@ -26,7 +26,7 @@ public SkypeForBusinessUsersBlockedAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SkypeForBusinessUsersBlockedAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SkypeForBusinessUsersBlockedAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SmsCreatePhoneNumberRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SmsCreatePhoneNumberRecord.cs index d9c753baf56..bf8fcd893b2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SmsCreatePhoneNumberRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SmsCreatePhoneNumberRecord.cs @@ -26,7 +26,7 @@ public SmsCreatePhoneNumberRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SmsCreatePhoneNumberRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SmsCreatePhoneNumberRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SmsDeletePhoneNumberRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SmsDeletePhoneNumberRecord.cs index 8e5ff7c1179..d72272f4360 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SmsDeletePhoneNumberRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SmsDeletePhoneNumberRecord.cs @@ -26,7 +26,7 @@ public SmsDeletePhoneNumberRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SmsDeletePhoneNumberRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SmsDeletePhoneNumberRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SoftDeleteIncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/SoftDeleteIncidentTaskResponseAction.cs index db3d4309478..f40a8ddb918 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SoftDeleteIncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SoftDeleteIncidentTaskResponseAction.cs @@ -26,7 +26,7 @@ public SoftDeleteIncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SoftDeleteIncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SoftDeleteIncidentTaskResponseAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SoftDeleteResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/SoftDeleteResponseAction.cs index f7fcfcf802e..73ef0bfca98 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SoftDeleteResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SoftDeleteResponseAction.cs @@ -32,7 +32,7 @@ public SoftDeleteResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SoftDeleteResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SoftDeleteResponseAction(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SslCertificate.cs b/src/Microsoft.Graph/Generated/Models/Security/SslCertificate.cs index e2c21d465ca..4bebcc65da7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SslCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SslCertificate.cs @@ -146,7 +146,7 @@ public SslCertificate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SslCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SslCertificate(); } /// @@ -175,7 +175,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteStringValue("fingerprint", Fingerprint); diff --git a/src/Microsoft.Graph/Generated/Models/Security/SslCertificateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/SslCertificateCollectionResponse.cs index 1881882e319..167a2fd76ee 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SslCertificateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SslCertificateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SslCertificateCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SslCertificateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SslCertificateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SslCertificateEntity.cs b/src/Microsoft.Graph/Generated/Models/Security/SslCertificateEntity.cs index 6ec80edf94e..01d6d66efbf 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SslCertificateEntity.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SslCertificateEntity.cs @@ -196,7 +196,7 @@ public SslCertificateEntity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.SslCertificateEntity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SslCertificateEntity(); } /// @@ -225,7 +225,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("address", Address); writer.WriteCollectionOfPrimitiveValues("alternateNames", AlternateNames); writer.WriteStringValue("commonName", CommonName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/StopAndQuarantineFileIncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/StopAndQuarantineFileIncidentTaskResponseAction.cs index 1e13fa26212..860ccf85316 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/StopAndQuarantineFileIncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/StopAndQuarantineFileIncidentTaskResponseAction.cs @@ -42,7 +42,7 @@ public StopAndQuarantineFileIncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.StopAndQuarantineFileIncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.StopAndQuarantineFileIncidentTaskResponseAction(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceId", DeviceId); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/StopAndQuarantineFileResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/StopAndQuarantineFileResponseAction.cs index 102ba943bb0..e30431b9e35 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/StopAndQuarantineFileResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/StopAndQuarantineFileResponseAction.cs @@ -32,7 +32,7 @@ public StopAndQuarantineFileResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.StopAndQuarantineFileResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.StopAndQuarantineFileResponseAction(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("identifier", Identifier); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/StreamObject.cs b/src/Microsoft.Graph/Generated/Models/Security/StreamObject.cs index 75099713437..c40597580c2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/StreamObject.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/StreamObject.cs @@ -68,7 +68,7 @@ public StreamObject() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.StreamObject CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.StreamObject(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Security/StringValueDictionary.cs b/src/Microsoft.Graph/Generated/Models/Security/StringValueDictionary.cs index ef74ef4a3a2..f135b33b1e7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/StringValueDictionary.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/StringValueDictionary.cs @@ -52,7 +52,7 @@ public StringValueDictionary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.StringValueDictionary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.StringValueDictionary(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SubcategoryTemplate.cs b/src/Microsoft.Graph/Generated/Models/Security/SubcategoryTemplate.cs index 41a842694db..49121042f50 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SubcategoryTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SubcategoryTemplate.cs @@ -19,7 +19,7 @@ public partial class SubcategoryTemplate : global::Microsoft.Graph.Beta.Models.S /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SubcategoryTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SubcategoryTemplate(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SubcategoryTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/SubcategoryTemplateCollectionResponse.cs index b298e1d4bf8..c24bba1782c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SubcategoryTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SubcategoryTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SubcategoryTemplateCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SubcategoryTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SubcategoryTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Subdomain.cs b/src/Microsoft.Graph/Generated/Models/Security/Subdomain.cs index b6dd2d01ced..fdd9e379011 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Subdomain.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Subdomain.cs @@ -41,7 +41,7 @@ public DateTimeOffset? FirstSeenDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Subdomain CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Subdomain(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); writer.WriteObjectValue("host", Host); diff --git a/src/Microsoft.Graph/Generated/Models/Security/SubdomainCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/SubdomainCollectionResponse.cs index 9d2563c93ed..3e24d1bbcb4 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SubdomainCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SubdomainCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SubdomainCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SubdomainCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SubdomainCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SubmissionAdminReview.cs b/src/Microsoft.Graph/Generated/Models/Security/SubmissionAdminReview.cs index 3936171581c..8b89ea50067 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SubmissionAdminReview.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SubmissionAdminReview.cs @@ -80,7 +80,7 @@ public SubmissionAdminReview() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.SubmissionAdminReview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SubmissionAdminReview(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("reviewBy", ReviewBy); writer.WriteDateTimeOffsetValue("reviewDateTime", ReviewDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/SubmissionDetectedFile.cs b/src/Microsoft.Graph/Generated/Models/Security/SubmissionDetectedFile.cs index cfc3f247cdf..597b9b08891 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SubmissionDetectedFile.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SubmissionDetectedFile.cs @@ -84,7 +84,7 @@ public SubmissionDetectedFile() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.SubmissionDetectedFile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SubmissionDetectedFile(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("fileHash", FileHash); writer.WriteStringValue("fileName", FileName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Security/SubmissionMailEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/SubmissionMailEvidence.cs index bb06f32f1c8..534c28ca2e2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SubmissionMailEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SubmissionMailEvidence.cs @@ -160,7 +160,7 @@ public SubmissionMailEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SubmissionMailEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SubmissionMailEvidence(); } /// @@ -188,7 +188,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("networkMessageId", NetworkMessageId); writer.WriteStringValue("recipient", Recipient); diff --git a/src/Microsoft.Graph/Generated/Models/Security/SubmissionResult.cs b/src/Microsoft.Graph/Generated/Models/Security/SubmissionResult.cs index 3c172a93514..50c0466ded7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SubmissionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SubmissionResult.cs @@ -102,7 +102,7 @@ public SubmissionResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.SubmissionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SubmissionResult(); } /// @@ -127,7 +127,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("category", Category); writer.WriteEnumValue("detail", Detail); writer.WriteCollectionOfObjectValues("detectedFiles", DetectedFiles); diff --git a/src/Microsoft.Graph/Generated/Models/Security/SubmissionUserIdentity.cs b/src/Microsoft.Graph/Generated/Models/Security/SubmissionUserIdentity.cs index 28f56b4c685..6b3d120a3f2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SubmissionUserIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SubmissionUserIdentity.cs @@ -42,7 +42,7 @@ public SubmissionUserIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SubmissionUserIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SubmissionUserIdentity(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("email", Email); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SupervisoryReviewDayXInsightsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SupervisoryReviewDayXInsightsAuditRecord.cs index d382a7f417e..eacd6a26088 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SupervisoryReviewDayXInsightsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SupervisoryReviewDayXInsightsAuditRecord.cs @@ -26,7 +26,7 @@ public SupervisoryReviewDayXInsightsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SupervisoryReviewDayXInsightsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SupervisoryReviewDayXInsightsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/SyntheticProbeAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/SyntheticProbeAuditRecord.cs index f522870ff8a..a2de337a132 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/SyntheticProbeAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/SyntheticProbeAuditRecord.cs @@ -26,7 +26,7 @@ public SyntheticProbeAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.SyntheticProbeAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.SyntheticProbeAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Tag.cs b/src/Microsoft.Graph/Generated/Models/Security/Tag.cs index 34d7c201a09..81b8d04c6d2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Tag.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Tag.cs @@ -73,7 +73,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Tag CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/Security/TeamsEasyApprovalsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/TeamsEasyApprovalsAuditRecord.cs index 5e4aeb19d1a..bb489f80350 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/TeamsEasyApprovalsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/TeamsEasyApprovalsAuditRecord.cs @@ -26,7 +26,7 @@ public TeamsEasyApprovalsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.TeamsEasyApprovalsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.TeamsEasyApprovalsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/TeamsHealthcareAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/TeamsHealthcareAuditRecord.cs index 57a67f9c95a..a56571360f5 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/TeamsHealthcareAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/TeamsHealthcareAuditRecord.cs @@ -26,7 +26,7 @@ public TeamsHealthcareAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.TeamsHealthcareAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.TeamsHealthcareAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/TeamsMessageEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/TeamsMessageEvidence.cs index 316638bd3a1..ca2f87c6cc1 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/TeamsMessageEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/TeamsMessageEvidence.cs @@ -330,7 +330,7 @@ public TeamsMessageEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.TeamsMessageEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.TeamsMessageEvidence(); } /// @@ -373,7 +373,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("campaignId", CampaignId); writer.WriteStringValue("channelId", ChannelId); diff --git a/src/Microsoft.Graph/Generated/Models/Security/TeamsUpdatesAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/TeamsUpdatesAuditRecord.cs index dcd4ddc6b96..c8be14f9bf8 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/TeamsUpdatesAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/TeamsUpdatesAuditRecord.cs @@ -26,7 +26,7 @@ public TeamsUpdatesAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.TeamsUpdatesAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.TeamsUpdatesAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/TenantAllowBlockListAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/TenantAllowBlockListAuditRecord.cs index 644e4b1a9ae..ea119ef99b6 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/TenantAllowBlockListAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/TenantAllowBlockListAuditRecord.cs @@ -26,7 +26,7 @@ public TenantAllowBlockListAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.TenantAllowBlockListAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.TenantAllowBlockListAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/TenantAllowBlockListEntryResult.cs b/src/Microsoft.Graph/Generated/Models/Security/TenantAllowBlockListEntryResult.cs index 23efc8f912c..6a7c7840a4c 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/TenantAllowBlockListEntryResult.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/TenantAllowBlockListEntryResult.cs @@ -102,7 +102,7 @@ public TenantAllowBlockListEntryResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.TenantAllowBlockListEntryResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.TenantAllowBlockListEntryResult(); } /// @@ -127,7 +127,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("entryType", EntryType); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteStringValue("identity", Identity); diff --git a/src/Microsoft.Graph/Generated/Models/Security/TenantAllowOrBlockListAction.cs b/src/Microsoft.Graph/Generated/Models/Security/TenantAllowOrBlockListAction.cs index 3a10505cbc3..c6ec51146de 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/TenantAllowOrBlockListAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/TenantAllowOrBlockListAction.cs @@ -96,7 +96,7 @@ public TenantAllowOrBlockListAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.TenantAllowOrBlockListAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.TenantAllowOrBlockListAction(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteStringValue("note", Note); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ThreatDetectionDetail.cs b/src/Microsoft.Graph/Generated/Models/Security/ThreatDetectionDetail.cs index 8401e5ac237..fb6c1627187 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ThreatDetectionDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ThreatDetectionDetail.cs @@ -100,7 +100,7 @@ public ThreatDetectionDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.ThreatDetectionDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ThreatDetectionDetail(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("confidenceLevel", ConfidenceLevel); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("priorityAccountProtection", PriorityAccountProtection); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ThreatFinderAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/ThreatFinderAuditRecord.cs index 6f1b908c7d4..92ed671b518 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ThreatFinderAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ThreatFinderAuditRecord.cs @@ -26,7 +26,7 @@ public ThreatFinderAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ThreatFinderAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ThreatFinderAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligence.cs b/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligence.cs index 5ff0d204669..391ce60e023 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligence.cs @@ -291,7 +291,7 @@ public partial class ThreatIntelligence : global::Microsoft.Graph.Beta.Models.En /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ThreatIntelligence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ThreatIntelligence(); } /// @@ -327,7 +327,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("articleIndicators", ArticleIndicators); writer.WriteCollectionOfObjectValues("articles", Articles); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligenceAtpContentData.cs b/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligenceAtpContentData.cs index dda2806dc30..1a6071892e7 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligenceAtpContentData.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligenceAtpContentData.cs @@ -26,7 +26,7 @@ public ThreatIntelligenceAtpContentData() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ThreatIntelligenceAtpContentData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ThreatIntelligenceAtpContentData(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligenceMailData.cs b/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligenceMailData.cs index ba60bf94a8d..22ff64e40f8 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligenceMailData.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligenceMailData.cs @@ -26,7 +26,7 @@ public ThreatIntelligenceMailData() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ThreatIntelligenceMailData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ThreatIntelligenceMailData(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligenceUrlClickData.cs b/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligenceUrlClickData.cs index be9423d8bdb..3094281276f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligenceUrlClickData.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ThreatIntelligenceUrlClickData.cs @@ -26,7 +26,7 @@ public ThreatIntelligenceUrlClickData() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ThreatIntelligenceUrlClickData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ThreatIntelligenceUrlClickData(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/ThreatSubmission.cs b/src/Microsoft.Graph/Generated/Models/Security/ThreatSubmission.cs index 01ade7b6f24..fa9d8c26101 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ThreatSubmission.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ThreatSubmission.cs @@ -119,7 +119,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ThreatSubmission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -159,7 +159,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("adminReview", AdminReview); writer.WriteEnumValue("category", Category); diff --git a/src/Microsoft.Graph/Generated/Models/Security/ThreatSubmissionRoot.cs b/src/Microsoft.Graph/Generated/Models/Security/ThreatSubmissionRoot.cs index 125dda9cf74..6e7a5248bde 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/ThreatSubmissionRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/ThreatSubmissionRoot.cs @@ -83,7 +83,7 @@ public partial class ThreatSubmissionRoot : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.ThreatSubmissionRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.ThreatSubmissionRoot(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("emailThreats", EmailThreats); writer.WriteCollectionOfObjectValues("emailThreatSubmissionPolicies", EmailThreatSubmissionPolicies); diff --git a/src/Microsoft.Graph/Generated/Models/Security/TimelineEvent.cs b/src/Microsoft.Graph/Generated/Models/Security/TimelineEvent.cs index 95738968e2a..857c6bac122 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/TimelineEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/TimelineEvent.cs @@ -118,7 +118,7 @@ public TimelineEvent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.TimelineEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.TimelineEvent(); } /// @@ -144,7 +144,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("eventDateTime", EventDateTime); writer.WriteStringValue("eventDetails", EventDetails); writer.WriteStringValue("eventResult", EventResult); diff --git a/src/Microsoft.Graph/Generated/Models/Security/TodoAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/TodoAuditRecord.cs index bc562aa0166..7f16f2ff350 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/TodoAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/TodoAuditRecord.cs @@ -26,7 +26,7 @@ public TodoAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.TodoAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.TodoAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/TopicModelingSettings.cs b/src/Microsoft.Graph/Generated/Models/Security/TopicModelingSettings.cs index ac10a7212cf..526f3f8d745 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/TopicModelingSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/TopicModelingSettings.cs @@ -76,7 +76,7 @@ public TopicModelingSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.TopicModelingSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.TopicModelingSettings(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("dynamicallyAdjustTopicCount", DynamicallyAdjustTopicCount); writer.WriteBoolValue("ignoreNumbers", IgnoreNumbers); writer.WriteBoolValue("isEnabled", IsEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/Security/TriggerTypesRoot.cs b/src/Microsoft.Graph/Generated/Models/Security/TriggerTypesRoot.cs index cfb0b018ebc..7185c925576 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/TriggerTypesRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/TriggerTypesRoot.cs @@ -35,7 +35,7 @@ public partial class TriggerTypesRoot : global::Microsoft.Graph.Beta.Models.Enti /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.TriggerTypesRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.TriggerTypesRoot(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("retentionEventTypes", RetentionEventTypes); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/TriggersRoot.cs b/src/Microsoft.Graph/Generated/Models/Security/TriggersRoot.cs index cdcd3f25fa5..31ebc3c561e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/TriggersRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/TriggersRoot.cs @@ -35,7 +35,7 @@ public partial class TriggersRoot : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.TriggersRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.TriggersRoot(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("retentionEvents", RetentionEvents); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UamOperationAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/UamOperationAuditRecord.cs index e4852938d9a..597a25a51fd 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UamOperationAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UamOperationAuditRecord.cs @@ -26,7 +26,7 @@ public UamOperationAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UamOperationAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UamOperationAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UnIsolateDeviceIncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/UnIsolateDeviceIncidentTaskResponseAction.cs index 06e65c7d87c..0012c1746d8 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UnIsolateDeviceIncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UnIsolateDeviceIncidentTaskResponseAction.cs @@ -26,7 +26,7 @@ public UnIsolateDeviceIncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UnIsolateDeviceIncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UnIsolateDeviceIncidentTaskResponseAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UnRestrictAppExecutionIncidentTaskResponseAction.cs b/src/Microsoft.Graph/Generated/Models/Security/UnRestrictAppExecutionIncidentTaskResponseAction.cs index 1d65eaa30cb..43d2100fe44 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UnRestrictAppExecutionIncidentTaskResponseAction.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UnRestrictAppExecutionIncidentTaskResponseAction.cs @@ -26,7 +26,7 @@ public UnRestrictAppExecutionIncidentTaskResponseAction() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UnRestrictAppExecutionIncidentTaskResponseAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UnRestrictAppExecutionIncidentTaskResponseAction(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UnclassifiedArtifact.cs b/src/Microsoft.Graph/Generated/Models/Security/UnclassifiedArtifact.cs index b69074862f6..0f179bfdfa0 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UnclassifiedArtifact.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UnclassifiedArtifact.cs @@ -58,7 +58,7 @@ public UnclassifiedArtifact() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UnclassifiedArtifact CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UnclassifiedArtifact(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("kind", Kind); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupAuditRecord.cs index 1a345814ed1..bc545cf4949 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupAuditRecord.cs @@ -26,7 +26,7 @@ public UnifiedGroupAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UnifiedGroupAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UnifiedGroupAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupSource.cs b/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupSource.cs index 4322b08597f..c49c002af8a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupSource.cs @@ -48,7 +48,7 @@ public UnifiedGroupSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UnifiedGroupSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UnifiedGroupSource(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("group", Group); writer.WriteEnumValue("includedSources", IncludedSources); diff --git a/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupSourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupSourceCollectionResponse.cs index 9365fc72264..7f130d356a2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupSourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UnifiedGroupSourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedGroupSourceCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UnifiedGroupSourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UnifiedGroupSourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UnifiedSimulationMatchedItemAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/UnifiedSimulationMatchedItemAuditRecord.cs index cc67d983bee..7556583bffb 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UnifiedSimulationMatchedItemAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UnifiedSimulationMatchedItemAuditRecord.cs @@ -26,7 +26,7 @@ public UnifiedSimulationMatchedItemAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UnifiedSimulationMatchedItemAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UnifiedSimulationMatchedItemAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UnifiedSimulationSummaryAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/UnifiedSimulationSummaryAuditRecord.cs index b11fb37b03d..0802f725a83 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UnifiedSimulationSummaryAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UnifiedSimulationSummaryAuditRecord.cs @@ -26,7 +26,7 @@ public UnifiedSimulationSummaryAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UnifiedSimulationSummaryAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UnifiedSimulationSummaryAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UploadCertificateRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/UploadCertificateRecord.cs index 67c1954a5b5..628f0e999ba 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UploadCertificateRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UploadCertificateRecord.cs @@ -26,7 +26,7 @@ public UploadCertificateRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UploadCertificateRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UploadCertificateRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UrbacAssignmentAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/UrbacAssignmentAuditRecord.cs index aad4fd2e01f..5f6d384c2d3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UrbacAssignmentAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UrbacAssignmentAuditRecord.cs @@ -26,7 +26,7 @@ public UrbacAssignmentAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UrbacAssignmentAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UrbacAssignmentAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UrbacEnableStateAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/UrbacEnableStateAuditRecord.cs index 949e0675ade..46be17a34ec 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UrbacEnableStateAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UrbacEnableStateAuditRecord.cs @@ -26,7 +26,7 @@ public UrbacEnableStateAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UrbacEnableStateAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UrbacEnableStateAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UrbacRoleAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/UrbacRoleAuditRecord.cs index a496537e32c..766e4900c80 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UrbacRoleAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UrbacRoleAuditRecord.cs @@ -26,7 +26,7 @@ public UrbacRoleAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UrbacRoleAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UrbacRoleAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UrlEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/UrlEvidence.cs index 3c33d9eda54..db33dd64400 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UrlEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UrlEvidence.cs @@ -42,7 +42,7 @@ public UrlEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UrlEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UrlEvidence(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("url", Url); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UrlThreatSubmission.cs b/src/Microsoft.Graph/Generated/Models/Security/UrlThreatSubmission.cs index a12154597e7..f59b5455a07 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UrlThreatSubmission.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UrlThreatSubmission.cs @@ -42,7 +42,7 @@ public UrlThreatSubmission() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UrlThreatSubmission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UrlThreatSubmission(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("webUrl", WebUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UrlThreatSubmissionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/UrlThreatSubmissionCollectionResponse.cs index d23092eabc8..bb389ffce40 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UrlThreatSubmissionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UrlThreatSubmissionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UrlThreatSubmissionCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UrlThreatSubmissionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UrlThreatSubmissionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/User.cs b/src/Microsoft.Graph/Generated/Models/Security/User.cs index e262fffae40..2825b3cb9da 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/User.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/User.cs @@ -12,7 +12,7 @@ namespace Microsoft.Graph.Beta.Models.Security public partial class User : global::Microsoft.Graph.Beta.Models.Security.IdentityAccounts, IParsable #pragma warning restore CS1591 { - /// The emailAddress property + /// Email address of the user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? EmailAddress @@ -28,7 +28,7 @@ public string EmailAddress set { BackingStore?.Set("emailAddress", value); } } #endif - /// The userPrincipalName property + /// The user principal name. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? UserPrincipalName @@ -58,7 +58,7 @@ public User() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.User CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.User(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("emailAddress", EmailAddress); writer.WriteStringValue("userPrincipalName", UserPrincipalName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/UserAccount.cs b/src/Microsoft.Graph/Generated/Models/Security/UserAccount.cs index 56d1abe68bf..3ab62abc1fd 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UserAccount.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UserAccount.cs @@ -164,7 +164,7 @@ public UserAccount() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.UserAccount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UserAccount(); } /// @@ -191,7 +191,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("accountName", AccountName); writer.WriteStringValue("azureAdUserId", AzureAdUserId); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/Security/UserEvidence.cs b/src/Microsoft.Graph/Generated/Models/Security/UserEvidence.cs index 52f155ba826..9a205ddb6f3 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UserEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UserEvidence.cs @@ -58,7 +58,7 @@ public UserEvidence() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UserEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UserEvidence(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("stream", Stream); writer.WriteObjectValue("userAccount", UserAccount); diff --git a/src/Microsoft.Graph/Generated/Models/Security/UserSource.cs b/src/Microsoft.Graph/Generated/Models/Security/UserSource.cs index 90b8c8b67de..11708cfb202 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UserSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UserSource.cs @@ -64,7 +64,7 @@ public UserSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UserSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UserSource(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("email", Email); writer.WriteEnumValue("includedSources", IncludedSources); diff --git a/src/Microsoft.Graph/Generated/Models/Security/UserSourceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/UserSourceCollectionResponse.cs index 57842ceaf9a..8bab7ea9694 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UserSourceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UserSourceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserSourceCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UserSourceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UserSourceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/UserTrainingAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/UserTrainingAuditRecord.cs index aa2f86235ec..0e4c8d1b432 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/UserTrainingAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/UserTrainingAuditRecord.cs @@ -26,7 +26,7 @@ public UserTrainingAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.UserTrainingAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.UserTrainingAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/VfamBasePolicyAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/VfamBasePolicyAuditRecord.cs index a34f6493bf1..5c9e2c78f56 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VfamBasePolicyAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VfamBasePolicyAuditRecord.cs @@ -26,7 +26,7 @@ public VfamBasePolicyAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.VfamBasePolicyAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VfamBasePolicyAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/VfamCreatePolicyAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/VfamCreatePolicyAuditRecord.cs index b62d87a7af9..77fe1424ac2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VfamCreatePolicyAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VfamCreatePolicyAuditRecord.cs @@ -26,7 +26,7 @@ public VfamCreatePolicyAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.VfamCreatePolicyAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VfamCreatePolicyAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/VfamDeletePolicyAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/VfamDeletePolicyAuditRecord.cs index 497c8e2c42f..b2934e7cf88 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VfamDeletePolicyAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VfamDeletePolicyAuditRecord.cs @@ -26,7 +26,7 @@ public VfamDeletePolicyAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.VfamDeletePolicyAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VfamDeletePolicyAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/VfamUpdatePolicyAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/VfamUpdatePolicyAuditRecord.cs index 12707dac344..867e9d4521e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VfamUpdatePolicyAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VfamUpdatePolicyAuditRecord.cs @@ -26,7 +26,7 @@ public VfamUpdatePolicyAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.VfamUpdatePolicyAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VfamUpdatePolicyAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/VivaGoalsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/VivaGoalsAuditRecord.cs index ad979f5bddc..90d1334153f 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VivaGoalsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VivaGoalsAuditRecord.cs @@ -26,7 +26,7 @@ public VivaGoalsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.VivaGoalsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VivaGoalsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/VivaLearningAdminAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/VivaLearningAdminAuditRecord.cs index 3eab30eb573..63b64e01ac2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VivaLearningAdminAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VivaLearningAdminAuditRecord.cs @@ -26,7 +26,7 @@ public VivaLearningAdminAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.VivaLearningAdminAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VivaLearningAdminAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/VivaLearningAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/VivaLearningAuditRecord.cs index 0a317f1bb8f..9d4934dc887 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VivaLearningAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VivaLearningAuditRecord.cs @@ -26,7 +26,7 @@ public VivaLearningAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.VivaLearningAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VivaLearningAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/VivaPulseAdminAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/VivaPulseAdminAuditRecord.cs index eecbcb5d1df..a167a9e4130 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VivaPulseAdminAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VivaPulseAdminAuditRecord.cs @@ -26,7 +26,7 @@ public VivaPulseAdminAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.VivaPulseAdminAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VivaPulseAdminAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/VivaPulseOrganizerAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/VivaPulseOrganizerAuditRecord.cs index 08f815fd4c6..8be331430b8 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VivaPulseOrganizerAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VivaPulseOrganizerAuditRecord.cs @@ -26,7 +26,7 @@ public VivaPulseOrganizerAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.VivaPulseOrganizerAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VivaPulseOrganizerAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/VivaPulseReportAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/VivaPulseReportAuditRecord.cs index 03767910a1a..6a374a720a2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VivaPulseReportAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VivaPulseReportAuditRecord.cs @@ -26,7 +26,7 @@ public VivaPulseReportAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.VivaPulseReportAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VivaPulseReportAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/VivaPulseResponseAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/VivaPulseResponseAuditRecord.cs index e29f16e9a46..1b4c221781d 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VivaPulseResponseAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VivaPulseResponseAuditRecord.cs @@ -26,7 +26,7 @@ public VivaPulseResponseAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.VivaPulseResponseAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VivaPulseResponseAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/VmMetadata.cs b/src/Microsoft.Graph/Generated/Models/Security/VmMetadata.cs index 9f194c488a5..0f92402b062 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VmMetadata.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VmMetadata.cs @@ -106,7 +106,7 @@ public VmMetadata() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.VmMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VmMetadata(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("cloudProvider", CloudProvider); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("resourceId", ResourceId); diff --git a/src/Microsoft.Graph/Generated/Models/Security/Vulnerability.cs b/src/Microsoft.Graph/Generated/Models/Security/Vulnerability.cs index 6ff46a6df7b..497231b96ba 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Vulnerability.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Vulnerability.cs @@ -211,7 +211,7 @@ public DateTimeOffset? PublishedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Vulnerability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Vulnerability(); } /// @@ -247,7 +247,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("activeExploitsObserved", ActiveExploitsObserved); writer.WriteCollectionOfObjectValues("articles", Articles); diff --git a/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityCollectionResponse.cs index db8312d9ed4..8462f4b2877 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class VulnerabilityCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.VulnerabilityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VulnerabilityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityComponent.cs b/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityComponent.cs index f59a3512b07..e326c75c56e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityComponent.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityComponent.cs @@ -35,7 +35,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.VulnerabilityComponent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VulnerabilityComponent(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityComponentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityComponentCollectionResponse.cs index 57bed07e1e3..7df5129eab5 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityComponentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/VulnerabilityComponentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class VulnerabilityComponentCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.VulnerabilityComponentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.VulnerabilityComponentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/WdatpAlertsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/WdatpAlertsAuditRecord.cs index 70616ecc727..350720d3e9a 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/WdatpAlertsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/WdatpAlertsAuditRecord.cs @@ -26,7 +26,7 @@ public WdatpAlertsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.WdatpAlertsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.WdatpAlertsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/WhoisBaseRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/WhoisBaseRecord.cs index 682455c7473..4bd563bcac0 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/WhoisBaseRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/WhoisBaseRecord.cs @@ -257,7 +257,7 @@ public string WhoisServer /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.WhoisBaseRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -300,7 +300,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("abuse", Abuse); writer.WriteObjectValue("admin", Admin); diff --git a/src/Microsoft.Graph/Generated/Models/Security/WhoisContact.cs b/src/Microsoft.Graph/Generated/Models/Security/WhoisContact.cs index a90d3c54def..7316c866651 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/WhoisContact.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/WhoisContact.cs @@ -148,7 +148,7 @@ public WhoisContact() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.WhoisContact CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.WhoisContact(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("address", Address); writer.WriteStringValue("email", Email); writer.WriteStringValue("fax", Fax); diff --git a/src/Microsoft.Graph/Generated/Models/Security/WhoisHistoryRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/WhoisHistoryRecord.cs index 2378a7423fa..ae4e2b0fb5e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/WhoisHistoryRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/WhoisHistoryRecord.cs @@ -26,7 +26,7 @@ public WhoisHistoryRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.WhoisHistoryRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.WhoisHistoryRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/WhoisHistoryRecordCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/WhoisHistoryRecordCollectionResponse.cs index 5a16cf9b240..91d23cba9af 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/WhoisHistoryRecordCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/WhoisHistoryRecordCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WhoisHistoryRecordCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.WhoisHistoryRecordCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.WhoisHistoryRecordCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/WhoisNameserver.cs b/src/Microsoft.Graph/Generated/Models/Security/WhoisNameserver.cs index 0d3fef433b1..55e9fa1adee 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/WhoisNameserver.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/WhoisNameserver.cs @@ -80,7 +80,7 @@ public WhoisNameserver() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Security.WhoisNameserver CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.WhoisNameserver(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("firstSeenDateTime", FirstSeenDateTime); writer.WriteObjectValue("host", Host); writer.WriteDateTimeOffsetValue("lastSeenDateTime", LastSeenDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Security/WhoisRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/WhoisRecord.cs index defea34b283..2fe94874b98 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/WhoisRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/WhoisRecord.cs @@ -42,7 +42,7 @@ public WhoisRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.WhoisRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.WhoisRecord(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("history", History); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/WhoisRecordCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Security/WhoisRecordCollectionResponse.cs index 140636923ec..302f0397b1e 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/WhoisRecordCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/WhoisRecordCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WhoisRecordCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.WhoisRecordCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.WhoisRecordCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Security/Windows365CustomerLockboxAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/Windows365CustomerLockboxAuditRecord.cs index 1bd524844a6..c07ea374db2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/Windows365CustomerLockboxAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/Windows365CustomerLockboxAuditRecord.cs @@ -26,7 +26,7 @@ public Windows365CustomerLockboxAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.Windows365CustomerLockboxAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.Windows365CustomerLockboxAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/WorkplaceAnalyticsAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/WorkplaceAnalyticsAuditRecord.cs index 03bf70e3e14..61d395d5647 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/WorkplaceAnalyticsAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/WorkplaceAnalyticsAuditRecord.cs @@ -26,7 +26,7 @@ public WorkplaceAnalyticsAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.WorkplaceAnalyticsAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.WorkplaceAnalyticsAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Security/YammerAuditRecord.cs b/src/Microsoft.Graph/Generated/Models/Security/YammerAuditRecord.cs index 8a2f87495fe..4d7af6fc3d2 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/YammerAuditRecord.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/YammerAuditRecord.cs @@ -26,7 +26,7 @@ public YammerAuditRecord() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Security.YammerAuditRecord CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Security.YammerAuditRecord(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SecurityAction.cs b/src/Microsoft.Graph/Generated/Models/SecurityAction.cs index 1b6119cf309..c95871e4e65 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityAction.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityAction.cs @@ -203,7 +203,7 @@ public string User /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityAction(); } /// @@ -236,7 +236,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("actionReason", ActionReason); writer.WriteStringValue("appId", AppId); diff --git a/src/Microsoft.Graph/Generated/Models/SecurityActionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SecurityActionCollectionResponse.cs index b0e428d4c26..bd213ae9df9 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityActionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityActionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SecurityActionCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityActionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityActionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SecurityActionState.cs b/src/Microsoft.Graph/Generated/Models/SecurityActionState.cs index a586313bb9e..72871b2616b 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityActionState.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityActionState.cs @@ -96,7 +96,7 @@ public SecurityActionState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SecurityActionState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityActionState(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/SecurityBaselineCategoryStateSummary.cs b/src/Microsoft.Graph/Generated/Models/SecurityBaselineCategoryStateSummary.cs index ad3edb14704..70513e67560 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityBaselineCategoryStateSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityBaselineCategoryStateSummary.cs @@ -43,7 +43,7 @@ public SecurityBaselineCategoryStateSummary() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityBaselineCategoryStateSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityBaselineCategoryStateSummary(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); } diff --git a/src/Microsoft.Graph/Generated/Models/SecurityBaselineContributingPolicy.cs b/src/Microsoft.Graph/Generated/Models/SecurityBaselineContributingPolicy.cs index eb811c7b96d..b8aa6016337 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityBaselineContributingPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityBaselineContributingPolicy.cs @@ -91,7 +91,7 @@ public SecurityBaselineContributingPolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SecurityBaselineContributingPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityBaselineContributingPolicy(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("sourceId", SourceId); diff --git a/src/Microsoft.Graph/Generated/Models/SecurityBaselineDeviceState.cs b/src/Microsoft.Graph/Generated/Models/SecurityBaselineDeviceState.cs index 7b51894014e..a0d98388e41 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityBaselineDeviceState.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityBaselineDeviceState.cs @@ -80,7 +80,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityBaselineDeviceState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityBaselineDeviceState(); } /// @@ -104,7 +104,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceDisplayName", DeviceDisplayName); writer.WriteDateTimeOffsetValue("lastReportedDateTime", LastReportedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/SecurityBaselineSettingState.cs b/src/Microsoft.Graph/Generated/Models/SecurityBaselineSettingState.cs index 47ec7a3732d..d0efc3d68ff 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityBaselineSettingState.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityBaselineSettingState.cs @@ -138,7 +138,7 @@ public string SettingName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingState(); } /// @@ -165,7 +165,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("contributingPolicies", ContributingPolicies); writer.WriteStringValue("errorCode", ErrorCode); diff --git a/src/Microsoft.Graph/Generated/Models/SecurityBaselineSettingStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SecurityBaselineSettingStateCollectionResponse.cs index 27fcbd13ed3..0a1431a3bfe 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityBaselineSettingStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityBaselineSettingStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SecurityBaselineSettingStateCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityBaselineSettingStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SecurityBaselineState.cs b/src/Microsoft.Graph/Generated/Models/SecurityBaselineState.cs index c67c1908d13..74e35743b61 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityBaselineState.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityBaselineState.cs @@ -90,7 +90,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityBaselineState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityBaselineState(); } /// @@ -114,7 +114,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("securityBaselineTemplateId", SecurityBaselineTemplateId); diff --git a/src/Microsoft.Graph/Generated/Models/SecurityBaselineStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SecurityBaselineStateCollectionResponse.cs index 013c1f81b2b..fbcc245d9a6 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityBaselineStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityBaselineStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SecurityBaselineStateCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityBaselineStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityBaselineStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SecurityBaselineStateSummary.cs b/src/Microsoft.Graph/Generated/Models/SecurityBaselineStateSummary.cs index 807d803e421..39ab4e72b4e 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityBaselineStateSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityBaselineStateSummary.cs @@ -56,7 +56,7 @@ public int? UnknownCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityBaselineStateSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("conflictCount", ConflictCount); writer.WriteIntValue("errorCount", ErrorCount); diff --git a/src/Microsoft.Graph/Generated/Models/SecurityBaselineTemplate.cs b/src/Microsoft.Graph/Generated/Models/SecurityBaselineTemplate.cs index b8c0cb5acc7..54462917614 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityBaselineTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityBaselineTemplate.cs @@ -75,7 +75,7 @@ public SecurityBaselineTemplate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityBaselineTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityBaselineTemplate(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("categoryDeviceStateSummaries", CategoryDeviceStateSummaries); writer.WriteCollectionOfObjectValues("deviceStates", DeviceStates); diff --git a/src/Microsoft.Graph/Generated/Models/SecurityConfigurationTask.cs b/src/Microsoft.Graph/Generated/Models/SecurityConfigurationTask.cs index 117cde75b15..0b95559003c 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityConfigurationTask.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityConfigurationTask.cs @@ -99,7 +99,7 @@ public SecurityConfigurationTask() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityConfigurationTask CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityConfigurationTask(); } /// @@ -125,7 +125,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("applicablePlatform", ApplicablePlatform); writer.WriteEnumValue("endpointSecurityPolicy", EndpointSecurityPolicy); diff --git a/src/Microsoft.Graph/Generated/Models/SecurityReportsRoot.cs b/src/Microsoft.Graph/Generated/Models/SecurityReportsRoot.cs index 19dd223f979..b1698575546 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityReportsRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityReportsRoot.cs @@ -19,7 +19,7 @@ public partial class SecurityReportsRoot : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityReportsRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityReportsRoot(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SecurityResource.cs b/src/Microsoft.Graph/Generated/Models/SecurityResource.cs index 6384d76e4dc..dbc05b65e3a 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityResource.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityResource.cs @@ -74,7 +74,7 @@ public SecurityResource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SecurityResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityResource(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("resource", Resource); writer.WriteEnumValue("resourceType", ResourceType); diff --git a/src/Microsoft.Graph/Generated/Models/SecurityToolAwsResourceAdministratorFinding.cs b/src/Microsoft.Graph/Generated/Models/SecurityToolAwsResourceAdministratorFinding.cs index 619b53b1e1c..5f7e399a1cf 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityToolAwsResourceAdministratorFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityToolAwsResourceAdministratorFinding.cs @@ -19,7 +19,7 @@ public partial class SecurityToolAwsResourceAdministratorFinding : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityToolAwsResourceAdministratorFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityToolAwsResourceAdministratorFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SecurityToolAwsRoleAdministratorFinding.cs b/src/Microsoft.Graph/Generated/Models/SecurityToolAwsRoleAdministratorFinding.cs index ee2289c6d62..45f0e2a409d 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityToolAwsRoleAdministratorFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityToolAwsRoleAdministratorFinding.cs @@ -19,7 +19,7 @@ public partial class SecurityToolAwsRoleAdministratorFinding : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityToolAwsRoleAdministratorFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityToolAwsRoleAdministratorFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SecurityToolAwsServerlessFunctionAdministratorFinding.cs b/src/Microsoft.Graph/Generated/Models/SecurityToolAwsServerlessFunctionAdministratorFinding.cs index c5263ba8348..7b1ecd3b031 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityToolAwsServerlessFunctionAdministratorFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityToolAwsServerlessFunctionAdministratorFinding.cs @@ -19,7 +19,7 @@ public partial class SecurityToolAwsServerlessFunctionAdministratorFinding : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityToolAwsServerlessFunctionAdministratorFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityToolAwsServerlessFunctionAdministratorFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SecurityToolAwsUserAdministratorFinding.cs b/src/Microsoft.Graph/Generated/Models/SecurityToolAwsUserAdministratorFinding.cs index 337706ef331..cfa8e504d07 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityToolAwsUserAdministratorFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityToolAwsUserAdministratorFinding.cs @@ -19,7 +19,7 @@ public partial class SecurityToolAwsUserAdministratorFinding : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SecurityToolAwsUserAdministratorFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityToolAwsUserAdministratorFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SecurityVendorInformation.cs b/src/Microsoft.Graph/Generated/Models/SecurityVendorInformation.cs index 897931dfc0d..b5fafd47594 100644 --- a/src/Microsoft.Graph/Generated/Models/SecurityVendorInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/SecurityVendorInformation.cs @@ -116,7 +116,7 @@ public SecurityVendorInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SecurityVendorInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SecurityVendorInformation(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("provider", Provider); writer.WriteStringValue("providerVersion", ProviderVersion); diff --git a/src/Microsoft.Graph/Generated/Models/SegmentConfiguration.cs b/src/Microsoft.Graph/Generated/Models/SegmentConfiguration.cs index efa99191d4b..42c681dfbbd 100644 --- a/src/Microsoft.Graph/Generated/Models/SegmentConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/SegmentConfiguration.cs @@ -52,7 +52,7 @@ public SegmentConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SegmentConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/SelfServiceSignUp.cs b/src/Microsoft.Graph/Generated/Models/SelfServiceSignUp.cs index 2b55e4ca542..66017ee3f25 100644 --- a/src/Microsoft.Graph/Generated/Models/SelfServiceSignUp.cs +++ b/src/Microsoft.Graph/Generated/Models/SelfServiceSignUp.cs @@ -159,7 +159,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SelfServiceSignUp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SelfServiceSignUp(); } /// @@ -188,7 +188,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appDisplayName", AppDisplayName); writer.WriteStringValue("appId", AppId); diff --git a/src/Microsoft.Graph/Generated/Models/SelfServiceSignUpAuthenticationFlowConfiguration.cs b/src/Microsoft.Graph/Generated/Models/SelfServiceSignUpAuthenticationFlowConfiguration.cs index d5254c49087..23bd702f1be 100644 --- a/src/Microsoft.Graph/Generated/Models/SelfServiceSignUpAuthenticationFlowConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/SelfServiceSignUpAuthenticationFlowConfiguration.cs @@ -58,7 +58,7 @@ public SelfServiceSignUpAuthenticationFlowConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SelfServiceSignUpAuthenticationFlowConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SelfServiceSignUpAuthenticationFlowConfiguration(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isEnabled", IsEnabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/SelfServiceSignUpCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SelfServiceSignUpCollectionResponse.cs index f8d73748164..1528971764c 100644 --- a/src/Microsoft.Graph/Generated/Models/SelfServiceSignUpCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SelfServiceSignUpCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SelfServiceSignUpCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SelfServiceSignUpCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SelfServiceSignUpCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SelfSignedCertificate.cs b/src/Microsoft.Graph/Generated/Models/SelfSignedCertificate.cs index 8e989ee0ebd..fb48e785647 100644 --- a/src/Microsoft.Graph/Generated/Models/SelfSignedCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/SelfSignedCertificate.cs @@ -166,7 +166,7 @@ public SelfSignedCertificate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SelfSignedCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SelfSignedCertificate(); } /// @@ -195,7 +195,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("customKeyIdentifier", CustomKeyIdentifier); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/SendDtmfTonesOperation.cs b/src/Microsoft.Graph/Generated/Models/SendDtmfTonesOperation.cs index 75ef263a39a..ce3a9e04da9 100644 --- a/src/Microsoft.Graph/Generated/Models/SendDtmfTonesOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/SendDtmfTonesOperation.cs @@ -25,7 +25,7 @@ public partial class SendDtmfTonesOperation : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SendDtmfTonesOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SendDtmfTonesOperation(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("completionReason", CompletionReason); } diff --git a/src/Microsoft.Graph/Generated/Models/SensitiveContentEvidence.cs b/src/Microsoft.Graph/Generated/Models/SensitiveContentEvidence.cs index b5a91f2d9be..b58d76f48f8 100644 --- a/src/Microsoft.Graph/Generated/Models/SensitiveContentEvidence.cs +++ b/src/Microsoft.Graph/Generated/Models/SensitiveContentEvidence.cs @@ -80,7 +80,7 @@ public SensitiveContentEvidence() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SensitiveContentEvidence CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SensitiveContentEvidence(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("length", Length); writer.WriteStringValue("match", Match); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SensitiveContentLocation.cs b/src/Microsoft.Graph/Generated/Models/SensitiveContentLocation.cs index 8f64cc12a91..ea35d14f73a 100644 --- a/src/Microsoft.Graph/Generated/Models/SensitiveContentLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/SensitiveContentLocation.cs @@ -102,7 +102,7 @@ public SensitiveContentLocation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SensitiveContentLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SensitiveContentLocation(); } /// @@ -127,7 +127,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("confidence", Confidence); writer.WriteCollectionOfObjectValues("evidences", Evidences); writer.WriteStringValue("idMatch", IdMatch); diff --git a/src/Microsoft.Graph/Generated/Models/SensitiveType.cs b/src/Microsoft.Graph/Generated/Models/SensitiveType.cs index 658206021c8..a6f67c93d1d 100644 --- a/src/Microsoft.Graph/Generated/Models/SensitiveType.cs +++ b/src/Microsoft.Graph/Generated/Models/SensitiveType.cs @@ -139,7 +139,7 @@ public string State /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SensitiveType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SensitiveType(); } /// @@ -168,7 +168,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("classificationMethod", ClassificationMethod); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/SensitiveTypeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SensitiveTypeCollectionResponse.cs index c06575e24d2..40b9e5b0868 100644 --- a/src/Microsoft.Graph/Generated/Models/SensitiveTypeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SensitiveTypeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SensitiveTypeCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SensitiveTypeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SensitiveTypeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SensitivityLabel.cs b/src/Microsoft.Graph/Generated/Models/SensitivityLabel.cs index b30111a8737..21444c7050a 100644 --- a/src/Microsoft.Graph/Generated/Models/SensitivityLabel.cs +++ b/src/Microsoft.Graph/Generated/Models/SensitivityLabel.cs @@ -211,7 +211,7 @@ public string ToolTip /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SensitivityLabel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SensitivityLabel(); } /// @@ -247,7 +247,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("actionSource", ActionSource); writer.WriteEnumValue("applicableTo", ApplicableTo); diff --git a/src/Microsoft.Graph/Generated/Models/SensitivityLabelAssignment.cs b/src/Microsoft.Graph/Generated/Models/SensitivityLabelAssignment.cs index d944cbba1f1..b246b14f939 100644 --- a/src/Microsoft.Graph/Generated/Models/SensitivityLabelAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/SensitivityLabelAssignment.cs @@ -90,7 +90,7 @@ public SensitivityLabelAssignment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SensitivityLabelAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SensitivityLabelAssignment(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("assignmentMethod", AssignmentMethod); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("sensitivityLabelId", SensitivityLabelId); diff --git a/src/Microsoft.Graph/Generated/Models/SensitivityLabelCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SensitivityLabelCollectionResponse.cs index 1a8a6e38cbe..5d29c215edf 100644 --- a/src/Microsoft.Graph/Generated/Models/SensitivityLabelCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SensitivityLabelCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SensitivityLabelCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SensitivityLabelCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SensitivityLabelCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SensitivityPolicySettings.cs b/src/Microsoft.Graph/Generated/Models/SensitivityPolicySettings.cs index 681a34f35c5..d80b2d6f7d8 100644 --- a/src/Microsoft.Graph/Generated/Models/SensitivityPolicySettings.cs +++ b/src/Microsoft.Graph/Generated/Models/SensitivityPolicySettings.cs @@ -53,7 +53,7 @@ public bool? IsMandatory /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SensitivityPolicySettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SensitivityPolicySettings(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("applicableTo", ApplicableTo); writer.WriteBoolValue("downgradeSensitivityRequiresJustification", DowngradeSensitivityRequiresJustification); diff --git a/src/Microsoft.Graph/Generated/Models/SequentialActivationRenewalsAlertConfiguration.cs b/src/Microsoft.Graph/Generated/Models/SequentialActivationRenewalsAlertConfiguration.cs index b4f253e4061..211b165b3bb 100644 --- a/src/Microsoft.Graph/Generated/Models/SequentialActivationRenewalsAlertConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/SequentialActivationRenewalsAlertConfiguration.cs @@ -38,7 +38,7 @@ public SequentialActivationRenewalsAlertConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SequentialActivationRenewalsAlertConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SequentialActivationRenewalsAlertConfiguration(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("sequentialActivationCounterThreshold", SequentialActivationCounterThreshold); writer.WriteTimeSpanValue("timeIntervalBetweenActivations", TimeIntervalBetweenActivations); diff --git a/src/Microsoft.Graph/Generated/Models/SequentialActivationRenewalsAlertIncident.cs b/src/Microsoft.Graph/Generated/Models/SequentialActivationRenewalsAlertIncident.cs index 8c2c091a862..14ee7e7d45b 100644 --- a/src/Microsoft.Graph/Generated/Models/SequentialActivationRenewalsAlertIncident.cs +++ b/src/Microsoft.Graph/Generated/Models/SequentialActivationRenewalsAlertIncident.cs @@ -140,7 +140,7 @@ public SequentialActivationRenewalsAlertIncident() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SequentialActivationRenewalsAlertIncident CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SequentialActivationRenewalsAlertIncident(); } /// @@ -168,7 +168,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activationCount", ActivationCount); writer.WriteStringValue("assigneeDisplayName", AssigneeDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ServerProcessedContent.cs b/src/Microsoft.Graph/Generated/Models/ServerProcessedContent.cs index 524217a5447..63d46433742 100644 --- a/src/Microsoft.Graph/Generated/Models/ServerProcessedContent.cs +++ b/src/Microsoft.Graph/Generated/Models/ServerProcessedContent.cs @@ -148,7 +148,7 @@ public ServerProcessedContent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ServerProcessedContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServerProcessedContent(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("componentDependencies", ComponentDependencies); writer.WriteCollectionOfObjectValues("customMetadata", CustomMetadata); writer.WriteCollectionOfObjectValues("htmlStrings", HtmlStrings); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceActivity.cs b/src/Microsoft.Graph/Generated/Models/ServiceActivity.cs index 817cf673221..0b004ec3338 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceActivity.cs @@ -19,7 +19,7 @@ public partial class ServiceActivity : global::Microsoft.Graph.Beta.Models.Entit /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceActivity(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceActivityPerformanceMetric.cs b/src/Microsoft.Graph/Generated/Models/ServiceActivityPerformanceMetric.cs index c2307d4490b..df515a11ae2 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceActivityPerformanceMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceActivityPerformanceMetric.cs @@ -64,7 +64,7 @@ public ServiceActivityPerformanceMetric() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ServiceActivityPerformanceMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceActivityPerformanceMetric(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("intervalStartDateTime", IntervalStartDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDoubleValue("percentage", Percentage); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceActivityValueMetric.cs b/src/Microsoft.Graph/Generated/Models/ServiceActivityValueMetric.cs index c48cefda4a2..7e25aa5b4cc 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceActivityValueMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceActivityValueMetric.cs @@ -64,7 +64,7 @@ public ServiceActivityValueMetric() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ServiceActivityValueMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceActivityValueMetric(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("intervalStartDateTime", IntervalStartDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceAnnouncement.cs b/src/Microsoft.Graph/Generated/Models/ServiceAnnouncement.cs index f8033a8c8f6..91fc551ae9a 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceAnnouncement.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceAnnouncement.cs @@ -67,7 +67,7 @@ public partial class ServiceAnnouncement : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceAnnouncement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceAnnouncement(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("healthOverviews", HealthOverviews); writer.WriteCollectionOfObjectValues("issues", Issues); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceAnnouncementAttachment.cs b/src/Microsoft.Graph/Generated/Models/ServiceAnnouncementAttachment.cs index b4c1b647248..79858bb0741 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceAnnouncementAttachment.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceAnnouncementAttachment.cs @@ -79,7 +79,7 @@ public int? Size /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceAnnouncementAttachment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceAnnouncementAttachment(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); writer.WriteStringValue("contentType", ContentType); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceAnnouncementAttachmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ServiceAnnouncementAttachmentCollectionResponse.cs index 33095765e83..bdb3aacd879 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceAnnouncementAttachmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceAnnouncementAttachmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ServiceAnnouncementAttachmentCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceAnnouncementAttachmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceAnnouncementAttachmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceAnnouncementBase.cs b/src/Microsoft.Graph/Generated/Models/ServiceAnnouncementBase.cs index e1c2a815610..0c28ae4c53e 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceAnnouncementBase.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceAnnouncementBase.cs @@ -69,7 +69,7 @@ public string Title /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceAnnouncementBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -99,7 +99,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("details", Details); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceApp.cs b/src/Microsoft.Graph/Generated/Models/ServiceApp.cs index 84c6c5aeccb..fa986eaa10a 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceApp.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceApp.cs @@ -75,7 +75,7 @@ public DateTimeOffset? RegistrationDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceApp(); } /// @@ -100,7 +100,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("application", Application); writer.WriteDateTimeOffsetValue("effectiveDateTime", EffectiveDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ServiceAppCollectionResponse.cs index d7d8f080251..e4ad23f323f 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ServiceAppCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceHealth.cs b/src/Microsoft.Graph/Generated/Models/ServiceHealth.cs index 606e58eb847..ca24ca3bcd0 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceHealth.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceHealth.cs @@ -57,7 +57,7 @@ public string Service /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceHealth CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceHealth(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("issues", Issues); writer.WriteStringValue("service", Service); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceHealthCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ServiceHealthCollectionResponse.cs index 354fb564532..ac5e035ca85 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceHealthCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceHealthCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ServiceHealthCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceHealthCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceHealthCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceHealthIssue.cs b/src/Microsoft.Graph/Generated/Models/ServiceHealthIssue.cs index a186ecb1631..9a2b7f11716 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceHealthIssue.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceHealthIssue.cs @@ -130,7 +130,7 @@ public ServiceHealthIssue() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceHealthIssue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceHealthIssue(); } /// @@ -158,7 +158,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("classification", Classification); writer.WriteStringValue("feature", Feature); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceHealthIssueCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ServiceHealthIssueCollectionResponse.cs index 29fc6819e83..5e16df0c4f2 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceHealthIssueCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceHealthIssueCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ServiceHealthIssueCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceHealthIssueCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceHealthIssueCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceHealthIssuePost.cs b/src/Microsoft.Graph/Generated/Models/ServiceHealthIssuePost.cs index a0a50383457..83f369fd29a 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceHealthIssuePost.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceHealthIssuePost.cs @@ -80,7 +80,7 @@ public ServiceHealthIssuePost() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ServiceHealthIssuePost CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceHealthIssuePost(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteObjectValue("description", Description); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceHostedMediaConfig.cs b/src/Microsoft.Graph/Generated/Models/ServiceHostedMediaConfig.cs index fc075a735d7..5320ca6e52f 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceHostedMediaConfig.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceHostedMediaConfig.cs @@ -58,7 +58,7 @@ public ServiceHostedMediaConfig() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceHostedMediaConfig CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceHostedMediaConfig(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("liveCaptionOptions", LiveCaptionOptions); writer.WriteCollectionOfObjectValues("preFetchMedia", PreFetchMedia); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceInformation.cs b/src/Microsoft.Graph/Generated/Models/ServiceInformation.cs index 4ca2fbb9acf..cffef9a5f69 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceInformation.cs @@ -84,7 +84,7 @@ public ServiceInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ServiceInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceInformation(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("webUrl", WebUrl); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceLevelAgreementAttainment.cs b/src/Microsoft.Graph/Generated/Models/ServiceLevelAgreementAttainment.cs index 4e01ab957c9..822af943d72 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceLevelAgreementAttainment.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceLevelAgreementAttainment.cs @@ -71,7 +71,7 @@ public ServiceLevelAgreementAttainment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ServiceLevelAgreementAttainment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceLevelAgreementAttainment(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateValue("endDate", EndDate); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDoubleValue("score", Score); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceLevelAgreementRoot.cs b/src/Microsoft.Graph/Generated/Models/ServiceLevelAgreementRoot.cs index db11579afc6..914d87f49de 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceLevelAgreementRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceLevelAgreementRoot.cs @@ -35,7 +35,7 @@ public partial class ServiceLevelAgreementRoot : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceLevelAgreementRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceLevelAgreementRoot(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("azureADAuthentication", AzureADAuthentication); } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceNowAuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/ServiceNowAuthenticationMethod.cs index 8b8309b545a..1ae894e9e55 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceNowAuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceNowAuthenticationMethod.cs @@ -53,7 +53,7 @@ public ServiceNowAuthenticationMethod() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ServiceNowAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceNowConnection.cs b/src/Microsoft.Graph/Generated/Models/ServiceNowConnection.cs index 8bcbc2589d3..8e3690dd083 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceNowConnection.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceNowConnection.cs @@ -92,7 +92,7 @@ public DateTimeOffset? LastQueriedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceNowConnection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceNowConnection(); } /// @@ -118,7 +118,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("authenticationMethod", AuthenticationMethod); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceNowConnectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ServiceNowConnectionCollectionResponse.cs index a96bf043151..d129c4697e2 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceNowConnectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceNowConnectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ServiceNowConnectionCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceNowConnectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceNowConnectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceNowOauthSecretAuthentication.cs b/src/Microsoft.Graph/Generated/Models/ServiceNowOauthSecretAuthentication.cs index 4bafb031cd9..cc71e3de436 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceNowOauthSecretAuthentication.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceNowOauthSecretAuthentication.cs @@ -43,7 +43,7 @@ public ServiceNowOauthSecretAuthentication() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceNowOauthSecretAuthentication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceNowOauthSecretAuthentication(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); } diff --git a/src/Microsoft.Graph/Generated/Models/ServicePlanInfo.cs b/src/Microsoft.Graph/Generated/Models/ServicePlanInfo.cs index 3c0f6634bcc..d02099e40b2 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePlanInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePlanInfo.cs @@ -106,7 +106,7 @@ public ServicePlanInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ServicePlanInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServicePlanInfo(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appliesTo", AppliesTo); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("provisioningStatus", ProvisioningStatus); diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs index 85b7038ee91..460a9ee8b73 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs @@ -920,7 +920,7 @@ public ServicePrincipal() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServicePrincipal CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServicePrincipal(); } /// @@ -998,7 +998,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("accountEnabled", AccountEnabled); writer.WriteCollectionOfObjectValues("addIns", AddIns); diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipalCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipalCollectionResponse.cs index 3a9fc7aaf33..5d49fba598e 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipalCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipalCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ServicePrincipalCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServicePrincipalCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServicePrincipalCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationConditionSet.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationConditionSet.cs index 8897ffab370..191762fd1b1 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationConditionSet.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationConditionSet.cs @@ -79,7 +79,7 @@ public bool? CertifiedApplicationsOnly /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationConditionSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationConditionSet(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("applicationIds", ApplicationIds); writer.WriteCollectionOfPrimitiveValues("applicationPublisherIds", ApplicationPublisherIds); diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationConditionSetCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationConditionSetCollectionResponse.cs index 6a12f533f4d..702235eebd8 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationConditionSetCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationConditionSetCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ServicePrincipalCreationConditionSetCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationConditionSetCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationConditionSetCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationPolicy.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationPolicy.cs index eecc3bb7f15..849dedc0854 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationPolicy.cs @@ -64,7 +64,7 @@ public ServicePrincipalCreationPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationPolicy(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("excludes", Excludes); writer.WriteCollectionOfObjectValues("includes", Includes); diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationPolicyCollectionResponse.cs index 0d02ea77a19..5049bf099fc 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipalCreationPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ServicePrincipalCreationPolicyCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipalIdentity.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipalIdentity.cs index e183fc4c142..a8b856d897d 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipalIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipalIdentity.cs @@ -42,7 +42,7 @@ public ServicePrincipalIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServicePrincipalIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServicePrincipalIdentity(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); } diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipalLockConfiguration.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipalLockConfiguration.cs index dcfe2ee5c9b..7580585fcce 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipalLockConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipalLockConfiguration.cs @@ -82,7 +82,7 @@ public ServicePrincipalLockConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ServicePrincipalLockConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServicePrincipalLockConfiguration(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allProperties", AllProperties); writer.WriteBoolValue("credentialsWithUsageSign", CredentialsWithUsageSign); writer.WriteBoolValue("credentialsWithUsageVerify", CredentialsWithUsageVerify); diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipalRiskDetection.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipalRiskDetection.cs index 8fd6086a4be..363a63d5023 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipalRiskDetection.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipalRiskDetection.cs @@ -265,7 +265,7 @@ public string Source /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServicePrincipalRiskDetection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServicePrincipalRiskDetection(); } /// @@ -305,7 +305,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("activity", Activity); writer.WriteDateTimeOffsetValue("activityDateTime", ActivityDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipalRiskDetectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipalRiskDetectionCollectionResponse.cs index bd5957af273..c64fa1cc028 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipalRiskDetectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipalRiskDetectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ServicePrincipalRiskDetectionCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServicePrincipalRiskDetectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServicePrincipalRiskDetectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipalSignInActivity.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipalSignInActivity.cs index f4eaa7eb857..76042ae5e86 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipalSignInActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipalSignInActivity.cs @@ -115,7 +115,7 @@ public string AppId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServicePrincipalSignInActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServicePrincipalSignInActivity(); } /// @@ -140,7 +140,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteObjectValue("applicationAuthenticationClientSignInActivity", ApplicationAuthenticationClientSignInActivity); diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipalSignInActivityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipalSignInActivityCollectionResponse.cs index 8214f0bc03a..7057cef87a8 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipalSignInActivityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipalSignInActivityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ServicePrincipalSignInActivityCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServicePrincipalSignInActivityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServicePrincipalSignInActivityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceProvisioningError.cs b/src/Microsoft.Graph/Generated/Models/ServiceProvisioningError.cs index 4249bbd9b0b..2e7751def16 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceProvisioningError.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceProvisioningError.cs @@ -80,7 +80,7 @@ public ServiceProvisioningError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ServiceProvisioningError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -109,7 +109,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteBoolValue("isResolved", IsResolved); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceProvisioningErrorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ServiceProvisioningErrorCollectionResponse.cs index eaec7e3d06b..3b111781360 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceProvisioningErrorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceProvisioningErrorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ServiceProvisioningErrorCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceProvisioningErrorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceProvisioningErrorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceProvisioningLinkedResourceErrorDetail.cs b/src/Microsoft.Graph/Generated/Models/ServiceProvisioningLinkedResourceErrorDetail.cs index 0f3abb5f197..9044c98b82b 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceProvisioningLinkedResourceErrorDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceProvisioningLinkedResourceErrorDetail.cs @@ -51,7 +51,7 @@ public string Target /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceProvisioningLinkedResourceErrorDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceProvisioningLinkedResourceErrorDetail(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("propertyName", PropertyName); writer.WriteStringValue("target", Target); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceProvisioningResourceError.cs b/src/Microsoft.Graph/Generated/Models/ServiceProvisioningResourceError.cs index 7c525e439c0..df4c202ab0e 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceProvisioningResourceError.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceProvisioningResourceError.cs @@ -42,7 +42,7 @@ public ServiceProvisioningResourceError() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceProvisioningResourceError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceProvisioningResourceError(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("errors", Errors); } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceProvisioningResourceErrorDetail.cs b/src/Microsoft.Graph/Generated/Models/ServiceProvisioningResourceErrorDetail.cs index d8ff7df8c86..2ab4971b719 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceProvisioningResourceErrorDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceProvisioningResourceErrorDetail.cs @@ -100,7 +100,7 @@ public ServiceProvisioningResourceErrorDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ServiceProvisioningResourceErrorDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -128,7 +128,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("details", Details); writer.WriteStringValue("message", Message); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceProvisioningXmlError.cs b/src/Microsoft.Graph/Generated/Models/ServiceProvisioningXmlError.cs index 37fc08f90aa..df12a56d136 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceProvisioningXmlError.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceProvisioningXmlError.cs @@ -42,7 +42,7 @@ public ServiceProvisioningXmlError() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceProvisioningXmlError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceProvisioningXmlError(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("errorDetail", ErrorDetail); } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceStatus.cs b/src/Microsoft.Graph/Generated/Models/ServiceStatus.cs index 9964424a661..0d49832df8c 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceStatus.cs @@ -104,7 +104,7 @@ public ServiceStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ServiceStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceStatus(); } /// @@ -131,7 +131,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("backupServiceConsumer", BackupServiceConsumer); writer.WriteEnumValue("disableReason", DisableReason); writer.WriteDateTimeOffsetValue("gracePeriodDateTime", GracePeriodDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceStorageQuotaBreakdown.cs b/src/Microsoft.Graph/Generated/Models/ServiceStorageQuotaBreakdown.cs index 033f4f11d09..57fa9a59502 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceStorageQuotaBreakdown.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceStorageQuotaBreakdown.cs @@ -19,7 +19,7 @@ public partial class ServiceStorageQuotaBreakdown : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceStorageQuotaBreakdown CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceStorageQuotaBreakdown(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceStorageQuotaBreakdownCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ServiceStorageQuotaBreakdownCollectionResponse.cs index 268f998b758..1da28e06718 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceStorageQuotaBreakdownCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceStorageQuotaBreakdownCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ServiceStorageQuotaBreakdownCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceStorageQuotaBreakdownCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceStorageQuotaBreakdownCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceUpdateMessage.cs b/src/Microsoft.Graph/Generated/Models/ServiceUpdateMessage.cs index 8edcc70ebbd..cde5528b12e 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceUpdateMessage.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceUpdateMessage.cs @@ -152,7 +152,7 @@ public ServiceUpdateMessage() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceUpdateMessage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceUpdateMessage(); } /// @@ -182,7 +182,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("actionRequiredByDateTime", ActionRequiredByDateTime); writer.WriteCollectionOfObjectValues("attachments", Attachments); diff --git a/src/Microsoft.Graph/Generated/Models/ServiceUpdateMessageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ServiceUpdateMessageCollectionResponse.cs index 05770ad0607..56f7f343c63 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceUpdateMessageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceUpdateMessageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ServiceUpdateMessageCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ServiceUpdateMessageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceUpdateMessageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ServiceUpdateMessageViewpoint.cs b/src/Microsoft.Graph/Generated/Models/ServiceUpdateMessageViewpoint.cs index 3b95d97f95d..d6d0fd96851 100644 --- a/src/Microsoft.Graph/Generated/Models/ServiceUpdateMessageViewpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/ServiceUpdateMessageViewpoint.cs @@ -70,7 +70,7 @@ public ServiceUpdateMessageViewpoint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ServiceUpdateMessageViewpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ServiceUpdateMessageViewpoint(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isArchived", IsArchived); writer.WriteBoolValue("isFavorited", IsFavorited); writer.WriteBoolValue("isRead", IsRead); diff --git a/src/Microsoft.Graph/Generated/Models/SessionLifetimePolicy.cs b/src/Microsoft.Graph/Generated/Models/SessionLifetimePolicy.cs index 524715726a4..a325464cc05 100644 --- a/src/Microsoft.Graph/Generated/Models/SessionLifetimePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/SessionLifetimePolicy.cs @@ -74,7 +74,7 @@ public SessionLifetimePolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SessionLifetimePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SessionLifetimePolicy(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("detail", Detail); writer.WriteEnumValue("expirationRequirement", ExpirationRequirement); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SettingSource.cs b/src/Microsoft.Graph/Generated/Models/SettingSource.cs index 9cea5e94f18..94b5e933005 100644 --- a/src/Microsoft.Graph/Generated/Models/SettingSource.cs +++ b/src/Microsoft.Graph/Generated/Models/SettingSource.cs @@ -90,7 +90,7 @@ public SettingSource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SettingSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SettingSource(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SettingStateDeviceSummary.cs b/src/Microsoft.Graph/Generated/Models/SettingStateDeviceSummary.cs index a7063a557cf..2615a55076d 100644 --- a/src/Microsoft.Graph/Generated/Models/SettingStateDeviceSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/SettingStateDeviceSummary.cs @@ -94,7 +94,7 @@ public int? UnknownDeviceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SettingStateDeviceSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SettingStateDeviceSummary(); } /// @@ -122,7 +122,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("compliantDeviceCount", CompliantDeviceCount); writer.WriteIntValue("conflictDeviceCount", ConflictDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/SettingStateDeviceSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SettingStateDeviceSummaryCollectionResponse.cs index 9726faa8f6b..a59cd190b8b 100644 --- a/src/Microsoft.Graph/Generated/Models/SettingStateDeviceSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SettingStateDeviceSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SettingStateDeviceSummaryCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SettingStateDeviceSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SettingStateDeviceSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SettingTemplateValue.cs b/src/Microsoft.Graph/Generated/Models/SettingTemplateValue.cs index fde019f79c8..b9253073460 100644 --- a/src/Microsoft.Graph/Generated/Models/SettingTemplateValue.cs +++ b/src/Microsoft.Graph/Generated/Models/SettingTemplateValue.cs @@ -116,7 +116,7 @@ public SettingTemplateValue() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SettingTemplateValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SettingTemplateValue(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("defaultValue", DefaultValue); writer.WriteStringValue("description", Description); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/SettingValue.cs b/src/Microsoft.Graph/Generated/Models/SettingValue.cs index 0b09833397f..3825ddcb892 100644 --- a/src/Microsoft.Graph/Generated/Models/SettingValue.cs +++ b/src/Microsoft.Graph/Generated/Models/SettingValue.cs @@ -84,7 +84,7 @@ public SettingValue() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SettingValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SettingValue(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/Settings.cs b/src/Microsoft.Graph/Generated/Models/Settings.cs index 8bc199298a8..5e6fb3c9cc8 100644 --- a/src/Microsoft.Graph/Generated/Models/Settings.cs +++ b/src/Microsoft.Graph/Generated/Models/Settings.cs @@ -70,7 +70,7 @@ public Settings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Settings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Settings(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("hasGraphMailbox", HasGraphMailbox); writer.WriteBoolValue("hasLicense", HasLicense); writer.WriteBoolValue("hasOptedOut", HasOptedOut); diff --git a/src/Microsoft.Graph/Generated/Models/ShareAction.cs b/src/Microsoft.Graph/Generated/Models/ShareAction.cs index 6c7fd0ecec3..758caf3b0d8 100644 --- a/src/Microsoft.Graph/Generated/Models/ShareAction.cs +++ b/src/Microsoft.Graph/Generated/Models/ShareAction.cs @@ -68,7 +68,7 @@ public ShareAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ShareAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ShareAction(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("recipients", Recipients); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/SharePointGroup.cs b/src/Microsoft.Graph/Generated/Models/SharePointGroup.cs index 685c8c199ec..36fed76f416 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointGroup.cs @@ -67,7 +67,7 @@ public string Title /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointGroup(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteCollectionOfObjectValues("members", Members); diff --git a/src/Microsoft.Graph/Generated/Models/SharePointGroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SharePointGroupCollectionResponse.cs index 3019e567af4..77f410275da 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointGroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointGroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SharePointGroupCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointGroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointGroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SharePointGroupMember.cs b/src/Microsoft.Graph/Generated/Models/SharePointGroupMember.cs index c7181c08bc6..98a118fdd2c 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointGroupMember.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointGroupMember.cs @@ -35,7 +35,7 @@ public partial class SharePointGroupMember : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointGroupMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointGroupMember(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("identity", Identity); } diff --git a/src/Microsoft.Graph/Generated/Models/SharePointGroupMemberCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SharePointGroupMemberCollectionResponse.cs index 8293e427263..d05345b3c5d 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointGroupMemberCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointGroupMemberCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SharePointGroupMemberCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointGroupMemberCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointGroupMemberCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SharePointIdentity.cs b/src/Microsoft.Graph/Generated/Models/SharePointIdentity.cs index 11e6c43bdb4..c7d58ed737a 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointIdentity.cs @@ -42,7 +42,7 @@ public SharePointIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointIdentity(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("loginName", LoginName); } diff --git a/src/Microsoft.Graph/Generated/Models/SharePointIdentitySet.cs b/src/Microsoft.Graph/Generated/Models/SharePointIdentitySet.cs index 1e9aeb18388..fe32ca78a52 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointIdentitySet.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointIdentitySet.cs @@ -74,7 +74,7 @@ public SharePointIdentitySet() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointIdentitySet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointIdentitySet(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("group", Group); writer.WriteObjectValue("siteGroup", SiteGroup); diff --git a/src/Microsoft.Graph/Generated/Models/SharePointMigrationContainerInfo.cs b/src/Microsoft.Graph/Generated/Models/SharePointMigrationContainerInfo.cs index 3a1ee09196d..c1e3f5c887b 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointMigrationContainerInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointMigrationContainerInfo.cs @@ -100,7 +100,7 @@ public SharePointMigrationContainerInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SharePointMigrationContainerInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointMigrationContainerInfo(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("dataContainerUri", DataContainerUri); writer.WriteStringValue("encryptionKey", EncryptionKey); writer.WriteStringValue("metadataContainerUri", MetadataContainerUri); diff --git a/src/Microsoft.Graph/Generated/Models/SharePointMigrationEvent.cs b/src/Microsoft.Graph/Generated/Models/SharePointMigrationEvent.cs index 231b751fe94..f953dda0f7c 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointMigrationEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointMigrationEvent.cs @@ -57,7 +57,7 @@ public string JobId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointMigrationEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -91,7 +91,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("correlationId", CorrelationId); writer.WriteDateTimeOffsetValue("eventDateTime", EventDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/SharePointMigrationEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SharePointMigrationEventCollectionResponse.cs index e868553ac4a..afa585aec99 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointMigrationEventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointMigrationEventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SharePointMigrationEventCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointMigrationEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointMigrationEventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SharePointMigrationFinishManifestFileUploadEvent.cs b/src/Microsoft.Graph/Generated/Models/SharePointMigrationFinishManifestFileUploadEvent.cs index 7463e94718c..9472cce1dac 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointMigrationFinishManifestFileUploadEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointMigrationFinishManifestFileUploadEvent.cs @@ -35,7 +35,7 @@ public string ManifestFileName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointMigrationFinishManifestFileUploadEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointMigrationFinishManifestFileUploadEvent(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("manifestFileName", ManifestFileName); } diff --git a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJob.cs b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJob.cs index f5f97218d06..611b62336fe 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJob.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJob.cs @@ -51,7 +51,7 @@ public partial class SharePointMigrationJob : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointMigrationJob CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointMigrationJob(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("containerInfo", ContainerInfo); writer.WriteCollectionOfObjectValues("progressEvents", ProgressEvents); diff --git a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobCancelledEvent.cs b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobCancelledEvent.cs index a06f964c4ac..eb2bdf0db8e 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobCancelledEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobCancelledEvent.cs @@ -31,7 +31,7 @@ public int? TotalRetryCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobCancelledEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobCancelledEvent(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isCancelledByUser", IsCancelledByUser); writer.WriteIntValue("totalRetryCount", TotalRetryCount); diff --git a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobCollectionResponse.cs index b7a9f36c9ab..63466cc9124 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SharePointMigrationJobCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobDeletedEvent.cs b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobDeletedEvent.cs index 5575d6d434c..622177d97eb 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobDeletedEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobDeletedEvent.cs @@ -19,7 +19,7 @@ public partial class SharePointMigrationJobDeletedEvent : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobDeletedEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobDeletedEvent(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobErrorEvent.cs b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobErrorEvent.cs index ab5d8f42394..0369f95aea5 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobErrorEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobErrorEvent.cs @@ -85,7 +85,7 @@ public int? TotalRetryCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobErrorEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobErrorEvent(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("error", Error); writer.WriteEnumValue("errorLevel", ErrorLevel); diff --git a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobPostponedEvent.cs b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobPostponedEvent.cs index 635db71ed4a..56e4a8ba656 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobPostponedEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobPostponedEvent.cs @@ -53,7 +53,7 @@ public int? TotalRetryCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobPostponedEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobPostponedEvent(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("jobsInQueue", JobsInQueue); writer.WriteDateTimeOffsetValue("nextPickupDateTime", NextPickupDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobProgressEvent.cs b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobProgressEvent.cs index c44728a4449..4dc22a5bb09 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobProgressEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobProgressEvent.cs @@ -131,7 +131,7 @@ public long? WaitTimeOnSqlThrottlingMs /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobProgressEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobProgressEvent(); } /// @@ -167,7 +167,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("bytesProcessed", BytesProcessed); writer.WriteLongValue("bytesProcessedOnlyCurrentVersion", BytesProcessedOnlyCurrentVersion); diff --git a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobQueuedEvent.cs b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobQueuedEvent.cs index 032697a1759..bf5baab742d 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobQueuedEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobQueuedEvent.cs @@ -19,7 +19,7 @@ public partial class SharePointMigrationJobQueuedEvent : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobQueuedEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobQueuedEvent(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobStartEvent.cs b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobStartEvent.cs index 7d436d34116..fd14bfc5ee3 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobStartEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointMigrationJobStartEvent.cs @@ -31,7 +31,7 @@ public int? TotalRetryCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobStartEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointMigrationJobStartEvent(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isRestarted", IsRestarted); writer.WriteIntValue("totalRetryCount", TotalRetryCount); diff --git a/src/Microsoft.Graph/Generated/Models/SharePointOneDriveOptions.cs b/src/Microsoft.Graph/Generated/Models/SharePointOneDriveOptions.cs index e9ec584eea4..37f7129604b 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointOneDriveOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointOneDriveOptions.cs @@ -58,7 +58,7 @@ public SharePointOneDriveOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SharePointOneDriveOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointOneDriveOptions(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("includeContent", IncludeContent); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/SharePointProtectionPolicy.cs b/src/Microsoft.Graph/Generated/Models/SharePointProtectionPolicy.cs index f4ad3fa22ad..bebedcdb2a0 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointProtectionPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointProtectionPolicy.cs @@ -74,7 +74,7 @@ public SharePointProtectionPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointProtectionPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointProtectionPolicy(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("siteInclusionRules", SiteInclusionRules); writer.WriteCollectionOfObjectValues("siteProtectionUnits", SiteProtectionUnits); diff --git a/src/Microsoft.Graph/Generated/Models/SharePointProtectionPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SharePointProtectionPolicyCollectionResponse.cs index e85c17f7d66..2ce3e2ad9e9 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointProtectionPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointProtectionPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SharePointProtectionPolicyCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointProtectionPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointProtectionPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SharePointRestoreSession.cs b/src/Microsoft.Graph/Generated/Models/SharePointRestoreSession.cs index 255f62a3f60..bf8d2806320 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointRestoreSession.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointRestoreSession.cs @@ -58,7 +58,7 @@ public SharePointRestoreSession() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointRestoreSession CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointRestoreSession(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("siteRestoreArtifacts", SiteRestoreArtifacts); writer.WriteCollectionOfObjectValues("siteRestoreArtifactsBulkAdditionRequests", SiteRestoreArtifactsBulkAdditionRequests); diff --git a/src/Microsoft.Graph/Generated/Models/SharePointRestoreSessionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SharePointRestoreSessionCollectionResponse.cs index 1b42baefeae..a1c150d473a 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointRestoreSessionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointRestoreSessionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SharePointRestoreSessionCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharePointRestoreSessionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointRestoreSessionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SharePointSharingAbilities.cs b/src/Microsoft.Graph/Generated/Models/SharePointSharingAbilities.cs index 1843ecb939d..38199704eba 100644 --- a/src/Microsoft.Graph/Generated/Models/SharePointSharingAbilities.cs +++ b/src/Microsoft.Graph/Generated/Models/SharePointSharingAbilities.cs @@ -116,7 +116,7 @@ public SharePointSharingAbilities() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SharePointSharingAbilities CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharePointSharingAbilities(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("anyoneLinkAbilities", AnyoneLinkAbilities); writer.WriteObjectValue("directSharingAbilities", DirectSharingAbilities); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Shared.cs b/src/Microsoft.Graph/Generated/Models/Shared.cs index dff14ea91c7..8805d4209a1 100644 --- a/src/Microsoft.Graph/Generated/Models/Shared.cs +++ b/src/Microsoft.Graph/Generated/Models/Shared.cs @@ -106,7 +106,7 @@ public Shared() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Shared CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Shared(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("owner", Owner); writer.WriteStringValue("scope", Scope); diff --git a/src/Microsoft.Graph/Generated/Models/SharedAppleDeviceUser.cs b/src/Microsoft.Graph/Generated/Models/SharedAppleDeviceUser.cs index 81d42a13c3c..2d7e34ba992 100644 --- a/src/Microsoft.Graph/Generated/Models/SharedAppleDeviceUser.cs +++ b/src/Microsoft.Graph/Generated/Models/SharedAppleDeviceUser.cs @@ -86,7 +86,7 @@ public SharedAppleDeviceUser() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SharedAppleDeviceUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharedAppleDeviceUser(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("dataQuota", DataQuota); writer.WriteBoolValue("dataToSync", DataToSync); writer.WriteLongValue("dataUsed", DataUsed); diff --git a/src/Microsoft.Graph/Generated/Models/SharedDriveItem.cs b/src/Microsoft.Graph/Generated/Models/SharedDriveItem.cs index 2d43bd6bdbf..4d32762d560 100644 --- a/src/Microsoft.Graph/Generated/Models/SharedDriveItem.cs +++ b/src/Microsoft.Graph/Generated/Models/SharedDriveItem.cs @@ -154,7 +154,7 @@ public SharedDriveItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharedDriveItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharedDriveItem(); } /// @@ -181,7 +181,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("driveItem", DriveItem); writer.WriteCollectionOfObjectValues("items", Items); diff --git a/src/Microsoft.Graph/Generated/Models/SharedDriveItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SharedDriveItemCollectionResponse.cs index 3580ecd37c9..3726197fc67 100644 --- a/src/Microsoft.Graph/Generated/Models/SharedDriveItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SharedDriveItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SharedDriveItemCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharedDriveItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharedDriveItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SharedEmailDomain.cs b/src/Microsoft.Graph/Generated/Models/SharedEmailDomain.cs index 1c59f7a5803..7b8d94f05dd 100644 --- a/src/Microsoft.Graph/Generated/Models/SharedEmailDomain.cs +++ b/src/Microsoft.Graph/Generated/Models/SharedEmailDomain.cs @@ -35,7 +35,7 @@ public string ProvisioningStatus /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharedEmailDomain CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharedEmailDomain(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("provisioningStatus", ProvisioningStatus); } diff --git a/src/Microsoft.Graph/Generated/Models/SharedEmailDomainCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SharedEmailDomainCollectionResponse.cs index 3710ba2eded..4ac4ace657d 100644 --- a/src/Microsoft.Graph/Generated/Models/SharedEmailDomainCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SharedEmailDomainCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SharedEmailDomainCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharedEmailDomainCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharedEmailDomainCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SharedEmailDomainInvitation.cs b/src/Microsoft.Graph/Generated/Models/SharedEmailDomainInvitation.cs index ad6afce084e..db70dce8c9c 100644 --- a/src/Microsoft.Graph/Generated/Models/SharedEmailDomainInvitation.cs +++ b/src/Microsoft.Graph/Generated/Models/SharedEmailDomainInvitation.cs @@ -57,7 +57,7 @@ public string InvitationStatus /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharedEmailDomainInvitation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharedEmailDomainInvitation(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("expiryTime", ExpiryTime); writer.WriteStringValue("invitationDomain", InvitationDomain); diff --git a/src/Microsoft.Graph/Generated/Models/SharedEmailDomainInvitationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SharedEmailDomainInvitationCollectionResponse.cs index 33ba451f78c..af53dca7c4b 100644 --- a/src/Microsoft.Graph/Generated/Models/SharedEmailDomainInvitationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SharedEmailDomainInvitationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SharedEmailDomainInvitationCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharedEmailDomainInvitationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharedEmailDomainInvitationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SharedInsight.cs b/src/Microsoft.Graph/Generated/Models/SharedInsight.cs index e6a86e43319..80968d78e58 100644 --- a/src/Microsoft.Graph/Generated/Models/SharedInsight.cs +++ b/src/Microsoft.Graph/Generated/Models/SharedInsight.cs @@ -115,7 +115,7 @@ public partial class SharedInsight : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharedInsight CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharedInsight(); } /// @@ -140,7 +140,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("lastShared", LastShared); writer.WriteObjectValue("lastSharedMethod", LastSharedMethod); diff --git a/src/Microsoft.Graph/Generated/Models/SharedInsightCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SharedInsightCollectionResponse.cs index 71b283a6057..9abf2943d4e 100644 --- a/src/Microsoft.Graph/Generated/Models/SharedInsightCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SharedInsightCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SharedInsightCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharedInsightCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharedInsightCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SharedPCAccountManagerPolicy.cs b/src/Microsoft.Graph/Generated/Models/SharedPCAccountManagerPolicy.cs index b475d353af8..6c121a9c345 100644 --- a/src/Microsoft.Graph/Generated/Models/SharedPCAccountManagerPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/SharedPCAccountManagerPolicy.cs @@ -77,7 +77,7 @@ public SharedPCAccountManagerPolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SharedPCAccountManagerPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharedPCAccountManagerPolicy(); } /// @@ -101,7 +101,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("accountDeletionPolicy", AccountDeletionPolicy); writer.WriteIntValue("cacheAccountsAboveDiskFreePercentage", CacheAccountsAboveDiskFreePercentage); writer.WriteIntValue("inactiveThresholdDays", InactiveThresholdDays); diff --git a/src/Microsoft.Graph/Generated/Models/SharedPCConfiguration.cs b/src/Microsoft.Graph/Generated/Models/SharedPCConfiguration.cs index c116ba1e614..dc13cba8c78 100644 --- a/src/Microsoft.Graph/Generated/Models/SharedPCConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/SharedPCConfiguration.cs @@ -166,7 +166,7 @@ public SharedPCConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharedPCConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharedPCConfiguration(); } /// @@ -203,7 +203,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("accountManagerPolicy", AccountManagerPolicy); writer.WriteEnumValue("allowedAccounts", AllowedAccounts); diff --git a/src/Microsoft.Graph/Generated/Models/SharedWithChannelTeamInfo.cs b/src/Microsoft.Graph/Generated/Models/SharedWithChannelTeamInfo.cs index d2a8d415b4b..ed5f3795819 100644 --- a/src/Microsoft.Graph/Generated/Models/SharedWithChannelTeamInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/SharedWithChannelTeamInfo.cs @@ -41,7 +41,7 @@ public bool? IsHostTeam /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharedWithChannelTeamInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharedWithChannelTeamInfo(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("allowedMembers", AllowedMembers); writer.WriteBoolValue("isHostTeam", IsHostTeam); diff --git a/src/Microsoft.Graph/Generated/Models/SharedWithChannelTeamInfoCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SharedWithChannelTeamInfoCollectionResponse.cs index a41258f9491..c02a5c3eedc 100644 --- a/src/Microsoft.Graph/Generated/Models/SharedWithChannelTeamInfoCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SharedWithChannelTeamInfoCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SharedWithChannelTeamInfoCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharedWithChannelTeamInfoCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharedWithChannelTeamInfoCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Sharepoint.cs b/src/Microsoft.Graph/Generated/Models/Sharepoint.cs index fa0fc3582d7..d9081ac6d99 100644 --- a/src/Microsoft.Graph/Generated/Models/Sharepoint.cs +++ b/src/Microsoft.Graph/Generated/Models/Sharepoint.cs @@ -35,7 +35,7 @@ public partial class Sharepoint : global::Microsoft.Graph.Beta.Models.Entity, IP /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Sharepoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Sharepoint(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("settings", Settings); } diff --git a/src/Microsoft.Graph/Generated/Models/SharepointIds.cs b/src/Microsoft.Graph/Generated/Models/SharepointIds.cs index e7b6353abc3..314d7349095 100644 --- a/src/Microsoft.Graph/Generated/Models/SharepointIds.cs +++ b/src/Microsoft.Graph/Generated/Models/SharepointIds.cs @@ -164,7 +164,7 @@ public SharepointIds() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SharepointIds CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharepointIds(); } /// @@ -191,7 +191,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("listId", ListId); writer.WriteStringValue("listItemId", ListItemId); writer.WriteStringValue("listItemUniqueId", ListItemUniqueId); diff --git a/src/Microsoft.Graph/Generated/Models/SharepointSettings.cs b/src/Microsoft.Graph/Generated/Models/SharepointSettings.cs index 1f43758c54b..d98b2366500 100644 --- a/src/Microsoft.Graph/Generated/Models/SharepointSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/SharepointSettings.cs @@ -273,7 +273,7 @@ public string TenantDefaultTimezone /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SharepointSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharepointSettings(); } /// @@ -321,7 +321,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("allowedDomainGuidsForSyncApp", AllowedDomainGuidsForSyncApp); writer.WriteCollectionOfPrimitiveValues("availableManagedPathsForSiteCreation", AvailableManagedPathsForSiteCreation); diff --git a/src/Microsoft.Graph/Generated/Models/SharingDetail.cs b/src/Microsoft.Graph/Generated/Models/SharingDetail.cs index 49950b5d774..67020cbcd9c 100644 --- a/src/Microsoft.Graph/Generated/Models/SharingDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/SharingDetail.cs @@ -122,7 +122,7 @@ public SharingDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SharingDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharingDetail(); } /// @@ -147,7 +147,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("sharedBy", SharedBy); writer.WriteDateTimeOffsetValue("sharedDateTime", SharedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/SharingInvitation.cs b/src/Microsoft.Graph/Generated/Models/SharingInvitation.cs index d2ae7c337f3..04f04e7581d 100644 --- a/src/Microsoft.Graph/Generated/Models/SharingInvitation.cs +++ b/src/Microsoft.Graph/Generated/Models/SharingInvitation.cs @@ -106,7 +106,7 @@ public SharingInvitation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SharingInvitation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharingInvitation(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("email", Email); writer.WriteObjectValue("invitedBy", InvitedBy); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SharingLink.cs b/src/Microsoft.Graph/Generated/Models/SharingLink.cs index 761045b3ed5..6b7d6bd68d2 100644 --- a/src/Microsoft.Graph/Generated/Models/SharingLink.cs +++ b/src/Microsoft.Graph/Generated/Models/SharingLink.cs @@ -154,7 +154,7 @@ public SharingLink() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SharingLink CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharingLink(); } /// @@ -181,7 +181,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("application", Application); writer.WriteStringValue("configuratorUrl", ConfiguratorUrl); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SharingLinkExpirationStatus.cs b/src/Microsoft.Graph/Generated/Models/SharingLinkExpirationStatus.cs index 9d8eec0f68e..dff26c3db5a 100644 --- a/src/Microsoft.Graph/Generated/Models/SharingLinkExpirationStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/SharingLinkExpirationStatus.cs @@ -80,7 +80,7 @@ public SharingLinkExpirationStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SharingLinkExpirationStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharingLinkExpirationStatus(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("defaultExpirationInDays", DefaultExpirationInDays); writer.WriteStringValue("disabledReason", DisabledReason); writer.WriteBoolValue("enabled", Enabled); diff --git a/src/Microsoft.Graph/Generated/Models/SharingLinkVariants.cs b/src/Microsoft.Graph/Generated/Models/SharingLinkVariants.cs index 5d087ffe4fa..3aab7d881ff 100644 --- a/src/Microsoft.Graph/Generated/Models/SharingLinkVariants.cs +++ b/src/Microsoft.Graph/Generated/Models/SharingLinkVariants.cs @@ -106,7 +106,7 @@ public SharingLinkVariants() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SharingLinkVariants CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharingLinkVariants(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("addressBarLinkPermission", AddressBarLinkPermission); writer.WriteObjectValue("allowEmbed", AllowEmbed); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SharingOperationStatus.cs b/src/Microsoft.Graph/Generated/Models/SharingOperationStatus.cs index c1eb5af2c73..d52c5ee666f 100644 --- a/src/Microsoft.Graph/Generated/Models/SharingOperationStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/SharingOperationStatus.cs @@ -74,7 +74,7 @@ public SharingOperationStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SharingOperationStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharingOperationStatus(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("disabledReason", DisabledReason); writer.WriteBoolValue("enabled", Enabled); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SharingViewpoint.cs b/src/Microsoft.Graph/Generated/Models/SharingViewpoint.cs index 0066623f4b8..de489340078 100644 --- a/src/Microsoft.Graph/Generated/Models/SharingViewpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/SharingViewpoint.cs @@ -84,7 +84,7 @@ public SharingViewpoint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SharingViewpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SharingViewpoint(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("defaultSharingLink", DefaultSharingLink); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("sharingAbilities", SharingAbilities); diff --git a/src/Microsoft.Graph/Generated/Models/Shift.cs b/src/Microsoft.Graph/Generated/Models/Shift.cs index 8258beed553..807e1e9159a 100644 --- a/src/Microsoft.Graph/Generated/Models/Shift.cs +++ b/src/Microsoft.Graph/Generated/Models/Shift.cs @@ -144,7 +144,7 @@ public Shift() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Shift CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Shift(); } /// @@ -171,7 +171,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("draftShift", DraftShift); writer.WriteBoolValue("isStagedForDeletion", IsStagedForDeletion); diff --git a/src/Microsoft.Graph/Generated/Models/ShiftActivity.cs b/src/Microsoft.Graph/Generated/Models/ShiftActivity.cs index e3b738fcac7..911172a8aea 100644 --- a/src/Microsoft.Graph/Generated/Models/ShiftActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/ShiftActivity.cs @@ -108,7 +108,7 @@ public ShiftActivity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ShiftActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ShiftActivity(); } /// @@ -134,7 +134,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/ShiftAvailability.cs b/src/Microsoft.Graph/Generated/Models/ShiftAvailability.cs index 956f3781cea..1c25d8d98bb 100644 --- a/src/Microsoft.Graph/Generated/Models/ShiftAvailability.cs +++ b/src/Microsoft.Graph/Generated/Models/ShiftAvailability.cs @@ -100,7 +100,7 @@ public ShiftAvailability() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ShiftAvailability CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ShiftAvailability(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("recurrence", Recurrence); writer.WriteCollectionOfObjectValues("timeSlots", TimeSlots); diff --git a/src/Microsoft.Graph/Generated/Models/ShiftCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ShiftCollectionResponse.cs index 4fb995a3497..3961305dea7 100644 --- a/src/Microsoft.Graph/Generated/Models/ShiftCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ShiftCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ShiftCollectionResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ShiftCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ShiftCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ShiftItem.cs b/src/Microsoft.Graph/Generated/Models/ShiftItem.cs index 3086abe9471..a4021aeb681 100644 --- a/src/Microsoft.Graph/Generated/Models/ShiftItem.cs +++ b/src/Microsoft.Graph/Generated/Models/ShiftItem.cs @@ -67,7 +67,7 @@ public string Notes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ShiftItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("activities", Activities); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ShiftPreferences.cs b/src/Microsoft.Graph/Generated/Models/ShiftPreferences.cs index 79eb51ccb01..c1ee3fa8d62 100644 --- a/src/Microsoft.Graph/Generated/Models/ShiftPreferences.cs +++ b/src/Microsoft.Graph/Generated/Models/ShiftPreferences.cs @@ -42,7 +42,7 @@ public ShiftPreferences() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ShiftPreferences CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ShiftPreferences(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("availability", Availability); } diff --git a/src/Microsoft.Graph/Generated/Models/ShiftsRoleDefinition.cs b/src/Microsoft.Graph/Generated/Models/ShiftsRoleDefinition.cs index 121f4628544..7ace712cade 100644 --- a/src/Microsoft.Graph/Generated/Models/ShiftsRoleDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/ShiftsRoleDefinition.cs @@ -67,7 +67,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ShiftsRoleDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ShiftsRoleDefinition(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/ShiftsRoleDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ShiftsRoleDefinitionCollectionResponse.cs index 22a74138797..266f1f6129b 100644 --- a/src/Microsoft.Graph/Generated/Models/ShiftsRoleDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ShiftsRoleDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ShiftsRoleDefinitionCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ShiftsRoleDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ShiftsRoleDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ShiftsRolePermission.cs b/src/Microsoft.Graph/Generated/Models/ShiftsRolePermission.cs index 5d3de7bc93a..259b123b56d 100644 --- a/src/Microsoft.Graph/Generated/Models/ShiftsRolePermission.cs +++ b/src/Microsoft.Graph/Generated/Models/ShiftsRolePermission.cs @@ -68,7 +68,7 @@ public ShiftsRolePermission() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ShiftsRolePermission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ShiftsRolePermission(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("allowedResourceActions", AllowedResourceActions); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ShiftsTeamInfo.cs b/src/Microsoft.Graph/Generated/Models/ShiftsTeamInfo.cs index d08da444caf..556a64cf3f5 100644 --- a/src/Microsoft.Graph/Generated/Models/ShiftsTeamInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ShiftsTeamInfo.cs @@ -84,7 +84,7 @@ public ShiftsTeamInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ShiftsTeamInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ShiftsTeamInfo(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("teamId", TeamId); diff --git a/src/Microsoft.Graph/Generated/Models/ShiftsUserInfo.cs b/src/Microsoft.Graph/Generated/Models/ShiftsUserInfo.cs index 3a71d8306ca..cadb1876c8e 100644 --- a/src/Microsoft.Graph/Generated/Models/ShiftsUserInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ShiftsUserInfo.cs @@ -84,7 +84,7 @@ public ShiftsUserInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ShiftsUserInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ShiftsUserInfo(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("userId", UserId); diff --git a/src/Microsoft.Graph/Generated/Models/ShipmentMethod.cs b/src/Microsoft.Graph/Generated/Models/ShipmentMethod.cs index a18f0c61f59..a0106d41c26 100644 --- a/src/Microsoft.Graph/Generated/Models/ShipmentMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/ShipmentMethod.cs @@ -96,7 +96,7 @@ public ShipmentMethod() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ShipmentMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ShipmentMethod(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("displayName", DisplayName); writer.WriteGuidValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/ShipmentMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ShipmentMethodCollectionResponse.cs index 743b0fba43c..adfff3af975 100644 --- a/src/Microsoft.Graph/Generated/Models/ShipmentMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ShipmentMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ShipmentMethodCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ShipmentMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ShipmentMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SignIn.cs b/src/Microsoft.Graph/Generated/Models/SignIn.cs index 06f562b01c2..02362d538cf 100644 --- a/src/Microsoft.Graph/Generated/Models/SignIn.cs +++ b/src/Microsoft.Graph/Generated/Models/SignIn.cs @@ -217,7 +217,7 @@ public List AuthenticationMethodsUsed get { return BackingStore?.Get("authenticationProtocol"); } set { BackingStore?.Set("authenticationProtocol", value); } } - /// The authentication requirement as explicitly requested by a resource provider. Does not account for previously satisfied claims. If primary authentication fails, the sign-in attempt is not evaluated by Conditional Access, so the resulting value is SingleFactorAuthentication. Supports $filter (eq, startsWith). + /// The authentication stage reached during sign-in. It doesn't account for previously satisfied claims. If primary authentication fails, the sign-in attempt is not evaluated by Conditional Access, so the resulting value is singleFactorAuthentication. Supports $filter (eq, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? AuthenticationRequirement @@ -1000,7 +1000,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SignIn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SignIn(); } /// @@ -1094,7 +1094,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("agent", Agent); writer.WriteStringValue("appDisplayName", AppDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/SignInActivity.cs b/src/Microsoft.Graph/Generated/Models/SignInActivity.cs index 8910beddc62..d18c7c99e1f 100644 --- a/src/Microsoft.Graph/Generated/Models/SignInActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/SignInActivity.cs @@ -118,7 +118,7 @@ public SignInActivity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SignInActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SignInActivity(); } /// @@ -144,7 +144,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastNonInteractiveSignInDateTime", LastNonInteractiveSignInDateTime); writer.WriteStringValue("lastNonInteractiveSignInRequestId", LastNonInteractiveSignInRequestId); writer.WriteDateTimeOffsetValue("lastSignInDateTime", LastSignInDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/SignInCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SignInCollectionResponse.cs index 16e63d020f0..73f3c76ce45 100644 --- a/src/Microsoft.Graph/Generated/Models/SignInCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SignInCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SignInCollectionResponse : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SignInCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SignInCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SignInFrequencySessionControl.cs b/src/Microsoft.Graph/Generated/Models/SignInFrequencySessionControl.cs index efae22e3811..9e73c800054 100644 --- a/src/Microsoft.Graph/Generated/Models/SignInFrequencySessionControl.cs +++ b/src/Microsoft.Graph/Generated/Models/SignInFrequencySessionControl.cs @@ -50,7 +50,7 @@ public SignInFrequencySessionControl() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SignInFrequencySessionControl CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SignInFrequencySessionControl(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationType", AuthenticationType); writer.WriteEnumValue("frequencyInterval", FrequencyInterval); diff --git a/src/Microsoft.Graph/Generated/Models/SignInLocation.cs b/src/Microsoft.Graph/Generated/Models/SignInLocation.cs index f29ba7fa202..1ee48936cb3 100644 --- a/src/Microsoft.Graph/Generated/Models/SignInLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/SignInLocation.cs @@ -116,7 +116,7 @@ public SignInLocation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SignInLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SignInLocation(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("city", City); writer.WriteStringValue("countryOrRegion", CountryOrRegion); writer.WriteObjectValue("geoCoordinates", GeoCoordinates); diff --git a/src/Microsoft.Graph/Generated/Models/SignInPreferences.cs b/src/Microsoft.Graph/Generated/Models/SignInPreferences.cs index 07a8425a059..22b5e968c0a 100644 --- a/src/Microsoft.Graph/Generated/Models/SignInPreferences.cs +++ b/src/Microsoft.Graph/Generated/Models/SignInPreferences.cs @@ -64,7 +64,7 @@ public SignInPreferences() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SignInPreferences CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SignInPreferences(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isSystemPreferredAuthenticationMethodEnabled", IsSystemPreferredAuthenticationMethodEnabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("userPreferredMethodForSecondaryAuthentication", UserPreferredMethodForSecondaryAuthentication); diff --git a/src/Microsoft.Graph/Generated/Models/SignInStatus.cs b/src/Microsoft.Graph/Generated/Models/SignInStatus.cs index 8741867d247..7ca3110474d 100644 --- a/src/Microsoft.Graph/Generated/Models/SignInStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/SignInStatus.cs @@ -90,7 +90,7 @@ public SignInStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SignInStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SignInStatus(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("additionalDetails", AdditionalDetails); writer.WriteIntValue("errorCode", ErrorCode); writer.WriteStringValue("failureReason", FailureReason); diff --git a/src/Microsoft.Graph/Generated/Models/SignUpIdentity.cs b/src/Microsoft.Graph/Generated/Models/SignUpIdentity.cs index 07c7655b485..aebc006d802 100644 --- a/src/Microsoft.Graph/Generated/Models/SignUpIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/SignUpIdentity.cs @@ -74,7 +74,7 @@ public SignUpIdentity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SignUpIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SignUpIdentity(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("signUpIdentifier", SignUpIdentifier); writer.WriteEnumValue("signUpIdentifierType", SignUpIdentifierType); diff --git a/src/Microsoft.Graph/Generated/Models/SignUpStatus.cs b/src/Microsoft.Graph/Generated/Models/SignUpStatus.cs index cabbbbd4d06..1684d69c6f9 100644 --- a/src/Microsoft.Graph/Generated/Models/SignUpStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/SignUpStatus.cs @@ -90,7 +90,7 @@ public SignUpStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SignUpStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SignUpStatus(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("additionalDetails", AdditionalDetails); writer.WriteIntValue("errorCode", ErrorCode); writer.WriteStringValue("failureReason", FailureReason); diff --git a/src/Microsoft.Graph/Generated/Models/SigningCertificateUpdateStatus.cs b/src/Microsoft.Graph/Generated/Models/SigningCertificateUpdateStatus.cs index 5aebd091f40..51a995b737f 100644 --- a/src/Microsoft.Graph/Generated/Models/SigningCertificateUpdateStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/SigningCertificateUpdateStatus.cs @@ -74,7 +74,7 @@ public SigningCertificateUpdateStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SigningCertificateUpdateStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SigningCertificateUpdateStatus(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("certificateUpdateResult", CertificateUpdateResult); writer.WriteDateTimeOffsetValue("lastRunDateTime", LastRunDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SigningResult.cs b/src/Microsoft.Graph/Generated/Models/SigningResult.cs index cb4383ef3e4..85b4bcd9b66 100644 --- a/src/Microsoft.Graph/Generated/Models/SigningResult.cs +++ b/src/Microsoft.Graph/Generated/Models/SigningResult.cs @@ -84,7 +84,7 @@ public SigningResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SigningResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SigningResult(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteByteArrayValue("signature", Signature); writer.WriteStringValue("signingKeyId", SigningKeyId); diff --git a/src/Microsoft.Graph/Generated/Models/Simulation.cs b/src/Microsoft.Graph/Generated/Models/Simulation.cs index 697dda8e428..7d30963610a 100644 --- a/src/Microsoft.Graph/Generated/Models/Simulation.cs +++ b/src/Microsoft.Graph/Generated/Models/Simulation.cs @@ -303,7 +303,7 @@ public DateTimeOffset? LaunchDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Simulation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Simulation(); } /// @@ -346,7 +346,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("attackTechnique", AttackTechnique); writer.WriteEnumValue("attackType", AttackType); diff --git a/src/Microsoft.Graph/Generated/Models/SimulationAutomation.cs b/src/Microsoft.Graph/Generated/Models/SimulationAutomation.cs index cdd0f6b8c7a..7ca2aec23fc 100644 --- a/src/Microsoft.Graph/Generated/Models/SimulationAutomation.cs +++ b/src/Microsoft.Graph/Generated/Models/SimulationAutomation.cs @@ -129,7 +129,7 @@ public DateTimeOffset? NextRunDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SimulationAutomation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SimulationAutomation(); } /// @@ -158,7 +158,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/SimulationAutomationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SimulationAutomationCollectionResponse.cs index c9d9dea268b..261245ca33e 100644 --- a/src/Microsoft.Graph/Generated/Models/SimulationAutomationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SimulationAutomationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SimulationAutomationCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SimulationAutomationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SimulationAutomationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SimulationAutomationRun.cs b/src/Microsoft.Graph/Generated/Models/SimulationAutomationRun.cs index ebc9648117f..cf4d21e4c2a 100644 --- a/src/Microsoft.Graph/Generated/Models/SimulationAutomationRun.cs +++ b/src/Microsoft.Graph/Generated/Models/SimulationAutomationRun.cs @@ -53,7 +53,7 @@ public DateTimeOffset? StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SimulationAutomationRun CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SimulationAutomationRun(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("simulationId", SimulationId); diff --git a/src/Microsoft.Graph/Generated/Models/SimulationAutomationRunCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SimulationAutomationRunCollectionResponse.cs index e3099331ab2..6d380dbd71b 100644 --- a/src/Microsoft.Graph/Generated/Models/SimulationAutomationRunCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SimulationAutomationRunCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SimulationAutomationRunCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SimulationAutomationRunCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SimulationAutomationRunCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SimulationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SimulationCollectionResponse.cs index ecc85f9ed60..886c8efdc46 100644 --- a/src/Microsoft.Graph/Generated/Models/SimulationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SimulationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SimulationCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SimulationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SimulationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SimulationEvent.cs b/src/Microsoft.Graph/Generated/Models/SimulationEvent.cs index d6b40c41a77..1d3657feef0 100644 --- a/src/Microsoft.Graph/Generated/Models/SimulationEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/SimulationEvent.cs @@ -74,7 +74,7 @@ public SimulationEvent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SimulationEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SimulationEvent(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("count", Count); writer.WriteStringValue("eventName", EventName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SimulationEventsContent.cs b/src/Microsoft.Graph/Generated/Models/SimulationEventsContent.cs index 7771356d8f6..da9d9ec46c4 100644 --- a/src/Microsoft.Graph/Generated/Models/SimulationEventsContent.cs +++ b/src/Microsoft.Graph/Generated/Models/SimulationEventsContent.cs @@ -74,7 +74,7 @@ public SimulationEventsContent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SimulationEventsContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SimulationEventsContent(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDoubleValue("compromisedRate", CompromisedRate); writer.WriteCollectionOfObjectValues("events", Events); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SimulationNotification.cs b/src/Microsoft.Graph/Generated/Models/SimulationNotification.cs index 87f777e3009..563b91e0ee4 100644 --- a/src/Microsoft.Graph/Generated/Models/SimulationNotification.cs +++ b/src/Microsoft.Graph/Generated/Models/SimulationNotification.cs @@ -32,7 +32,7 @@ public SimulationNotification() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SimulationNotification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SimulationNotification(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("targettedUserType", TargettedUserType); } diff --git a/src/Microsoft.Graph/Generated/Models/SimulationReport.cs b/src/Microsoft.Graph/Generated/Models/SimulationReport.cs index 8e925c672e5..9dab55c4fde 100644 --- a/src/Microsoft.Graph/Generated/Models/SimulationReport.cs +++ b/src/Microsoft.Graph/Generated/Models/SimulationReport.cs @@ -84,7 +84,7 @@ public SimulationReport() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SimulationReport CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SimulationReport(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("overview", Overview); writer.WriteCollectionOfObjectValues("simulationUsers", SimulationUsers); diff --git a/src/Microsoft.Graph/Generated/Models/SimulationReportOverview.cs b/src/Microsoft.Graph/Generated/Models/SimulationReportOverview.cs index a50db0ba678..2b4fb2c3a00 100644 --- a/src/Microsoft.Graph/Generated/Models/SimulationReportOverview.cs +++ b/src/Microsoft.Graph/Generated/Models/SimulationReportOverview.cs @@ -106,7 +106,7 @@ public SimulationReportOverview() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SimulationReportOverview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SimulationReportOverview(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("recommendedActions", RecommendedActions); writer.WriteIntValue("resolvedTargetsCount", ResolvedTargetsCount); diff --git a/src/Microsoft.Graph/Generated/Models/SingleResourceAzurePermissionsDefinition.cs b/src/Microsoft.Graph/Generated/Models/SingleResourceAzurePermissionsDefinition.cs index 4d9cef77651..4b65b823d87 100644 --- a/src/Microsoft.Graph/Generated/Models/SingleResourceAzurePermissionsDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/SingleResourceAzurePermissionsDefinition.cs @@ -58,7 +58,7 @@ public SingleResourceAzurePermissionsDefinition() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SingleResourceAzurePermissionsDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SingleResourceAzurePermissionsDefinition(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("actionInfo", ActionInfo); writer.WriteStringValue("resourceId", ResourceId); diff --git a/src/Microsoft.Graph/Generated/Models/SingleResourceGcpPermissionsDefinition.cs b/src/Microsoft.Graph/Generated/Models/SingleResourceGcpPermissionsDefinition.cs index c27812967a9..a7bb6cfc25b 100644 --- a/src/Microsoft.Graph/Generated/Models/SingleResourceGcpPermissionsDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/SingleResourceGcpPermissionsDefinition.cs @@ -58,7 +58,7 @@ public SingleResourceGcpPermissionsDefinition() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SingleResourceGcpPermissionsDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SingleResourceGcpPermissionsDefinition(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("actionInfo", ActionInfo); writer.WriteStringValue("resourceId", ResourceId); diff --git a/src/Microsoft.Graph/Generated/Models/SingleSignOnExtension.cs b/src/Microsoft.Graph/Generated/Models/SingleSignOnExtension.cs index 4342aecf4f6..ede17a04b44 100644 --- a/src/Microsoft.Graph/Generated/Models/SingleSignOnExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/SingleSignOnExtension.cs @@ -53,7 +53,7 @@ public SingleSignOnExtension() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SingleSignOnExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/SingleUser.cs b/src/Microsoft.Graph/Generated/Models/SingleUser.cs index 06a9dcbdd60..3733246b2fe 100644 --- a/src/Microsoft.Graph/Generated/Models/SingleUser.cs +++ b/src/Microsoft.Graph/Generated/Models/SingleUser.cs @@ -58,7 +58,7 @@ public SingleUser() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SingleUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SingleUser(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/SingleValueExtendedProperty.cs b/src/Microsoft.Graph/Generated/Models/SingleValueExtendedProperty.cs index 3e6d31b91b5..e8cb419183b 100644 --- a/src/Microsoft.Graph/Generated/Models/SingleValueExtendedProperty.cs +++ b/src/Microsoft.Graph/Generated/Models/SingleValueExtendedProperty.cs @@ -35,7 +35,7 @@ public string Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SingleValueExtendedProperty CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SingleValueExtendedProperty(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SingleValueLegacyExtendedProperty.cs b/src/Microsoft.Graph/Generated/Models/SingleValueLegacyExtendedProperty.cs index dbf75a508e6..4b51aef6e74 100644 --- a/src/Microsoft.Graph/Generated/Models/SingleValueLegacyExtendedProperty.cs +++ b/src/Microsoft.Graph/Generated/Models/SingleValueLegacyExtendedProperty.cs @@ -35,7 +35,7 @@ public string Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SingleValueLegacyExtendedProperty CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SingleValueLegacyExtendedProperty(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Site.cs b/src/Microsoft.Graph/Generated/Models/Site.cs index a78d7a27b24..dbb136f2035 100644 --- a/src/Microsoft.Graph/Generated/Models/Site.cs +++ b/src/Microsoft.Graph/Generated/Models/Site.cs @@ -449,7 +449,7 @@ public Site() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Site CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Site(); } /// @@ -495,7 +495,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("analytics", Analytics); writer.WriteCollectionOfObjectValues("columns", Columns); diff --git a/src/Microsoft.Graph/Generated/Models/SiteArchivalDetails.cs b/src/Microsoft.Graph/Generated/Models/SiteArchivalDetails.cs index e5c2c4797c8..d31b3703dc6 100644 --- a/src/Microsoft.Graph/Generated/Models/SiteArchivalDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/SiteArchivalDetails.cs @@ -80,7 +80,7 @@ public SiteArchivalDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SiteArchivalDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SiteArchivalDetails(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("archivedBy", ArchivedBy); writer.WriteDateTimeOffsetValue("archivedDateTime", ArchivedDateTime); writer.WriteEnumValue("archiveStatus", ArchiveStatus); diff --git a/src/Microsoft.Graph/Generated/Models/SiteCollection.cs b/src/Microsoft.Graph/Generated/Models/SiteCollection.cs index 5b2516aa696..f90d81cfea3 100644 --- a/src/Microsoft.Graph/Generated/Models/SiteCollection.cs +++ b/src/Microsoft.Graph/Generated/Models/SiteCollection.cs @@ -116,7 +116,7 @@ public SiteCollection() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SiteCollection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SiteCollection(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("archivalDetails", ArchivalDetails); writer.WriteStringValue("dataLocationCode", DataLocationCode); writer.WriteStringValue("hostname", Hostname); diff --git a/src/Microsoft.Graph/Generated/Models/SiteCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SiteCollectionResponse.cs index dbd994e9b43..f08eafa5faf 100644 --- a/src/Microsoft.Graph/Generated/Models/SiteCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SiteCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SiteCollectionResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SiteCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SiteCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SitePage.cs b/src/Microsoft.Graph/Generated/Models/SitePage.cs index 6c15f3964a2..280414d5544 100644 --- a/src/Microsoft.Graph/Generated/Models/SitePage.cs +++ b/src/Microsoft.Graph/Generated/Models/SitePage.cs @@ -117,7 +117,7 @@ public string ThumbnailWebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SitePage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SitePage(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("canvasLayout", CanvasLayout); writer.WriteEnumValue("promotionKind", PromotionKind); diff --git a/src/Microsoft.Graph/Generated/Models/SitePageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SitePageCollectionResponse.cs index 72261ab68ad..6a394c5c22a 100644 --- a/src/Microsoft.Graph/Generated/Models/SitePageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SitePageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SitePageCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SitePageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SitePageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SiteProtectionRule.cs b/src/Microsoft.Graph/Generated/Models/SiteProtectionRule.cs index 8e171af12e1..a7e73fee341 100644 --- a/src/Microsoft.Graph/Generated/Models/SiteProtectionRule.cs +++ b/src/Microsoft.Graph/Generated/Models/SiteProtectionRule.cs @@ -42,7 +42,7 @@ public SiteProtectionRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SiteProtectionRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SiteProtectionRule(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("siteExpression", SiteExpression); } diff --git a/src/Microsoft.Graph/Generated/Models/SiteProtectionRuleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SiteProtectionRuleCollectionResponse.cs index f3bd800ef21..b84a3bcd958 100644 --- a/src/Microsoft.Graph/Generated/Models/SiteProtectionRuleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SiteProtectionRuleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SiteProtectionRuleCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SiteProtectionRuleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SiteProtectionRuleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SiteProtectionUnit.cs b/src/Microsoft.Graph/Generated/Models/SiteProtectionUnit.cs index ba488a0986a..626b0fa551a 100644 --- a/src/Microsoft.Graph/Generated/Models/SiteProtectionUnit.cs +++ b/src/Microsoft.Graph/Generated/Models/SiteProtectionUnit.cs @@ -74,7 +74,7 @@ public SiteProtectionUnit() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SiteProtectionUnit CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SiteProtectionUnit(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("siteId", SiteId); } diff --git a/src/Microsoft.Graph/Generated/Models/SiteProtectionUnitCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SiteProtectionUnitCollectionResponse.cs index 38aa12fe0a3..59709e5234e 100644 --- a/src/Microsoft.Graph/Generated/Models/SiteProtectionUnitCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SiteProtectionUnitCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SiteProtectionUnitCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SiteProtectionUnitCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SiteProtectionUnitCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SiteProtectionUnitsBulkAdditionJob.cs b/src/Microsoft.Graph/Generated/Models/SiteProtectionUnitsBulkAdditionJob.cs index 506b449505b..f70a2f85764 100644 --- a/src/Microsoft.Graph/Generated/Models/SiteProtectionUnitsBulkAdditionJob.cs +++ b/src/Microsoft.Graph/Generated/Models/SiteProtectionUnitsBulkAdditionJob.cs @@ -58,7 +58,7 @@ public SiteProtectionUnitsBulkAdditionJob() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SiteProtectionUnitsBulkAdditionJob CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SiteProtectionUnitsBulkAdditionJob(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("siteIds", SiteIds); writer.WriteCollectionOfPrimitiveValues("siteWebUrls", SiteWebUrls); diff --git a/src/Microsoft.Graph/Generated/Models/SiteProtectionUnitsBulkAdditionJobCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SiteProtectionUnitsBulkAdditionJobCollectionResponse.cs index 9c930324132..56accb80e6a 100644 --- a/src/Microsoft.Graph/Generated/Models/SiteProtectionUnitsBulkAdditionJobCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SiteProtectionUnitsBulkAdditionJobCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SiteProtectionUnitsBulkAdditionJobCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SiteProtectionUnitsBulkAdditionJobCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SiteProtectionUnitsBulkAdditionJobCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifact.cs b/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifact.cs index c404925760e..7e42cb974cc 100644 --- a/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifact.cs +++ b/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifact.cs @@ -67,7 +67,7 @@ public string RestoredSiteWebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SiteRestoreArtifact CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SiteRestoreArtifact(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("restoredSiteId", RestoredSiteId); } diff --git a/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifactCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifactCollectionResponse.cs index 1039a6c6786..6dfa42e4db5 100644 --- a/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifactCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifactCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SiteRestoreArtifactCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SiteRestoreArtifactCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SiteRestoreArtifactCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifactsBulkAdditionRequest.cs b/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifactsBulkAdditionRequest.cs index 3f7db21ed9d..5d207601c4c 100644 --- a/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifactsBulkAdditionRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifactsBulkAdditionRequest.cs @@ -51,7 +51,7 @@ public List SiteWebUrls /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SiteRestoreArtifactsBulkAdditionRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SiteRestoreArtifactsBulkAdditionRequest(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("siteIds", SiteIds); writer.WriteCollectionOfPrimitiveValues("siteWebUrls", SiteWebUrls); diff --git a/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifactsBulkAdditionRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifactsBulkAdditionRequestCollectionResponse.cs index 5fc58f991f2..023ccd70792 100644 --- a/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifactsBulkAdditionRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SiteRestoreArtifactsBulkAdditionRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SiteRestoreArtifactsBulkAdditionRequestCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SiteRestoreArtifactsBulkAdditionRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SiteRestoreArtifactsBulkAdditionRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SiteSettings.cs b/src/Microsoft.Graph/Generated/Models/SiteSettings.cs index 72e59eef9f4..f38151b74c8 100644 --- a/src/Microsoft.Graph/Generated/Models/SiteSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/SiteSettings.cs @@ -84,7 +84,7 @@ public SiteSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SiteSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SiteSettings(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("languageTag", LanguageTag); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("timeZone", TimeZone); diff --git a/src/Microsoft.Graph/Generated/Models/SizeRange.cs b/src/Microsoft.Graph/Generated/Models/SizeRange.cs index 7cfdca17c8b..f01781b0731 100644 --- a/src/Microsoft.Graph/Generated/Models/SizeRange.cs +++ b/src/Microsoft.Graph/Generated/Models/SizeRange.cs @@ -64,7 +64,7 @@ public SizeRange() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SizeRange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SizeRange(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("maximumSize", MaximumSize); writer.WriteIntValue("minimumSize", MinimumSize); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SkillProficiency.cs b/src/Microsoft.Graph/Generated/Models/SkillProficiency.cs index ff865c9d5f3..67b69bf1fc1 100644 --- a/src/Microsoft.Graph/Generated/Models/SkillProficiency.cs +++ b/src/Microsoft.Graph/Generated/Models/SkillProficiency.cs @@ -112,7 +112,7 @@ public SkillProficiency() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SkillProficiency CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SkillProficiency(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("categories", Categories); writer.WriteCollectionOfPrimitiveValues("collaborationTags", CollaborationTags); diff --git a/src/Microsoft.Graph/Generated/Models/SkillProficiencyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SkillProficiencyCollectionResponse.cs index 4465db51e0d..5af02886165 100644 --- a/src/Microsoft.Graph/Generated/Models/SkillProficiencyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SkillProficiencyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SkillProficiencyCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SkillProficiencyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SkillProficiencyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SkypeForBusinessUserConversationMember.cs b/src/Microsoft.Graph/Generated/Models/SkypeForBusinessUserConversationMember.cs index 8332534677b..e2fc77b2ca5 100644 --- a/src/Microsoft.Graph/Generated/Models/SkypeForBusinessUserConversationMember.cs +++ b/src/Microsoft.Graph/Generated/Models/SkypeForBusinessUserConversationMember.cs @@ -58,7 +58,7 @@ public SkypeForBusinessUserConversationMember() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SkypeForBusinessUserConversationMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SkypeForBusinessUserConversationMember(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("tenantId", TenantId); writer.WriteStringValue("userId", UserId); diff --git a/src/Microsoft.Graph/Generated/Models/SkypeUserConversationMember.cs b/src/Microsoft.Graph/Generated/Models/SkypeUserConversationMember.cs index 7afc88fec31..f429526bc99 100644 --- a/src/Microsoft.Graph/Generated/Models/SkypeUserConversationMember.cs +++ b/src/Microsoft.Graph/Generated/Models/SkypeUserConversationMember.cs @@ -42,7 +42,7 @@ public SkypeUserConversationMember() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SkypeUserConversationMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SkypeUserConversationMember(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("skypeId", SkypeId); } diff --git a/src/Microsoft.Graph/Generated/Models/SmsAuthenticationMethodConfiguration.cs b/src/Microsoft.Graph/Generated/Models/SmsAuthenticationMethodConfiguration.cs index 42e9a141e10..b87aa7046d4 100644 --- a/src/Microsoft.Graph/Generated/Models/SmsAuthenticationMethodConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/SmsAuthenticationMethodConfiguration.cs @@ -42,7 +42,7 @@ public SmsAuthenticationMethodConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SmsAuthenticationMethodConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SmsAuthenticationMethodConfiguration(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("includeTargets", IncludeTargets); } diff --git a/src/Microsoft.Graph/Generated/Models/SmsAuthenticationMethodTarget.cs b/src/Microsoft.Graph/Generated/Models/SmsAuthenticationMethodTarget.cs index b4b5be233f3..7509a1a1c0c 100644 --- a/src/Microsoft.Graph/Generated/Models/SmsAuthenticationMethodTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/SmsAuthenticationMethodTarget.cs @@ -25,7 +25,7 @@ public bool? IsUsableForSignIn /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SmsAuthenticationMethodTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SmsAuthenticationMethodTarget(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isUsableForSignIn", IsUsableForSignIn); } diff --git a/src/Microsoft.Graph/Generated/Models/SocialIdentityProvider.cs b/src/Microsoft.Graph/Generated/Models/SocialIdentityProvider.cs index 495ddc238a1..3434ef046d7 100644 --- a/src/Microsoft.Graph/Generated/Models/SocialIdentityProvider.cs +++ b/src/Microsoft.Graph/Generated/Models/SocialIdentityProvider.cs @@ -74,7 +74,7 @@ public SocialIdentityProvider() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SocialIdentityProvider CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SocialIdentityProvider(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("clientId", ClientId); writer.WriteStringValue("clientSecret", ClientSecret); diff --git a/src/Microsoft.Graph/Generated/Models/SocialIdentitySource.cs b/src/Microsoft.Graph/Generated/Models/SocialIdentitySource.cs index ffb3da283a0..ef783d898ff 100644 --- a/src/Microsoft.Graph/Generated/Models/SocialIdentitySource.cs +++ b/src/Microsoft.Graph/Generated/Models/SocialIdentitySource.cs @@ -48,7 +48,7 @@ public SocialIdentitySource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SocialIdentitySource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SocialIdentitySource(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteEnumValue("socialIdentitySourceType", SocialIdentitySourceType); diff --git a/src/Microsoft.Graph/Generated/Models/SoftwareOathAuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/SoftwareOathAuthenticationMethod.cs index 4f716948adc..0e9787b1913 100644 --- a/src/Microsoft.Graph/Generated/Models/SoftwareOathAuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/SoftwareOathAuthenticationMethod.cs @@ -42,7 +42,7 @@ public SoftwareOathAuthenticationMethod() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SoftwareOathAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SoftwareOathAuthenticationMethod(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("secretKey", SecretKey); } diff --git a/src/Microsoft.Graph/Generated/Models/SoftwareOathAuthenticationMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SoftwareOathAuthenticationMethodCollectionResponse.cs index f7bd6343aab..c4c7afa2d6b 100644 --- a/src/Microsoft.Graph/Generated/Models/SoftwareOathAuthenticationMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SoftwareOathAuthenticationMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SoftwareOathAuthenticationMethodCollectionResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SoftwareOathAuthenticationMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SoftwareOathAuthenticationMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SoftwareOathAuthenticationMethodConfiguration.cs b/src/Microsoft.Graph/Generated/Models/SoftwareOathAuthenticationMethodConfiguration.cs index c3c26d09f14..456abcf0b48 100644 --- a/src/Microsoft.Graph/Generated/Models/SoftwareOathAuthenticationMethodConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/SoftwareOathAuthenticationMethodConfiguration.cs @@ -42,7 +42,7 @@ public SoftwareOathAuthenticationMethodConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SoftwareOathAuthenticationMethodConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SoftwareOathAuthenticationMethodConfiguration(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("includeTargets", IncludeTargets); } diff --git a/src/Microsoft.Graph/Generated/Models/SoftwareUpdateStatusSummary.cs b/src/Microsoft.Graph/Generated/Models/SoftwareUpdateStatusSummary.cs index 13a7247ec6e..eb9a55b1f88 100644 --- a/src/Microsoft.Graph/Generated/Models/SoftwareUpdateStatusSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/SoftwareUpdateStatusSummary.cs @@ -119,7 +119,7 @@ public int? UnknownUserCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SoftwareUpdateStatusSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SoftwareUpdateStatusSummary(); } /// @@ -153,7 +153,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("compliantDeviceCount", CompliantDeviceCount); writer.WriteIntValue("compliantUserCount", CompliantUserCount); diff --git a/src/Microsoft.Graph/Generated/Models/SolutionsRoot.cs b/src/Microsoft.Graph/Generated/Models/SolutionsRoot.cs index 5740b5b3936..354a4f49ab0 100644 --- a/src/Microsoft.Graph/Generated/Models/SolutionsRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/SolutionsRoot.cs @@ -148,7 +148,7 @@ public SolutionsRoot() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SolutionsRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SolutionsRoot(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("approval", Approval); writer.WriteObjectValue("backupRestore", BackupRestore); writer.WriteCollectionOfObjectValues("bookingBusinesses", BookingBusinesses); diff --git a/src/Microsoft.Graph/Generated/Models/SortProperty.cs b/src/Microsoft.Graph/Generated/Models/SortProperty.cs index 9854d112bbc..487a8edae0a 100644 --- a/src/Microsoft.Graph/Generated/Models/SortProperty.cs +++ b/src/Microsoft.Graph/Generated/Models/SortProperty.cs @@ -74,7 +74,7 @@ public SortProperty() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SortProperty CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SortProperty(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isDescending", IsDescending); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SourceProvisionedIdentity.cs b/src/Microsoft.Graph/Generated/Models/SourceProvisionedIdentity.cs index f68f5a73ec9..caa6ce493fa 100644 --- a/src/Microsoft.Graph/Generated/Models/SourceProvisionedIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/SourceProvisionedIdentity.cs @@ -26,7 +26,7 @@ public SourceProvisionedIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SourceProvisionedIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SourceProvisionedIdentity(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SourcedAttribute.cs b/src/Microsoft.Graph/Generated/Models/SourcedAttribute.cs index fe2157f49f2..4ff0b4ee52a 100644 --- a/src/Microsoft.Graph/Generated/Models/SourcedAttribute.cs +++ b/src/Microsoft.Graph/Generated/Models/SourcedAttribute.cs @@ -64,7 +64,7 @@ public SourcedAttribute() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SourcedAttribute CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SourcedAttribute(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("id", Id); writer.WriteBoolValue("isExtensionAttribute", IsExtensionAttribute); diff --git a/src/Microsoft.Graph/Generated/Models/SpaApplication.cs b/src/Microsoft.Graph/Generated/Models/SpaApplication.cs index f9ea5eb6ca3..5dceb0dfb06 100644 --- a/src/Microsoft.Graph/Generated/Models/SpaApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/SpaApplication.cs @@ -68,7 +68,7 @@ public SpaApplication() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SpaApplication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SpaApplication(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("redirectUris", RedirectUris); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/SpeakerAssignmentSubmission.cs b/src/Microsoft.Graph/Generated/Models/SpeakerAssignmentSubmission.cs index 259765abef0..0eab4b4a147 100644 --- a/src/Microsoft.Graph/Generated/Models/SpeakerAssignmentSubmission.cs +++ b/src/Microsoft.Graph/Generated/Models/SpeakerAssignmentSubmission.cs @@ -213,7 +213,7 @@ public long? WordsSpokenCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SpeakerAssignmentSubmission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SpeakerAssignmentSubmission(); } /// @@ -251,7 +251,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assignmentId", AssignmentId); writer.WriteLongValue("averageWordsPerMinutePace", AverageWordsPerMinutePace); diff --git a/src/Microsoft.Graph/Generated/Models/SpeakerAssignmentSubmissionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SpeakerAssignmentSubmissionCollectionResponse.cs index 8c8b7b3da86..860c6c3cbaf 100644 --- a/src/Microsoft.Graph/Generated/Models/SpeakerAssignmentSubmissionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SpeakerAssignmentSubmissionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SpeakerAssignmentSubmissionCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SpeakerAssignmentSubmissionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SpeakerAssignmentSubmissionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SpeakerInfo.cs b/src/Microsoft.Graph/Generated/Models/SpeakerInfo.cs new file mode 100644 index 00000000000..f25ed635740 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SpeakerInfo.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Microsoft.Graph.Beta.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SpeakerInfo : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The displayName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DisplayName + { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#nullable restore +#else + public string DisplayName + { + get { return BackingStore?.Get("displayName"); } + set { BackingStore?.Set("displayName", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType + { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType + { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The rawId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RawId + { + get { return BackingStore?.Get("rawId"); } + set { BackingStore?.Set("rawId", value); } + } +#nullable restore +#else + public string RawId + { + get { return BackingStore?.Get("rawId"); } + set { BackingStore?.Set("rawId", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SpeakerInfo() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Microsoft.Graph.Beta.Models.SpeakerInfo CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Microsoft.Graph.Beta.Models.SpeakerInfo(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "displayName", n => { DisplayName = n.GetStringValue(); } }, + { "@odata.type", n => { OdataType = n.GetStringValue(); } }, + { "rawId", n => { RawId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("displayName", DisplayName); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("rawId", RawId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Microsoft.Graph/Generated/Models/SpecialFolder.cs b/src/Microsoft.Graph/Generated/Models/SpecialFolder.cs index 86bf31b3d0f..a595ad1351c 100644 --- a/src/Microsoft.Graph/Generated/Models/SpecialFolder.cs +++ b/src/Microsoft.Graph/Generated/Models/SpecialFolder.cs @@ -68,7 +68,7 @@ public SpecialFolder() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SpecialFolder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SpecialFolder(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/SpecifiedCaptiveNetworkPlugins.cs b/src/Microsoft.Graph/Generated/Models/SpecifiedCaptiveNetworkPlugins.cs index 44a85dc7edf..b97ffb8c946 100644 --- a/src/Microsoft.Graph/Generated/Models/SpecifiedCaptiveNetworkPlugins.cs +++ b/src/Microsoft.Graph/Generated/Models/SpecifiedCaptiveNetworkPlugins.cs @@ -69,7 +69,7 @@ public SpecifiedCaptiveNetworkPlugins() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SpecifiedCaptiveNetworkPlugins CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SpecifiedCaptiveNetworkPlugins(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("allowedBundleIdentifiers", AllowedBundleIdentifiers); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/StaffAvailabilityItem.cs b/src/Microsoft.Graph/Generated/Models/StaffAvailabilityItem.cs index 149bca67064..5a734373d3c 100644 --- a/src/Microsoft.Graph/Generated/Models/StaffAvailabilityItem.cs +++ b/src/Microsoft.Graph/Generated/Models/StaffAvailabilityItem.cs @@ -84,7 +84,7 @@ public StaffAvailabilityItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.StaffAvailabilityItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StaffAvailabilityItem(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("availabilityItems", AvailabilityItems); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("staffId", StaffId); diff --git a/src/Microsoft.Graph/Generated/Models/StaleSignInAlertConfiguration.cs b/src/Microsoft.Graph/Generated/Models/StaleSignInAlertConfiguration.cs index 723095489f9..3ed883b56a2 100644 --- a/src/Microsoft.Graph/Generated/Models/StaleSignInAlertConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/StaleSignInAlertConfiguration.cs @@ -32,7 +32,7 @@ public StaleSignInAlertConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StaleSignInAlertConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StaleSignInAlertConfiguration(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeSpanValue("duration", Duration); } diff --git a/src/Microsoft.Graph/Generated/Models/StaleSignInAlertIncident.cs b/src/Microsoft.Graph/Generated/Models/StaleSignInAlertIncident.cs index e82ab12bd49..3d887550b67 100644 --- a/src/Microsoft.Graph/Generated/Models/StaleSignInAlertIncident.cs +++ b/src/Microsoft.Graph/Generated/Models/StaleSignInAlertIncident.cs @@ -134,7 +134,7 @@ public StaleSignInAlertIncident() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StaleSignInAlertIncident CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StaleSignInAlertIncident(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assigneeDisplayName", AssigneeDisplayName); writer.WriteStringValue("assigneeId", AssigneeId); diff --git a/src/Microsoft.Graph/Generated/Models/StandardTimeZoneOffset.cs b/src/Microsoft.Graph/Generated/Models/StandardTimeZoneOffset.cs index b51b0028c24..08564f3c7cd 100644 --- a/src/Microsoft.Graph/Generated/Models/StandardTimeZoneOffset.cs +++ b/src/Microsoft.Graph/Generated/Models/StandardTimeZoneOffset.cs @@ -83,7 +83,7 @@ public StandardTimeZoneOffset() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.StandardTimeZoneOffset CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("dayOccurrence", DayOccurrence); writer.WriteEnumValue("dayOfWeek", DayOfWeek); writer.WriteIntValue("month", Month); diff --git a/src/Microsoft.Graph/Generated/Models/StandardWebPart.cs b/src/Microsoft.Graph/Generated/Models/StandardWebPart.cs index 063331df768..0f5b655f52b 100644 --- a/src/Microsoft.Graph/Generated/Models/StandardWebPart.cs +++ b/src/Microsoft.Graph/Generated/Models/StandardWebPart.cs @@ -74,7 +74,7 @@ public StandardWebPart() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StandardWebPart CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StandardWebPart(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("containerTextWebPartId", ContainerTextWebPartId); writer.WriteObjectValue("data", Data); diff --git a/src/Microsoft.Graph/Generated/Models/StartHoldMusicOperation.cs b/src/Microsoft.Graph/Generated/Models/StartHoldMusicOperation.cs index 10a3b1df688..03ed96cda84 100644 --- a/src/Microsoft.Graph/Generated/Models/StartHoldMusicOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/StartHoldMusicOperation.cs @@ -19,7 +19,7 @@ public partial class StartHoldMusicOperation : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StartHoldMusicOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StartHoldMusicOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/StartRecordingOperation.cs b/src/Microsoft.Graph/Generated/Models/StartRecordingOperation.cs index 1d8ab41b657..21af1c56b16 100644 --- a/src/Microsoft.Graph/Generated/Models/StartRecordingOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/StartRecordingOperation.cs @@ -19,7 +19,7 @@ public partial class StartRecordingOperation : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StartRecordingOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StartRecordingOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/StartTranscriptionOperation.cs b/src/Microsoft.Graph/Generated/Models/StartTranscriptionOperation.cs index b0bc372a39f..462b818d127 100644 --- a/src/Microsoft.Graph/Generated/Models/StartTranscriptionOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/StartTranscriptionOperation.cs @@ -19,7 +19,7 @@ public partial class StartTranscriptionOperation : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StartTranscriptionOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StartTranscriptionOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/StartsWithTransformation.cs b/src/Microsoft.Graph/Generated/Models/StartsWithTransformation.cs index 29e6c6fd09e..577fe83ad64 100644 --- a/src/Microsoft.Graph/Generated/Models/StartsWithTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/StartsWithTransformation.cs @@ -58,7 +58,7 @@ public StartsWithTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StartsWithTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StartsWithTransformation(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("output", Output); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/StatusBase.cs b/src/Microsoft.Graph/Generated/Models/StatusBase.cs index 2c382a06f0f..61784946271 100644 --- a/src/Microsoft.Graph/Generated/Models/StatusBase.cs +++ b/src/Microsoft.Graph/Generated/Models/StatusBase.cs @@ -58,7 +58,7 @@ public StatusBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.StatusBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -84,7 +84,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("status", Status); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/StatusDetails.cs b/src/Microsoft.Graph/Generated/Models/StatusDetails.cs index 9b31291fd60..32a8587c241 100644 --- a/src/Microsoft.Graph/Generated/Models/StatusDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/StatusDetails.cs @@ -96,7 +96,7 @@ public StatusDetails() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StatusDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StatusDetails(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("additionalDetails", AdditionalDetails); writer.WriteEnumValue("errorCategory", ErrorCategory); diff --git a/src/Microsoft.Graph/Generated/Models/StopHoldMusicOperation.cs b/src/Microsoft.Graph/Generated/Models/StopHoldMusicOperation.cs index 50e6a520488..90e9a6013bb 100644 --- a/src/Microsoft.Graph/Generated/Models/StopHoldMusicOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/StopHoldMusicOperation.cs @@ -19,7 +19,7 @@ public partial class StopHoldMusicOperation : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StopHoldMusicOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StopHoldMusicOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/StopRecordingOperation.cs b/src/Microsoft.Graph/Generated/Models/StopRecordingOperation.cs index 576764087b1..aa0953281d7 100644 --- a/src/Microsoft.Graph/Generated/Models/StopRecordingOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/StopRecordingOperation.cs @@ -19,7 +19,7 @@ public partial class StopRecordingOperation : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StopRecordingOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StopRecordingOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/StopTranscriptionOperation.cs b/src/Microsoft.Graph/Generated/Models/StopTranscriptionOperation.cs index 294c43f90a2..8ccda8d4c67 100644 --- a/src/Microsoft.Graph/Generated/Models/StopTranscriptionOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/StopTranscriptionOperation.cs @@ -19,7 +19,7 @@ public partial class StopTranscriptionOperation : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StopTranscriptionOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StopTranscriptionOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Storage.cs b/src/Microsoft.Graph/Generated/Models/Storage.cs index e130014d0be..133058e9713 100644 --- a/src/Microsoft.Graph/Generated/Models/Storage.cs +++ b/src/Microsoft.Graph/Generated/Models/Storage.cs @@ -84,7 +84,7 @@ public Storage() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Storage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Storage(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("fileStorage", FileStorage); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("settings", Settings); diff --git a/src/Microsoft.Graph/Generated/Models/StoragePlanInformation.cs b/src/Microsoft.Graph/Generated/Models/StoragePlanInformation.cs index 793552038c1..f9e7e523fa1 100644 --- a/src/Microsoft.Graph/Generated/Models/StoragePlanInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/StoragePlanInformation.cs @@ -58,7 +58,7 @@ public StoragePlanInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.StoragePlanInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StoragePlanInformation(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("upgradeAvailable", UpgradeAvailable); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/StorageQuotaBreakdown.cs b/src/Microsoft.Graph/Generated/Models/StorageQuotaBreakdown.cs index 6982f420233..9712c6f8526 100644 --- a/src/Microsoft.Graph/Generated/Models/StorageQuotaBreakdown.cs +++ b/src/Microsoft.Graph/Generated/Models/StorageQuotaBreakdown.cs @@ -57,7 +57,7 @@ public long? Used /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StorageQuotaBreakdown CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -84,7 +84,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("manageWebUrl", ManageWebUrl); diff --git a/src/Microsoft.Graph/Generated/Models/StorageSettings.cs b/src/Microsoft.Graph/Generated/Models/StorageSettings.cs index a7718814342..3ebb2723927 100644 --- a/src/Microsoft.Graph/Generated/Models/StorageSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/StorageSettings.cs @@ -35,7 +35,7 @@ public partial class StorageSettings : global::Microsoft.Graph.Beta.Models.Entit /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StorageSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StorageSettings(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("quota", Quota); } diff --git a/src/Microsoft.Graph/Generated/Models/StringCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/StringCollectionResponse.cs index 1a961461d8f..e2fab349522 100644 --- a/src/Microsoft.Graph/Generated/Models/StringCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/StringCollectionResponse.cs @@ -35,7 +35,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StringCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StringCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/StringKeyAttributeMappingSourceValuePair.cs b/src/Microsoft.Graph/Generated/Models/StringKeyAttributeMappingSourceValuePair.cs index bc2fe66b4dc..67bd3da5972 100644 --- a/src/Microsoft.Graph/Generated/Models/StringKeyAttributeMappingSourceValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/StringKeyAttributeMappingSourceValuePair.cs @@ -84,7 +84,7 @@ public StringKeyAttributeMappingSourceValuePair() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.StringKeyAttributeMappingSourceValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StringKeyAttributeMappingSourceValuePair(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/StringKeyLongValuePair.cs b/src/Microsoft.Graph/Generated/Models/StringKeyLongValuePair.cs index 85845f71434..7d26946df6b 100644 --- a/src/Microsoft.Graph/Generated/Models/StringKeyLongValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/StringKeyLongValuePair.cs @@ -74,7 +74,7 @@ public StringKeyLongValuePair() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.StringKeyLongValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StringKeyLongValuePair(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/StringKeyObjectValuePair.cs b/src/Microsoft.Graph/Generated/Models/StringKeyObjectValuePair.cs index 6fff2288e32..2617ef35ac1 100644 --- a/src/Microsoft.Graph/Generated/Models/StringKeyObjectValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/StringKeyObjectValuePair.cs @@ -68,7 +68,7 @@ public StringKeyObjectValuePair() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.StringKeyObjectValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StringKeyObjectValuePair(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/StringKeyStringValuePair.cs b/src/Microsoft.Graph/Generated/Models/StringKeyStringValuePair.cs index edff3c40b12..89c39b7fe1c 100644 --- a/src/Microsoft.Graph/Generated/Models/StringKeyStringValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/StringKeyStringValuePair.cs @@ -84,7 +84,7 @@ public StringKeyStringValuePair() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.StringKeyStringValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StringKeyStringValuePair(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/StrongAuthenticationDetail.cs b/src/Microsoft.Graph/Generated/Models/StrongAuthenticationDetail.cs index 4deb0876f3b..71c19399b54 100644 --- a/src/Microsoft.Graph/Generated/Models/StrongAuthenticationDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/StrongAuthenticationDetail.cs @@ -41,7 +41,7 @@ public long? ProofupTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StrongAuthenticationDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StrongAuthenticationDetail(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("encryptedPinHashHistory", EncryptedPinHashHistory); writer.WriteLongValue("proofupTime", ProofupTime); diff --git a/src/Microsoft.Graph/Generated/Models/StrongAuthenticationPhoneAppDetail.cs b/src/Microsoft.Graph/Generated/Models/StrongAuthenticationPhoneAppDetail.cs index 721611833cd..7fdb8918c1c 100644 --- a/src/Microsoft.Graph/Generated/Models/StrongAuthenticationPhoneAppDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/StrongAuthenticationPhoneAppDetail.cs @@ -219,7 +219,7 @@ public int? TokenGenerationIntervalInSeconds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StrongAuthenticationPhoneAppDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StrongAuthenticationPhoneAppDetail(); } /// @@ -253,7 +253,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("authenticationType", AuthenticationType); writer.WriteStringValue("authenticatorFlavor", AuthenticatorFlavor); diff --git a/src/Microsoft.Graph/Generated/Models/StrongAuthenticationRequirements.cs b/src/Microsoft.Graph/Generated/Models/StrongAuthenticationRequirements.cs index f9db5d13e68..944a9ae030d 100644 --- a/src/Microsoft.Graph/Generated/Models/StrongAuthenticationRequirements.cs +++ b/src/Microsoft.Graph/Generated/Models/StrongAuthenticationRequirements.cs @@ -58,7 +58,7 @@ public StrongAuthenticationRequirements() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.StrongAuthenticationRequirements CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.StrongAuthenticationRequirements(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("perUserMfaState", PerUserMfaState); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/StsPolicy.cs b/src/Microsoft.Graph/Generated/Models/StsPolicy.cs index 3d10091cf01..a39e769f8e6 100644 --- a/src/Microsoft.Graph/Generated/Models/StsPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/StsPolicy.cs @@ -64,7 +64,7 @@ public StsPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.StsPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -95,7 +95,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("appliesTo", AppliesTo); writer.WriteCollectionOfPrimitiveValues("definition", Definition); diff --git a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequest.cs b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequest.cs index 1ec45737c36..bd90219d4ab 100644 --- a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequest.cs @@ -367,7 +367,7 @@ public List Regulations /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SubjectRightsRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SubjectRightsRequest(); } /// @@ -414,7 +414,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("approvers", Approvers); writer.WriteObjectValue("assignedTo", AssignedTo); diff --git a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestAllMailboxLocation.cs b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestAllMailboxLocation.cs index a0770eb53ee..c3f507a3c92 100644 --- a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestAllMailboxLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestAllMailboxLocation.cs @@ -26,7 +26,7 @@ public SubjectRightsRequestAllMailboxLocation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SubjectRightsRequestAllMailboxLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SubjectRightsRequestAllMailboxLocation(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestAllSiteLocation.cs b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestAllSiteLocation.cs index 751f73d6223..2b3ab66e395 100644 --- a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestAllSiteLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestAllSiteLocation.cs @@ -26,7 +26,7 @@ public SubjectRightsRequestAllSiteLocation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SubjectRightsRequestAllSiteLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SubjectRightsRequestAllSiteLocation(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestCollectionResponse.cs index ba9cf666bcd..0979cbbc212 100644 --- a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SubjectRightsRequestCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SubjectRightsRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SubjectRightsRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestDetail.cs b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestDetail.cs index 4eccc4c6a44..ccb05ae1159 100644 --- a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestDetail.cs @@ -114,7 +114,7 @@ public SubjectRightsRequestDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SubjectRightsRequestDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SubjectRightsRequestDetail(); } /// @@ -141,7 +141,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("excludedItemCount", ExcludedItemCount); writer.WriteCollectionOfObjectValues("insightCounts", InsightCounts); writer.WriteLongValue("itemCount", ItemCount); diff --git a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestEnumeratedMailboxLocation.cs b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestEnumeratedMailboxLocation.cs index 0a78699f969..654f717e319 100644 --- a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestEnumeratedMailboxLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestEnumeratedMailboxLocation.cs @@ -58,7 +58,7 @@ public SubjectRightsRequestEnumeratedMailboxLocation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SubjectRightsRequestEnumeratedMailboxLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SubjectRightsRequestEnumeratedMailboxLocation(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("upns", Upns); writer.WriteCollectionOfPrimitiveValues("userPrincipalNames", UserPrincipalNames); diff --git a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestEnumeratedSiteLocation.cs b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestEnumeratedSiteLocation.cs index b68cd6dbb30..6dcb4fbf584 100644 --- a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestEnumeratedSiteLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestEnumeratedSiteLocation.cs @@ -42,7 +42,7 @@ public SubjectRightsRequestEnumeratedSiteLocation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SubjectRightsRequestEnumeratedSiteLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SubjectRightsRequestEnumeratedSiteLocation(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("urls", Urls); } diff --git a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestHistory.cs b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestHistory.cs index 69c01665350..8a6cb25ff78 100644 --- a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestHistory.cs @@ -102,7 +102,7 @@ public SubjectRightsRequestHistory() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SubjectRightsRequestHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SubjectRightsRequestHistory(); } /// @@ -127,7 +127,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("changedBy", ChangedBy); writer.WriteDateTimeOffsetValue("eventDateTime", EventDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestMailboxLocation.cs b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestMailboxLocation.cs index a5dc3476715..470f619dcf6 100644 --- a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestMailboxLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestMailboxLocation.cs @@ -52,7 +52,7 @@ public SubjectRightsRequestMailboxLocation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SubjectRightsRequestMailboxLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestSiteLocation.cs b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestSiteLocation.cs index 65658443577..5c50b632b9c 100644 --- a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestSiteLocation.cs +++ b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestSiteLocation.cs @@ -52,7 +52,7 @@ public SubjectRightsRequestSiteLocation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SubjectRightsRequestSiteLocation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestStageDetail.cs b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestStageDetail.cs index 7767fa5e3ea..d676a65b790 100644 --- a/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestStageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/SubjectRightsRequestStageDetail.cs @@ -80,7 +80,7 @@ public SubjectRightsRequestStageDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SubjectRightsRequestStageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SubjectRightsRequestStageDetail(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("error", Error); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("stage", Stage); diff --git a/src/Microsoft.Graph/Generated/Models/SubjectSet.cs b/src/Microsoft.Graph/Generated/Models/SubjectSet.cs index 8dc8f17bcb3..9ac0aeee3ed 100644 --- a/src/Microsoft.Graph/Generated/Models/SubjectSet.cs +++ b/src/Microsoft.Graph/Generated/Models/SubjectSet.cs @@ -53,7 +53,7 @@ public SubjectSet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SubjectSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/SubscribeToToneOperation.cs b/src/Microsoft.Graph/Generated/Models/SubscribeToToneOperation.cs index 1c6aafcab61..883e16c0422 100644 --- a/src/Microsoft.Graph/Generated/Models/SubscribeToToneOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/SubscribeToToneOperation.cs @@ -19,7 +19,7 @@ public partial class SubscribeToToneOperation : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SubscribeToToneOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SubscribeToToneOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SubscribedSku.cs b/src/Microsoft.Graph/Generated/Models/SubscribedSku.cs index bf222b83f8c..d94b92bfae2 100644 --- a/src/Microsoft.Graph/Generated/Models/SubscribedSku.cs +++ b/src/Microsoft.Graph/Generated/Models/SubscribedSku.cs @@ -159,7 +159,7 @@ public List SubscriptionIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SubscribedSku CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SubscribedSku(); } /// @@ -188,7 +188,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("accountId", AccountId); writer.WriteStringValue("accountName", AccountName); diff --git a/src/Microsoft.Graph/Generated/Models/SubscribedSkuCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SubscribedSkuCollectionResponse.cs index c4cd38f7c28..feb610aad1f 100644 --- a/src/Microsoft.Graph/Generated/Models/SubscribedSkuCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SubscribedSkuCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SubscribedSkuCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SubscribedSkuCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SubscribedSkuCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Subscription.cs b/src/Microsoft.Graph/Generated/Models/Subscription.cs index 44c7fbbf3c7..bcd36134337 100644 --- a/src/Microsoft.Graph/Generated/Models/Subscription.cs +++ b/src/Microsoft.Graph/Generated/Models/Subscription.cs @@ -239,7 +239,7 @@ public string Resource /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Subscription CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Subscription(); } /// @@ -273,7 +273,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("applicationId", ApplicationId); writer.WriteStringValue("changeType", ChangeType); diff --git a/src/Microsoft.Graph/Generated/Models/SubscriptionActivities.cs b/src/Microsoft.Graph/Generated/Models/SubscriptionActivities.cs new file mode 100644 index 00000000000..35f33ba7dd6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SubscriptionActivities.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Microsoft.Graph.Beta.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class SubscriptionActivities : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType + { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType + { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The transcript property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Microsoft.Graph.Beta.Models.TranscriptActivity? Transcript + { + get { return BackingStore?.Get("transcript"); } + set { BackingStore?.Set("transcript", value); } + } +#nullable restore +#else + public global::Microsoft.Graph.Beta.Models.TranscriptActivity Transcript + { + get { return BackingStore?.Get("transcript"); } + set { BackingStore?.Set("transcript", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SubscriptionActivities() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Microsoft.Graph.Beta.Models.SubscriptionActivities CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Microsoft.Graph.Beta.Models.SubscriptionActivities(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.type", n => { OdataType = n.GetStringValue(); } }, + { "transcript", n => { Transcript = n.GetObjectValue(global::Microsoft.Graph.Beta.Models.TranscriptActivity.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteObjectValue("transcript", Transcript); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Microsoft.Graph/Generated/Models/SubscriptionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SubscriptionCollectionResponse.cs index 0534abcbda2..b691b96bce6 100644 --- a/src/Microsoft.Graph/Generated/Models/SubscriptionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SubscriptionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SubscriptionCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SubscriptionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SubscriptionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SubstringTransformation.cs b/src/Microsoft.Graph/Generated/Models/SubstringTransformation.cs index b20ef84c94f..7331a00a51c 100644 --- a/src/Microsoft.Graph/Generated/Models/SubstringTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/SubstringTransformation.cs @@ -38,7 +38,7 @@ public SubstringTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SubstringTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SubstringTransformation(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("index", Index); writer.WriteIntValue("length", Length); diff --git a/src/Microsoft.Graph/Generated/Models/SuggestedEnrollmentLimit.cs b/src/Microsoft.Graph/Generated/Models/SuggestedEnrollmentLimit.cs index 7192caed835..ce12b1d2deb 100644 --- a/src/Microsoft.Graph/Generated/Models/SuggestedEnrollmentLimit.cs +++ b/src/Microsoft.Graph/Generated/Models/SuggestedEnrollmentLimit.cs @@ -59,7 +59,7 @@ public SuggestedEnrollmentLimit() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SuggestedEnrollmentLimit CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SuggestedEnrollmentLimit(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("suggestedDailyLimit", SuggestedDailyLimit); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/SuperAwsResourceFinding.cs b/src/Microsoft.Graph/Generated/Models/SuperAwsResourceFinding.cs index bd25fed48bd..444dfcade16 100644 --- a/src/Microsoft.Graph/Generated/Models/SuperAwsResourceFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/SuperAwsResourceFinding.cs @@ -19,7 +19,7 @@ public partial class SuperAwsResourceFinding : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SuperAwsResourceFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SuperAwsResourceFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SuperAwsRoleFinding.cs b/src/Microsoft.Graph/Generated/Models/SuperAwsRoleFinding.cs index f788e9279e6..677a9ecd408 100644 --- a/src/Microsoft.Graph/Generated/Models/SuperAwsRoleFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/SuperAwsRoleFinding.cs @@ -19,7 +19,7 @@ public partial class SuperAwsRoleFinding : global::Microsoft.Graph.Beta.Models.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SuperAwsRoleFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SuperAwsRoleFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SuperAzureServicePrincipalFinding.cs b/src/Microsoft.Graph/Generated/Models/SuperAzureServicePrincipalFinding.cs index cf6b9420d89..f48467e2f9a 100644 --- a/src/Microsoft.Graph/Generated/Models/SuperAzureServicePrincipalFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/SuperAzureServicePrincipalFinding.cs @@ -19,7 +19,7 @@ public partial class SuperAzureServicePrincipalFinding : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SuperAzureServicePrincipalFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SuperAzureServicePrincipalFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SuperGcpServiceAccountFinding.cs b/src/Microsoft.Graph/Generated/Models/SuperGcpServiceAccountFinding.cs index ac27dd14baf..89be01c23e4 100644 --- a/src/Microsoft.Graph/Generated/Models/SuperGcpServiceAccountFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/SuperGcpServiceAccountFinding.cs @@ -19,7 +19,7 @@ public partial class SuperGcpServiceAccountFinding : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SuperGcpServiceAccountFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SuperGcpServiceAccountFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SuperServerlessFunctionFinding.cs b/src/Microsoft.Graph/Generated/Models/SuperServerlessFunctionFinding.cs index 8348e0c4fc4..3837ce0c227 100644 --- a/src/Microsoft.Graph/Generated/Models/SuperServerlessFunctionFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/SuperServerlessFunctionFinding.cs @@ -19,7 +19,7 @@ public partial class SuperServerlessFunctionFinding : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SuperServerlessFunctionFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SuperServerlessFunctionFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SuperUserFinding.cs b/src/Microsoft.Graph/Generated/Models/SuperUserFinding.cs index 96f38edd747..dffa3b740dc 100644 --- a/src/Microsoft.Graph/Generated/Models/SuperUserFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/SuperUserFinding.cs @@ -19,7 +19,7 @@ public partial class SuperUserFinding : global::Microsoft.Graph.Beta.Models.Iden /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SuperUserFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SuperUserFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/SupportedClaimConfiguration.cs b/src/Microsoft.Graph/Generated/Models/SupportedClaimConfiguration.cs index 29fca96a129..906cfe86f6a 100644 --- a/src/Microsoft.Graph/Generated/Models/SupportedClaimConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/SupportedClaimConfiguration.cs @@ -68,7 +68,7 @@ public SupportedClaimConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SupportedClaimConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SupportedClaimConfiguration(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("nameIdPolicyFormat", NameIdPolicyFormat); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/SwapShiftsChangeRequest.cs b/src/Microsoft.Graph/Generated/Models/SwapShiftsChangeRequest.cs index f8e167ee0e9..a24cfbfd218 100644 --- a/src/Microsoft.Graph/Generated/Models/SwapShiftsChangeRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/SwapShiftsChangeRequest.cs @@ -42,7 +42,7 @@ public SwapShiftsChangeRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SwapShiftsChangeRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SwapShiftsChangeRequest(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("recipientShiftId", RecipientShiftId); } diff --git a/src/Microsoft.Graph/Generated/Models/SwapShiftsChangeRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SwapShiftsChangeRequestCollectionResponse.cs index eafea3c4139..62ee3f5e97e 100644 --- a/src/Microsoft.Graph/Generated/Models/SwapShiftsChangeRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SwapShiftsChangeRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SwapShiftsChangeRequestCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SwapShiftsChangeRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SwapShiftsChangeRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SymantecCodeSigningCertificate.cs b/src/Microsoft.Graph/Generated/Models/SymantecCodeSigningCertificate.cs index 6b58ed7bb04..497f991d674 100644 --- a/src/Microsoft.Graph/Generated/Models/SymantecCodeSigningCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/SymantecCodeSigningCertificate.cs @@ -133,7 +133,7 @@ public DateTimeOffset? UploadDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SymantecCodeSigningCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SymantecCodeSigningCertificate(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("content", Content); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Synchronization.cs b/src/Microsoft.Graph/Generated/Models/Synchronization.cs index 82d4a0b3552..a6aafcae053 100644 --- a/src/Microsoft.Graph/Generated/Models/Synchronization.cs +++ b/src/Microsoft.Graph/Generated/Models/Synchronization.cs @@ -67,7 +67,7 @@ public partial class Synchronization : global::Microsoft.Graph.Beta.Models.Entit /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Synchronization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Synchronization(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("jobs", Jobs); writer.WriteCollectionOfObjectValues("secrets", Secrets); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationError.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationError.cs index 4a3a64d40ae..eebbfb1e743 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationError.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationError.cs @@ -90,7 +90,7 @@ public SynchronizationError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SynchronizationError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationError(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("message", Message); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationJob.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationJob.cs index 515876e3d8c..25a007bbbf0 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationJob.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationJob.cs @@ -115,7 +115,7 @@ public string TemplateId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SynchronizationJob CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationJob(); } /// @@ -140,7 +140,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("bulkUpload", BulkUpload); writer.WriteObjectValue("schedule", Schedule); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationJobApplicationParameters.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationJobApplicationParameters.cs index 4432c57ff34..3b01954c663 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationJobApplicationParameters.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationJobApplicationParameters.cs @@ -84,7 +84,7 @@ public SynchronizationJobApplicationParameters() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SynchronizationJobApplicationParameters CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationJobApplicationParameters(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("ruleId", RuleId); writer.WriteCollectionOfObjectValues("subjects", Subjects); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationJobCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationJobCollectionResponse.cs index f2ab5fec679..b736f70d7b3 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationJobCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationJobCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SynchronizationJobCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SynchronizationJobCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationJobCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartCriteria.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartCriteria.cs index a87dc09afc3..3c7e02ab23e 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartCriteria.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartCriteria.cs @@ -58,7 +58,7 @@ public SynchronizationJobRestartCriteria() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SynchronizationJobRestartCriteria CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationJobRestartCriteria(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("resetScope", ResetScope); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationJobSubject.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationJobSubject.cs index 7c535cba769..ebc3049ee46 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationJobSubject.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationJobSubject.cs @@ -100,7 +100,7 @@ public SynchronizationJobSubject() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SynchronizationJobSubject CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationJobSubject(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("links", Links); writer.WriteStringValue("objectId", ObjectId); writer.WriteStringValue("objectTypeName", ObjectTypeName); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationLinkedObjects.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationLinkedObjects.cs index 9a55e2382e9..34bf16c8d9b 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationLinkedObjects.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationLinkedObjects.cs @@ -100,7 +100,7 @@ public SynchronizationLinkedObjects() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SynchronizationLinkedObjects CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationLinkedObjects(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("manager", Manager); writer.WriteCollectionOfObjectValues("members", Members); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationMetadataEntry.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationMetadataEntry.cs index 344a044bb59..8abe3c20048 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationMetadataEntry.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationMetadataEntry.cs @@ -74,7 +74,7 @@ public SynchronizationMetadataEntry() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SynchronizationMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationMetadataEntry(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationProgress.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationProgress.cs index 9ca8904aa18..0cd47942ad1 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationProgress.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationProgress.cs @@ -86,7 +86,7 @@ public SynchronizationProgress() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SynchronizationProgress CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationProgress(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteLongValue("completedUnits", CompletedUnits); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("progressObservationDateTime", ProgressObservationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationQuarantine.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationQuarantine.cs index d9ac34aa53d..5509ddd1ba1 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationQuarantine.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationQuarantine.cs @@ -98,7 +98,7 @@ public SynchronizationQuarantine() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SynchronizationQuarantine CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationQuarantine(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("currentBegan", CurrentBegan); writer.WriteObjectValue("error", Error); writer.WriteDateTimeOffsetValue("nextAttempt", NextAttempt); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationRule.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationRule.cs index a5be81c1f77..04ee3e3e3c8 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationRule.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationRule.cs @@ -192,7 +192,7 @@ public SynchronizationRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SynchronizationRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationRule(); } /// @@ -222,7 +222,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("containerFilter", ContainerFilter); writer.WriteBoolValue("editable", Editable); writer.WriteObjectValue("groupFilter", GroupFilter); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationSchedule.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationSchedule.cs index ba95f0552b7..6366c558cd3 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationSchedule.cs @@ -70,7 +70,7 @@ public SynchronizationSchedule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SynchronizationSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationSchedule(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("expiration", Expiration); writer.WriteTimeSpanValue("interval", Interval); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationSchema.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationSchema.cs index 674cdadafdc..d1eff238023 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationSchema.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationSchema.cs @@ -67,7 +67,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SynchronizationSchema CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationSchema(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("directories", Directories); writer.WriteCollectionOfObjectValues("synchronizationRules", SynchronizationRules); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationSecretKeyStringValuePair.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationSecretKeyStringValuePair.cs index 8b10b52c390..c455eb31dea 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationSecretKeyStringValuePair.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationSecretKeyStringValuePair.cs @@ -74,7 +74,7 @@ public SynchronizationSecretKeyStringValuePair() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SynchronizationSecretKeyStringValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationSecretKeyStringValuePair(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("key", Key); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationStatus.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationStatus.cs index eaa1d09fee0..9151e5bcd17 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationStatus.cs @@ -194,7 +194,7 @@ public SynchronizationStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SynchronizationStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationStatus(); } /// @@ -226,7 +226,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("code", Code); writer.WriteLongValue("countSuccessiveCompleteFailures", CountSuccessiveCompleteFailures); writer.WriteBoolValue("escrowsPruned", EscrowsPruned); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationTaskExecution.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationTaskExecution.cs index 17f3f674d9d..e9fd3c48d8c 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationTaskExecution.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationTaskExecution.cs @@ -156,7 +156,7 @@ public SynchronizationTaskExecution() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SynchronizationTaskExecution CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationTaskExecution(); } /// @@ -190,7 +190,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("activityIdentifier", ActivityIdentifier); writer.WriteLongValue("countEntitled", CountEntitled); writer.WriteLongValue("countEntitledForProvisioning", CountEntitledForProvisioning); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationTemplate.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationTemplate.cs index 308decf882f..978ccb0b591 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationTemplate.cs @@ -101,7 +101,7 @@ public string FactoryTag /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SynchronizationTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationTemplate(); } /// @@ -127,7 +127,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteGuidValue("applicationId", ApplicationId); writer.WriteBoolValue("default", Default); diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationTemplateCollectionResponse.cs index 28ca6044940..cd55678371d 100644 --- a/src/Microsoft.Graph/Generated/Models/SynchronizationTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SynchronizationTemplateCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.SynchronizationTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SynchronizationTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/SystemCredentialPreferences.cs b/src/Microsoft.Graph/Generated/Models/SystemCredentialPreferences.cs index cb3583e00ef..e40aa02e07f 100644 --- a/src/Microsoft.Graph/Generated/Models/SystemCredentialPreferences.cs +++ b/src/Microsoft.Graph/Generated/Models/SystemCredentialPreferences.cs @@ -90,7 +90,7 @@ public SystemCredentialPreferences() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SystemCredentialPreferences CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SystemCredentialPreferences(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("excludeTargets", ExcludeTargets); writer.WriteCollectionOfObjectValues("includeTargets", IncludeTargets); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/SystemFacet.cs b/src/Microsoft.Graph/Generated/Models/SystemFacet.cs index cdd92c41847..e0e108867b7 100644 --- a/src/Microsoft.Graph/Generated/Models/SystemFacet.cs +++ b/src/Microsoft.Graph/Generated/Models/SystemFacet.cs @@ -52,7 +52,7 @@ public SystemFacet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.SystemFacet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.SystemFacet(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/TabUpdatedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/TabUpdatedEventMessageDetail.cs index 8e374c0351c..0baf10d3528 100644 --- a/src/Microsoft.Graph/Generated/Models/TabUpdatedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/TabUpdatedEventMessageDetail.cs @@ -58,7 +58,7 @@ public TabUpdatedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TabUpdatedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TabUpdatedEventMessageDetail(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteStringValue("tabId", TabId); diff --git a/src/Microsoft.Graph/Generated/Models/TargetDeviceGroup.cs b/src/Microsoft.Graph/Generated/Models/TargetDeviceGroup.cs index 8e972aa1eff..9e1480642cb 100644 --- a/src/Microsoft.Graph/Generated/Models/TargetDeviceGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/TargetDeviceGroup.cs @@ -35,7 +35,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TargetDeviceGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TargetDeviceGroup(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); } diff --git a/src/Microsoft.Graph/Generated/Models/TargetDeviceGroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TargetDeviceGroupCollectionResponse.cs index a0ed991e101..80ece78fd9a 100644 --- a/src/Microsoft.Graph/Generated/Models/TargetDeviceGroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TargetDeviceGroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TargetDeviceGroupCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TargetDeviceGroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TargetDeviceGroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TargetPolicyEndpoints.cs b/src/Microsoft.Graph/Generated/Models/TargetPolicyEndpoints.cs index e6c7591fc0e..d2beed48f18 100644 --- a/src/Microsoft.Graph/Generated/Models/TargetPolicyEndpoints.cs +++ b/src/Microsoft.Graph/Generated/Models/TargetPolicyEndpoints.cs @@ -68,7 +68,7 @@ public TargetPolicyEndpoints() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TargetPolicyEndpoints CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TargetPolicyEndpoints(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("platformTypes", PlatformTypes); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/TargetProvisionedIdentity.cs b/src/Microsoft.Graph/Generated/Models/TargetProvisionedIdentity.cs index 29045d793cb..01ab25bf4c6 100644 --- a/src/Microsoft.Graph/Generated/Models/TargetProvisionedIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/TargetProvisionedIdentity.cs @@ -26,7 +26,7 @@ public TargetProvisionedIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TargetProvisionedIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TargetProvisionedIdentity(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TargetResource.cs b/src/Microsoft.Graph/Generated/Models/TargetResource.cs index 53efe4323a0..4b9cd64e2e7 100644 --- a/src/Microsoft.Graph/Generated/Models/TargetResource.cs +++ b/src/Microsoft.Graph/Generated/Models/TargetResource.cs @@ -138,7 +138,7 @@ public TargetResource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TargetResource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TargetResource(); } /// @@ -164,7 +164,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteEnumValue("groupType", GroupType); writer.WriteStringValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/TargetUserSponsors.cs b/src/Microsoft.Graph/Generated/Models/TargetUserSponsors.cs index e5f22b2e335..c1eac094156 100644 --- a/src/Microsoft.Graph/Generated/Models/TargetUserSponsors.cs +++ b/src/Microsoft.Graph/Generated/Models/TargetUserSponsors.cs @@ -26,7 +26,7 @@ public TargetUserSponsors() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TargetUserSponsors CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TargetUserSponsors(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TargetedManagedAppConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TargetedManagedAppConfiguration.cs index 06a0a324812..f36df6d1d00 100644 --- a/src/Microsoft.Graph/Generated/Models/TargetedManagedAppConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TargetedManagedAppConfiguration.cs @@ -99,7 +99,7 @@ public TargetedManagedAppConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TargetedManagedAppConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TargetedManagedAppConfiguration(); } /// @@ -125,7 +125,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("appGroupType", AppGroupType); writer.WriteCollectionOfObjectValues("apps", Apps); diff --git a/src/Microsoft.Graph/Generated/Models/TargetedManagedAppConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TargetedManagedAppConfigurationCollectionResponse.cs index ab2b9b3c3c7..0bf1cfc6389 100644 --- a/src/Microsoft.Graph/Generated/Models/TargetedManagedAppConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TargetedManagedAppConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TargetedManagedAppConfigurationCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TargetedManagedAppConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TargetedManagedAppConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TargetedManagedAppConfigurationPolicySetItem.cs b/src/Microsoft.Graph/Generated/Models/TargetedManagedAppConfigurationPolicySetItem.cs index 7431fd109ff..f9b9bc3b70d 100644 --- a/src/Microsoft.Graph/Generated/Models/TargetedManagedAppConfigurationPolicySetItem.cs +++ b/src/Microsoft.Graph/Generated/Models/TargetedManagedAppConfigurationPolicySetItem.cs @@ -27,7 +27,7 @@ public TargetedManagedAppConfigurationPolicySetItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TargetedManagedAppConfigurationPolicySetItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TargetedManagedAppConfigurationPolicySetItem(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TargetedManagedAppPolicyAssignment.cs b/src/Microsoft.Graph/Generated/Models/TargetedManagedAppPolicyAssignment.cs index 4ada941647f..cab82c8b0e0 100644 --- a/src/Microsoft.Graph/Generated/Models/TargetedManagedAppPolicyAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/TargetedManagedAppPolicyAssignment.cs @@ -58,7 +58,7 @@ public string SourceId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignment(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("source", Source); writer.WriteStringValue("sourceId", SourceId); diff --git a/src/Microsoft.Graph/Generated/Models/TargetedManagedAppPolicyAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TargetedManagedAppPolicyAssignmentCollectionResponse.cs index 2d243d9b7ac..84c63583efe 100644 --- a/src/Microsoft.Graph/Generated/Models/TargetedManagedAppPolicyAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TargetedManagedAppPolicyAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TargetedManagedAppPolicyAssignmentCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TargetedManagedAppPolicyAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TargetedManagedAppProtection.cs b/src/Microsoft.Graph/Generated/Models/TargetedManagedAppProtection.cs index 707aa3be706..fdeba72e96c 100644 --- a/src/Microsoft.Graph/Generated/Models/TargetedManagedAppProtection.cs +++ b/src/Microsoft.Graph/Generated/Models/TargetedManagedAppProtection.cs @@ -61,7 +61,7 @@ public TargetedManagedAppProtection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TargetedManagedAppProtection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -90,7 +90,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("appGroupType", AppGroupType); writer.WriteCollectionOfObjectValues("assignments", Assignments); diff --git a/src/Microsoft.Graph/Generated/Models/TaskFileAttachment.cs b/src/Microsoft.Graph/Generated/Models/TaskFileAttachment.cs index 136d58fa441..e37e65685d3 100644 --- a/src/Microsoft.Graph/Generated/Models/TaskFileAttachment.cs +++ b/src/Microsoft.Graph/Generated/Models/TaskFileAttachment.cs @@ -42,7 +42,7 @@ public TaskFileAttachment() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TaskFileAttachment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TaskFileAttachment(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("contentBytes", ContentBytes); } diff --git a/src/Microsoft.Graph/Generated/Models/TaxArea.cs b/src/Microsoft.Graph/Generated/Models/TaxArea.cs index 9451e356ddb..ac2dea27336 100644 --- a/src/Microsoft.Graph/Generated/Models/TaxArea.cs +++ b/src/Microsoft.Graph/Generated/Models/TaxArea.cs @@ -112,7 +112,7 @@ public TaxArea() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TaxArea CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TaxArea(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("displayName", DisplayName); writer.WriteGuidValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/TaxAreaCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TaxAreaCollectionResponse.cs index 6856cb33a9b..8ca115398dd 100644 --- a/src/Microsoft.Graph/Generated/Models/TaxAreaCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TaxAreaCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TaxAreaCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TaxAreaCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TaxAreaCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TaxGroup.cs b/src/Microsoft.Graph/Generated/Models/TaxGroup.cs index b8ef80acba9..4ef0243aabe 100644 --- a/src/Microsoft.Graph/Generated/Models/TaxGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/TaxGroup.cs @@ -73,7 +73,7 @@ public string TaxType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TaxGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TaxGroup(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("code", Code); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/TaxGroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TaxGroupCollectionResponse.cs index 2b1b3e1e9de..07181f78287 100644 --- a/src/Microsoft.Graph/Generated/Models/TaxGroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TaxGroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TaxGroupCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TaxGroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TaxGroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Team.cs b/src/Microsoft.Graph/Generated/Models/Team.cs index 393eb14ccb7..ab6a8df1375 100644 --- a/src/Microsoft.Graph/Generated/Models/Team.cs +++ b/src/Microsoft.Graph/Generated/Models/Team.cs @@ -497,7 +497,7 @@ public string WebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Team CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Team(); } /// @@ -549,7 +549,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("allChannels", AllChannels); writer.WriteCollectionOfObjectValues("channels", Channels); diff --git a/src/Microsoft.Graph/Generated/Models/TeamArchivedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/TeamArchivedEventMessageDetail.cs index b304c6defe6..7830f550616 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamArchivedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamArchivedEventMessageDetail.cs @@ -58,7 +58,7 @@ public TeamArchivedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamArchivedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamArchivedEventMessageDetail(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteStringValue("teamId", TeamId); diff --git a/src/Microsoft.Graph/Generated/Models/TeamCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamCollectionResponse.cs index 783fb1f26f1..6846331e494 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamCollectionResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamCreatedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/TeamCreatedEventMessageDetail.cs index 2db51c52b69..03711a5f41f 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamCreatedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamCreatedEventMessageDetail.cs @@ -90,7 +90,7 @@ public TeamCreatedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamCreatedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamCreatedEventMessageDetail(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteStringValue("teamDescription", TeamDescription); diff --git a/src/Microsoft.Graph/Generated/Models/TeamDescriptionUpdatedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/TeamDescriptionUpdatedEventMessageDetail.cs index 25f71ddb8b0..ba4571f884a 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamDescriptionUpdatedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamDescriptionUpdatedEventMessageDetail.cs @@ -74,7 +74,7 @@ public TeamDescriptionUpdatedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamDescriptionUpdatedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamDescriptionUpdatedEventMessageDetail(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteStringValue("teamDescription", TeamDescription); diff --git a/src/Microsoft.Graph/Generated/Models/TeamDiscoverySettings.cs b/src/Microsoft.Graph/Generated/Models/TeamDiscoverySettings.cs index a01be127e98..a3fa8284ff2 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamDiscoverySettings.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamDiscoverySettings.cs @@ -58,7 +58,7 @@ public TeamDiscoverySettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamDiscoverySettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamDiscoverySettings(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("showInTeamsSearchAndSuggestions", ShowInTeamsSearchAndSuggestions); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/TeamFunSettings.cs b/src/Microsoft.Graph/Generated/Models/TeamFunSettings.cs index 481f07324cb..f7c84fda91e 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamFunSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamFunSettings.cs @@ -76,7 +76,7 @@ public TeamFunSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamFunSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamFunSettings(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowCustomMemes", AllowCustomMemes); writer.WriteBoolValue("allowGiphy", AllowGiphy); writer.WriteBoolValue("allowStickersAndMemes", AllowStickersAndMemes); diff --git a/src/Microsoft.Graph/Generated/Models/TeamGuestSettings.cs b/src/Microsoft.Graph/Generated/Models/TeamGuestSettings.cs index 0df726fbb55..ed0e99cf6b5 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamGuestSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamGuestSettings.cs @@ -64,7 +64,7 @@ public TeamGuestSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamGuestSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamGuestSettings(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowCreateUpdateChannels", AllowCreateUpdateChannels); writer.WriteBoolValue("allowDeleteChannels", AllowDeleteChannels); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamInfo.cs b/src/Microsoft.Graph/Generated/Models/TeamInfo.cs index 6cbf1745bbb..2a01182bab5 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamInfo.cs @@ -67,7 +67,7 @@ public string TenantId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -95,7 +95,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteObjectValue("team", Team); diff --git a/src/Microsoft.Graph/Generated/Models/TeamJoiningDisabledEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/TeamJoiningDisabledEventMessageDetail.cs index c6b2ccfb66a..d5508b8f5dc 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamJoiningDisabledEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamJoiningDisabledEventMessageDetail.cs @@ -58,7 +58,7 @@ public TeamJoiningDisabledEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamJoiningDisabledEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamJoiningDisabledEventMessageDetail(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteStringValue("teamId", TeamId); diff --git a/src/Microsoft.Graph/Generated/Models/TeamJoiningEnabledEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/TeamJoiningEnabledEventMessageDetail.cs index 96a28d3b56c..df64e5eae76 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamJoiningEnabledEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamJoiningEnabledEventMessageDetail.cs @@ -58,7 +58,7 @@ public TeamJoiningEnabledEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamJoiningEnabledEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamJoiningEnabledEventMessageDetail(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteStringValue("teamId", TeamId); diff --git a/src/Microsoft.Graph/Generated/Models/TeamMemberSettings.cs b/src/Microsoft.Graph/Generated/Models/TeamMemberSettings.cs index bab8e9a4474..c5d2027a998 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamMemberSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamMemberSettings.cs @@ -88,7 +88,7 @@ public TeamMemberSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamMemberSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamMemberSettings(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowAddRemoveApps", AllowAddRemoveApps); writer.WriteBoolValue("allowCreatePrivateChannels", AllowCreatePrivateChannels); writer.WriteBoolValue("allowCreateUpdateChannels", AllowCreateUpdateChannels); diff --git a/src/Microsoft.Graph/Generated/Models/TeamMembersNotificationRecipient.cs b/src/Microsoft.Graph/Generated/Models/TeamMembersNotificationRecipient.cs index 50d753947f8..06ab5858bc8 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamMembersNotificationRecipient.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamMembersNotificationRecipient.cs @@ -42,7 +42,7 @@ public TeamMembersNotificationRecipient() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamMembersNotificationRecipient CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamMembersNotificationRecipient(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("teamId", TeamId); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamMessagingSettings.cs b/src/Microsoft.Graph/Generated/Models/TeamMessagingSettings.cs index 5ca98939c36..3b2e27fffcd 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamMessagingSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamMessagingSettings.cs @@ -82,7 +82,7 @@ public TeamMessagingSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamMessagingSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamMessagingSettings(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowChannelMentions", AllowChannelMentions); writer.WriteBoolValue("allowOwnerDeleteMessages", AllowOwnerDeleteMessages); writer.WriteBoolValue("allowTeamMentions", AllowTeamMentions); diff --git a/src/Microsoft.Graph/Generated/Models/TeamRenamedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/TeamRenamedEventMessageDetail.cs index 5ad90acc646..9c6930b91dd 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamRenamedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamRenamedEventMessageDetail.cs @@ -74,7 +74,7 @@ public TeamRenamedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamRenamedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamRenamedEventMessageDetail(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteStringValue("teamDisplayName", TeamDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/TeamSummary.cs b/src/Microsoft.Graph/Generated/Models/TeamSummary.cs index f9bf2848aa0..11f87cc33b4 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamSummary.cs @@ -70,7 +70,7 @@ public TeamSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamSummary(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("guestsCount", GuestsCount); writer.WriteIntValue("membersCount", MembersCount); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamTeamsAppInstallationScopeInfo.cs b/src/Microsoft.Graph/Generated/Models/TeamTeamsAppInstallationScopeInfo.cs index 9ace739dd11..0a02c968d5c 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamTeamsAppInstallationScopeInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamTeamsAppInstallationScopeInfo.cs @@ -42,7 +42,7 @@ public TeamTeamsAppInstallationScopeInfo() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamTeamsAppInstallationScopeInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamTeamsAppInstallationScopeInfo(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("teamId", TeamId); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamTemplate.cs b/src/Microsoft.Graph/Generated/Models/TeamTemplate.cs index b8e17012377..5f49dba86e7 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamTemplate.cs @@ -35,7 +35,7 @@ public partial class TeamTemplate : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamTemplate(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("definitions", Definitions); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamTemplateCollectionResponse.cs index 834fa10ccff..0a25be2f55c 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamTemplateCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamTemplateDefinition.cs b/src/Microsoft.Graph/Generated/Models/TeamTemplateDefinition.cs index 9be5401f789..e07fd05f7b6 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamTemplateDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamTemplateDefinition.cs @@ -191,7 +191,7 @@ public string ShortDescription /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamTemplateDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamTemplateDefinition(); } /// @@ -222,7 +222,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("audience", Audience); writer.WriteCollectionOfPrimitiveValues("categories", Categories); diff --git a/src/Microsoft.Graph/Generated/Models/TeamTemplateDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamTemplateDefinitionCollectionResponse.cs index c864d4e5489..c37a644c474 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamTemplateDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamTemplateDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamTemplateDefinitionCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamTemplateDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamTemplateDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamUnarchivedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/TeamUnarchivedEventMessageDetail.cs index fef163b9f26..be9b9c0f0bd 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamUnarchivedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamUnarchivedEventMessageDetail.cs @@ -58,7 +58,7 @@ public TeamUnarchivedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamUnarchivedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamUnarchivedEventMessageDetail(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteStringValue("teamId", TeamId); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAdministration/AssignedTelephoneNumber.cs b/src/Microsoft.Graph/Generated/Models/TeamsAdministration/AssignedTelephoneNumber.cs index a81f0ec1f26..fee2e77963a 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAdministration/AssignedTelephoneNumber.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAdministration/AssignedTelephoneNumber.cs @@ -74,7 +74,7 @@ public AssignedTelephoneNumber() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamsAdministration.AssignedTelephoneNumber CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAdministration.AssignedTelephoneNumber(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("assignmentCategory", AssignmentCategory); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("telephoneNumber", TelephoneNumber); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAdministration/EffectivePolicyAssignment.cs b/src/Microsoft.Graph/Generated/Models/TeamsAdministration/EffectivePolicyAssignment.cs index 1cd2f6cf8db..52ead866b97 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAdministration/EffectivePolicyAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAdministration/EffectivePolicyAssignment.cs @@ -84,7 +84,7 @@ public EffectivePolicyAssignment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamsAdministration.EffectivePolicyAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAdministration.EffectivePolicyAssignment(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("policyAssignment", PolicyAssignment); writer.WriteStringValue("policyType", PolicyType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAdministration/PolicyAssignment.cs b/src/Microsoft.Graph/Generated/Models/TeamsAdministration/PolicyAssignment.cs index e59dc09adb4..244cd3bd8b3 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAdministration/PolicyAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAdministration/PolicyAssignment.cs @@ -106,7 +106,7 @@ public PolicyAssignment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamsAdministration.PolicyAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAdministration.PolicyAssignment(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("assignmentType", AssignmentType); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("groupId", GroupId); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsAdminRoot.cs b/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsAdminRoot.cs index bd96889d897..f323e1afce0 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsAdminRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsAdminRoot.cs @@ -51,7 +51,7 @@ public partial class TeamsAdminRoot : global::Microsoft.Graph.Beta.Models.Entity /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsAdminRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsAdminRoot(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("policy", Policy); writer.WriteCollectionOfObjectValues("userConfigurations", UserConfigurations); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsPolicyAssignment.cs b/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsPolicyAssignment.cs index 38d5690c818..6667264dda8 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsPolicyAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsPolicyAssignment.cs @@ -19,7 +19,7 @@ public partial class TeamsPolicyAssignment : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsPolicyAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsPolicyAssignment(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsUserConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsUserConfiguration.cs index 2ad65279fe3..2c678d177bc 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsUserConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsUserConfiguration.cs @@ -139,7 +139,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsUserConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsUserConfiguration(); } /// @@ -168,7 +168,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accountType", AccountType); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsUserConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsUserConfigurationCollectionResponse.cs index 7f5934abdf4..551243195b2 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsUserConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAdministration/TeamsUserConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamsUserConfigurationCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsUserConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAdministration.TeamsUserConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamsApp.cs b/src/Microsoft.Graph/Generated/Models/TeamsApp.cs index b34bc014362..df6a548e298 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsApp.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsApp.cs @@ -73,7 +73,7 @@ public string ExternalId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsApp(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("appDefinitions", AppDefinitions); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppAuthorization.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppAuthorization.cs index 758a7bacc1f..6a7758a32bd 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppAuthorization.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppAuthorization.cs @@ -84,7 +84,7 @@ public TeamsAppAuthorization() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamsAppAuthorization CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppAuthorization(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clientAppId", ClientAppId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("requiredPermissionSet", RequiredPermissionSet); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppCollectionResponse.cs index 47036d36bb4..3f4e1246096 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamsAppCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardBotConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardBotConfiguration.cs index 3477ab0037e..1e762836641 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardBotConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardBotConfiguration.cs @@ -68,7 +68,7 @@ public TeamsAppDashboardCardBotConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamsAppDashboardCardBotConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppDashboardCardBotConfiguration(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("botId", BotId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardContentSource.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardContentSource.cs index 383fa8adf04..642f5ddaad8 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardContentSource.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardContentSource.cs @@ -74,7 +74,7 @@ public TeamsAppDashboardCardContentSource() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamsAppDashboardCardContentSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppDashboardCardContentSource(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("botConfiguration", BotConfiguration); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("sourceType", SourceType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardDefinition.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardDefinition.cs index 60e2ffffd08..818fccbfabd 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardDefinition.cs @@ -105,7 +105,7 @@ public string PickerGroupId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAppDashboardCardDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppDashboardCardDefinition(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("contentSource", ContentSource); writer.WriteEnumValue("defaultSize", DefaultSize); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardDefinitionCollectionResponse.cs index bc4dcfea305..1aee29410d0 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamsAppDashboardCardDefinitionCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAppDashboardCardDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppDashboardCardDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardIcon.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardIcon.cs index a8d7afeafa3..9789a960703 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardIcon.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppDashboardCardIcon.cs @@ -84,7 +84,7 @@ public TeamsAppDashboardCardIcon() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamsAppDashboardCardIcon CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppDashboardCardIcon(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("iconUrl", IconUrl); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("officeUIFabricIconName", OfficeUIFabricIconName); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppDefinition.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppDefinition.cs index 144f820415d..4e68348463c 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppDefinition.cs @@ -229,7 +229,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAppDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppDefinition(); } /// @@ -263,7 +263,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("allowedInstallationScopes", AllowedInstallationScopes); writer.WriteObjectValue("authorization", Authorization); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppDefinitionCollectionResponse.cs index 0f6cc1c7c1f..a179c1bc563 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamsAppDefinitionCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAppDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppIcon.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppIcon.cs index d52b1d074b1..2b78bcf6ef9 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppIcon.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppIcon.cs @@ -51,7 +51,7 @@ public string WebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAppIcon CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppIcon(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("hostedContent", HostedContent); writer.WriteStringValue("webUrl", WebUrl); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppInstallation.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppInstallation.cs index 6cdf00c28c1..7725e5728da 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppInstallation.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppInstallation.cs @@ -83,7 +83,7 @@ public partial class TeamsAppInstallation : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAppInstallation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -111,7 +111,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("consentedPermissionSet", ConsentedPermissionSet); writer.WriteObjectValue("scopeInfo", ScopeInfo); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppInstallationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppInstallationCollectionResponse.cs index 5c23324340a..bf4cbc329e6 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppInstallationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppInstallationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamsAppInstallationCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAppInstallationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppInstallationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppInstallationScopeInfo.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppInstallationScopeInfo.cs index 4e0b9a7f591..17fc35ef039 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppInstallationScopeInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppInstallationScopeInfo.cs @@ -58,7 +58,7 @@ public TeamsAppInstallationScopeInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamsAppInstallationScopeInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("scope", Scope); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppInstalledEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppInstalledEventMessageDetail.cs index 419525b1649..dae70cd41d1 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppInstalledEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppInstalledEventMessageDetail.cs @@ -74,7 +74,7 @@ public TeamsAppInstalledEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAppInstalledEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppInstalledEventMessageDetail(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteStringValue("teamsAppDisplayName", TeamsAppDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppPermissionSet.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppPermissionSet.cs index a356f0d7807..ed4feef88d0 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppPermissionSet.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppPermissionSet.cs @@ -68,7 +68,7 @@ public TeamsAppPermissionSet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamsAppPermissionSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppPermissionSet(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("resourceSpecificPermissions", ResourceSpecificPermissions); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppRemovedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppRemovedEventMessageDetail.cs index 9a8ad0caddf..655c3279f66 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppRemovedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppRemovedEventMessageDetail.cs @@ -74,7 +74,7 @@ public TeamsAppRemovedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAppRemovedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppRemovedEventMessageDetail(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteStringValue("teamsAppDisplayName", TeamsAppDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppResourceSpecificPermission.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppResourceSpecificPermission.cs index 5126555cffb..4379f5aec52 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppResourceSpecificPermission.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppResourceSpecificPermission.cs @@ -74,7 +74,7 @@ public TeamsAppResourceSpecificPermission() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamsAppResourceSpecificPermission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppResourceSpecificPermission(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("permissionType", PermissionType); writer.WriteStringValue("permissionValue", PermissionValue); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppSettings.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppSettings.cs index 3295c4826fc..97385836c25 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppSettings.cs @@ -53,7 +53,7 @@ public bool? IsUserPersonalScopeResourceSpecificConsentEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAppSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppSettings(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowUserRequestsForAppAccess", AllowUserRequestsForAppAccess); writer.WriteObjectValue("customAppSettings", CustomAppSettings); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAppUpgradedEventMessageDetail.cs b/src/Microsoft.Graph/Generated/Models/TeamsAppUpgradedEventMessageDetail.cs index 9de4479e359..a3fa5637f72 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAppUpgradedEventMessageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAppUpgradedEventMessageDetail.cs @@ -74,7 +74,7 @@ public TeamsAppUpgradedEventMessageDetail() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAppUpgradedEventMessageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAppUpgradedEventMessageDetail(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("initiator", Initiator); writer.WriteStringValue("teamsAppDisplayName", TeamsAppDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAsyncOperation.cs b/src/Microsoft.Graph/Generated/Models/TeamsAsyncOperation.cs index e99f92f63cd..6597f7e9a01 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAsyncOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAsyncOperation.cs @@ -97,7 +97,7 @@ public string TargetResourceLocation /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAsyncOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAsyncOperation(); } /// @@ -124,7 +124,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("attemptsCount", AttemptsCount); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsAsyncOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamsAsyncOperationCollectionResponse.cs index 5becc6970cc..d87f970b70f 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsAsyncOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsAsyncOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamsAsyncOperationCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsAsyncOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsAsyncOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamsChannelPlanner.cs b/src/Microsoft.Graph/Generated/Models/TeamsChannelPlanner.cs index bc183c9cf5e..39264284451 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsChannelPlanner.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsChannelPlanner.cs @@ -35,7 +35,7 @@ public partial class TeamsChannelPlanner : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsChannelPlanner CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsChannelPlanner(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("plans", Plans); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamsLicensingDetails.cs b/src/Microsoft.Graph/Generated/Models/TeamsLicensingDetails.cs index 31a8ac33b78..5840244ef18 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsLicensingDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsLicensingDetails.cs @@ -25,7 +25,7 @@ public bool? HasTeamsLicense /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsLicensingDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsLicensingDetails(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("hasTeamsLicense", HasTeamsLicense); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamsTab.cs b/src/Microsoft.Graph/Generated/Models/TeamsTab.cs index 28e9de784a9..4a64fb2076d 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsTab.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsTab.cs @@ -131,7 +131,7 @@ public string WebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsTab CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsTab(); } /// @@ -157,7 +157,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("configuration", Configuration); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsTabCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamsTabCollectionResponse.cs index babaf4ce3ac..bc26ca3ca10 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsTabCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsTabCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamsTabCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsTabCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsTabCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamsTabConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamsTabConfiguration.cs index 36ff1a6b409..33b47ecaf14 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsTabConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsTabConfiguration.cs @@ -116,7 +116,7 @@ public TeamsTabConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamsTabConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsTabConfiguration(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("contentUrl", ContentUrl); writer.WriteStringValue("entityId", EntityId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamsTemplate.cs b/src/Microsoft.Graph/Generated/Models/TeamsTemplate.cs index 3f849c395ab..294af7744fa 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsTemplate.cs @@ -19,7 +19,7 @@ public partial class TeamsTemplate : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsTemplate(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TeamsTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamsTemplateCollectionResponse.cs index e2144cd95a3..1a918de0304 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamsTemplateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamsTemplateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamsTemplateCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamsTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamsTemplateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Teamwork.cs b/src/Microsoft.Graph/Generated/Models/Teamwork.cs index 616b707e7a7..ff0c990d5f9 100644 --- a/src/Microsoft.Graph/Generated/Models/Teamwork.cs +++ b/src/Microsoft.Graph/Generated/Models/Teamwork.cs @@ -137,7 +137,7 @@ public string Region /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Teamwork CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Teamwork(); } /// @@ -164,7 +164,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("deletedChats", DeletedChats); writer.WriteCollectionOfObjectValues("deletedTeams", DeletedTeams); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkAccountConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkAccountConfiguration.cs index 9c45e9add94..3a507518735 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkAccountConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkAccountConfiguration.cs @@ -74,7 +74,7 @@ public TeamworkAccountConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkAccountConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkAccountConfiguration(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("onPremisesCalendarSyncConfiguration", OnPremisesCalendarSyncConfiguration); writer.WriteEnumValue("supportedClient", SupportedClient); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkActivePeripherals.cs b/src/Microsoft.Graph/Generated/Models/TeamworkActivePeripherals.cs index 28f2a2ffadc..f4aef8f9fab 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkActivePeripherals.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkActivePeripherals.cs @@ -132,7 +132,7 @@ public TeamworkActivePeripherals() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkActivePeripherals CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkActivePeripherals(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("communicationSpeaker", CommunicationSpeaker); writer.WriteObjectValue("contentCamera", ContentCamera); writer.WriteObjectValue("microphone", Microphone); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkActivityTopic.cs b/src/Microsoft.Graph/Generated/Models/TeamworkActivityTopic.cs index f0544d12e98..cf7058545d7 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkActivityTopic.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkActivityTopic.cs @@ -90,7 +90,7 @@ public TeamworkActivityTopic() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkActivityTopic CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkActivityTopic(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("source", Source); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkApplicationIdentity.cs b/src/Microsoft.Graph/Generated/Models/TeamworkApplicationIdentity.cs index 44152159275..ccc885f9e16 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkApplicationIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkApplicationIdentity.cs @@ -32,7 +32,7 @@ public TeamworkApplicationIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkApplicationIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkApplicationIdentity(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("applicationIdentityType", ApplicationIdentityType); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkBot.cs b/src/Microsoft.Graph/Generated/Models/TeamworkBot.cs index a30a9dc91dc..ee98c4fbb73 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkBot.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkBot.cs @@ -19,7 +19,7 @@ public partial class TeamworkBot : global::Microsoft.Graph.Beta.Models.Entity, I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkBot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkBot(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkCameraConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkCameraConfiguration.cs index d333f5c7002..4d82dbb1ac0 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkCameraConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkCameraConfiguration.cs @@ -100,7 +100,7 @@ public TeamworkCameraConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkCameraConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkCameraConfiguration(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("cameras", Cameras); writer.WriteObjectValue("contentCameraConfiguration", ContentCameraConfiguration); writer.WriteObjectValue("defaultContentCamera", DefaultContentCamera); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkConfiguredPeripheral.cs b/src/Microsoft.Graph/Generated/Models/TeamworkConfiguredPeripheral.cs index f57decc8d40..4269fc56711 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkConfiguredPeripheral.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkConfiguredPeripheral.cs @@ -74,7 +74,7 @@ public TeamworkConfiguredPeripheral() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkConfiguredPeripheral CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkConfiguredPeripheral(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isOptional", IsOptional); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("peripheral", Peripheral); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkConnection.cs b/src/Microsoft.Graph/Generated/Models/TeamworkConnection.cs index 6c8aec9aa91..2e31c8b35d4 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkConnection.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkConnection.cs @@ -64,7 +64,7 @@ public TeamworkConnection() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkConnection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkConnection(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("connectionStatus", ConnectionStatus); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkContentCameraConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkContentCameraConfiguration.cs index e38a2985bad..33e5f885eef 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkContentCameraConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkContentCameraConfiguration.cs @@ -70,7 +70,7 @@ public TeamworkContentCameraConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkContentCameraConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkContentCameraConfiguration(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isContentCameraInverted", IsContentCameraInverted); writer.WriteBoolValue("isContentCameraOptional", IsContentCameraOptional); writer.WriteBoolValue("isContentEnhancementEnabled", IsContentEnhancementEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkConversationIdentity.cs b/src/Microsoft.Graph/Generated/Models/TeamworkConversationIdentity.cs index f1584121482..d16a23b93e5 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkConversationIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkConversationIdentity.cs @@ -32,7 +32,7 @@ public TeamworkConversationIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkConversationIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkConversationIdentity(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("conversationIdentityType", ConversationIdentityType); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkDateTimeConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkDateTimeConfiguration.cs index 77483b6a86d..24db144ff0d 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkDateTimeConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkDateTimeConfiguration.cs @@ -113,7 +113,7 @@ public TeamworkDateTimeConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkDateTimeConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkDateTimeConfiguration(); } /// @@ -138,7 +138,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("dateFormat", DateFormat); writer.WriteStringValue("@odata.type", OdataType); writer.WriteTimeValue("officeHoursEndTime", OfficeHoursEndTime); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkDevice.cs b/src/Microsoft.Graph/Generated/Models/TeamworkDevice.cs index af36988bacf..48923e18ba3 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkDevice.cs @@ -209,7 +209,7 @@ public string Notes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkDevice(); } /// @@ -243,7 +243,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("activity", Activity); writer.WriteEnumValue("activityState", ActivityState); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkDeviceActivity.cs b/src/Microsoft.Graph/Generated/Models/TeamworkDeviceActivity.cs index a08575e0f39..c4fc8c54c34 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkDeviceActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkDeviceActivity.cs @@ -79,7 +79,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkDeviceActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkDeviceActivity(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("activePeripherals", ActivePeripherals); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkDeviceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamworkDeviceCollectionResponse.cs index 6ecbd878046..8574d75037a 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkDeviceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkDeviceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamworkDeviceCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkDeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkDeviceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkDeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkDeviceConfiguration.cs index 7f02d39703a..6efe65f71b0 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkDeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkDeviceConfiguration.cs @@ -191,7 +191,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkDeviceConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkDeviceConfiguration(); } /// @@ -222,7 +222,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("cameraConfiguration", CameraConfiguration); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkDeviceHealth.cs b/src/Microsoft.Graph/Generated/Models/TeamworkDeviceHealth.cs index 8bcee962421..a1f432039f8 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkDeviceHealth.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkDeviceHealth.cs @@ -143,7 +143,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkDeviceHealth CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkDeviceHealth(); } /// @@ -171,7 +171,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("connection", Connection); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkDeviceOperation.cs b/src/Microsoft.Graph/Generated/Models/TeamworkDeviceOperation.cs index 73de8d4c565..39133ce98a6 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkDeviceOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkDeviceOperation.cs @@ -113,7 +113,7 @@ public string Status /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkDeviceOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkDeviceOperation(); } /// @@ -141,7 +141,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("completedDateTime", CompletedDateTime); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkDeviceOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamworkDeviceOperationCollectionResponse.cs index 714917a1d8c..359323682a4 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkDeviceOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkDeviceOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamworkDeviceOperationCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkDeviceOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkDeviceOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkDeviceSoftwareVersions.cs b/src/Microsoft.Graph/Generated/Models/TeamworkDeviceSoftwareVersions.cs index 8dcecf5e904..e055b5892ca 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkDeviceSoftwareVersions.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkDeviceSoftwareVersions.cs @@ -132,7 +132,7 @@ public TeamworkDeviceSoftwareVersions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkDeviceSoftwareVersions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkDeviceSoftwareVersions(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("adminAgentSoftwareVersion", AdminAgentSoftwareVersion); writer.WriteStringValue("firmwareSoftwareVersion", FirmwareSoftwareVersion); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkDisplayConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkDisplayConfiguration.cs index ef99c55d61d..6431ee0b221 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkDisplayConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkDisplayConfiguration.cs @@ -102,7 +102,7 @@ public TeamworkDisplayConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkDisplayConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkDisplayConfiguration(); } /// @@ -127,7 +127,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("configuredDisplays", ConfiguredDisplays); writer.WriteIntValue("displayCount", DisplayCount); writer.WriteObjectValue("inBuiltDisplayScreenConfiguration", InBuiltDisplayScreenConfiguration); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkDisplayScreenConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkDisplayScreenConfiguration.cs index 77c0a542255..4f36f72d022 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkDisplayScreenConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkDisplayScreenConfiguration.cs @@ -82,7 +82,7 @@ public TeamworkDisplayScreenConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkDisplayScreenConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkDisplayScreenConfiguration(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("backlightBrightness", BacklightBrightness); writer.WriteTimeSpanValue("backlightTimeout", BacklightTimeout); writer.WriteBoolValue("isHighContrastEnabled", IsHighContrastEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkFeaturesConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkFeaturesConfiguration.cs index e775966f9b0..68144383e18 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkFeaturesConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkFeaturesConfiguration.cs @@ -92,7 +92,7 @@ public TeamworkFeaturesConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkFeaturesConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkFeaturesConfiguration(); } /// @@ -117,7 +117,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("emailToSendLogsAndFeedback", EmailToSendLogsAndFeedback); writer.WriteBoolValue("isAutoScreenShareEnabled", IsAutoScreenShareEnabled); writer.WriteBoolValue("isBluetoothBeaconingEnabled", IsBluetoothBeaconingEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkHardwareConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkHardwareConfiguration.cs index d040a59d0ae..cf537a46058 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkHardwareConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkHardwareConfiguration.cs @@ -100,7 +100,7 @@ public TeamworkHardwareConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkHardwareConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkHardwareConfiguration(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("compute", Compute); writer.WriteObjectValue("hdmiIngest", HdmiIngest); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkHardwareDetail.cs b/src/Microsoft.Graph/Generated/Models/TeamworkHardwareDetail.cs index bd3798742cd..4392d09afbf 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkHardwareDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkHardwareDetail.cs @@ -132,7 +132,7 @@ public TeamworkHardwareDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkHardwareDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkHardwareDetail(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("macAddresses", MacAddresses); writer.WriteStringValue("manufacturer", Manufacturer); writer.WriteStringValue("model", Model); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkHardwareHealth.cs b/src/Microsoft.Graph/Generated/Models/TeamworkHardwareHealth.cs index f694978009e..162b8387913 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkHardwareHealth.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkHardwareHealth.cs @@ -84,7 +84,7 @@ public TeamworkHardwareHealth() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkHardwareHealth CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkHardwareHealth(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("computeHealth", ComputeHealth); writer.WriteObjectValue("hdmiIngestHealth", HdmiIngestHealth); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkHostedContent.cs b/src/Microsoft.Graph/Generated/Models/TeamworkHostedContent.cs index 82480439c52..1b8022bbac5 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkHostedContent.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkHostedContent.cs @@ -51,7 +51,7 @@ public string ContentType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkHostedContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("contentBytes", ContentBytes); writer.WriteStringValue("contentType", ContentType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkLoginStatus.cs b/src/Microsoft.Graph/Generated/Models/TeamworkLoginStatus.cs index a67cbd97a9c..f942009e072 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkLoginStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkLoginStatus.cs @@ -100,7 +100,7 @@ public TeamworkLoginStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkLoginStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkLoginStatus(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("exchangeConnection", ExchangeConnection); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("skypeConnection", SkypeConnection); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkMicrophoneConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkMicrophoneConfiguration.cs index 15184d1e421..cf8081d9b3b 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkMicrophoneConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkMicrophoneConfiguration.cs @@ -90,7 +90,7 @@ public TeamworkMicrophoneConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkMicrophoneConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkMicrophoneConfiguration(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("defaultMicrophone", DefaultMicrophone); writer.WriteBoolValue("isMicrophoneOptional", IsMicrophoneOptional); writer.WriteCollectionOfObjectValues("microphones", Microphones); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkNetworkConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkNetworkConfiguration.cs index ce818789c45..e5208680d7a 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkNetworkConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkNetworkConfiguration.cs @@ -176,7 +176,7 @@ public TeamworkNetworkConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkNetworkConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkNetworkConfiguration(); } /// @@ -205,7 +205,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("defaultGateway", DefaultGateway); writer.WriteStringValue("domainName", DomainName); writer.WriteStringValue("hostName", HostName); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkNotificationRecipient.cs b/src/Microsoft.Graph/Generated/Models/TeamworkNotificationRecipient.cs index 33babd028eb..3458606a15d 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkNotificationRecipient.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkNotificationRecipient.cs @@ -52,7 +52,7 @@ public TeamworkNotificationRecipient() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkNotificationRecipient CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkOnPremisesCalendarSyncConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkOnPremisesCalendarSyncConfiguration.cs index a6ac807937d..6f7b8654178 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkOnPremisesCalendarSyncConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkOnPremisesCalendarSyncConfiguration.cs @@ -100,7 +100,7 @@ public TeamworkOnPremisesCalendarSyncConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkOnPremisesCalendarSyncConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkOnPremisesCalendarSyncConfiguration(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("domain", Domain); writer.WriteStringValue("domainUserName", DomainUserName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkOnlineMeetingInfo.cs b/src/Microsoft.Graph/Generated/Models/TeamworkOnlineMeetingInfo.cs index f991612c3b0..4531171760c 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkOnlineMeetingInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkOnlineMeetingInfo.cs @@ -100,7 +100,7 @@ public TeamworkOnlineMeetingInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkOnlineMeetingInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkOnlineMeetingInfo(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("calendarEventId", CalendarEventId); writer.WriteStringValue("joinWebUrl", JoinWebUrl); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkPeripheral.cs b/src/Microsoft.Graph/Generated/Models/TeamworkPeripheral.cs index e6a7b6f8b93..a28e6a0a586 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkPeripheral.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkPeripheral.cs @@ -67,7 +67,7 @@ public string VendorId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkPeripheral CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkPeripheral(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("productId", ProductId); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkPeripheralHealth.cs b/src/Microsoft.Graph/Generated/Models/TeamworkPeripheralHealth.cs index 4230d5e3568..3cf1508c9ad 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkPeripheralHealth.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkPeripheralHealth.cs @@ -90,7 +90,7 @@ public TeamworkPeripheralHealth() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkPeripheralHealth CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkPeripheralHealth(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("connection", Connection); writer.WriteBoolValue("isOptional", IsOptional); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkPeripheralsHealth.cs b/src/Microsoft.Graph/Generated/Models/TeamworkPeripheralsHealth.cs index 5dec21a4168..ff4d1b1fdf8 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkPeripheralsHealth.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkPeripheralsHealth.cs @@ -148,7 +148,7 @@ public TeamworkPeripheralsHealth() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkPeripheralsHealth CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkPeripheralsHealth(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("communicationSpeakerHealth", CommunicationSpeakerHealth); writer.WriteObjectValue("contentCameraHealth", ContentCameraHealth); writer.WriteCollectionOfObjectValues("displayHealthCollection", DisplayHealthCollection); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkSoftwareUpdateHealth.cs b/src/Microsoft.Graph/Generated/Models/TeamworkSoftwareUpdateHealth.cs index 52597eb3bd0..926c5327d43 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkSoftwareUpdateHealth.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkSoftwareUpdateHealth.cs @@ -148,7 +148,7 @@ public TeamworkSoftwareUpdateHealth() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkSoftwareUpdateHealth CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkSoftwareUpdateHealth(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("adminAgentSoftwareUpdateStatus", AdminAgentSoftwareUpdateStatus); writer.WriteObjectValue("companyPortalSoftwareUpdateStatus", CompanyPortalSoftwareUpdateStatus); writer.WriteObjectValue("firmwareSoftwareUpdateStatus", FirmwareSoftwareUpdateStatus); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkSoftwareUpdateStatus.cs b/src/Microsoft.Graph/Generated/Models/TeamworkSoftwareUpdateStatus.cs index eaecd50456d..446fad81b0d 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkSoftwareUpdateStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkSoftwareUpdateStatus.cs @@ -90,7 +90,7 @@ public TeamworkSoftwareUpdateStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkSoftwareUpdateStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkSoftwareUpdateStatus(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("availableVersion", AvailableVersion); writer.WriteStringValue("currentVersion", CurrentVersion); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkSpeakerConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkSpeakerConfiguration.cs index 87696210ed7..3f64b0deb94 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkSpeakerConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkSpeakerConfiguration.cs @@ -112,7 +112,7 @@ public TeamworkSpeakerConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkSpeakerConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkSpeakerConfiguration(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("defaultCommunicationSpeaker", DefaultCommunicationSpeaker); writer.WriteObjectValue("defaultSpeaker", DefaultSpeaker); writer.WriteBoolValue("isCommunicationSpeakerOptional", IsCommunicationSpeakerOptional); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkSystemConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkSystemConfiguration.cs index 164ad98da65..23c1650a160 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkSystemConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkSystemConfiguration.cs @@ -184,7 +184,7 @@ public TeamworkSystemConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkSystemConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkSystemConfiguration(); } /// @@ -216,7 +216,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("dateTimeConfiguration", DateTimeConfiguration); writer.WriteStringValue("defaultPassword", DefaultPassword); writer.WriteTimeSpanValue("deviceLockTimeout", DeviceLockTimeout); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkTag.cs b/src/Microsoft.Graph/Generated/Models/TeamworkTag.cs index d532cbef366..a1172d41a70 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkTag.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkTag.cs @@ -95,7 +95,7 @@ public string TeamId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkTag CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkTag(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkTagCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamworkTagCollectionResponse.cs index a92103ee856..9e853038b74 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkTagCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkTagCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamworkTagCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkTagCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkTagCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkTagIdentity.cs b/src/Microsoft.Graph/Generated/Models/TeamworkTagIdentity.cs index 123b26429a2..6b147ca0632 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkTagIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkTagIdentity.cs @@ -26,7 +26,7 @@ public TeamworkTagIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkTagIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkTagIdentity(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkTagMember.cs b/src/Microsoft.Graph/Generated/Models/TeamworkTagMember.cs index a3c1e3487b5..643d27ccad4 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkTagMember.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkTagMember.cs @@ -67,7 +67,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkTagMember CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkTagMember(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("tenantId", TenantId); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkTagMemberCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TeamworkTagMemberCollectionResponse.cs index b2669aa8be5..434cd3d186b 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkTagMemberCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkTagMemberCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TeamworkTagMemberCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkTagMemberCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkTagMemberCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkTeamsClientConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TeamworkTeamsClientConfiguration.cs index 56372a56355..bc336b5d648 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkTeamsClientConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkTeamsClientConfiguration.cs @@ -84,7 +84,7 @@ public TeamworkTeamsClientConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeamworkTeamsClientConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkTeamsClientConfiguration(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("accountConfiguration", AccountConfiguration); writer.WriteObjectValue("featuresConfiguration", FeaturesConfiguration); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TeamworkUserIdentity.cs b/src/Microsoft.Graph/Generated/Models/TeamworkUserIdentity.cs index ab0973d7b77..076b2227f2e 100644 --- a/src/Microsoft.Graph/Generated/Models/TeamworkUserIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/TeamworkUserIdentity.cs @@ -48,7 +48,7 @@ public TeamworkUserIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeamworkUserIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeamworkUserIdentity(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("userIdentityType", UserIdentityType); writer.WriteStringValue("userPrincipalName", UserPrincipalName); diff --git a/src/Microsoft.Graph/Generated/Models/TelecomExpenseManagementPartner.cs b/src/Microsoft.Graph/Generated/Models/TelecomExpenseManagementPartner.cs index 2194ba8f0a9..8227d2ae443 100644 --- a/src/Microsoft.Graph/Generated/Models/TelecomExpenseManagementPartner.cs +++ b/src/Microsoft.Graph/Generated/Models/TelecomExpenseManagementPartner.cs @@ -70,7 +70,7 @@ public string Url /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TelecomExpenseManagementPartner CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TelecomExpenseManagementPartner(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("appAuthorized", AppAuthorized); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/TelecomExpenseManagementPartnerCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TelecomExpenseManagementPartnerCollectionResponse.cs index 10eb152d524..6c324cf7801 100644 --- a/src/Microsoft.Graph/Generated/Models/TelecomExpenseManagementPartnerCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TelecomExpenseManagementPartnerCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TelecomExpenseManagementPartnerCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TelecomExpenseManagementPartnerCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TelecomExpenseManagementPartnerCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceAudioQuality.cs b/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceAudioQuality.cs index ab656db3f8e..353b9c5301b 100644 --- a/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceAudioQuality.cs +++ b/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceAudioQuality.cs @@ -26,7 +26,7 @@ public TeleconferenceDeviceAudioQuality() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeleconferenceDeviceAudioQuality CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeleconferenceDeviceAudioQuality(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceMediaQuality.cs b/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceMediaQuality.cs index c37802fa63d..c224e5980fa 100644 --- a/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceMediaQuality.cs +++ b/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceMediaQuality.cs @@ -198,7 +198,7 @@ public TeleconferenceDeviceMediaQuality() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeleconferenceDeviceMediaQuality CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -246,7 +246,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteTimeSpanValue("averageInboundJitter", AverageInboundJitter); writer.WriteDoubleValue("averageInboundPacketLossRateInPercentage", AverageInboundPacketLossRateInPercentage); writer.WriteTimeSpanValue("averageInboundRoundTripDelay", AverageInboundRoundTripDelay); diff --git a/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceQuality.cs b/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceQuality.cs index 905c41bf856..c3539376932 100644 --- a/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceQuality.cs +++ b/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceQuality.cs @@ -182,7 +182,7 @@ public TeleconferenceDeviceQuality() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TeleconferenceDeviceQuality CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeleconferenceDeviceQuality(); } /// @@ -212,7 +212,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteGuidValue("callChainId", CallChainId); writer.WriteStringValue("cloudServiceDeploymentEnvironment", CloudServiceDeploymentEnvironment); writer.WriteStringValue("cloudServiceDeploymentId", CloudServiceDeploymentId); diff --git a/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceScreenSharingQuality.cs b/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceScreenSharingQuality.cs index 0579957804c..388b43320de 100644 --- a/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceScreenSharingQuality.cs +++ b/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceScreenSharingQuality.cs @@ -19,7 +19,7 @@ public partial class TeleconferenceDeviceScreenSharingQuality : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeleconferenceDeviceScreenSharingQuality CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TeleconferenceDeviceScreenSharingQuality(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceVideoQuality.cs b/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceVideoQuality.cs index b83d673f8ba..57a692f9671 100644 --- a/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceVideoQuality.cs +++ b/src/Microsoft.Graph/Generated/Models/TeleconferenceDeviceVideoQuality.cs @@ -50,7 +50,7 @@ public TeleconferenceDeviceVideoQuality() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TeleconferenceDeviceVideoQuality CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDoubleValue("averageInboundBitRate", AverageInboundBitRate); writer.WriteDoubleValue("averageInboundFrameRate", AverageInboundFrameRate); diff --git a/src/Microsoft.Graph/Generated/Models/Template.cs b/src/Microsoft.Graph/Generated/Models/Template.cs index a8c0855b260..f46061acbfd 100644 --- a/src/Microsoft.Graph/Generated/Models/Template.cs +++ b/src/Microsoft.Graph/Generated/Models/Template.cs @@ -35,7 +35,7 @@ public partial class Template : global::Microsoft.Graph.Beta.Models.Entity, IPar /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Template CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Template(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("deviceTemplates", DeviceTemplates); } diff --git a/src/Microsoft.Graph/Generated/Models/TemporaryAccessPassAuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/TemporaryAccessPassAuthenticationMethod.cs index 0a56a1c9878..9151bee5ae0 100644 --- a/src/Microsoft.Graph/Generated/Models/TemporaryAccessPassAuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/TemporaryAccessPassAuthenticationMethod.cs @@ -60,7 +60,7 @@ public TemporaryAccessPassAuthenticationMethod() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TemporaryAccessPassAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TemporaryAccessPassAuthenticationMethod(); } /// @@ -83,7 +83,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isUsableOnce", IsUsableOnce); writer.WriteIntValue("lifetimeInMinutes", LifetimeInMinutes); diff --git a/src/Microsoft.Graph/Generated/Models/TemporaryAccessPassAuthenticationMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TemporaryAccessPassAuthenticationMethodCollectionResponse.cs index fd966c0c326..e1365220cbc 100644 --- a/src/Microsoft.Graph/Generated/Models/TemporaryAccessPassAuthenticationMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TemporaryAccessPassAuthenticationMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TemporaryAccessPassAuthenticationMethodCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TemporaryAccessPassAuthenticationMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TemporaryAccessPassAuthenticationMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TemporaryAccessPassAuthenticationMethodConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TemporaryAccessPassAuthenticationMethodConfiguration.cs index 9839c1e710f..22e66432d8d 100644 --- a/src/Microsoft.Graph/Generated/Models/TemporaryAccessPassAuthenticationMethodConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TemporaryAccessPassAuthenticationMethodConfiguration.cs @@ -72,7 +72,7 @@ public TemporaryAccessPassAuthenticationMethodConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TemporaryAccessPassAuthenticationMethodConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TemporaryAccessPassAuthenticationMethodConfiguration(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("defaultLength", DefaultLength); writer.WriteIntValue("defaultLifetimeInMinutes", DefaultLifetimeInMinutes); diff --git a/src/Microsoft.Graph/Generated/Models/TenantAppManagementPolicy.cs b/src/Microsoft.Graph/Generated/Models/TenantAppManagementPolicy.cs index 6b868ae5fa5..538fac040b8 100644 --- a/src/Microsoft.Graph/Generated/Models/TenantAppManagementPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/TenantAppManagementPolicy.cs @@ -64,7 +64,7 @@ public TenantAppManagementPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TenantAppManagementPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TenantAppManagementPolicy(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("applicationRestrictions", ApplicationRestrictions); writer.WriteBoolValue("isEnabled", IsEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/TenantAttachRBAC.cs b/src/Microsoft.Graph/Generated/Models/TenantAttachRBAC.cs index 6309b19b8d6..f92d06d0cde 100644 --- a/src/Microsoft.Graph/Generated/Models/TenantAttachRBAC.cs +++ b/src/Microsoft.Graph/Generated/Models/TenantAttachRBAC.cs @@ -20,7 +20,7 @@ public partial class TenantAttachRBAC : global::Microsoft.Graph.Beta.Models.Enti /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TenantAttachRBAC CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TenantAttachRBAC(); } /// @@ -39,7 +39,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TenantAttachRBACState.cs b/src/Microsoft.Graph/Generated/Models/TenantAttachRBACState.cs index 504afe52d0e..7945cc3f433 100644 --- a/src/Microsoft.Graph/Generated/Models/TenantAttachRBACState.cs +++ b/src/Microsoft.Graph/Generated/Models/TenantAttachRBACState.cs @@ -59,7 +59,7 @@ public TenantAttachRBACState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TenantAttachRBACState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TenantAttachRBACState(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("enabled", Enabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/TenantDataSecurityAndGovernance.cs b/src/Microsoft.Graph/Generated/Models/TenantDataSecurityAndGovernance.cs index 96d51f776c2..85dc387f047 100644 --- a/src/Microsoft.Graph/Generated/Models/TenantDataSecurityAndGovernance.cs +++ b/src/Microsoft.Graph/Generated/Models/TenantDataSecurityAndGovernance.cs @@ -58,7 +58,7 @@ public TenantDataSecurityAndGovernance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TenantDataSecurityAndGovernance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TenantDataSecurityAndGovernance(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("policyFiles", PolicyFiles); writer.WriteObjectValue("protectionScopes", ProtectionScopes); diff --git a/src/Microsoft.Graph/Generated/Models/TenantInformation.cs b/src/Microsoft.Graph/Generated/Models/TenantInformation.cs index 487cb178b3e..6a8094ecc70 100644 --- a/src/Microsoft.Graph/Generated/Models/TenantInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/TenantInformation.cs @@ -116,7 +116,7 @@ public TenantInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TenantInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TenantInformation(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("defaultDomainName", DefaultDomainName); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("federationBrandName", FederationBrandName); diff --git a/src/Microsoft.Graph/Generated/Models/TenantProtectionScopeContainer.cs b/src/Microsoft.Graph/Generated/Models/TenantProtectionScopeContainer.cs index 278f13c594c..ea24ff19346 100644 --- a/src/Microsoft.Graph/Generated/Models/TenantProtectionScopeContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/TenantProtectionScopeContainer.cs @@ -19,7 +19,7 @@ public partial class TenantProtectionScopeContainer : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TenantProtectionScopeContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TenantProtectionScopeContainer(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TenantReference.cs b/src/Microsoft.Graph/Generated/Models/TenantReference.cs index 12148bec8cb..cec24d889c7 100644 --- a/src/Microsoft.Graph/Generated/Models/TenantReference.cs +++ b/src/Microsoft.Graph/Generated/Models/TenantReference.cs @@ -68,7 +68,7 @@ public TenantReference() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TenantReference CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TenantReference(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("tenantId", TenantId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/TenantReferenceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TenantReferenceCollectionResponse.cs index c0f65e5bb86..5eccd860dcf 100644 --- a/src/Microsoft.Graph/Generated/Models/TenantReferenceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TenantReferenceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TenantReferenceCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TenantReferenceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TenantReferenceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TenantRelationship.cs b/src/Microsoft.Graph/Generated/Models/TenantRelationship.cs index ee6569cd1b1..5effeab6178 100644 --- a/src/Microsoft.Graph/Generated/Models/TenantRelationship.cs +++ b/src/Microsoft.Graph/Generated/Models/TenantRelationship.cs @@ -117,7 +117,7 @@ public TenantRelationship() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TenantRelationship CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TenantRelationship(); } /// @@ -141,7 +141,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("delegatedAdminCustomers", DelegatedAdminCustomers); writer.WriteCollectionOfObjectValues("delegatedAdminRelationships", DelegatedAdminRelationships); writer.WriteObjectValue("managedTenants", ManagedTenants); diff --git a/src/Microsoft.Graph/Generated/Models/TenantRelationshipAccessPolicyBase.cs b/src/Microsoft.Graph/Generated/Models/TenantRelationshipAccessPolicyBase.cs index 071ddf78b2f..21d29b5b52c 100644 --- a/src/Microsoft.Graph/Generated/Models/TenantRelationshipAccessPolicyBase.cs +++ b/src/Microsoft.Graph/Generated/Models/TenantRelationshipAccessPolicyBase.cs @@ -42,7 +42,7 @@ public TenantRelationshipAccessPolicyBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TenantRelationshipAccessPolicyBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("definition", Definition); } diff --git a/src/Microsoft.Graph/Generated/Models/TenantScope.cs b/src/Microsoft.Graph/Generated/Models/TenantScope.cs index 9b6d952ac76..021337c11e0 100644 --- a/src/Microsoft.Graph/Generated/Models/TenantScope.cs +++ b/src/Microsoft.Graph/Generated/Models/TenantScope.cs @@ -26,7 +26,7 @@ public TenantScope() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TenantScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TenantScope(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TenantSetupInfo.cs b/src/Microsoft.Graph/Generated/Models/TenantSetupInfo.cs index fa53895e615..2e9cf4e82c5 100644 --- a/src/Microsoft.Graph/Generated/Models/TenantSetupInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/TenantSetupInfo.cs @@ -85,7 +85,7 @@ public string UserRolesActions /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TenantSetupInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TenantSetupInfo(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("defaultRolesSettings", DefaultRolesSettings); writer.WriteBoolValue("firstTimeSetup", FirstTimeSetup); diff --git a/src/Microsoft.Graph/Generated/Models/TermColumn.cs b/src/Microsoft.Graph/Generated/Models/TermColumn.cs index 326b37f827f..22966f1b2d2 100644 --- a/src/Microsoft.Graph/Generated/Models/TermColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/TermColumn.cs @@ -97,7 +97,7 @@ public TermColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TermColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermColumn(); } /// @@ -121,7 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowMultipleValues", AllowMultipleValues); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("parentTerm", ParentTerm); diff --git a/src/Microsoft.Graph/Generated/Models/TermStore/Group.cs b/src/Microsoft.Graph/Generated/Models/TermStore/Group.cs index 2bdd1f10f9b..702cd8b0aea 100644 --- a/src/Microsoft.Graph/Generated/Models/TermStore/Group.cs +++ b/src/Microsoft.Graph/Generated/Models/TermStore/Group.cs @@ -95,7 +95,7 @@ public string ParentSiteId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermStore.Group CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermStore.Group(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/TermStore/GroupCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TermStore/GroupCollectionResponse.cs index 08d8cd8cbe5..a2eb7635845 100644 --- a/src/Microsoft.Graph/Generated/Models/TermStore/GroupCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TermStore/GroupCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class GroupCollectionResponse : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermStore.GroupCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermStore.GroupCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TermStore/LocalizedDescription.cs b/src/Microsoft.Graph/Generated/Models/TermStore/LocalizedDescription.cs index 4ed6042f501..19ff6d15f3f 100644 --- a/src/Microsoft.Graph/Generated/Models/TermStore/LocalizedDescription.cs +++ b/src/Microsoft.Graph/Generated/Models/TermStore/LocalizedDescription.cs @@ -84,7 +84,7 @@ public LocalizedDescription() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TermStore.LocalizedDescription CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermStore.LocalizedDescription(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("description", Description); writer.WriteStringValue("languageTag", LanguageTag); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TermStore/LocalizedLabel.cs b/src/Microsoft.Graph/Generated/Models/TermStore/LocalizedLabel.cs index 7cb0491d046..05ec688c9f5 100644 --- a/src/Microsoft.Graph/Generated/Models/TermStore/LocalizedLabel.cs +++ b/src/Microsoft.Graph/Generated/Models/TermStore/LocalizedLabel.cs @@ -90,7 +90,7 @@ public LocalizedLabel() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TermStore.LocalizedLabel CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermStore.LocalizedLabel(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isDefault", IsDefault); writer.WriteStringValue("languageTag", LanguageTag); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/TermStore/LocalizedName.cs b/src/Microsoft.Graph/Generated/Models/TermStore/LocalizedName.cs index 31495bb1e46..981976806c8 100644 --- a/src/Microsoft.Graph/Generated/Models/TermStore/LocalizedName.cs +++ b/src/Microsoft.Graph/Generated/Models/TermStore/LocalizedName.cs @@ -84,7 +84,7 @@ public LocalizedName() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TermStore.LocalizedName CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermStore.LocalizedName(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("languageTag", LanguageTag); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TermStore/Relation.cs b/src/Microsoft.Graph/Generated/Models/TermStore/Relation.cs index 6c6817023d5..ef024f0e5c6 100644 --- a/src/Microsoft.Graph/Generated/Models/TermStore/Relation.cs +++ b/src/Microsoft.Graph/Generated/Models/TermStore/Relation.cs @@ -73,7 +73,7 @@ public partial class Relation : global::Microsoft.Graph.Beta.Models.Entity, IPar /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermStore.Relation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermStore.Relation(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("fromTerm", FromTerm); writer.WriteEnumValue("relationship", Relationship); diff --git a/src/Microsoft.Graph/Generated/Models/TermStore/RelationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TermStore/RelationCollectionResponse.cs index 1f437c77568..df850a8dd30 100644 --- a/src/Microsoft.Graph/Generated/Models/TermStore/RelationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TermStore/RelationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class RelationCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermStore.RelationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermStore.RelationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TermStore/Set.cs b/src/Microsoft.Graph/Generated/Models/TermStore/Set.cs index bb4a268ed06..4826b4ca61b 100644 --- a/src/Microsoft.Graph/Generated/Models/TermStore/Set.cs +++ b/src/Microsoft.Graph/Generated/Models/TermStore/Set.cs @@ -137,7 +137,7 @@ public string Description /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermStore.Set CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermStore.Set(); } /// @@ -164,7 +164,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("children", Children); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/TermStore/SetCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TermStore/SetCollectionResponse.cs index 398ec56fccc..8c26a0f84bd 100644 --- a/src/Microsoft.Graph/Generated/Models/TermStore/SetCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TermStore/SetCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class SetCollectionResponse : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermStore.SetCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermStore.SetCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TermStore/Store.cs b/src/Microsoft.Graph/Generated/Models/TermStore/Store.cs index 2e06a3dd75d..b9a7818fea2 100644 --- a/src/Microsoft.Graph/Generated/Models/TermStore/Store.cs +++ b/src/Microsoft.Graph/Generated/Models/TermStore/Store.cs @@ -83,7 +83,7 @@ public List LanguageTags /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermStore.Store CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermStore.Store(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("defaultLanguageTag", DefaultLanguageTag); writer.WriteCollectionOfObjectValues("groups", Groups); diff --git a/src/Microsoft.Graph/Generated/Models/TermStore/Term.cs b/src/Microsoft.Graph/Generated/Models/TermStore/Term.cs index 2c233a2f17b..8237d22a965 100644 --- a/src/Microsoft.Graph/Generated/Models/TermStore/Term.cs +++ b/src/Microsoft.Graph/Generated/Models/TermStore/Term.cs @@ -127,7 +127,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermStore.Term CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermStore.Term(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("children", Children); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/TermStore/TermCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TermStore/TermCollectionResponse.cs index 503c806ae41..fbc2f4c0c45 100644 --- a/src/Microsoft.Graph/Generated/Models/TermStore/TermCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TermStore/TermCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TermCollectionResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermStore.TermCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermStore.TermCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TermsAndConditions.cs b/src/Microsoft.Graph/Generated/Models/TermsAndConditions.cs index 2f46465fb99..a2deafb7bb0 100644 --- a/src/Microsoft.Graph/Generated/Models/TermsAndConditions.cs +++ b/src/Microsoft.Graph/Generated/Models/TermsAndConditions.cs @@ -188,7 +188,7 @@ public int? Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermsAndConditions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermsAndConditions(); } /// @@ -220,7 +220,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("acceptanceStatement", AcceptanceStatement); writer.WriteCollectionOfObjectValues("acceptanceStatuses", AcceptanceStatuses); diff --git a/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAcceptanceStatus.cs b/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAcceptanceStatus.cs index 80557752c8e..cae75ebaff8 100644 --- a/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAcceptanceStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAcceptanceStatus.cs @@ -80,7 +80,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermsAndConditionsAcceptanceStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermsAndConditionsAcceptanceStatus(); } /// @@ -104,7 +104,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("acceptedDateTime", AcceptedDateTime); writer.WriteIntValue("acceptedVersion", AcceptedVersion); diff --git a/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAcceptanceStatusCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAcceptanceStatusCollectionResponse.cs index 9dfaddb9d88..f4ab68cba37 100644 --- a/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAcceptanceStatusCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAcceptanceStatusCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TermsAndConditionsAcceptanceStatusCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermsAndConditionsAcceptanceStatusCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermsAndConditionsAcceptanceStatusCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAssignment.cs b/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAssignment.cs index 29a6da16186..b0cbec282fe 100644 --- a/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAssignment.cs @@ -36,7 +36,7 @@ public partial class TermsAndConditionsAssignment : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermsAndConditionsAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermsAndConditionsAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAssignmentCollectionResponse.cs index 26a61275326..b41b3e20ea4 100644 --- a/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TermsAndConditionsAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TermsAndConditionsAssignmentCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermsAndConditionsAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermsAndConditionsAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TermsAndConditionsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TermsAndConditionsCollectionResponse.cs index 82eed57751d..b895255e5d4 100644 --- a/src/Microsoft.Graph/Generated/Models/TermsAndConditionsCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TermsAndConditionsCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TermsAndConditionsCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermsAndConditionsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermsAndConditionsCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TermsAndConditionsGroupAssignment.cs b/src/Microsoft.Graph/Generated/Models/TermsAndConditionsGroupAssignment.cs index a56d279c8c4..37cdeadb683 100644 --- a/src/Microsoft.Graph/Generated/Models/TermsAndConditionsGroupAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/TermsAndConditionsGroupAssignment.cs @@ -52,7 +52,7 @@ public string TargetGroupId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermsAndConditionsGroupAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermsAndConditionsGroupAssignment(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("targetGroupId", TargetGroupId); writer.WriteObjectValue("termsAndConditions", TermsAndConditions); diff --git a/src/Microsoft.Graph/Generated/Models/TermsAndConditionsGroupAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TermsAndConditionsGroupAssignmentCollectionResponse.cs index 1659996c3af..961d06d394f 100644 --- a/src/Microsoft.Graph/Generated/Models/TermsAndConditionsGroupAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TermsAndConditionsGroupAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TermsAndConditionsGroupAssignmentCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermsAndConditionsGroupAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermsAndConditionsGroupAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TermsExpiration.cs b/src/Microsoft.Graph/Generated/Models/TermsExpiration.cs index 476c6e75133..381adafa81e 100644 --- a/src/Microsoft.Graph/Generated/Models/TermsExpiration.cs +++ b/src/Microsoft.Graph/Generated/Models/TermsExpiration.cs @@ -64,7 +64,7 @@ public TermsExpiration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TermsExpiration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermsExpiration(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteTimeSpanValue("frequency", Frequency); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/TermsOfUseContainer.cs b/src/Microsoft.Graph/Generated/Models/TermsOfUseContainer.cs index b322f20eac3..8c21620bfa4 100644 --- a/src/Microsoft.Graph/Generated/Models/TermsOfUseContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/TermsOfUseContainer.cs @@ -51,7 +51,7 @@ public partial class TermsOfUseContainer : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TermsOfUseContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TermsOfUseContainer(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("agreementAcceptances", AgreementAcceptances); writer.WriteCollectionOfObjectValues("agreements", Agreements); diff --git a/src/Microsoft.Graph/Generated/Models/TextClassificationRequest.cs b/src/Microsoft.Graph/Generated/Models/TextClassificationRequest.cs index 68d14e9ed2c..ea220463f8e 100644 --- a/src/Microsoft.Graph/Generated/Models/TextClassificationRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/TextClassificationRequest.cs @@ -95,7 +95,7 @@ public string Text /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TextClassificationRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TextClassificationRequest(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("contentMetaData", ContentMetaData); writer.WriteStringValue("fileExtension", FileExtension); diff --git a/src/Microsoft.Graph/Generated/Models/TextColumn.cs b/src/Microsoft.Graph/Generated/Models/TextColumn.cs index baa5c1f6d1f..4b4331c7020 100644 --- a/src/Microsoft.Graph/Generated/Models/TextColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/TextColumn.cs @@ -92,7 +92,7 @@ public TextColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TextColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TextColumn(); } /// @@ -117,7 +117,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowMultipleLines", AllowMultipleLines); writer.WriteBoolValue("appendChangesToExistingText", AppendChangesToExistingText); writer.WriteIntValue("linesForEditing", LinesForEditing); diff --git a/src/Microsoft.Graph/Generated/Models/TextContent.cs b/src/Microsoft.Graph/Generated/Models/TextContent.cs index 60ef87861af..7f13d6345ce 100644 --- a/src/Microsoft.Graph/Generated/Models/TextContent.cs +++ b/src/Microsoft.Graph/Generated/Models/TextContent.cs @@ -42,7 +42,7 @@ public TextContent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TextContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TextContent(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("data", Data); } diff --git a/src/Microsoft.Graph/Generated/Models/TextWebPart.cs b/src/Microsoft.Graph/Generated/Models/TextWebPart.cs index 35af8293b0c..c4812c65305 100644 --- a/src/Microsoft.Graph/Generated/Models/TextWebPart.cs +++ b/src/Microsoft.Graph/Generated/Models/TextWebPart.cs @@ -42,7 +42,7 @@ public TextWebPart() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TextWebPart CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TextWebPart(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("innerHtml", InnerHtml); } diff --git a/src/Microsoft.Graph/Generated/Models/ThreatAssessmentRequest.cs b/src/Microsoft.Graph/Generated/Models/ThreatAssessmentRequest.cs index 0aa944133f6..43cb0e33002 100644 --- a/src/Microsoft.Graph/Generated/Models/ThreatAssessmentRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/ThreatAssessmentRequest.cs @@ -87,7 +87,7 @@ public DateTimeOffset? CreatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -122,7 +122,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("category", Category); writer.WriteEnumValue("contentType", ContentType); diff --git a/src/Microsoft.Graph/Generated/Models/ThreatAssessmentRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ThreatAssessmentRequestCollectionResponse.cs index dce65d5aa5e..b6806e681dc 100644 --- a/src/Microsoft.Graph/Generated/Models/ThreatAssessmentRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ThreatAssessmentRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ThreatAssessmentRequestCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ThreatAssessmentRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ThreatAssessmentResult.cs b/src/Microsoft.Graph/Generated/Models/ThreatAssessmentResult.cs index a5526145686..08bbfe1f53a 100644 --- a/src/Microsoft.Graph/Generated/Models/ThreatAssessmentResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ThreatAssessmentResult.cs @@ -47,7 +47,7 @@ public string Message /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ThreatAssessmentResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ThreatAssessmentResult(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("message", Message); diff --git a/src/Microsoft.Graph/Generated/Models/ThreatAssessmentResultCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ThreatAssessmentResultCollectionResponse.cs index 5ec3fa11d97..d7f219f2f0a 100644 --- a/src/Microsoft.Graph/Generated/Models/ThreatAssessmentResultCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ThreatAssessmentResultCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ThreatAssessmentResultCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ThreatAssessmentResultCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ThreatAssessmentResultCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Thumbnail.cs b/src/Microsoft.Graph/Generated/Models/Thumbnail.cs index b25f4643d02..322eef1a6cb 100644 --- a/src/Microsoft.Graph/Generated/Models/Thumbnail.cs +++ b/src/Microsoft.Graph/Generated/Models/Thumbnail.cs @@ -112,7 +112,7 @@ public Thumbnail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Thumbnail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Thumbnail(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("content", Content); writer.WriteIntValue("height", Height); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/ThumbnailColumn.cs b/src/Microsoft.Graph/Generated/Models/ThumbnailColumn.cs index 4084224389d..bc3afdd4e36 100644 --- a/src/Microsoft.Graph/Generated/Models/ThumbnailColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/ThumbnailColumn.cs @@ -52,7 +52,7 @@ public ThumbnailColumn() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ThumbnailColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ThumbnailColumn(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/ThumbnailSet.cs b/src/Microsoft.Graph/Generated/Models/ThumbnailSet.cs index 0cd2b6102b4..c401173515d 100644 --- a/src/Microsoft.Graph/Generated/Models/ThumbnailSet.cs +++ b/src/Microsoft.Graph/Generated/Models/ThumbnailSet.cs @@ -84,7 +84,7 @@ public partial class ThumbnailSet : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ThumbnailSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ThumbnailSet(); } /// @@ -107,7 +107,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("large", Large); writer.WriteObjectValue("medium", Medium); diff --git a/src/Microsoft.Graph/Generated/Models/ThumbnailSetCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ThumbnailSetCollectionResponse.cs index 4d485f90112..62eed3c3ef0 100644 --- a/src/Microsoft.Graph/Generated/Models/ThumbnailSetCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ThumbnailSetCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ThumbnailSetCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ThumbnailSetCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ThumbnailSetCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TiIndicator.cs b/src/Microsoft.Graph/Generated/Models/TiIndicator.cs index 51a543c7ab4..0a4e7374456 100644 --- a/src/Microsoft.Graph/Generated/Models/TiIndicator.cs +++ b/src/Microsoft.Graph/Generated/Models/TiIndicator.cs @@ -747,7 +747,7 @@ public string UserAgent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TiIndicator CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TiIndicator(); } /// @@ -824,7 +824,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("action", Action); writer.WriteCollectionOfPrimitiveValues("activityGroupNames", ActivityGroupNames); diff --git a/src/Microsoft.Graph/Generated/Models/TiIndicatorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TiIndicatorCollectionResponse.cs index 9876c3c1353..9db76313924 100644 --- a/src/Microsoft.Graph/Generated/Models/TiIndicatorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TiIndicatorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TiIndicatorCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TiIndicatorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TiIndicatorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TicketInfo.cs b/src/Microsoft.Graph/Generated/Models/TicketInfo.cs index 29f735dc16e..504d493a6e7 100644 --- a/src/Microsoft.Graph/Generated/Models/TicketInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/TicketInfo.cs @@ -116,7 +116,7 @@ public TicketInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TicketInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TicketInfo(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("ticketApproverIdentityId", TicketApproverIdentityId); writer.WriteStringValue("ticketNumber", TicketNumber); diff --git a/src/Microsoft.Graph/Generated/Models/TimeCard.cs b/src/Microsoft.Graph/Generated/Models/TimeCard.cs index bd6119d0ee7..dd266923ee1 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeCard.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeCard.cs @@ -134,7 +134,7 @@ public TimeCard() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TimeCard CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeCard(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("breaks", Breaks); writer.WriteObjectValue("clockInEvent", ClockInEvent); diff --git a/src/Microsoft.Graph/Generated/Models/TimeCardBreak.cs b/src/Microsoft.Graph/Generated/Models/TimeCardBreak.cs index f08a6289afe..23872d74b56 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeCardBreak.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeCardBreak.cs @@ -116,7 +116,7 @@ public TimeCardBreak() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TimeCardBreak CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeCardBreak(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("breakId", BreakId); writer.WriteObjectValue("end", End); writer.WriteObjectValue("notes", Notes); diff --git a/src/Microsoft.Graph/Generated/Models/TimeCardCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TimeCardCollectionResponse.cs index 864034d61dd..c2570ebefc2 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeCardCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeCardCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TimeCardCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TimeCardCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeCardCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TimeCardEntry.cs b/src/Microsoft.Graph/Generated/Models/TimeCardEntry.cs index 08426a5e4d4..b755f96890a 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeCardEntry.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeCardEntry.cs @@ -100,7 +100,7 @@ public TimeCardEntry() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TimeCardEntry CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeCardEntry(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("breaks", Breaks); writer.WriteObjectValue("clockInEvent", ClockInEvent); writer.WriteObjectValue("clockOutEvent", ClockOutEvent); diff --git a/src/Microsoft.Graph/Generated/Models/TimeCardEvent.cs b/src/Microsoft.Graph/Generated/Models/TimeCardEvent.cs index d1ea1dfa30b..e439148108e 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeCardEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeCardEvent.cs @@ -86,7 +86,7 @@ public TimeCardEvent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TimeCardEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeCardEvent(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("atApprovedLocation", AtApprovedLocation); writer.WriteDateTimeOffsetValue("dateTime", DateTime); writer.WriteBoolValue("isAtApprovedLocation", IsAtApprovedLocation); diff --git a/src/Microsoft.Graph/Generated/Models/TimeClockSettings.cs b/src/Microsoft.Graph/Generated/Models/TimeClockSettings.cs index 6c2d600b5c9..6cbf4da965f 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeClockSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeClockSettings.cs @@ -68,7 +68,7 @@ public TimeClockSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TimeClockSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeClockSettings(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("approvedLocation", ApprovedLocation); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/TimeConstraint.cs b/src/Microsoft.Graph/Generated/Models/TimeConstraint.cs index 3e6c755c36b..b927e95c632 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeConstraint.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeConstraint.cs @@ -74,7 +74,7 @@ public TimeConstraint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TimeConstraint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeConstraint(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("activityDomain", ActivityDomain); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("timeSlots", TimeSlots); diff --git a/src/Microsoft.Graph/Generated/Models/TimeOff.cs b/src/Microsoft.Graph/Generated/Models/TimeOff.cs index be5f8d6edae..af5e9694710 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeOff.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeOff.cs @@ -112,7 +112,7 @@ public TimeOff() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TimeOff CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeOff(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("draftTimeOff", DraftTimeOff); writer.WriteBoolValue("isStagedForDeletion", IsStagedForDeletion); diff --git a/src/Microsoft.Graph/Generated/Models/TimeOffCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TimeOffCollectionResponse.cs index f2fa5110a22..bf126c1293b 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeOffCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeOffCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TimeOffCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TimeOffCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeOffCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TimeOffItem.cs b/src/Microsoft.Graph/Generated/Models/TimeOffItem.cs index 1a9aee149e4..52a7cb05d1b 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeOffItem.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeOffItem.cs @@ -35,7 +35,7 @@ public string TimeOffReasonId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TimeOffItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeOffItem(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("timeOffReasonId", TimeOffReasonId); } diff --git a/src/Microsoft.Graph/Generated/Models/TimeOffReason.cs b/src/Microsoft.Graph/Generated/Models/TimeOffReason.cs index 804e51a347f..9bd23db27f4 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeOffReason.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeOffReason.cs @@ -70,7 +70,7 @@ public TimeOffReason() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TimeOffReason CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeOffReason(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("code", Code); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/TimeOffReasonCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TimeOffReasonCollectionResponse.cs index f643c7ad2e1..83955ebc44f 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeOffReasonCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeOffReasonCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TimeOffReasonCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TimeOffReasonCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeOffReasonCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TimeOffRequest.cs b/src/Microsoft.Graph/Generated/Models/TimeOffRequest.cs index c2014e26724..86a352ebf67 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeOffRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeOffRequest.cs @@ -54,7 +54,7 @@ public TimeOffRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TimeOffRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeOffRequest(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/TimeOffRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TimeOffRequestCollectionResponse.cs index 2537caa5f1c..77d983ad984 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeOffRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeOffRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TimeOffRequestCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TimeOffRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeOffRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TimePeriod.cs b/src/Microsoft.Graph/Generated/Models/TimePeriod.cs index f1130324218..6ad07eb1d5c 100644 --- a/src/Microsoft.Graph/Generated/Models/TimePeriod.cs +++ b/src/Microsoft.Graph/Generated/Models/TimePeriod.cs @@ -64,7 +64,7 @@ public TimePeriod() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TimePeriod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimePeriod(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/TimeRange.cs b/src/Microsoft.Graph/Generated/Models/TimeRange.cs index cf53043f14b..7a9bcd683d9 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeRange.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeRange.cs @@ -65,7 +65,7 @@ public TimeRange() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TimeRange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeRange(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteTimeValue("endTime", EndTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteTimeValue("startTime", StartTime); diff --git a/src/Microsoft.Graph/Generated/Models/TimeSeriesParameter.cs b/src/Microsoft.Graph/Generated/Models/TimeSeriesParameter.cs index f2b41281068..6d67baba402 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeSeriesParameter.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeSeriesParameter.cs @@ -81,7 +81,7 @@ public TimeSeriesParameter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TimeSeriesParameter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeSeriesParameter(); } /// @@ -104,7 +104,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("metricName", MetricName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TimeSlot.cs b/src/Microsoft.Graph/Generated/Models/TimeSlot.cs index f4de82ddac2..5dcb09f4606 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeSlot.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeSlot.cs @@ -84,7 +84,7 @@ public TimeSlot() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TimeSlot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeSlot(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("end", End); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("start", Start); diff --git a/src/Microsoft.Graph/Generated/Models/TimeZoneBase.cs b/src/Microsoft.Graph/Generated/Models/TimeZoneBase.cs index 74dfcc074bc..1e4b6929fdf 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeZoneBase.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeZoneBase.cs @@ -68,7 +68,7 @@ public TimeZoneBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TimeZoneBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/TimeZoneInformation.cs b/src/Microsoft.Graph/Generated/Models/TimeZoneInformation.cs index 6d4ef702f5e..8d228d02e2b 100644 --- a/src/Microsoft.Graph/Generated/Models/TimeZoneInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/TimeZoneInformation.cs @@ -84,7 +84,7 @@ public TimeZoneInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TimeZoneInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TimeZoneInformation(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("alias", Alias); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TitleArea.cs b/src/Microsoft.Graph/Generated/Models/TitleArea.cs index d1d8dccf63e..3c5182cec62 100644 --- a/src/Microsoft.Graph/Generated/Models/TitleArea.cs +++ b/src/Microsoft.Graph/Generated/Models/TitleArea.cs @@ -152,7 +152,7 @@ public TitleArea() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TitleArea CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TitleArea(); } /// @@ -182,7 +182,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("alternativeText", AlternativeText); writer.WriteBoolValue("enableGradientEffect", EnableGradientEffect); writer.WriteStringValue("imageWebUrl", ImageWebUrl); diff --git a/src/Microsoft.Graph/Generated/Models/ToLowercaseTransformation.cs b/src/Microsoft.Graph/Generated/Models/ToLowercaseTransformation.cs index 30f77216f89..6a66e3fc1e8 100644 --- a/src/Microsoft.Graph/Generated/Models/ToLowercaseTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ToLowercaseTransformation.cs @@ -26,7 +26,7 @@ public ToLowercaseTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ToLowercaseTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ToLowercaseTransformation(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/ToUppercaseTransformation.cs b/src/Microsoft.Graph/Generated/Models/ToUppercaseTransformation.cs index 9f60f0990a3..eaddf614398 100644 --- a/src/Microsoft.Graph/Generated/Models/ToUppercaseTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/ToUppercaseTransformation.cs @@ -26,7 +26,7 @@ public ToUppercaseTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ToUppercaseTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ToUppercaseTransformation(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Todo.cs b/src/Microsoft.Graph/Generated/Models/Todo.cs index 731c392f1de..eba2038a505 100644 --- a/src/Microsoft.Graph/Generated/Models/Todo.cs +++ b/src/Microsoft.Graph/Generated/Models/Todo.cs @@ -35,7 +35,7 @@ public partial class Todo : global::Microsoft.Graph.Beta.Models.Entity, IParsabl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Todo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Todo(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("lists", Lists); } diff --git a/src/Microsoft.Graph/Generated/Models/TodoSettings.cs b/src/Microsoft.Graph/Generated/Models/TodoSettings.cs index 1da8e5426c9..10ff3dcb724 100644 --- a/src/Microsoft.Graph/Generated/Models/TodoSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/TodoSettings.cs @@ -70,7 +70,7 @@ public TodoSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TodoSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TodoSettings(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isExternalJoinEnabled", IsExternalJoinEnabled); writer.WriteBoolValue("isExternalShareEnabled", IsExternalShareEnabled); writer.WriteBoolValue("isPushNotificationEnabled", IsPushNotificationEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/TodoTask.cs b/src/Microsoft.Graph/Generated/Models/TodoTask.cs index 75828213bc0..cb0ed8d4b6e 100644 --- a/src/Microsoft.Graph/Generated/Models/TodoTask.cs +++ b/src/Microsoft.Graph/Generated/Models/TodoTask.cs @@ -285,7 +285,7 @@ public string Title /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TodoTask CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TodoTask(); } /// @@ -325,7 +325,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("attachments", Attachments); writer.WriteCollectionOfObjectValues("attachmentSessions", AttachmentSessions); diff --git a/src/Microsoft.Graph/Generated/Models/TodoTaskCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TodoTaskCollectionResponse.cs index 5a5b853dec7..533f5c795bd 100644 --- a/src/Microsoft.Graph/Generated/Models/TodoTaskCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TodoTaskCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TodoTaskCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TodoTaskCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TodoTaskCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TodoTaskList.cs b/src/Microsoft.Graph/Generated/Models/TodoTaskList.cs index 021dd95b519..80133edd6b3 100644 --- a/src/Microsoft.Graph/Generated/Models/TodoTaskList.cs +++ b/src/Microsoft.Graph/Generated/Models/TodoTaskList.cs @@ -85,7 +85,7 @@ public bool? IsShared /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TodoTaskList CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TodoTaskList(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfObjectValues("extensions", Extensions); diff --git a/src/Microsoft.Graph/Generated/Models/TodoTaskListCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TodoTaskListCollectionResponse.cs index bc2dd23c4b2..25b62640ba5 100644 --- a/src/Microsoft.Graph/Generated/Models/TodoTaskListCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TodoTaskListCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TodoTaskListCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TodoTaskListCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TodoTaskListCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TokenDetails.cs b/src/Microsoft.Graph/Generated/Models/TokenDetails.cs index 3b1d94e2f74..e1eb42eafbc 100644 --- a/src/Microsoft.Graph/Generated/Models/TokenDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/TokenDetails.cs @@ -74,7 +74,7 @@ public TokenDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TokenDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TokenDetails(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("issuedAtDateTime", IssuedAtDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("uniqueTokenIdentifier", UniqueTokenIdentifier); diff --git a/src/Microsoft.Graph/Generated/Models/TokenIssuancePolicy.cs b/src/Microsoft.Graph/Generated/Models/TokenIssuancePolicy.cs index cd369fab8a6..cff300b0923 100644 --- a/src/Microsoft.Graph/Generated/Models/TokenIssuancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/TokenIssuancePolicy.cs @@ -26,7 +26,7 @@ public TokenIssuancePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TokenIssuancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TokenIssuancePolicy(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TokenIssuancePolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TokenIssuancePolicyCollectionResponse.cs index 49e2fb152b6..a3ec32de5a4 100644 --- a/src/Microsoft.Graph/Generated/Models/TokenIssuancePolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TokenIssuancePolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TokenIssuancePolicyCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TokenIssuancePolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TokenIssuancePolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TokenLifetimePolicy.cs b/src/Microsoft.Graph/Generated/Models/TokenLifetimePolicy.cs index b1970cec6be..bbe17935269 100644 --- a/src/Microsoft.Graph/Generated/Models/TokenLifetimePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/TokenLifetimePolicy.cs @@ -26,7 +26,7 @@ public TokenLifetimePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TokenLifetimePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TokenLifetimePolicy(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TokenLifetimePolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TokenLifetimePolicyCollectionResponse.cs index 6ab768f6756..11bd9e4d3ae 100644 --- a/src/Microsoft.Graph/Generated/Models/TokenLifetimePolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TokenLifetimePolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TokenLifetimePolicyCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TokenLifetimePolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TokenLifetimePolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TokenMeetingInfo.cs b/src/Microsoft.Graph/Generated/Models/TokenMeetingInfo.cs index d360790f2b8..aaa767f9889 100644 --- a/src/Microsoft.Graph/Generated/Models/TokenMeetingInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/TokenMeetingInfo.cs @@ -42,7 +42,7 @@ public TokenMeetingInfo() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TokenMeetingInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TokenMeetingInfo(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("token", Token); } diff --git a/src/Microsoft.Graph/Generated/Models/TokenProtectionStatusDetails.cs b/src/Microsoft.Graph/Generated/Models/TokenProtectionStatusDetails.cs index 66fd9c8e1c2..676913fe3e1 100644 --- a/src/Microsoft.Graph/Generated/Models/TokenProtectionStatusDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/TokenProtectionStatusDetails.cs @@ -64,7 +64,7 @@ public TokenProtectionStatusDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TokenProtectionStatusDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TokenProtectionStatusDetails(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("signInSessionStatus", SignInSessionStatus); writer.WriteIntValue("signInSessionStatusCode", SignInSessionStatusCode); diff --git a/src/Microsoft.Graph/Generated/Models/ToneInfo.cs b/src/Microsoft.Graph/Generated/Models/ToneInfo.cs index 79e0fa1c89b..0ae9e8a2ebd 100644 --- a/src/Microsoft.Graph/Generated/Models/ToneInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/ToneInfo.cs @@ -64,7 +64,7 @@ public ToneInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ToneInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ToneInfo(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("sequenceId", SequenceId); writer.WriteEnumValue("tone", Tone); diff --git a/src/Microsoft.Graph/Generated/Models/TooManyGlobalAdminsAssignedToTenantAlertConfiguration.cs b/src/Microsoft.Graph/Generated/Models/TooManyGlobalAdminsAssignedToTenantAlertConfiguration.cs index b30b5ba7602..0dd71162ca2 100644 --- a/src/Microsoft.Graph/Generated/Models/TooManyGlobalAdminsAssignedToTenantAlertConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/TooManyGlobalAdminsAssignedToTenantAlertConfiguration.cs @@ -38,7 +38,7 @@ public TooManyGlobalAdminsAssignedToTenantAlertConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TooManyGlobalAdminsAssignedToTenantAlertConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TooManyGlobalAdminsAssignedToTenantAlertConfiguration(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("globalAdminCountThreshold", GlobalAdminCountThreshold); writer.WriteIntValue("percentageOfGlobalAdminsOutOfRolesThreshold", PercentageOfGlobalAdminsOutOfRolesThreshold); diff --git a/src/Microsoft.Graph/Generated/Models/TooManyGlobalAdminsAssignedToTenantAlertIncident.cs b/src/Microsoft.Graph/Generated/Models/TooManyGlobalAdminsAssignedToTenantAlertIncident.cs index 53311e312ff..fc6a8a3069b 100644 --- a/src/Microsoft.Graph/Generated/Models/TooManyGlobalAdminsAssignedToTenantAlertIncident.cs +++ b/src/Microsoft.Graph/Generated/Models/TooManyGlobalAdminsAssignedToTenantAlertIncident.cs @@ -74,7 +74,7 @@ public TooManyGlobalAdminsAssignedToTenantAlertIncident() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TooManyGlobalAdminsAssignedToTenantAlertIncident CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TooManyGlobalAdminsAssignedToTenantAlertIncident(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("assigneeDisplayName", AssigneeDisplayName); writer.WriteStringValue("assigneeId", AssigneeId); diff --git a/src/Microsoft.Graph/Generated/Models/Training.cs b/src/Microsoft.Graph/Generated/Models/Training.cs index 49e17deb282..38adc135f4a 100644 --- a/src/Microsoft.Graph/Generated/Models/Training.cs +++ b/src/Microsoft.Graph/Generated/Models/Training.cs @@ -189,7 +189,7 @@ public List Tags /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Training CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Training(); } /// @@ -223,7 +223,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("availabilityStatus", AvailabilityStatus); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/TrainingCampaign.cs b/src/Microsoft.Graph/Generated/Models/TrainingCampaign.cs index 8e4f8f594d0..85479cc7f5c 100644 --- a/src/Microsoft.Graph/Generated/Models/TrainingCampaign.cs +++ b/src/Microsoft.Graph/Generated/Models/TrainingCampaign.cs @@ -191,7 +191,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrainingCampaign CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrainingCampaign(); } /// @@ -222,7 +222,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("campaignSchedule", CampaignSchedule); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/TrainingCampaignCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TrainingCampaignCollectionResponse.cs index bddb06a917c..67719f3cb37 100644 --- a/src/Microsoft.Graph/Generated/Models/TrainingCampaignCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TrainingCampaignCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TrainingCampaignCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrainingCampaignCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrainingCampaignCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TrainingCampaignReport.cs b/src/Microsoft.Graph/Generated/Models/TrainingCampaignReport.cs index 6f8282f8258..29dad65402c 100644 --- a/src/Microsoft.Graph/Generated/Models/TrainingCampaignReport.cs +++ b/src/Microsoft.Graph/Generated/Models/TrainingCampaignReport.cs @@ -84,7 +84,7 @@ public TrainingCampaignReport() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TrainingCampaignReport CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrainingCampaignReport(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("campaignUsers", CampaignUsers); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("overview", Overview); diff --git a/src/Microsoft.Graph/Generated/Models/TrainingCampaignReportOverview.cs b/src/Microsoft.Graph/Generated/Models/TrainingCampaignReportOverview.cs index f70870f7070..98e3cd1065e 100644 --- a/src/Microsoft.Graph/Generated/Models/TrainingCampaignReportOverview.cs +++ b/src/Microsoft.Graph/Generated/Models/TrainingCampaignReportOverview.cs @@ -100,7 +100,7 @@ public TrainingCampaignReportOverview() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TrainingCampaignReportOverview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrainingCampaignReportOverview(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("trainingModuleCompletion", TrainingModuleCompletion); writer.WriteObjectValue("trainingNotificationDeliveryStatus", TrainingNotificationDeliveryStatus); diff --git a/src/Microsoft.Graph/Generated/Models/TrainingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TrainingCollectionResponse.cs index 3c71f28b488..2d55bc56d80 100644 --- a/src/Microsoft.Graph/Generated/Models/TrainingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TrainingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TrainingCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrainingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrainingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TrainingEventsContent.cs b/src/Microsoft.Graph/Generated/Models/TrainingEventsContent.cs index fc38c69ff5e..75827f30df8 100644 --- a/src/Microsoft.Graph/Generated/Models/TrainingEventsContent.cs +++ b/src/Microsoft.Graph/Generated/Models/TrainingEventsContent.cs @@ -74,7 +74,7 @@ public TrainingEventsContent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TrainingEventsContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrainingEventsContent(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("assignedTrainingsInfos", AssignedTrainingsInfos); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("trainingsAssignedUserCount", TrainingsAssignedUserCount); diff --git a/src/Microsoft.Graph/Generated/Models/TrainingLanguageDetail.cs b/src/Microsoft.Graph/Generated/Models/TrainingLanguageDetail.cs index 1b528d24456..34b5880c96d 100644 --- a/src/Microsoft.Graph/Generated/Models/TrainingLanguageDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/TrainingLanguageDetail.cs @@ -133,7 +133,7 @@ public string Locale /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrainingLanguageDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrainingLanguageDetail(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("content", Content); writer.WriteObjectValue("createdBy", CreatedBy); diff --git a/src/Microsoft.Graph/Generated/Models/TrainingLanguageDetailCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TrainingLanguageDetailCollectionResponse.cs index fe3b64a52ae..7c321c8d044 100644 --- a/src/Microsoft.Graph/Generated/Models/TrainingLanguageDetailCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TrainingLanguageDetailCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TrainingLanguageDetailCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrainingLanguageDetailCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrainingLanguageDetailCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TrainingNotificationDelivery.cs b/src/Microsoft.Graph/Generated/Models/TrainingNotificationDelivery.cs index a34efd844af..c6accb88e8a 100644 --- a/src/Microsoft.Graph/Generated/Models/TrainingNotificationDelivery.cs +++ b/src/Microsoft.Graph/Generated/Models/TrainingNotificationDelivery.cs @@ -70,7 +70,7 @@ public TrainingNotificationDelivery() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TrainingNotificationDelivery CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrainingNotificationDelivery(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("failedMessageDeliveryCount", FailedMessageDeliveryCount); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("resolvedTargetsCount", ResolvedTargetsCount); diff --git a/src/Microsoft.Graph/Generated/Models/TrainingNotificationSetting.cs b/src/Microsoft.Graph/Generated/Models/TrainingNotificationSetting.cs index b79705bc0a9..6f5676ef2de 100644 --- a/src/Microsoft.Graph/Generated/Models/TrainingNotificationSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/TrainingNotificationSetting.cs @@ -58,7 +58,7 @@ public TrainingNotificationSetting() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrainingNotificationSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrainingNotificationSetting(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("trainingAssignment", TrainingAssignment); writer.WriteObjectValue("trainingReminder", TrainingReminder); diff --git a/src/Microsoft.Graph/Generated/Models/TrainingReminderNotification.cs b/src/Microsoft.Graph/Generated/Models/TrainingReminderNotification.cs index 3c612c52048..335bf1fa451 100644 --- a/src/Microsoft.Graph/Generated/Models/TrainingReminderNotification.cs +++ b/src/Microsoft.Graph/Generated/Models/TrainingReminderNotification.cs @@ -32,7 +32,7 @@ public TrainingReminderNotification() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrainingReminderNotification CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrainingReminderNotification(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("deliveryFrequency", DeliveryFrequency); } diff --git a/src/Microsoft.Graph/Generated/Models/TrainingSetting.cs b/src/Microsoft.Graph/Generated/Models/TrainingSetting.cs index 9e55f21d6dd..b6c7b1b2d0d 100644 --- a/src/Microsoft.Graph/Generated/Models/TrainingSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/TrainingSetting.cs @@ -58,7 +58,7 @@ public TrainingSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TrainingSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -88,7 +88,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("settingType", SettingType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/TranscriptActivity.cs b/src/Microsoft.Graph/Generated/Models/TranscriptActivity.cs new file mode 100644 index 00000000000..67014cfe8b6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/TranscriptActivity.cs @@ -0,0 +1,53 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace Microsoft.Graph.Beta.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TranscriptActivity : global::Microsoft.Graph.Beta.Models.BaseActivity, IParsable + #pragma warning restore CS1591 + { + /// + /// Instantiates a new and sets the default values. + /// + public TranscriptActivity() : base() + { + OdataType = "#microsoft.graph.transcriptActivity"; + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static new global::Microsoft.Graph.Beta.Models.TranscriptActivity CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Microsoft.Graph.Beta.Models.TranscriptActivity(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public override IDictionary> GetFieldDeserializers() + { + return new Dictionary>(base.GetFieldDeserializers()) + { + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public override void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Microsoft.Graph/Generated/Models/TranscriptPayload.cs b/src/Microsoft.Graph/Generated/Models/TranscriptPayload.cs new file mode 100644 index 00000000000..19f9e7d1af5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/TranscriptPayload.cs @@ -0,0 +1,151 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Microsoft.Graph.Beta.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TranscriptPayload : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// The audioCaptureDateTime property + public DateTimeOffset? AudioCaptureDateTime + { + get { return BackingStore?.Get("audioCaptureDateTime"); } + set { BackingStore?.Set("audioCaptureDateTime", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType + { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType + { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The sequenceId property + public int? SequenceId + { + get { return BackingStore?.Get("sequenceId"); } + set { BackingStore?.Set("sequenceId", value); } + } + /// The speaker property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Microsoft.Graph.Beta.Models.TranscriptSpeaker? Speaker + { + get { return BackingStore?.Get("speaker"); } + set { BackingStore?.Set("speaker", value); } + } +#nullable restore +#else + public global::Microsoft.Graph.Beta.Models.TranscriptSpeaker Speaker + { + get { return BackingStore?.Get("speaker"); } + set { BackingStore?.Set("speaker", value); } + } +#endif + /// The spokenLanguage property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SpokenLanguage + { + get { return BackingStore?.Get("spokenLanguage"); } + set { BackingStore?.Set("spokenLanguage", value); } + } +#nullable restore +#else + public string SpokenLanguage + { + get { return BackingStore?.Get("spokenLanguage"); } + set { BackingStore?.Set("spokenLanguage", value); } + } +#endif + /// The text property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Text + { + get { return BackingStore?.Get("text"); } + set { BackingStore?.Set("text", value); } + } +#nullable restore +#else + public string Text + { + get { return BackingStore?.Get("text"); } + set { BackingStore?.Set("text", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TranscriptPayload() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Microsoft.Graph.Beta.Models.TranscriptPayload CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Microsoft.Graph.Beta.Models.TranscriptPayload(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "audioCaptureDateTime", n => { AudioCaptureDateTime = n.GetDateTimeOffsetValue(); } }, + { "@odata.type", n => { OdataType = n.GetStringValue(); } }, + { "sequenceId", n => { SequenceId = n.GetIntValue(); } }, + { "speaker", n => { Speaker = n.GetObjectValue(global::Microsoft.Graph.Beta.Models.TranscriptSpeaker.CreateFromDiscriminatorValue); } }, + { "spokenLanguage", n => { SpokenLanguage = n.GetStringValue(); } }, + { "text", n => { Text = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("audioCaptureDateTime", AudioCaptureDateTime); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteIntValue("sequenceId", SequenceId); + writer.WriteObjectValue("speaker", Speaker); + writer.WriteStringValue("spokenLanguage", SpokenLanguage); + writer.WriteStringValue("text", Text); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Microsoft.Graph/Generated/Models/TranscriptSpeaker.cs b/src/Microsoft.Graph/Generated/Models/TranscriptSpeaker.cs new file mode 100644 index 00000000000..098358abd6c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/TranscriptSpeaker.cs @@ -0,0 +1,117 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System; +namespace Microsoft.Graph.Beta.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] + #pragma warning disable CS1591 + public partial class TranscriptSpeaker : IAdditionalDataHolder, IBackedModel, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData + { + get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } + set { BackingStore.Set("AdditionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType + { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType + { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The room property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Microsoft.Graph.Beta.Models.SpeakerInfo? Room + { + get { return BackingStore?.Get("room"); } + set { BackingStore?.Set("room", value); } + } +#nullable restore +#else + public global::Microsoft.Graph.Beta.Models.SpeakerInfo Room + { + get { return BackingStore?.Get("room"); } + set { BackingStore?.Set("room", value); } + } +#endif + /// The user property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::Microsoft.Graph.Beta.Models.SpeakerInfo? User + { + get { return BackingStore?.Get("user"); } + set { BackingStore?.Set("user", value); } + } +#nullable restore +#else + public global::Microsoft.Graph.Beta.Models.SpeakerInfo User + { + get { return BackingStore?.Get("user"); } + set { BackingStore?.Set("user", value); } + } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public TranscriptSpeaker() + { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::Microsoft.Graph.Beta.Models.TranscriptSpeaker CreateFromDiscriminatorValue(IParseNode parseNode) + { + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); + return new global::Microsoft.Graph.Beta.Models.TranscriptSpeaker(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "@odata.type", n => { OdataType = n.GetStringValue(); } }, + { "room", n => { Room = n.GetObjectValue(global::Microsoft.Graph.Beta.Models.SpeakerInfo.CreateFromDiscriminatorValue); } }, + { "user", n => { User = n.GetObjectValue(global::Microsoft.Graph.Beta.Models.SpeakerInfo.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteObjectValue("room", Room); + writer.WriteObjectValue("user", User); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/Microsoft.Graph/Generated/Models/TranscriptionState.cs b/src/Microsoft.Graph/Generated/Models/TranscriptionState.cs index a60285426c2..2e1bbbb4f70 100644 --- a/src/Microsoft.Graph/Generated/Models/TranscriptionState.cs +++ b/src/Microsoft.Graph/Generated/Models/TranscriptionState.cs @@ -64,7 +64,7 @@ public TranscriptionState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TranscriptionState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TranscriptionState(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("sequenceNumber", SequenceNumber); writer.WriteEnumValue("state", State); diff --git a/src/Microsoft.Graph/Generated/Models/TransformationAttribute.cs b/src/Microsoft.Graph/Generated/Models/TransformationAttribute.cs index 60d28f5b163..8650af2be50 100644 --- a/src/Microsoft.Graph/Generated/Models/TransformationAttribute.cs +++ b/src/Microsoft.Graph/Generated/Models/TransformationAttribute.cs @@ -74,7 +74,7 @@ public TransformationAttribute() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TransformationAttribute CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TransformationAttribute(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("attribute", Attribute); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("treatAsMultiValue", TreatAsMultiValue); diff --git a/src/Microsoft.Graph/Generated/Models/TranslationLanguageOverride.cs b/src/Microsoft.Graph/Generated/Models/TranslationLanguageOverride.cs index 9997edbef3d..03638e24665 100644 --- a/src/Microsoft.Graph/Generated/Models/TranslationLanguageOverride.cs +++ b/src/Microsoft.Graph/Generated/Models/TranslationLanguageOverride.cs @@ -74,7 +74,7 @@ public TranslationLanguageOverride() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TranslationLanguageOverride CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TranslationLanguageOverride(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("languageTag", LanguageTag); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("translationBehavior", TranslationBehavior); diff --git a/src/Microsoft.Graph/Generated/Models/TranslationPreferences.cs b/src/Microsoft.Graph/Generated/Models/TranslationPreferences.cs index c29c71aede3..88cb4a283ab 100644 --- a/src/Microsoft.Graph/Generated/Models/TranslationPreferences.cs +++ b/src/Microsoft.Graph/Generated/Models/TranslationPreferences.cs @@ -90,7 +90,7 @@ public TranslationPreferences() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TranslationPreferences CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TranslationPreferences(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("languageOverrides", LanguageOverrides); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("translationBehavior", TranslationBehavior); diff --git a/src/Microsoft.Graph/Generated/Models/Trending.cs b/src/Microsoft.Graph/Generated/Models/Trending.cs index 94b0b7456f7..d891eab3c98 100644 --- a/src/Microsoft.Graph/Generated/Models/Trending.cs +++ b/src/Microsoft.Graph/Generated/Models/Trending.cs @@ -79,7 +79,7 @@ public double? Weight /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Trending CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Trending(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteObjectValue("resource", Resource); diff --git a/src/Microsoft.Graph/Generated/Models/TrendingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TrendingCollectionResponse.cs index a8c461b196a..780310fddcc 100644 --- a/src/Microsoft.Graph/Generated/Models/TrendingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TrendingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TrendingCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrendingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrendingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TrimTransformation.cs b/src/Microsoft.Graph/Generated/Models/TrimTransformation.cs index 2300130f434..a548bac56f0 100644 --- a/src/Microsoft.Graph/Generated/Models/TrimTransformation.cs +++ b/src/Microsoft.Graph/Generated/Models/TrimTransformation.cs @@ -48,7 +48,7 @@ public TrimTransformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrimTransformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrimTransformation(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("type", Type); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/TrustChainCertificate.cs b/src/Microsoft.Graph/Generated/Models/TrustChainCertificate.cs index ff7b2be4399..44c9f555401 100644 --- a/src/Microsoft.Graph/Generated/Models/TrustChainCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/TrustChainCertificate.cs @@ -85,7 +85,7 @@ public TrustChainCertificate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TrustChainCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrustChainCertificate(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("certificate", Certificate); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/TrustFramework.cs b/src/Microsoft.Graph/Generated/Models/TrustFramework.cs index 7e02ac753ec..0c17a59fb00 100644 --- a/src/Microsoft.Graph/Generated/Models/TrustFramework.cs +++ b/src/Microsoft.Graph/Generated/Models/TrustFramework.cs @@ -84,7 +84,7 @@ public TrustFramework() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TrustFramework CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrustFramework(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("keySets", KeySets); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("policies", Policies); diff --git a/src/Microsoft.Graph/Generated/Models/TrustFrameworkKey.cs b/src/Microsoft.Graph/Generated/Models/TrustFrameworkKey.cs index 02ed4e0f16b..a7289dbe4d1 100644 --- a/src/Microsoft.Graph/Generated/Models/TrustFrameworkKey.cs +++ b/src/Microsoft.Graph/Generated/Models/TrustFrameworkKey.cs @@ -294,7 +294,7 @@ public TrustFrameworkKey() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TrustFrameworkKey CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrustFrameworkKey(); } /// @@ -331,7 +331,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("d", D); writer.WriteStringValue("dp", Dp); writer.WriteStringValue("dq", Dq); diff --git a/src/Microsoft.Graph/Generated/Models/TrustFrameworkKeySet.cs b/src/Microsoft.Graph/Generated/Models/TrustFrameworkKeySet.cs index d9aa5d2f0df..0d3f97d98ba 100644 --- a/src/Microsoft.Graph/Generated/Models/TrustFrameworkKeySet.cs +++ b/src/Microsoft.Graph/Generated/Models/TrustFrameworkKeySet.cs @@ -51,7 +51,7 @@ public partial class TrustFrameworkKeySet : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrustFrameworkKeySet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrustFrameworkKeySet(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("keys", Keys); writer.WriteCollectionOfObjectValues("keys_v2", KeysV2); diff --git a/src/Microsoft.Graph/Generated/Models/TrustFrameworkKeySetCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TrustFrameworkKeySetCollectionResponse.cs index 616c2552728..6a008f2e2de 100644 --- a/src/Microsoft.Graph/Generated/Models/TrustFrameworkKeySetCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TrustFrameworkKeySetCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TrustFrameworkKeySetCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrustFrameworkKeySetCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrustFrameworkKeySetCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TrustFrameworkKey_v2.cs b/src/Microsoft.Graph/Generated/Models/TrustFrameworkKey_v2.cs index cae47092493..52081c085d1 100644 --- a/src/Microsoft.Graph/Generated/Models/TrustFrameworkKey_v2.cs +++ b/src/Microsoft.Graph/Generated/Models/TrustFrameworkKey_v2.cs @@ -294,7 +294,7 @@ public TrustFrameworkKey_v2() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.TrustFrameworkKey_v2 CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrustFrameworkKey_v2(); } /// @@ -331,7 +331,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("d", D); writer.WriteStringValue("dp", Dp); writer.WriteStringValue("dq", Dq); diff --git a/src/Microsoft.Graph/Generated/Models/TrustFrameworkKey_v2CollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TrustFrameworkKey_v2CollectionResponse.cs index 79269285fda..708f18bc810 100644 --- a/src/Microsoft.Graph/Generated/Models/TrustFrameworkKey_v2CollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TrustFrameworkKey_v2CollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TrustFrameworkKey_v2CollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrustFrameworkKey_v2CollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrustFrameworkKey_v2CollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TrustFrameworkPolicy.cs b/src/Microsoft.Graph/Generated/Models/TrustFrameworkPolicy.cs index b93b09b8cfc..673c386e7bb 100644 --- a/src/Microsoft.Graph/Generated/Models/TrustFrameworkPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/TrustFrameworkPolicy.cs @@ -19,7 +19,7 @@ public partial class TrustFrameworkPolicy : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrustFrameworkPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrustFrameworkPolicy(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/TrustFrameworkPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/TrustFrameworkPolicyCollectionResponse.cs index 002085cbd2b..6bee5dfe0e8 100644 --- a/src/Microsoft.Graph/Generated/Models/TrustFrameworkPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/TrustFrameworkPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class TrustFrameworkPolicyCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrustFrameworkPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TrustFrameworkPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/TrustedCertificateAuthorityAsEntityBase.cs b/src/Microsoft.Graph/Generated/Models/TrustedCertificateAuthorityAsEntityBase.cs index 6e911809216..b614959285a 100644 --- a/src/Microsoft.Graph/Generated/Models/TrustedCertificateAuthorityAsEntityBase.cs +++ b/src/Microsoft.Graph/Generated/Models/TrustedCertificateAuthorityAsEntityBase.cs @@ -42,7 +42,7 @@ public TrustedCertificateAuthorityAsEntityBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrustedCertificateAuthorityAsEntityBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("trustedCertificateAuthorities", TrustedCertificateAuthorities); } diff --git a/src/Microsoft.Graph/Generated/Models/TrustedCertificateAuthorityBase.cs b/src/Microsoft.Graph/Generated/Models/TrustedCertificateAuthorityBase.cs index c4ff5bb9c04..26b02b34195 100644 --- a/src/Microsoft.Graph/Generated/Models/TrustedCertificateAuthorityBase.cs +++ b/src/Microsoft.Graph/Generated/Models/TrustedCertificateAuthorityBase.cs @@ -42,7 +42,7 @@ public TrustedCertificateAuthorityBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TrustedCertificateAuthorityBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -67,7 +67,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("certificateAuthorities", CertificateAuthorities); } diff --git a/src/Microsoft.Graph/Generated/Models/TypedEmailAddress.cs b/src/Microsoft.Graph/Generated/Models/TypedEmailAddress.cs index 7e61e256418..854fd3082b8 100644 --- a/src/Microsoft.Graph/Generated/Models/TypedEmailAddress.cs +++ b/src/Microsoft.Graph/Generated/Models/TypedEmailAddress.cs @@ -48,7 +48,7 @@ public TypedEmailAddress() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.TypedEmailAddress CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.TypedEmailAddress(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("otherLabel", OtherLabel); writer.WriteEnumValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/Models/UnenforcedMfaAwsUserFinding.cs b/src/Microsoft.Graph/Generated/Models/UnenforcedMfaAwsUserFinding.cs index 7135bea1ede..376577ba2e4 100644 --- a/src/Microsoft.Graph/Generated/Models/UnenforcedMfaAwsUserFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/UnenforcedMfaAwsUserFinding.cs @@ -19,7 +19,7 @@ public partial class UnenforcedMfaAwsUserFinding : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnenforcedMfaAwsUserFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnenforcedMfaAwsUserFinding(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRbacApplication.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRbacApplication.cs index 024627ff3f5..75edd7e4895 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRbacApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRbacApplication.cs @@ -99,7 +99,7 @@ public partial class UnifiedRbacApplication : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRbacApplication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRbacApplication(); } /// @@ -123,7 +123,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("customAppScopes", CustomAppScopes); writer.WriteCollectionOfObjectValues("resourceNamespaces", ResourceNamespaces); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRbacApplicationMultiple.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRbacApplicationMultiple.cs index b132d17308b..497adbfc2f1 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRbacApplicationMultiple.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRbacApplicationMultiple.cs @@ -42,7 +42,7 @@ public UnifiedRbacApplicationMultiple() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRbacApplicationMultiple CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRbacApplicationMultiple(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("customAppScopes", CustomAppScopes); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceAction.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceAction.cs index cd13219ed7b..0f04adf8816 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceAction.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceAction.cs @@ -143,7 +143,7 @@ public string ResourceScopeId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction(); } /// @@ -171,7 +171,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("actionVerb", ActionVerb); writer.WriteObjectValue("authenticationContext", AuthenticationContext); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceActionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceActionCollectionResponse.cs index 6a5016e7666..344857a9847 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceActionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceActionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRbacResourceActionCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceActionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceActionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceNamespace.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceNamespace.cs index 1b7e40dce69..5b8452b954e 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceNamespace.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceNamespace.cs @@ -51,7 +51,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); writer.WriteCollectionOfObjectValues("resourceActions", ResourceActions); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceNamespaceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceNamespaceCollectionResponse.cs index 42cc8a31825..ab362fe21f3 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceNamespaceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceNamespaceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRbacResourceNamespaceCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespaceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespaceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceScope.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceScope.cs index 8bd6bd31d0a..95a7f154401 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceScope.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRbacResourceScope.cs @@ -67,7 +67,7 @@ public string Type /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceScope(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("scope", Scope); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRole.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRole.cs index 7680b608aa3..32233dd56b8 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRole.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRole.cs @@ -68,7 +68,7 @@ public UnifiedRole() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UnifiedRole CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRole(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("roleDefinitionId", RoleDefinitionId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignment.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignment.cs index 6aecf7d999f..ba769d8a081 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignment.cs @@ -195,7 +195,7 @@ public string RoleDefinitionId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignment(); } /// @@ -225,7 +225,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("appScope", AppScope); writer.WriteStringValue("appScopeId", AppScopeId); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentCollectionResponse.cs index 0c3ad7854d2..26d10e3d81c 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleAssignmentCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentMultiple.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentMultiple.cs index 4599972d0bd..5e3c17f25bf 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentMultiple.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentMultiple.cs @@ -195,7 +195,7 @@ public string RoleDefinitionId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultiple CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultiple(); } /// @@ -225,7 +225,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("appScopeIds", AppScopeIds); writer.WriteCollectionOfObjectValues("appScopes", AppScopes); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentMultipleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentMultipleCollectionResponse.cs index 5cb5a39c930..342e2a0e3b9 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentMultipleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentMultipleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleAssignmentMultipleCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultipleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultipleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentSchedule.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentSchedule.cs index 6e5cf2bec49..f95692f5c9e 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentSchedule.cs @@ -83,7 +83,7 @@ public string MemberType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentSchedule(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("activatedUsing", ActivatedUsing); writer.WriteStringValue("assignmentType", AssignmentType); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleCollectionResponse.cs index 9be2ca128fc..4cc34c10f43 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleAssignmentScheduleCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentScheduleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentScheduleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleInstance.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleInstance.cs index 36796926404..f919fc80863 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleInstance.cs @@ -111,7 +111,7 @@ public DateTimeOffset? StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentScheduleInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentScheduleInstance(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("activatedUsing", ActivatedUsing); writer.WriteStringValue("assignmentType", AssignmentType); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleInstanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleInstanceCollectionResponse.cs index 1bca33b5dae..e2098e91962 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleInstanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleInstanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleAssignmentScheduleInstanceCollectionResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentScheduleInstanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentScheduleInstanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleRequest.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleRequest.cs index ab01a5c2fa4..57c4f145abc 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleRequest.cs @@ -272,7 +272,7 @@ public UnifiedRoleAssignmentScheduleRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentScheduleRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentScheduleRequest(); } /// @@ -307,7 +307,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("action", Action); writer.WriteObjectValue("activatedUsing", ActivatedUsing); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleRequestCollectionResponse.cs index d04ba904946..d2197e4fc24 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleAssignmentScheduleRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleAssignmentScheduleRequestCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentScheduleRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentScheduleRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleDefinition.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleDefinition.cs index 5965af3521c..4ae4cf5ed4e 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleDefinition.cs @@ -155,7 +155,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition(); } /// @@ -185,7 +185,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("allowedPrincipalTypes", AllowedPrincipalTypes); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleDefinitionCollectionResponse.cs index b1d6d175ad3..14b9d2aa83e 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleDefinitionCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilitySchedule.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilitySchedule.cs index 41fd507f0cd..505f6cab80f 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilitySchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilitySchedule.cs @@ -51,7 +51,7 @@ public string MemberType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleEligibilitySchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleEligibilitySchedule(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("memberType", MemberType); writer.WriteObjectValue("scheduleInfo", ScheduleInfo); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleCollectionResponse.cs index 8939436e875..02c7aa4a4d4 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleEligibilityScheduleCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleEligibilityScheduleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleEligibilityScheduleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleInstance.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleInstance.cs index 77004f32c93..055547db8d0 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleInstance.cs @@ -63,7 +63,7 @@ public DateTimeOffset? StartDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleEligibilityScheduleInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleEligibilityScheduleInstance(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("memberType", MemberType); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleInstanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleInstanceCollectionResponse.cs index 67e057b2d33..4b772cd3296 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleInstanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleInstanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleEligibilityScheduleInstanceCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleEligibilityScheduleInstanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleEligibilityScheduleInstanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleRequest.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleRequest.cs index b4386dc703e..2ceac40443b 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleRequest.cs @@ -256,7 +256,7 @@ public UnifiedRoleEligibilityScheduleRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleEligibilityScheduleRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleEligibilityScheduleRequest(); } /// @@ -290,7 +290,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("action", Action); writer.WriteObjectValue("appScope", AppScope); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleRequestCollectionResponse.cs index 19ff50ba988..1464fd48c2b 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleEligibilityScheduleRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleEligibilityScheduleRequestCollectionResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleEligibilityScheduleRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleEligibilityScheduleRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlert.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlert.cs index 2da8bdd7c55..a01aba0846a 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlert.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlert.cs @@ -139,7 +139,7 @@ public string ScopeType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlert CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlert(); } /// @@ -168,7 +168,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("alertConfiguration", AlertConfiguration); writer.WriteObjectValue("alertDefinition", AlertDefinition); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertCollectionResponse.cs index fe93efa8bae..f5b06d05c41 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleManagementAlertCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertConfiguration.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertConfiguration.cs index efb976f3d18..6c53903be34 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertConfiguration.cs @@ -89,7 +89,7 @@ public string ScopeType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -124,7 +124,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("alertDefinition", AlertDefinition); writer.WriteStringValue("alertDefinitionId", AlertDefinitionId); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertConfigurationCollectionResponse.cs index 94ad292a0cd..5b6e0e4d3a1 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleManagementAlertConfigurationCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertDefinition.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertDefinition.cs index f4c87772a5c..e95e4bea656 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertDefinition.cs @@ -149,7 +149,7 @@ public string SecurityImpact /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertDefinition(); } /// @@ -178,7 +178,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertDefinitionCollectionResponse.cs index e43b92eb106..1621b7d4e0a 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertDefinitionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertDefinitionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleManagementAlertDefinitionCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertDefinitionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertIncident.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertIncident.cs index c304075eb92..aaa38018ce2 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertIncident.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertIncident.cs @@ -19,7 +19,7 @@ public partial class UnifiedRoleManagementAlertIncident : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertIncident CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -49,7 +49,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertIncidentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertIncidentCollectionResponse.cs index 9024154226f..c6c1b20afdc 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertIncidentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementAlertIncidentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleManagementAlertIncidentCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertIncidentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementAlertIncidentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicy.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicy.cs index fecdc46cc88..8fe92616ac8 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicy.cs @@ -143,7 +143,7 @@ public string ScopeType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicy(); } /// @@ -171,7 +171,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyApprovalRule.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyApprovalRule.cs index 2875382c1b7..07191da0cbb 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyApprovalRule.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyApprovalRule.cs @@ -42,7 +42,7 @@ public UnifiedRoleManagementPolicyApprovalRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyApprovalRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyApprovalRule(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("setting", Setting); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAssignment.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAssignment.cs index d36777b6657..800d5b4f4cc 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAssignment.cs @@ -99,7 +99,7 @@ public string ScopeType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyAssignment(); } /// @@ -123,7 +123,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("policy", Policy); writer.WriteStringValue("policyId", PolicyId); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAssignmentCollectionResponse.cs index c37c8d1f07c..2d5a5fc77a2 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleManagementPolicyAssignmentCollectionResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAuthenticationContextRule.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAuthenticationContextRule.cs index 5a6afb5e8d0..23352ef6de5 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAuthenticationContextRule.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyAuthenticationContextRule.cs @@ -48,7 +48,7 @@ public UnifiedRoleManagementPolicyAuthenticationContextRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyAuthenticationContextRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyAuthenticationContextRule(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("claimValue", ClaimValue); writer.WriteBoolValue("isEnabled", IsEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyCollectionResponse.cs index d2e4cfb0677..fc7e3b17b53 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleManagementPolicyCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyEnablementRule.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyEnablementRule.cs index e92d252bcbf..6b1483a28a5 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyEnablementRule.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyEnablementRule.cs @@ -42,7 +42,7 @@ public UnifiedRoleManagementPolicyEnablementRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyEnablementRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyEnablementRule(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("enabledRules", EnabledRules); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyExpirationRule.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyExpirationRule.cs index 9922cb411d4..b25e73f1b41 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyExpirationRule.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyExpirationRule.cs @@ -38,7 +38,7 @@ public UnifiedRoleManagementPolicyExpirationRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyExpirationRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyExpirationRule(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isExpirationRequired", IsExpirationRequired); writer.WriteTimeSpanValue("maximumDuration", MaximumDuration); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyNotificationRule.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyNotificationRule.cs index 18eebd59bfb..1860727c831 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyNotificationRule.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyNotificationRule.cs @@ -96,7 +96,7 @@ public UnifiedRoleManagementPolicyNotificationRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyNotificationRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyNotificationRule(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isDefaultRecipientsEnabled", IsDefaultRecipientsEnabled); writer.WriteStringValue("notificationLevel", NotificationLevel); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyRule.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyRule.cs index eb7b3751c23..9dc56d719ba 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyRule.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyRule.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleManagementPolicyRule : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -64,7 +64,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyRuleCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyRuleCollectionResponse.cs index 07441d2ee58..14f7132cacb 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyRuleCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyRuleCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnifiedRoleManagementPolicyRuleCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyRuleCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyRuleCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyRuleTarget.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyRuleTarget.cs index 2337a5b4790..830544421fe 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyRuleTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleManagementPolicyRuleTarget.cs @@ -148,7 +148,7 @@ public UnifiedRoleManagementPolicyRuleTarget() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyRuleTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyRuleTarget(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("caller", Caller); writer.WriteCollectionOfPrimitiveValues("enforcedSettings", EnforcedSettings); writer.WriteCollectionOfPrimitiveValues("inheritableSettings", InheritableSettings); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRolePermission.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRolePermission.cs index fdfe18dc12c..ebb1d0c7d70 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRolePermission.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRolePermission.cs @@ -100,7 +100,7 @@ public UnifiedRolePermission() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UnifiedRolePermission CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedRolePermission(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("allowedResourceActions", AllowedResourceActions); writer.WriteStringValue("condition", Condition); writer.WriteCollectionOfPrimitiveValues("excludedResourceActions", ExcludedResourceActions); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleScheduleBase.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleScheduleBase.cs index 01018775089..45dcd47186b 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleScheduleBase.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleScheduleBase.cs @@ -191,7 +191,7 @@ public string Status /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleScheduleBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -228,7 +228,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("appScope", AppScope); writer.WriteStringValue("appScopeId", AppScopeId); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedRoleScheduleInstanceBase.cs b/src/Microsoft.Graph/Generated/Models/UnifiedRoleScheduleInstanceBase.cs index def6c5a249d..88c80e202c3 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedRoleScheduleInstanceBase.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedRoleScheduleInstanceBase.cs @@ -147,7 +147,7 @@ public string RoleDefinitionId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedRoleScheduleInstanceBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -180,7 +180,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("appScope", AppScope); writer.WriteStringValue("appScopeId", AppScopeId); diff --git a/src/Microsoft.Graph/Generated/Models/UnifiedStorageQuota.cs b/src/Microsoft.Graph/Generated/Models/UnifiedStorageQuota.cs index c7da70942b1..22252ff9154 100644 --- a/src/Microsoft.Graph/Generated/Models/UnifiedStorageQuota.cs +++ b/src/Microsoft.Graph/Generated/Models/UnifiedStorageQuota.cs @@ -91,7 +91,7 @@ public long? Used /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnifiedStorageQuota CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnifiedStorageQuota(); } /// @@ -117,7 +117,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("deleted", Deleted); writer.WriteStringValue("manageWebUrl", ManageWebUrl); diff --git a/src/Microsoft.Graph/Generated/Models/UnitOfMeasure.cs b/src/Microsoft.Graph/Generated/Models/UnitOfMeasure.cs index 28bcc38dd76..664d543ecb2 100644 --- a/src/Microsoft.Graph/Generated/Models/UnitOfMeasure.cs +++ b/src/Microsoft.Graph/Generated/Models/UnitOfMeasure.cs @@ -112,7 +112,7 @@ public UnitOfMeasure() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UnitOfMeasure CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnitOfMeasure(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteStringValue("displayName", DisplayName); writer.WriteGuidValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/UnitOfMeasureCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnitOfMeasureCollectionResponse.cs index f792e66fd96..6de4fc967e5 100644 --- a/src/Microsoft.Graph/Generated/Models/UnitOfMeasureCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnitOfMeasureCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnitOfMeasureCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnitOfMeasureCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnitOfMeasureCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UnknownSource.cs b/src/Microsoft.Graph/Generated/Models/UnknownSource.cs index 9852e1ac2d3..f0f54cf668c 100644 --- a/src/Microsoft.Graph/Generated/Models/UnknownSource.cs +++ b/src/Microsoft.Graph/Generated/Models/UnknownSource.cs @@ -26,7 +26,7 @@ public UnknownSource() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnknownSource CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnknownSource(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/UnmanagedDevice.cs b/src/Microsoft.Graph/Generated/Models/UnmanagedDevice.cs index c6e4c5caaf9..624b674e77b 100644 --- a/src/Microsoft.Graph/Generated/Models/UnmanagedDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/UnmanagedDevice.cs @@ -219,7 +219,7 @@ public UnmanagedDevice() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UnmanagedDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnmanagedDevice(); } /// @@ -250,7 +250,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceName", DeviceName); writer.WriteStringValue("domain", Domain); writer.WriteStringValue("ipAddress", IpAddress); diff --git a/src/Microsoft.Graph/Generated/Models/UnmanagedDeviceDiscoveryTask.cs b/src/Microsoft.Graph/Generated/Models/UnmanagedDeviceDiscoveryTask.cs index 9504a2e30cc..5225fd4b5f3 100644 --- a/src/Microsoft.Graph/Generated/Models/UnmanagedDeviceDiscoveryTask.cs +++ b/src/Microsoft.Graph/Generated/Models/UnmanagedDeviceDiscoveryTask.cs @@ -43,7 +43,7 @@ public UnmanagedDeviceDiscoveryTask() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnmanagedDeviceDiscoveryTask CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnmanagedDeviceDiscoveryTask(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("unmanagedDevices", UnmanagedDevices); } diff --git a/src/Microsoft.Graph/Generated/Models/UnmuteParticipantOperation.cs b/src/Microsoft.Graph/Generated/Models/UnmuteParticipantOperation.cs index 09bf3076838..546a479e4cd 100644 --- a/src/Microsoft.Graph/Generated/Models/UnmuteParticipantOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/UnmuteParticipantOperation.cs @@ -19,7 +19,7 @@ public partial class UnmuteParticipantOperation : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnmuteParticipantOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnmuteParticipantOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/UnsupportedDeviceConfiguration.cs b/src/Microsoft.Graph/Generated/Models/UnsupportedDeviceConfiguration.cs index ef251471da5..04fb8e95999 100644 --- a/src/Microsoft.Graph/Generated/Models/UnsupportedDeviceConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/UnsupportedDeviceConfiguration.cs @@ -59,7 +59,7 @@ public UnsupportedDeviceConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnsupportedDeviceConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnsupportedDeviceConfiguration(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("details", Details); writer.WriteStringValue("originalEntityTypeName", OriginalEntityTypeName); diff --git a/src/Microsoft.Graph/Generated/Models/UnsupportedDeviceConfigurationDetail.cs b/src/Microsoft.Graph/Generated/Models/UnsupportedDeviceConfigurationDetail.cs index 739eef27210..68e871fcfb2 100644 --- a/src/Microsoft.Graph/Generated/Models/UnsupportedDeviceConfigurationDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/UnsupportedDeviceConfigurationDetail.cs @@ -85,7 +85,7 @@ public UnsupportedDeviceConfigurationDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UnsupportedDeviceConfigurationDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnsupportedDeviceConfigurationDetail(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("message", Message); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("propertyName", PropertyName); diff --git a/src/Microsoft.Graph/Generated/Models/UnsupportedGroupPolicyExtension.cs b/src/Microsoft.Graph/Generated/Models/UnsupportedGroupPolicyExtension.cs index ed12694a0d4..4d07ab864da 100644 --- a/src/Microsoft.Graph/Generated/Models/UnsupportedGroupPolicyExtension.cs +++ b/src/Microsoft.Graph/Generated/Models/UnsupportedGroupPolicyExtension.cs @@ -74,7 +74,7 @@ public string NodeName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnsupportedGroupPolicyExtension CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnsupportedGroupPolicyExtension(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("extensionType", ExtensionType); writer.WriteStringValue("namespaceUrl", NamespaceUrl); diff --git a/src/Microsoft.Graph/Generated/Models/UnsupportedGroupPolicyExtensionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UnsupportedGroupPolicyExtensionCollectionResponse.cs index 7642ee9035c..696ef4086cb 100644 --- a/src/Microsoft.Graph/Generated/Models/UnsupportedGroupPolicyExtensionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UnsupportedGroupPolicyExtensionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UnsupportedGroupPolicyExtensionCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UnsupportedGroupPolicyExtensionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UnsupportedGroupPolicyExtensionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UpdateAllMessagesReadStateOperation.cs b/src/Microsoft.Graph/Generated/Models/UpdateAllMessagesReadStateOperation.cs index b5cf8278e01..02e3eaa8bea 100644 --- a/src/Microsoft.Graph/Generated/Models/UpdateAllMessagesReadStateOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/UpdateAllMessagesReadStateOperation.cs @@ -19,7 +19,7 @@ public partial class UpdateAllMessagesReadStateOperation : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UpdateAllMessagesReadStateOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UpdateAllMessagesReadStateOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/UpdateAllowedCombinationsResult.cs b/src/Microsoft.Graph/Generated/Models/UpdateAllowedCombinationsResult.cs index 5d785ebbe7a..7c9b5d381f5 100644 --- a/src/Microsoft.Graph/Generated/Models/UpdateAllowedCombinationsResult.cs +++ b/src/Microsoft.Graph/Generated/Models/UpdateAllowedCombinationsResult.cs @@ -116,7 +116,7 @@ public UpdateAllowedCombinationsResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UpdateAllowedCombinationsResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UpdateAllowedCombinationsResult(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("additionalInformation", AdditionalInformation); writer.WriteCollectionOfPrimitiveValues("conditionalAccessReferences", ConditionalAccessReferences); writer.WriteCollectionOfEnumValues("currentCombinations", CurrentCombinations); diff --git a/src/Microsoft.Graph/Generated/Models/UpdateRecordingStatusOperation.cs b/src/Microsoft.Graph/Generated/Models/UpdateRecordingStatusOperation.cs index cab1b5eee1f..82333c9e58f 100644 --- a/src/Microsoft.Graph/Generated/Models/UpdateRecordingStatusOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/UpdateRecordingStatusOperation.cs @@ -19,7 +19,7 @@ public partial class UpdateRecordingStatusOperation : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UpdateRecordingStatusOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UpdateRecordingStatusOperation(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/UpdateWindow.cs b/src/Microsoft.Graph/Generated/Models/UpdateWindow.cs index 4add87579c8..3ba561a74e1 100644 --- a/src/Microsoft.Graph/Generated/Models/UpdateWindow.cs +++ b/src/Microsoft.Graph/Generated/Models/UpdateWindow.cs @@ -65,7 +65,7 @@ public UpdateWindow() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UpdateWindow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UpdateWindow(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteTimeValue("updateWindowEndTime", UpdateWindowEndTime); writer.WriteTimeValue("updateWindowStartTime", UpdateWindowStartTime); diff --git a/src/Microsoft.Graph/Generated/Models/UpdateWindowsDeviceAccountActionParameter.cs b/src/Microsoft.Graph/Generated/Models/UpdateWindowsDeviceAccountActionParameter.cs index b80f80793f1..8b8bb3f4b53 100644 --- a/src/Microsoft.Graph/Generated/Models/UpdateWindowsDeviceAccountActionParameter.cs +++ b/src/Microsoft.Graph/Generated/Models/UpdateWindowsDeviceAccountActionParameter.cs @@ -128,7 +128,7 @@ public UpdateWindowsDeviceAccountActionParameter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UpdateWindowsDeviceAccountActionParameter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UpdateWindowsDeviceAccountActionParameter(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("calendarSyncEnabled", CalendarSyncEnabled); writer.WriteObjectValue("deviceAccount", DeviceAccount); writer.WriteStringValue("deviceAccountEmail", DeviceAccountEmail); diff --git a/src/Microsoft.Graph/Generated/Models/UploadSession.cs b/src/Microsoft.Graph/Generated/Models/UploadSession.cs index 53a1bd800f5..d01f88ea987 100644 --- a/src/Microsoft.Graph/Generated/Models/UploadSession.cs +++ b/src/Microsoft.Graph/Generated/Models/UploadSession.cs @@ -90,7 +90,7 @@ public UploadSession() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UploadSession CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -118,7 +118,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); writer.WriteCollectionOfPrimitiveValues("nextExpectedRanges", NextExpectedRanges); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/UriClickSecurityState.cs b/src/Microsoft.Graph/Generated/Models/UriClickSecurityState.cs index 824bb1bed36..1e6fac30535 100644 --- a/src/Microsoft.Graph/Generated/Models/UriClickSecurityState.cs +++ b/src/Microsoft.Graph/Generated/Models/UriClickSecurityState.cs @@ -138,7 +138,7 @@ public UriClickSecurityState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UriClickSecurityState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UriClickSecurityState(); } /// @@ -164,7 +164,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("clickAction", ClickAction); writer.WriteDateTimeOffsetValue("clickDateTime", ClickDateTime); writer.WriteStringValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/UrlAssessmentRequest.cs b/src/Microsoft.Graph/Generated/Models/UrlAssessmentRequest.cs index f583a7cc031..0a87243f089 100644 --- a/src/Microsoft.Graph/Generated/Models/UrlAssessmentRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/UrlAssessmentRequest.cs @@ -42,7 +42,7 @@ public UrlAssessmentRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UrlAssessmentRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UrlAssessmentRequest(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("url", Url); } diff --git a/src/Microsoft.Graph/Generated/Models/UsageDetails.cs b/src/Microsoft.Graph/Generated/Models/UsageDetails.cs index 22835e8400f..9b36b7f5f80 100644 --- a/src/Microsoft.Graph/Generated/Models/UsageDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/UsageDetails.cs @@ -64,7 +64,7 @@ public UsageDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UsageDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UsageDetails(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("lastAccessedDateTime", LastAccessedDateTime); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/UsageRight.cs b/src/Microsoft.Graph/Generated/Models/UsageRight.cs index d5ebe99b682..c142bfc5750 100644 --- a/src/Microsoft.Graph/Generated/Models/UsageRight.cs +++ b/src/Microsoft.Graph/Generated/Models/UsageRight.cs @@ -57,7 +57,7 @@ public string ServiceIdentifier /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UsageRight CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UsageRight(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("catalogId", CatalogId); writer.WriteStringValue("serviceIdentifier", ServiceIdentifier); diff --git a/src/Microsoft.Graph/Generated/Models/UsageRightCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UsageRightCollectionResponse.cs index 527f8b840fd..46b321fd9c4 100644 --- a/src/Microsoft.Graph/Generated/Models/UsageRightCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UsageRightCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UsageRightCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UsageRightCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UsageRightCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UsageRightsIncluded.cs b/src/Microsoft.Graph/Generated/Models/UsageRightsIncluded.cs index 7efc2113747..a36a16f0b7f 100644 --- a/src/Microsoft.Graph/Generated/Models/UsageRightsIncluded.cs +++ b/src/Microsoft.Graph/Generated/Models/UsageRightsIncluded.cs @@ -57,7 +57,7 @@ public string UserEmail /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UsageRightsIncluded CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UsageRightsIncluded(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("ownerEmail", OwnerEmail); writer.WriteStringValue("userEmail", UserEmail); diff --git a/src/Microsoft.Graph/Generated/Models/UsedInsight.cs b/src/Microsoft.Graph/Generated/Models/UsedInsight.cs index 09bdda4489f..d7863b2edb8 100644 --- a/src/Microsoft.Graph/Generated/Models/UsedInsight.cs +++ b/src/Microsoft.Graph/Generated/Models/UsedInsight.cs @@ -83,7 +83,7 @@ public partial class UsedInsight : global::Microsoft.Graph.Beta.Models.Entity, I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UsedInsight CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UsedInsight(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("lastUsed", LastUsed); writer.WriteObjectValue("resource", Resource); diff --git a/src/Microsoft.Graph/Generated/Models/UsedInsightCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UsedInsightCollectionResponse.cs index 95e9a34d208..1137283cf65 100644 --- a/src/Microsoft.Graph/Generated/Models/UsedInsightCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UsedInsightCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UsedInsightCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UsedInsightCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UsedInsightCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/User.cs b/src/Microsoft.Graph/Generated/Models/User.cs index c955eaa361d..ab7bdd27a74 100644 --- a/src/Microsoft.Graph/Generated/Models/User.cs +++ b/src/Microsoft.Graph/Generated/Models/User.cs @@ -2412,7 +2412,7 @@ public User() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.User CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.User(); } /// @@ -2590,7 +2590,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("aboutMe", AboutMe); writer.WriteBoolValue("accountEnabled", AccountEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/UserAccount.cs b/src/Microsoft.Graph/Generated/Models/UserAccount.cs index 6e120c9461e..8fdb2f57786 100644 --- a/src/Microsoft.Graph/Generated/Models/UserAccount.cs +++ b/src/Microsoft.Graph/Generated/Models/UserAccount.cs @@ -128,7 +128,7 @@ public UserAccount() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserAccount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserAccount(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("lastSeenDateTime", LastSeenDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/UserAccountInformation.cs b/src/Microsoft.Graph/Generated/Models/UserAccountInformation.cs index 6be6daed2dd..fe42bcc0625 100644 --- a/src/Microsoft.Graph/Generated/Models/UserAccountInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/UserAccountInformation.cs @@ -112,7 +112,7 @@ public UserAccountInformation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserAccountInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserAccountInformation(); } /// @@ -137,7 +137,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("ageGroup", AgeGroup); writer.WriteStringValue("countryCode", CountryCode); diff --git a/src/Microsoft.Graph/Generated/Models/UserAccountInformationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserAccountInformationCollectionResponse.cs index c87367b2e88..b3ca94a0dee 100644 --- a/src/Microsoft.Graph/Generated/Models/UserAccountInformationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserAccountInformationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserAccountInformationCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserAccountInformationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserAccountInformationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserActivity.cs b/src/Microsoft.Graph/Generated/Models/UserActivity.cs index b6ec159224c..ec838a331c5 100644 --- a/src/Microsoft.Graph/Generated/Models/UserActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/UserActivity.cs @@ -203,7 +203,7 @@ public string UserTimezone /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserActivity(); } /// @@ -236,7 +236,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("activationUrl", ActivationUrl); writer.WriteStringValue("activitySourceHost", ActivitySourceHost); diff --git a/src/Microsoft.Graph/Generated/Models/UserActivityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserActivityCollectionResponse.cs index 6d43af3eb53..11524ca20d4 100644 --- a/src/Microsoft.Graph/Generated/Models/UserActivityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserActivityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserActivityCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserActivityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserActivityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserAnalytics.cs b/src/Microsoft.Graph/Generated/Models/UserAnalytics.cs index 217fdacc60e..53264975fe8 100644 --- a/src/Microsoft.Graph/Generated/Models/UserAnalytics.cs +++ b/src/Microsoft.Graph/Generated/Models/UserAnalytics.cs @@ -51,7 +51,7 @@ public partial class UserAnalytics : global::Microsoft.Graph.Beta.Models.Entity, /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserAnalytics CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserAnalytics(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("activityStatistics", ActivityStatistics); writer.WriteObjectValue("settings", Settings); diff --git a/src/Microsoft.Graph/Generated/Models/UserAppInstallStatus.cs b/src/Microsoft.Graph/Generated/Models/UserAppInstallStatus.cs index 8d27a33b134..abd86cb56dd 100644 --- a/src/Microsoft.Graph/Generated/Models/UserAppInstallStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/UserAppInstallStatus.cs @@ -102,7 +102,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserAppInstallStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserAppInstallStatus(); } /// @@ -128,7 +128,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("app", App); writer.WriteCollectionOfObjectValues("deviceStatuses", DeviceStatuses); diff --git a/src/Microsoft.Graph/Generated/Models/UserAttributeValuesItem.cs b/src/Microsoft.Graph/Generated/Models/UserAttributeValuesItem.cs index 95f929f34ef..a7c9c5a9cfc 100644 --- a/src/Microsoft.Graph/Generated/Models/UserAttributeValuesItem.cs +++ b/src/Microsoft.Graph/Generated/Models/UserAttributeValuesItem.cs @@ -90,7 +90,7 @@ public UserAttributeValuesItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserAttributeValuesItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserAttributeValuesItem(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isDefault", IsDefault); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/UserCloudCommunication.cs b/src/Microsoft.Graph/Generated/Models/UserCloudCommunication.cs index b14616b6a60..7ecfa735302 100644 --- a/src/Microsoft.Graph/Generated/Models/UserCloudCommunication.cs +++ b/src/Microsoft.Graph/Generated/Models/UserCloudCommunication.cs @@ -35,7 +35,7 @@ public partial class UserCloudCommunication : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserCloudCommunication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserCloudCommunication(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("callSettings", CallSettings); } diff --git a/src/Microsoft.Graph/Generated/Models/UserCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserCollectionResponse.cs index 751aa11d7a1..a41b42bbd9a 100644 --- a/src/Microsoft.Graph/Generated/Models/UserCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserCollectionResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserConfiguration.cs b/src/Microsoft.Graph/Generated/Models/UserConfiguration.cs index 3fe961b779c..6efd49db23f 100644 --- a/src/Microsoft.Graph/Generated/Models/UserConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/UserConfiguration.cs @@ -35,7 +35,7 @@ public byte[] BinaryData /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserConfiguration(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("binaryData", BinaryData); } diff --git a/src/Microsoft.Graph/Generated/Models/UserConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserConfigurationCollectionResponse.cs index 5d409a335ea..dbd00a21630 100644 --- a/src/Microsoft.Graph/Generated/Models/UserConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserConfigurationCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserConsentRequest.cs b/src/Microsoft.Graph/Generated/Models/UserConsentRequest.cs index 2a7d2f34642..9a4ff83c226 100644 --- a/src/Microsoft.Graph/Generated/Models/UserConsentRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/UserConsentRequest.cs @@ -58,7 +58,7 @@ public UserConsentRequest() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserConsentRequest CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserConsentRequest(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("approval", Approval); writer.WriteStringValue("reason", Reason); diff --git a/src/Microsoft.Graph/Generated/Models/UserConsentRequestCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserConsentRequestCollectionResponse.cs index fba3e713689..812993c2958 100644 --- a/src/Microsoft.Graph/Generated/Models/UserConsentRequestCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserConsentRequestCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserConsentRequestCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserConsentRequestCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserConsentRequestCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserCountMetric.cs b/src/Microsoft.Graph/Generated/Models/UserCountMetric.cs index c48570ee31f..a40334c3e60 100644 --- a/src/Microsoft.Graph/Generated/Models/UserCountMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/UserCountMetric.cs @@ -48,7 +48,7 @@ public string Language /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserCountMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserCountMetric(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("count", Count); writer.WriteDateValue("factDate", FactDate); diff --git a/src/Microsoft.Graph/Generated/Models/UserCountMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserCountMetricCollectionResponse.cs index c645cc6f507..218a96d6f7a 100644 --- a/src/Microsoft.Graph/Generated/Models/UserCountMetricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserCountMetricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserCountMetricCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserCountMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserCountMetricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserCredentialUsageDetails.cs b/src/Microsoft.Graph/Generated/Models/UserCredentialUsageDetails.cs index 9d3ee450c55..7ebfb2fe988 100644 --- a/src/Microsoft.Graph/Generated/Models/UserCredentialUsageDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/UserCredentialUsageDetails.cs @@ -91,7 +91,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserCredentialUsageDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserCredentialUsageDetails(); } /// @@ -117,7 +117,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authMethod", AuthMethod); writer.WriteDateTimeOffsetValue("eventDateTime", EventDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/UserCredentialUsageDetailsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserCredentialUsageDetailsCollectionResponse.cs index 7f1b441c0d0..17a9890b053 100644 --- a/src/Microsoft.Graph/Generated/Models/UserCredentialUsageDetailsCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserCredentialUsageDetailsCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserCredentialUsageDetailsCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserCredentialUsageDetailsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserCredentialUsageDetailsCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserDataSecurityAndGovernance.cs b/src/Microsoft.Graph/Generated/Models/UserDataSecurityAndGovernance.cs index bdad3ae9853..3c392288203 100644 --- a/src/Microsoft.Graph/Generated/Models/UserDataSecurityAndGovernance.cs +++ b/src/Microsoft.Graph/Generated/Models/UserDataSecurityAndGovernance.cs @@ -58,7 +58,7 @@ public UserDataSecurityAndGovernance() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserDataSecurityAndGovernance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserDataSecurityAndGovernance(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("activities", Activities); writer.WriteObjectValue("protectionScopes", ProtectionScopes); diff --git a/src/Microsoft.Graph/Generated/Models/UserEventsSummary.cs b/src/Microsoft.Graph/Generated/Models/UserEventsSummary.cs index a2b278d3522..09cc24fe938 100644 --- a/src/Microsoft.Graph/Generated/Models/UserEventsSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/UserEventsSummary.cs @@ -91,7 +91,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserEventsSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserEventsSummary(); } /// @@ -117,7 +117,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authMethod", AuthMethod); writer.WriteDateTimeOffsetValue("eventDateTime", EventDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/UserEventsSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserEventsSummaryCollectionResponse.cs index 4e20706b6d4..e1d0a50174b 100644 --- a/src/Microsoft.Graph/Generated/Models/UserEventsSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserEventsSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserEventsSummaryCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserEventsSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserEventsSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomaly.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomaly.cs index e079fa475e2..4993de90eae 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomaly.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomaly.cs @@ -168,7 +168,7 @@ public string IssueId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomaly CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomaly(); } /// @@ -200,7 +200,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("anomalyFirstOccurrenceDateTime", AnomalyFirstOccurrenceDateTime); writer.WriteStringValue("anomalyId", AnomalyId); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCollectionResponse.cs index 05a20eff255..436b36a0383 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsAnomalyCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCorrelationGroupFeature.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCorrelationGroupFeature.cs index 1a85e21c781..0138bd6d0ef 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCorrelationGroupFeature.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCorrelationGroupFeature.cs @@ -75,7 +75,7 @@ public UserExperienceAnalyticsAnomalyCorrelationGroupFeature() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyCorrelationGroupFeature CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyCorrelationGroupFeature(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("deviceFeatureType", DeviceFeatureType); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("values", Values); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCorrelationGroupOverview.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCorrelationGroupOverview.cs index 933bc3eed54..328da19aba3 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCorrelationGroupOverview.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCorrelationGroupOverview.cs @@ -110,7 +110,7 @@ public int? TotalDeviceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyCorrelationGroupOverview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyCorrelationGroupOverview(); } /// @@ -139,7 +139,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("anomalyCorrelationGroupCount", AnomalyCorrelationGroupCount); writer.WriteStringValue("anomalyId", AnomalyId); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCorrelationGroupOverviewCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCorrelationGroupOverviewCollectionResponse.cs index ad776303dd4..8f2fdaaea60 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCorrelationGroupOverviewCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyCorrelationGroupOverviewCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsAnomalyCorrelationGroupOverviewColle /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyCorrelationGroupOverviewCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyCorrelationGroupOverviewCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyDevice.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyDevice.cs index 66fa91491cc..c59f1feaa54 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyDevice.cs @@ -166,7 +166,7 @@ public string OsVersion /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyDevice(); } /// @@ -196,7 +196,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("anomalyId", AnomalyId); writer.WriteDateTimeOffsetValue("anomalyOnDeviceFirstOccurrenceDateTime", AnomalyOnDeviceFirstOccurrenceDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyDeviceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyDeviceCollectionResponse.cs index 0952e5b794f..5185c14aeaa 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyDeviceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalyDeviceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsAnomalyDeviceCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyDeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalyDeviceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalySeverityOverview.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalySeverityOverview.cs index 2538e9584fa..cbd30f49edd 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalySeverityOverview.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAnomalySeverityOverview.cs @@ -77,7 +77,7 @@ public UserExperienceAnalyticsAnomalySeverityOverview() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalySeverityOverview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAnomalySeverityOverview(); } /// @@ -101,7 +101,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("highSeverityAnomalyCount", HighSeverityAnomalyCount); writer.WriteIntValue("informationalSeverityAnomalyCount", InformationalSeverityAnomalyCount); writer.WriteIntValue("lowSeverityAnomalyCount", LowSeverityAnomalyCount); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersion.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersion.cs index f26a7b0005e..54b615a30f3 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersion.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersion.cs @@ -102,7 +102,7 @@ public int? MeanTimeToFailureInMinutes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersion(); } /// @@ -128,7 +128,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("appCrashCount", AppCrashCount); writer.WriteStringValue("appDisplayName", AppDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionCollectionResponse.cs index b97b8f1de0f..4fbf334a8bc 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionC /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.cs index b919a88ef21..afd000b70a4 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails.cs @@ -108,7 +108,7 @@ public bool? IsMostUsedVersion /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails(); } /// @@ -135,7 +135,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("appCrashCount", AppCrashCount); writer.WriteStringValue("appDisplayName", AppDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsCollectionResponse.cs index 1d6f391c7c4..c3978b5e325 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionD /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.cs index 18438066fdc..bd89b9ee9b5 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId.cs @@ -128,7 +128,7 @@ public DateTimeOffset? ProcessedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId(); } /// @@ -155,7 +155,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("appCrashCount", AppCrashCount); writer.WriteStringValue("appDisplayName", AppDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdCollectionResponse.cs index 8219f891f09..b29fa2312da 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionD /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.cs index ffffd3061bb..e5518f3a876 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion.cs @@ -124,7 +124,7 @@ public string OsVersion /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByOSVersion(); } /// @@ -152,7 +152,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activeDeviceCount", ActiveDeviceCount); writer.WriteIntValue("appCrashCount", AppCrashCount); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCollectionResponse.cs index 2f5113dc661..da9b59719fa 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthApplicationPerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthApplicationPerformance.cs index a12a7f2d025..6cfc9f76939 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthApplicationPerformance.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthApplicationPerformance.cs @@ -104,7 +104,7 @@ public int? MeanTimeToFailureInMinutes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthApplicationPerformance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthApplicationPerformance(); } /// @@ -132,7 +132,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activeDeviceCount", ActiveDeviceCount); writer.WriteIntValue("appCrashCount", AppCrashCount); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthApplicationPerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthApplicationPerformanceCollectionResponse.cs index 36479216327..5d6dc88a62b 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthApplicationPerformanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthApplicationPerformanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsAppHealthApplicationPerformanceColle /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthApplicationPerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthApplicationPerformanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDeviceModelPerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDeviceModelPerformance.cs index 40b15894e5f..66ed2169a38 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDeviceModelPerformance.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDeviceModelPerformance.cs @@ -76,7 +76,7 @@ public double? ModelAppHealthScore /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDeviceModelPerformance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDeviceModelPerformance(); } /// @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activeDeviceCount", ActiveDeviceCount); writer.WriteStringValue("deviceManufacturer", DeviceManufacturer); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDeviceModelPerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDeviceModelPerformanceCollectionResponse.cs index 5a226131716..c9b97951e43 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDeviceModelPerformanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDeviceModelPerformanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsAppHealthDeviceModelPerformanceColle /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDeviceModelPerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDeviceModelPerformanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformance.cs index 49f0410dedb..3483135ac37 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformance.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformance.cs @@ -126,7 +126,7 @@ public DateTimeOffset? ProcessedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformance(); } /// @@ -156,7 +156,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("appCrashCount", AppCrashCount); writer.WriteIntValue("appHangCount", AppHangCount); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceCollectionResponse.cs index 0c63bdad316..ebe54d6fdb2 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsAppHealthDevicePerformanceCollection /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceDetails.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceDetails.cs index 92284581065..b8cb4270f35 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceDetails.cs @@ -122,7 +122,7 @@ public string EventType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformanceDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformanceDetails(); } /// @@ -148,7 +148,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appDisplayName", AppDisplayName); writer.WriteStringValue("appPublisher", AppPublisher); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCollectionResponse.cs index e291b2389f1..a6d0cefbea8 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCol /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthDevicePerformanceDetailsCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthOSVersionPerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthOSVersionPerformance.cs index 70394e0dbe0..90048a8e6f1 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthOSVersionPerformance.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthOSVersionPerformance.cs @@ -70,7 +70,7 @@ public double? OsVersionAppHealthScore /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthOSVersionPerformance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthOSVersionPerformance(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activeDeviceCount", ActiveDeviceCount); writer.WriteIntValue("meanTimeToFailureInMinutes", MeanTimeToFailureInMinutes); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthOSVersionPerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthOSVersionPerformanceCollectionResponse.cs index 34b0a4c2942..1dfa9541929 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthOSVersionPerformanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAppHealthOSVersionPerformanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsAppHealthOSVersionPerformanceCollect /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthOSVersionPerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAppHealthOSVersionPerformanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAutopilotDevicesSummary.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAutopilotDevicesSummary.cs index 7a80e4ef267..d2511673feb 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAutopilotDevicesSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsAutopilotDevicesSummary.cs @@ -71,7 +71,7 @@ public UserExperienceAnalyticsAutopilotDevicesSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAutopilotDevicesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsAutopilotDevicesSummary(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("devicesNotAutopilotRegistered", DevicesNotAutopilotRegistered); writer.WriteIntValue("devicesWithoutAutopilotProfileAssigned", DevicesWithoutAutopilotProfileAssigned); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBaseline.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBaseline.cs index db5ba375c13..a92423be603 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBaseline.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBaseline.cs @@ -160,7 +160,7 @@ public bool? IsBuiltIn /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBaseline CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBaseline(); } /// @@ -189,7 +189,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("appHealthMetrics", AppHealthMetrics); writer.WriteObjectValue("batteryHealthMetrics", BatteryHealthMetrics); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBaselineCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBaselineCollectionResponse.cs index fb533d6dbdc..c881d02e8ad 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBaselineCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBaselineCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsBaselineCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBaselineCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBaselineCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthAppImpact.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthAppImpact.cs index f6787142e42..c9c801b03ef 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthAppImpact.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthAppImpact.cs @@ -86,7 +86,7 @@ public bool? IsForegroundApp /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthAppImpact CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthAppImpact(); } /// @@ -111,7 +111,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activeDevices", ActiveDevices); writer.WriteStringValue("appDisplayName", AppDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthAppImpactCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthAppImpactCollectionResponse.cs index f44fc7c09a9..bf79a31c3d1 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthAppImpactCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthAppImpactCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsBatteryHealthAppImpactCollectionResp /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthAppImpactCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthAppImpactCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthCapacityDetails.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthCapacityDetails.cs index 5e8079d6e8b..4f62e788a00 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthCapacityDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthCapacityDetails.cs @@ -50,7 +50,7 @@ public DateTimeOffset? LastRefreshedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthCapacityDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthCapacityDetails(); } /// @@ -74,7 +74,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activeDevices", ActiveDevices); writer.WriteIntValue("batteryCapacityFair", BatteryCapacityFair); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceAppImpact.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceAppImpact.cs index f5ae6c68522..9ae0557cc5c 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceAppImpact.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceAppImpact.cs @@ -96,7 +96,7 @@ public bool? IsForegroundApp /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceAppImpact CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceAppImpact(); } /// @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appDisplayName", AppDisplayName); writer.WriteStringValue("appName", AppName); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceAppImpactCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceAppImpactCollectionResponse.cs index ec8fe7fd222..e8bf33fcaae 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceAppImpactCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceAppImpactCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsBatteryHealthDeviceAppImpactCollecti /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceAppImpactCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceAppImpactCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDevicePerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDevicePerformance.cs index 476dedd755a..2980003889f 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDevicePerformance.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDevicePerformance.cs @@ -190,7 +190,7 @@ public string Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDevicePerformance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDevicePerformance(); } /// @@ -224,7 +224,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("batteryAgeInDays", BatteryAgeInDays); writer.WriteCollectionOfObjectValues("deviceBatteriesDetails", DeviceBatteriesDetails); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDevicePerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDevicePerformanceCollectionResponse.cs index c7d1ed58e5f..fd79fafc824 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDevicePerformanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDevicePerformanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsBatteryHealthDevicePerformanceCollec /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDevicePerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDevicePerformanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory.cs index 4822ca46684..6be4ddbaf6d 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory.cs @@ -58,7 +58,7 @@ public string RuntimeDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceId", DeviceId); writer.WriteIntValue("estimatedRuntimeInMinutes", EstimatedRuntimeInMinutes); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryCollectionResponse.cs index 243f15b0e48..41c86891353 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryCol /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthModelPerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthModelPerformance.cs index fd1576cd12c..fa4db8086c6 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthModelPerformance.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthModelPerformance.cs @@ -144,7 +144,7 @@ public int? ModelBatteryHealthScore /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthModelPerformance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthModelPerformance(); } /// @@ -177,7 +177,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activeDevices", ActiveDevices); writer.WriteIntValue("averageBatteryAgeInDays", AverageBatteryAgeInDays); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthModelPerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthModelPerformanceCollectionResponse.cs index 866a6fd81ba..a6fdf4e177f 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthModelPerformanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthModelPerformanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsBatteryHealthModelPerformanceCollect /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthModelPerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthModelPerformanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthOsPerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthOsPerformance.cs index fa914ab7705..745a6e65d58 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthOsPerformance.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthOsPerformance.cs @@ -112,7 +112,7 @@ public string OsVersion /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthOsPerformance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthOsPerformance(); } /// @@ -143,7 +143,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activeDevices", ActiveDevices); writer.WriteIntValue("averageBatteryAgeInDays", AverageBatteryAgeInDays); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthOsPerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthOsPerformanceCollectionResponse.cs index a67af004165..c1e3bf67a78 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthOsPerformanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthOsPerformanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsBatteryHealthOsPerformanceCollection /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthOsPerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthOsPerformanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthRuntimeDetails.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthRuntimeDetails.cs index 3e745e57797..b6c8136c1ab 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthRuntimeDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsBatteryHealthRuntimeDetails.cs @@ -50,7 +50,7 @@ public DateTimeOffset? LastRefreshedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthRuntimeDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsBatteryHealthRuntimeDetails(); } /// @@ -74,7 +74,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("activeDevices", ActiveDevices); writer.WriteIntValue("batteryRuntimeFair", BatteryRuntimeFair); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCategory.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCategory.cs index f92844987ad..ba3e89615d7 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCategory.cs @@ -52,7 +52,7 @@ public partial class UserExperienceAnalyticsCategory : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsCategory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsCategory(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("insights", Insights); writer.WriteCollectionOfObjectValues("metricValues", MetricValues); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCategoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCategoryCollectionResponse.cs index b6e9c2d6370..5e2b431cea1 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCategoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCategoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsCategoryCollectionResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsCategoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsCategoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCloudIdentityDevicesSummary.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCloudIdentityDevicesSummary.cs index 90b7b94f42a..67503891b28 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCloudIdentityDevicesSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCloudIdentityDevicesSummary.cs @@ -59,7 +59,7 @@ public UserExperienceAnalyticsCloudIdentityDevicesSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsCloudIdentityDevicesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsCloudIdentityDevicesSummary(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("deviceWithoutCloudIdentityCount", DeviceWithoutCloudIdentityCount); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCloudManagementDevicesSummary.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCloudManagementDevicesSummary.cs index 27a18e432dd..d92246328e2 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCloudManagementDevicesSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsCloudManagementDevicesSummary.cs @@ -71,7 +71,7 @@ public UserExperienceAnalyticsCloudManagementDevicesSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsCloudManagementDevicesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsCloudManagementDevicesSummary(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("coManagedDeviceCount", CoManagedDeviceCount); writer.WriteIntValue("intuneDeviceCount", IntuneDeviceCount); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceBatteryDetail.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceBatteryDetail.cs index f50d0898e96..148dbb9d4aa 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceBatteryDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceBatteryDetail.cs @@ -81,7 +81,7 @@ public UserExperienceAnalyticsDeviceBatteryDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceBatteryDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceBatteryDetail(); } /// @@ -104,7 +104,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("batteryId", BatteryId); writer.WriteIntValue("fullBatteryDrainCount", FullBatteryDrainCount); writer.WriteIntValue("maxCapacityPercentage", MaxCapacityPercentage); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformance.cs index e7cb4d542fa..cff5c8e7a04 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformance.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformance.cs @@ -180,7 +180,7 @@ public double? StartupPerformanceScore /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDevicePerformance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDevicePerformance(); } /// @@ -219,7 +219,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDoubleValue("averageBlueScreens", AverageBlueScreens); writer.WriteDoubleValue("averageRestarts", AverageRestarts); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformanceCollectionResponse.cs index 7f85fbf257f..b6dc77331ad 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDevicePerformanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsDevicePerformanceCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDevicePerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDevicePerformanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScope.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScope.cs index 067210fd590..e09ef14cc59 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScope.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScope.cs @@ -126,7 +126,7 @@ public string ValueObjectId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScope(); } /// @@ -156,7 +156,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("deviceScopeName", DeviceScopeName); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScopeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScopeCollectionResponse.cs index 1ac259aace8..98d6ce2408a 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScopeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScopeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsDeviceScopeCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScopeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScopeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScopeSummary.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScopeSummary.cs index a99acf27f03..89de0da1f78 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScopeSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScopeSummary.cs @@ -97,7 +97,7 @@ public UserExperienceAnalyticsDeviceScopeSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScopeSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScopeSummary(); } /// @@ -121,7 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("completedDeviceScopeIds", CompletedDeviceScopeIds); writer.WriteCollectionOfPrimitiveValues("insufficientDataDeviceScopeIds", InsufficientDataDeviceScopeIds); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScores.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScores.cs index 77714d9d9db..f23a792f724 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScores.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScores.cs @@ -110,7 +110,7 @@ public double? WorkFromAnywhereScore /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScores CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScores(); } /// @@ -139,7 +139,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDoubleValue("appReliabilityScore", AppReliabilityScore); writer.WriteDoubleValue("batteryHealthScore", BatteryHealthScore); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScoresCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScoresCollectionResponse.cs index 92f29fada70..4e019053e8f 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScoresCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceScoresCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsDeviceScoresCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScoresCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceScoresCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupHistory.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupHistory.cs index 8bdf818c3ac..a1e9b162421 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupHistory.cs @@ -156,7 +156,7 @@ public int? TotalLoginTimeInMs /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupHistory(); } /// @@ -191,7 +191,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("coreBootTimeInMs", CoreBootTimeInMs); writer.WriteIntValue("coreLoginTimeInMs", CoreLoginTimeInMs); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupHistoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupHistoryCollectionResponse.cs index c9b15318773..bc32bcd0a33 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupHistoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupHistoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsDeviceStartupHistoryCollectionRespon /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupHistoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupHistoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcess.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcess.cs index 6369686b3ed..793e3362b74 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcess.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcess.cs @@ -90,7 +90,7 @@ public int? StartupImpactInMs /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcess CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcess(); } /// @@ -114,7 +114,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("managedDeviceId", ManagedDeviceId); writer.WriteStringValue("processName", ProcessName); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessCollectionResponse.cs index 98c58b3f590..e0d26b6c24a 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsDeviceStartupProcessCollectionRespon /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcessCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcessCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessPerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessPerformance.cs index 8e91da9ff96..3b747c507fa 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessPerformance.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessPerformance.cs @@ -86,7 +86,7 @@ public long? TotalImpactInMs /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcessPerformance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcessPerformance(); } /// @@ -111,7 +111,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("deviceCount", DeviceCount); writer.WriteLongValue("medianImpactInMs", MedianImpactInMs); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessPerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessPerformanceCollectionResponse.cs index b3454601275..0cae2d94965 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessPerformanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceStartupProcessPerformanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsDeviceStartupProcessPerformanceColle /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcessPerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceStartupProcessPerformanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceTimelineEvent.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceTimelineEvent.cs index c883b58ac20..e6453b81a02 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceTimelineEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceTimelineEvent.cs @@ -96,7 +96,7 @@ public string EventSource /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceTimelineEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceTimelineEvent(); } /// @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceId", DeviceId); writer.WriteDateTimeOffsetValue("eventDateTime", EventDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceTimelineEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceTimelineEventCollectionResponse.cs index 92deea726f9..5b042bd1c7a 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceTimelineEventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceTimelineEventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsDeviceTimelineEventCollectionRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceTimelineEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceTimelineEventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceWithoutCloudIdentity.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceWithoutCloudIdentity.cs index d471ec5c54b..cab34046571 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceWithoutCloudIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceWithoutCloudIdentity.cs @@ -52,7 +52,7 @@ public string DeviceName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceWithoutCloudIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceWithoutCloudIdentity(); } /// @@ -73,7 +73,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("azureAdDeviceId", AzureAdDeviceId); writer.WriteStringValue("deviceName", DeviceName); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceWithoutCloudIdentityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceWithoutCloudIdentityCollectionResponse.cs index d9b634fecff..2c0c69531bf 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceWithoutCloudIdentityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsDeviceWithoutCloudIdentityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsDeviceWithoutCloudIdentityCollection /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceWithoutCloudIdentityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsDeviceWithoutCloudIdentityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsImpactingProcess.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsImpactingProcess.cs index aef12fb61dd..2cb0187d9db 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsImpactingProcess.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsImpactingProcess.cs @@ -106,7 +106,7 @@ public string Publisher /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsImpactingProcess CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsImpactingProcess(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("category", Category); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsImpactingProcessCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsImpactingProcessCollectionResponse.cs index 7f82e406b5c..f7e6c91167b 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsImpactingProcessCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsImpactingProcessCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsImpactingProcessCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsImpactingProcessCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsImpactingProcessCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsight.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsight.cs index 64d1c567a15..e3a553153ea 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsight.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsight.cs @@ -107,7 +107,7 @@ public UserExperienceAnalyticsInsight() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsInsight CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsInsight(); } /// @@ -131,7 +131,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("insightId", InsightId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("severity", Severity); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsightValue.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsightValue.cs index 1207233814c..d884bef1b69 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsightValue.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsInsightValue.cs @@ -53,7 +53,7 @@ public UserExperienceAnalyticsInsightValue() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsInsightValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetric.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetric.cs index daf8fbb36fc..6867aa8c838 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetric.cs @@ -42,7 +42,7 @@ public double? Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetric(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("unit", Unit); writer.WriteDoubleValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricCollectionResponse.cs index 8a9a179fd07..8e2cf95681b 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsMetricCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricHistory.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricHistory.cs index a4ba1fd61af..471f1e410db 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricHistory.cs @@ -58,7 +58,7 @@ public string MetricType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetricHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetricHistory(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceId", DeviceId); writer.WriteDateTimeOffsetValue("metricDateTime", MetricDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricHistoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricHistoryCollectionResponse.cs index c6c86df2ba4..cff5fbfbc29 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricHistoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsMetricHistoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsMetricHistoryCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetricHistoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsMetricHistoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsModelScores.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsModelScores.cs index 1481ab75f4b..3fc4ff77327 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsModelScores.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsModelScores.cs @@ -100,7 +100,7 @@ public double? WorkFromAnywhereScore /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsModelScores CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsModelScores(); } /// @@ -129,7 +129,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDoubleValue("appReliabilityScore", AppReliabilityScore); writer.WriteDoubleValue("batteryHealthScore", BatteryHealthScore); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsModelScoresCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsModelScoresCollectionResponse.cs index 7009d6ae6f4..dc998ab86d8 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsModelScoresCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsModelScoresCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsModelScoresCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsModelScoresCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsModelScoresCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsNotAutopilotReadyDevice.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsNotAutopilotReadyDevice.cs index bf1364b20ad..6e32fa1e884 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsNotAutopilotReadyDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsNotAutopilotReadyDevice.cs @@ -134,7 +134,7 @@ public string SerialNumber /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsNotAutopilotReadyDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsNotAutopilotReadyDevice(); } /// @@ -162,7 +162,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("autoPilotProfileAssigned", AutoPilotProfileAssigned); writer.WriteBoolValue("autoPilotRegistered", AutoPilotRegistered); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsNotAutopilotReadyDeviceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsNotAutopilotReadyDeviceCollectionResponse.cs index a697c5feaf5..e6b8395e47b 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsNotAutopilotReadyDeviceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsNotAutopilotReadyDeviceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsNotAutopilotReadyDeviceCollectionRes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsNotAutopilotReadyDeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsNotAutopilotReadyDeviceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsOverview.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsOverview.cs index 9e259a175b8..39121734635 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsOverview.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsOverview.cs @@ -36,7 +36,7 @@ public partial class UserExperienceAnalyticsOverview : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsOverview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsOverview(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("insights", Insights); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsRemoteConnection.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsRemoteConnection.cs index 41c7dcb786d..9394ada62a7 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsRemoteConnection.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsRemoteConnection.cs @@ -158,7 +158,7 @@ public string VirtualNetwork /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsRemoteConnection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsRemoteConnection(); } /// @@ -190,7 +190,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDoubleValue("cloudPcFailurePercentage", CloudPcFailurePercentage); writer.WriteDoubleValue("cloudPcRoundTripTime", CloudPcRoundTripTime); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsRemoteConnectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsRemoteConnectionCollectionResponse.cs index 447fd29b1d8..708d502e8bb 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsRemoteConnectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsRemoteConnectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsRemoteConnectionCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsRemoteConnectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsRemoteConnectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsResourcePerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsResourcePerformance.cs index e759576d155..1db1272fcff 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsResourcePerformance.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsResourcePerformance.cs @@ -190,7 +190,7 @@ public double? TotalRamInMB /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsResourcePerformance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsResourcePerformance(); } /// @@ -229,7 +229,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("averageSpikeTimeScore", AverageSpikeTimeScore); writer.WriteDoubleValue("cpuClockSpeedInMHz", CpuClockSpeedInMHz); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsResourcePerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsResourcePerformanceCollectionResponse.cs index d2ccd0d797a..a7f2c7c6fc1 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsResourcePerformanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsResourcePerformanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsResourcePerformanceCollectionRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsResourcePerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsResourcePerformanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsScoreHistory.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsScoreHistory.cs index e771ac49d25..31f044dadda 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsScoreHistory.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsScoreHistory.cs @@ -26,7 +26,7 @@ public DateTimeOffset? StartupDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsScoreHistory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsScoreHistory(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("startupDateTime", StartupDateTime); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsScoreHistoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsScoreHistoryCollectionResponse.cs index c7f57454ef5..4c9229459fd 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsScoreHistoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsScoreHistoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsScoreHistoryCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsScoreHistoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsScoreHistoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsSettings.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsSettings.cs index 6770585f5b9..c91dfb0ce62 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsSettings.cs @@ -59,7 +59,7 @@ public UserExperienceAnalyticsSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsSettings(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("configurationManagerDataConnectorConfigured", ConfigurationManagerDataConnectorConfigured); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWindows10DevicesSummary.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWindows10DevicesSummary.cs index 2176791040c..ded122742d5 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWindows10DevicesSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWindows10DevicesSummary.cs @@ -59,7 +59,7 @@ public UserExperienceAnalyticsWindows10DevicesSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWindows10DevicesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWindows10DevicesSummary(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("unsupportedOSversionDeviceCount", UnsupportedOSversionDeviceCount); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDevice.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDevice.cs index 4b10137c172..430b577f759 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDevice.cs @@ -334,7 +334,7 @@ public double? WorkFromAnywhereScore /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereDevice(); } /// @@ -387,7 +387,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("autoPilotProfileAssigned", AutoPilotProfileAssigned); writer.WriteBoolValue("autoPilotRegistered", AutoPilotRegistered); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResponse.cs index 7269abc30d8..557cdb7beb5 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResp /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereDeviceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDevicesSummary.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDevicesSummary.cs index 266f2b470be..dbbfe2288d9 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDevicesSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereDevicesSummary.cs @@ -177,7 +177,7 @@ public UserExperienceAnalyticsWorkFromAnywhereDevicesSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereDevicesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereDevicesSummary(); } /// @@ -211,7 +211,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("autopilotDevicesSummary", AutopilotDevicesSummary); writer.WriteObjectValue("cloudIdentityDevicesSummary", CloudIdentityDevicesSummary); writer.WriteObjectValue("cloudManagementDevicesSummary", CloudManagementDevicesSummary); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric.cs index f2cf24589e0..912b2bdb5ac 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric.cs @@ -86,7 +86,7 @@ public int? UpgradeEligibleDeviceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric(); } /// @@ -116,7 +116,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDoubleValue("osCheckFailedPercentage", OsCheckFailedPercentage); writer.WriteDoubleValue("processor64BitCheckFailedPercentage", Processor64BitCheckFailedPercentage); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereMetric.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereMetric.cs index 31186265025..8e356979428 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereMetric.cs @@ -36,7 +36,7 @@ public partial class UserExperienceAnalyticsWorkFromAnywhereMetric : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereMetric(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("metricDevices", MetricDevices); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResponse.cs index 7028397d400..6d691762111 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResp /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereMetricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereModelPerformance.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereModelPerformance.cs index 0607f9bb179..6ad92f5e4b5 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereModelPerformance.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereModelPerformance.cs @@ -94,7 +94,7 @@ public double? WorkFromAnywhereScore /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereModelPerformance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereModelPerformance(); } /// @@ -122,7 +122,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDoubleValue("cloudIdentityScore", CloudIdentityScore); writer.WriteDoubleValue("cloudManagementScore", CloudManagementScore); diff --git a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceCollectionResponse.cs index 2a13f02ed41..0df3e4245da 100644 --- a/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserExperienceAnalyticsWorkFromAnywhereModelPerformanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserExperienceAnalyticsWorkFromAnywhereModelPerformanceColl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereModelPerformanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserExperienceAnalyticsWorkFromAnywhereModelPerformanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserFlowApiConnectorConfiguration.cs b/src/Microsoft.Graph/Generated/Models/UserFlowApiConnectorConfiguration.cs index 60a76127cfc..bf205621fbf 100644 --- a/src/Microsoft.Graph/Generated/Models/UserFlowApiConnectorConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/UserFlowApiConnectorConfiguration.cs @@ -100,7 +100,7 @@ public UserFlowApiConnectorConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserFlowApiConnectorConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserFlowApiConnectorConfiguration(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("postAttributeCollection", PostAttributeCollection); writer.WriteObjectValue("postFederationSignup", PostFederationSignup); diff --git a/src/Microsoft.Graph/Generated/Models/UserFlowLanguageConfiguration.cs b/src/Microsoft.Graph/Generated/Models/UserFlowLanguageConfiguration.cs index 55ab4a96217..96016eb0cf7 100644 --- a/src/Microsoft.Graph/Generated/Models/UserFlowLanguageConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/UserFlowLanguageConfiguration.cs @@ -73,7 +73,7 @@ public bool? IsEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserFlowLanguageConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserFlowLanguageConfiguration(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("defaultPages", DefaultPages); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/UserFlowLanguageConfigurationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserFlowLanguageConfigurationCollectionResponse.cs index 971780c72fe..97698c8cd91 100644 --- a/src/Microsoft.Graph/Generated/Models/UserFlowLanguageConfigurationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserFlowLanguageConfigurationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserFlowLanguageConfigurationCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserFlowLanguageConfigurationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserFlowLanguageConfigurationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserFlowLanguagePage.cs b/src/Microsoft.Graph/Generated/Models/UserFlowLanguagePage.cs index aca1090428a..d083b16d2f9 100644 --- a/src/Microsoft.Graph/Generated/Models/UserFlowLanguagePage.cs +++ b/src/Microsoft.Graph/Generated/Models/UserFlowLanguagePage.cs @@ -19,7 +19,7 @@ public partial class UserFlowLanguagePage : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserFlowLanguagePage(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/UserFlowLanguagePageCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserFlowLanguagePageCollectionResponse.cs index e341b4d166d..63eabd5c19e 100644 --- a/src/Microsoft.Graph/Generated/Models/UserFlowLanguagePageCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserFlowLanguagePageCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserFlowLanguagePageCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserFlowLanguagePageCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserFlowLanguagePageCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserGovernanceCriteria.cs b/src/Microsoft.Graph/Generated/Models/UserGovernanceCriteria.cs index 2146aba0516..ffd012012f3 100644 --- a/src/Microsoft.Graph/Generated/Models/UserGovernanceCriteria.cs +++ b/src/Microsoft.Graph/Generated/Models/UserGovernanceCriteria.cs @@ -42,7 +42,7 @@ public UserGovernanceCriteria() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserGovernanceCriteria CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserGovernanceCriteria(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userId", UserId); } diff --git a/src/Microsoft.Graph/Generated/Models/UserIdentity.cs b/src/Microsoft.Graph/Generated/Models/UserIdentity.cs index 54fbfbd9e59..3323c895971 100644 --- a/src/Microsoft.Graph/Generated/Models/UserIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/UserIdentity.cs @@ -58,7 +58,7 @@ public UserIdentity() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -84,7 +84,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("ipAddress", IpAddress); writer.WriteStringValue("userPrincipalName", UserPrincipalName); diff --git a/src/Microsoft.Graph/Generated/Models/UserInsightsRoot.cs b/src/Microsoft.Graph/Generated/Models/UserInsightsRoot.cs index 6e7d797f565..e71c43119ab 100644 --- a/src/Microsoft.Graph/Generated/Models/UserInsightsRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/UserInsightsRoot.cs @@ -51,7 +51,7 @@ public partial class UserInsightsRoot : global::Microsoft.Graph.Beta.Models.Enti /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserInsightsRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserInsightsRoot(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("daily", Daily); writer.WriteObjectValue("monthly", Monthly); diff --git a/src/Microsoft.Graph/Generated/Models/UserInsightsSettings.cs b/src/Microsoft.Graph/Generated/Models/UserInsightsSettings.cs index 745dd25fa18..6433ad15b77 100644 --- a/src/Microsoft.Graph/Generated/Models/UserInsightsSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/UserInsightsSettings.cs @@ -25,7 +25,7 @@ public bool? IsEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserInsightsSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserInsightsSettings(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isEnabled", IsEnabled); } diff --git a/src/Microsoft.Graph/Generated/Models/UserInstallStateSummary.cs b/src/Microsoft.Graph/Generated/Models/UserInstallStateSummary.cs index 7d4027435cc..e9cabe5513b 100644 --- a/src/Microsoft.Graph/Generated/Models/UserInstallStateSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/UserInstallStateSummary.cs @@ -70,7 +70,7 @@ public string UserName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserInstallStateSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserInstallStateSummary(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("deviceStates", DeviceStates); writer.WriteIntValue("failedDeviceCount", FailedDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/UserInstallStateSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserInstallStateSummaryCollectionResponse.cs index 10b8eb8ab92..fede7aac636 100644 --- a/src/Microsoft.Graph/Generated/Models/UserInstallStateSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserInstallStateSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserInstallStateSummaryCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserInstallStateSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserInstallStateSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserLastSignInRecommendationInsightSetting.cs b/src/Microsoft.Graph/Generated/Models/UserLastSignInRecommendationInsightSetting.cs index 2b37cb3201d..7c14a740a6c 100644 --- a/src/Microsoft.Graph/Generated/Models/UserLastSignInRecommendationInsightSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/UserLastSignInRecommendationInsightSetting.cs @@ -38,7 +38,7 @@ public UserLastSignInRecommendationInsightSetting() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserLastSignInRecommendationInsightSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserLastSignInRecommendationInsightSetting(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeSpanValue("recommendationLookBackDuration", RecommendationLookBackDuration); writer.WriteEnumValue("signInScope", SignInScope); diff --git a/src/Microsoft.Graph/Generated/Models/UserMfaSignInSummary.cs b/src/Microsoft.Graph/Generated/Models/UserMfaSignInSummary.cs index ddddb5d72ba..8eec91613c2 100644 --- a/src/Microsoft.Graph/Generated/Models/UserMfaSignInSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/UserMfaSignInSummary.cs @@ -43,7 +43,7 @@ public long? TotalSignIns /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserMfaSignInSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserMfaSignInSummary(); } /// @@ -66,7 +66,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteLongValue("multiFactorSignIns", MultiFactorSignIns); diff --git a/src/Microsoft.Graph/Generated/Models/UserMfaSignInSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserMfaSignInSummaryCollectionResponse.cs index e6ed24af04c..42a73b669a0 100644 --- a/src/Microsoft.Graph/Generated/Models/UserMfaSignInSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserMfaSignInSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserMfaSignInSummaryCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserMfaSignInSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserMfaSignInSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserPFXCertificate.cs b/src/Microsoft.Graph/Generated/Models/UserPFXCertificate.cs index d2f216dea64..5f8367755b7 100644 --- a/src/Microsoft.Graph/Generated/Models/UserPFXCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/UserPFXCertificate.cs @@ -152,7 +152,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserPFXCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserPFXCertificate(); } /// @@ -183,7 +183,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteByteArrayValue("encryptedPfxBlob", EncryptedPfxBlob); diff --git a/src/Microsoft.Graph/Generated/Models/UserPFXCertificateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserPFXCertificateCollectionResponse.cs index 38ae34667d0..1cb1045366c 100644 --- a/src/Microsoft.Graph/Generated/Models/UserPFXCertificateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserPFXCertificateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserPFXCertificateCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserPFXCertificateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserPFXCertificateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserPasswordResetsAndChangesSummary.cs b/src/Microsoft.Graph/Generated/Models/UserPasswordResetsAndChangesSummary.cs index d69d43d9ede..0f1c42b5dd4 100644 --- a/src/Microsoft.Graph/Generated/Models/UserPasswordResetsAndChangesSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/UserPasswordResetsAndChangesSummary.cs @@ -43,7 +43,7 @@ public long? PasswordResetsSelfServiceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserPasswordResetsAndChangesSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserPasswordResetsAndChangesSummary(); } /// @@ -66,7 +66,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("aggregatedDateTime", AggregatedDateTime); writer.WriteLongValue("changePasswordSelfServiceCount", ChangePasswordSelfServiceCount); diff --git a/src/Microsoft.Graph/Generated/Models/UserPasswordResetsAndChangesSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserPasswordResetsAndChangesSummaryCollectionResponse.cs index 4f77e8b58d4..8eacd6f5a7c 100644 --- a/src/Microsoft.Graph/Generated/Models/UserPasswordResetsAndChangesSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserPasswordResetsAndChangesSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserPasswordResetsAndChangesSummaryCollectionResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserPasswordResetsAndChangesSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserPasswordResetsAndChangesSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserPrint.cs b/src/Microsoft.Graph/Generated/Models/UserPrint.cs index 7d74fc7537c..13e3883e4ab 100644 --- a/src/Microsoft.Graph/Generated/Models/UserPrint.cs +++ b/src/Microsoft.Graph/Generated/Models/UserPrint.cs @@ -68,7 +68,7 @@ public UserPrint() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserPrint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserPrint(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("recentPrinterShares", RecentPrinterShares); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/UserProtectionScopeContainer.cs b/src/Microsoft.Graph/Generated/Models/UserProtectionScopeContainer.cs index 184a7a1d2da..e0e6402e867 100644 --- a/src/Microsoft.Graph/Generated/Models/UserProtectionScopeContainer.cs +++ b/src/Microsoft.Graph/Generated/Models/UserProtectionScopeContainer.cs @@ -19,7 +19,7 @@ public partial class UserProtectionScopeContainer : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserProtectionScopeContainer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserProtectionScopeContainer(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/UserRegistrationActivitySummary.cs b/src/Microsoft.Graph/Generated/Models/UserRegistrationActivitySummary.cs index ba03a3d0e3d..2ab27714f40 100644 --- a/src/Microsoft.Graph/Generated/Models/UserRegistrationActivitySummary.cs +++ b/src/Microsoft.Graph/Generated/Models/UserRegistrationActivitySummary.cs @@ -43,7 +43,7 @@ public long? SuccessfulActivityCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserRegistrationActivitySummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserRegistrationActivitySummary(); } /// @@ -66,7 +66,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authMethod", AuthMethod); writer.WriteLongValue("failureActivityCount", FailureActivityCount); diff --git a/src/Microsoft.Graph/Generated/Models/UserRegistrationCount.cs b/src/Microsoft.Graph/Generated/Models/UserRegistrationCount.cs index 6d61c48a41c..f70f909c3d6 100644 --- a/src/Microsoft.Graph/Generated/Models/UserRegistrationCount.cs +++ b/src/Microsoft.Graph/Generated/Models/UserRegistrationCount.cs @@ -64,7 +64,7 @@ public UserRegistrationCount() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserRegistrationCount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserRegistrationCount(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("registrationCount", RegistrationCount); writer.WriteEnumValue("registrationStatus", RegistrationStatus); diff --git a/src/Microsoft.Graph/Generated/Models/UserRegistrationDetails.cs b/src/Microsoft.Graph/Generated/Models/UserRegistrationDetails.cs index 0f007754bb0..5d55b7731a2 100644 --- a/src/Microsoft.Graph/Generated/Models/UserRegistrationDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/UserRegistrationDetails.cs @@ -155,7 +155,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserRegistrationDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserRegistrationDetails(); } /// @@ -190,7 +190,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("defaultMfaMethod", DefaultMfaMethod); writer.WriteBoolValue("isAdmin", IsAdmin); diff --git a/src/Microsoft.Graph/Generated/Models/UserRegistrationDetailsCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserRegistrationDetailsCollectionResponse.cs index e557da84c23..58c59fd603b 100644 --- a/src/Microsoft.Graph/Generated/Models/UserRegistrationDetailsCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserRegistrationDetailsCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserRegistrationDetailsCollectionResponse : global::Microso /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserRegistrationDetailsCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserRegistrationDetailsCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserRegistrationFeatureCount.cs b/src/Microsoft.Graph/Generated/Models/UserRegistrationFeatureCount.cs index 9e43a3acffb..c9bde0f47f3 100644 --- a/src/Microsoft.Graph/Generated/Models/UserRegistrationFeatureCount.cs +++ b/src/Microsoft.Graph/Generated/Models/UserRegistrationFeatureCount.cs @@ -64,7 +64,7 @@ public UserRegistrationFeatureCount() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserRegistrationFeatureCount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserRegistrationFeatureCount(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("feature", Feature); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("userCount", UserCount); diff --git a/src/Microsoft.Graph/Generated/Models/UserRegistrationFeatureSummary.cs b/src/Microsoft.Graph/Generated/Models/UserRegistrationFeatureSummary.cs index aad39bd9ef5..05740affc2a 100644 --- a/src/Microsoft.Graph/Generated/Models/UserRegistrationFeatureSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/UserRegistrationFeatureSummary.cs @@ -86,7 +86,7 @@ public UserRegistrationFeatureSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserRegistrationFeatureSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserRegistrationFeatureSummary(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("totalUserCount", TotalUserCount); writer.WriteCollectionOfObjectValues("userRegistrationFeatureCounts", UserRegistrationFeatureCounts); diff --git a/src/Microsoft.Graph/Generated/Models/UserRegistrationMethodCount.cs b/src/Microsoft.Graph/Generated/Models/UserRegistrationMethodCount.cs index 47b14fd3c29..9c7be4d3c70 100644 --- a/src/Microsoft.Graph/Generated/Models/UserRegistrationMethodCount.cs +++ b/src/Microsoft.Graph/Generated/Models/UserRegistrationMethodCount.cs @@ -74,7 +74,7 @@ public UserRegistrationMethodCount() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserRegistrationMethodCount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserRegistrationMethodCount(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("authenticationMethod", AuthenticationMethod); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("userCount", UserCount); diff --git a/src/Microsoft.Graph/Generated/Models/UserRegistrationMethodSummary.cs b/src/Microsoft.Graph/Generated/Models/UserRegistrationMethodSummary.cs index d48041db781..b22cd4ed594 100644 --- a/src/Microsoft.Graph/Generated/Models/UserRegistrationMethodSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/UserRegistrationMethodSummary.cs @@ -86,7 +86,7 @@ public UserRegistrationMethodSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserRegistrationMethodSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserRegistrationMethodSummary(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("totalUserCount", TotalUserCount); writer.WriteCollectionOfObjectValues("userRegistrationMethodCounts", UserRegistrationMethodCounts); diff --git a/src/Microsoft.Graph/Generated/Models/UserRequestsMetric.cs b/src/Microsoft.Graph/Generated/Models/UserRequestsMetric.cs index 607a9405ff0..c240cc2901c 100644 --- a/src/Microsoft.Graph/Generated/Models/UserRequestsMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/UserRequestsMetric.cs @@ -112,7 +112,7 @@ public long? RequestCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserRequestsMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserRequestsMetric(); } /// @@ -138,7 +138,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("browser", Browser); diff --git a/src/Microsoft.Graph/Generated/Models/UserRequestsMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserRequestsMetricCollectionResponse.cs index 3fbc5a68ae4..d6866bb93a1 100644 --- a/src/Microsoft.Graph/Generated/Models/UserRequestsMetricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserRequestsMetricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserRequestsMetricCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserRequestsMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserRequestsMetricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserScope.cs b/src/Microsoft.Graph/Generated/Models/UserScope.cs index d829931b63c..aa5da236f67 100644 --- a/src/Microsoft.Graph/Generated/Models/UserScope.cs +++ b/src/Microsoft.Graph/Generated/Models/UserScope.cs @@ -26,7 +26,7 @@ public UserScope() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserScope(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/UserScopeTeamsAppInstallation.cs b/src/Microsoft.Graph/Generated/Models/UserScopeTeamsAppInstallation.cs index 0946188760a..0edd2872c82 100644 --- a/src/Microsoft.Graph/Generated/Models/UserScopeTeamsAppInstallation.cs +++ b/src/Microsoft.Graph/Generated/Models/UserScopeTeamsAppInstallation.cs @@ -42,7 +42,7 @@ public UserScopeTeamsAppInstallation() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserScopeTeamsAppInstallation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserScopeTeamsAppInstallation(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("chat", Chat); } diff --git a/src/Microsoft.Graph/Generated/Models/UserScopeTeamsAppInstallationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserScopeTeamsAppInstallationCollectionResponse.cs index cc5881c71f3..361f3b771b4 100644 --- a/src/Microsoft.Graph/Generated/Models/UserScopeTeamsAppInstallationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserScopeTeamsAppInstallationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserScopeTeamsAppInstallationCollectionResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserScopeTeamsAppInstallationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserScopeTeamsAppInstallationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserSecurityProfile.cs b/src/Microsoft.Graph/Generated/Models/UserSecurityProfile.cs index 7469514a0d2..ee07d183da6 100644 --- a/src/Microsoft.Graph/Generated/Models/UserSecurityProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/UserSecurityProfile.cs @@ -159,7 +159,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserSecurityProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserSecurityProfile(); } /// @@ -188,7 +188,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("accounts", Accounts); writer.WriteStringValue("azureSubscriptionId", AzureSubscriptionId); diff --git a/src/Microsoft.Graph/Generated/Models/UserSecurityProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserSecurityProfileCollectionResponse.cs index e12fa4152d6..3dc68b8836c 100644 --- a/src/Microsoft.Graph/Generated/Models/UserSecurityProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserSecurityProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserSecurityProfileCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserSecurityProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserSecurityProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserSecurityState.cs b/src/Microsoft.Graph/Generated/Models/UserSecurityState.cs index b627a008f70..0ad1be6ee38 100644 --- a/src/Microsoft.Graph/Generated/Models/UserSecurityState.cs +++ b/src/Microsoft.Graph/Generated/Models/UserSecurityState.cs @@ -226,7 +226,7 @@ public UserSecurityState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserSecurityState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserSecurityState(); } /// @@ -260,7 +260,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("aadUserId", AadUserId); writer.WriteStringValue("accountName", AccountName); writer.WriteStringValue("domainName", DomainName); diff --git a/src/Microsoft.Graph/Generated/Models/UserSet.cs b/src/Microsoft.Graph/Generated/Models/UserSet.cs index 7f0fa6159fe..455e54428f0 100644 --- a/src/Microsoft.Graph/Generated/Models/UserSet.cs +++ b/src/Microsoft.Graph/Generated/Models/UserSet.cs @@ -58,7 +58,7 @@ public UserSet() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserSet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isBackup", IsBackup); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/UserSettings.cs b/src/Microsoft.Graph/Generated/Models/UserSettings.cs index 5ee47b93271..f9bfaa74a99 100644 --- a/src/Microsoft.Graph/Generated/Models/UserSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/UserSettings.cs @@ -143,7 +143,7 @@ public bool? ContributionToContentDiscoveryDisabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserSettings(); } /// @@ -171,7 +171,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("contactMergeSuggestions", ContactMergeSuggestions); writer.WriteBoolValue("contributionToContentDiscoveryAsOrganizationDisabled", ContributionToContentDiscoveryAsOrganizationDisabled); diff --git a/src/Microsoft.Graph/Generated/Models/UserSignInInsight.cs b/src/Microsoft.Graph/Generated/Models/UserSignInInsight.cs index 8b5af158b73..7121cdb7ef2 100644 --- a/src/Microsoft.Graph/Generated/Models/UserSignInInsight.cs +++ b/src/Microsoft.Graph/Generated/Models/UserSignInInsight.cs @@ -32,7 +32,7 @@ public UserSignInInsight() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserSignInInsight CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserSignInInsight(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("lastSignInDateTime", LastSignInDateTime); } diff --git a/src/Microsoft.Graph/Generated/Models/UserSignInUsageByAuthMethodActivity.cs b/src/Microsoft.Graph/Generated/Models/UserSignInUsageByAuthMethodActivity.cs index 833f199fb73..d3ceab5957a 100644 --- a/src/Microsoft.Graph/Generated/Models/UserSignInUsageByAuthMethodActivity.cs +++ b/src/Microsoft.Graph/Generated/Models/UserSignInUsageByAuthMethodActivity.cs @@ -74,7 +74,7 @@ public UserSignInUsageByAuthMethodActivity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserSignInUsageByAuthMethodActivity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserSignInUsageByAuthMethodActivity(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("authenticationMethod", AuthenticationMethod); writer.WriteStringValue("@odata.type", OdataType); writer.WriteLongValue("successActivityCount", SuccessActivityCount); diff --git a/src/Microsoft.Graph/Generated/Models/UserSignUpMetric.cs b/src/Microsoft.Graph/Generated/Models/UserSignUpMetric.cs index 0943257951e..e5455c1a9c7 100644 --- a/src/Microsoft.Graph/Generated/Models/UserSignUpMetric.cs +++ b/src/Microsoft.Graph/Generated/Models/UserSignUpMetric.cs @@ -128,7 +128,7 @@ public string Os /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserSignUpMetric CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserSignUpMetric(); } /// @@ -155,7 +155,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("browser", Browser); diff --git a/src/Microsoft.Graph/Generated/Models/UserSignUpMetricCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/UserSignUpMetricCollectionResponse.cs index 912e2f65b38..d0d22385cf8 100644 --- a/src/Microsoft.Graph/Generated/Models/UserSignUpMetricCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/UserSignUpMetricCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UserSignUpMetricCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserSignUpMetricCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserSignUpMetricCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/UserSimulationDetails.cs b/src/Microsoft.Graph/Generated/Models/UserSimulationDetails.cs index 77198b33f83..e9129b19199 100644 --- a/src/Microsoft.Graph/Generated/Models/UserSimulationDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/UserSimulationDetails.cs @@ -152,7 +152,7 @@ public UserSimulationDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserSimulationDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserSimulationDetails(); } /// @@ -182,7 +182,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("assignedTrainingsCount", AssignedTrainingsCount); writer.WriteIntValue("completedTrainingsCount", CompletedTrainingsCount); writer.WriteDateTimeOffsetValue("compromisedDateTime", CompromisedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/UserSimulationEventInfo.cs b/src/Microsoft.Graph/Generated/Models/UserSimulationEventInfo.cs index 0bf8685816f..9be3816256a 100644 --- a/src/Microsoft.Graph/Generated/Models/UserSimulationEventInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/UserSimulationEventInfo.cs @@ -128,7 +128,7 @@ public UserSimulationEventInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserSimulationEventInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserSimulationEventInfo(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("browser", Browser); writer.WriteEnumValue("clickSource", ClickSource); writer.WriteDateTimeOffsetValue("eventDateTime", EventDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/UserSolutionRoot.cs b/src/Microsoft.Graph/Generated/Models/UserSolutionRoot.cs index c527a9ee4c0..41e8dadf90c 100644 --- a/src/Microsoft.Graph/Generated/Models/UserSolutionRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/UserSolutionRoot.cs @@ -35,7 +35,7 @@ public partial class UserSolutionRoot : global::Microsoft.Graph.Beta.Models.Enti /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserSolutionRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserSolutionRoot(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("workingTimeSchedule", WorkingTimeSchedule); } diff --git a/src/Microsoft.Graph/Generated/Models/UserStorage.cs b/src/Microsoft.Graph/Generated/Models/UserStorage.cs index 6616372dc52..319b376f0e3 100644 --- a/src/Microsoft.Graph/Generated/Models/UserStorage.cs +++ b/src/Microsoft.Graph/Generated/Models/UserStorage.cs @@ -35,7 +35,7 @@ public partial class UserStorage : global::Microsoft.Graph.Beta.Models.Entity, I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserStorage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserStorage(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("quota", Quota); } diff --git a/src/Microsoft.Graph/Generated/Models/UserTeamwork.cs b/src/Microsoft.Graph/Generated/Models/UserTeamwork.cs index 3643f678cf6..6fe427085f7 100644 --- a/src/Microsoft.Graph/Generated/Models/UserTeamwork.cs +++ b/src/Microsoft.Graph/Generated/Models/UserTeamwork.cs @@ -83,7 +83,7 @@ public string Region /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserTeamwork CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserTeamwork(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("associatedTeams", AssociatedTeams); writer.WriteCollectionOfObjectValues("installedApps", InstalledApps); diff --git a/src/Microsoft.Graph/Generated/Models/UserTrainingCompletionSummary.cs b/src/Microsoft.Graph/Generated/Models/UserTrainingCompletionSummary.cs index bbd07139433..24984d4ac73 100644 --- a/src/Microsoft.Graph/Generated/Models/UserTrainingCompletionSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/UserTrainingCompletionSummary.cs @@ -82,7 +82,7 @@ public UserTrainingCompletionSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserTrainingCompletionSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserTrainingCompletionSummary(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("completedUsersCount", CompletedUsersCount); writer.WriteIntValue("inProgressUsersCount", InProgressUsersCount); writer.WriteIntValue("notCompletedUsersCount", NotCompletedUsersCount); diff --git a/src/Microsoft.Graph/Generated/Models/UserTrainingContentEventInfo.cs b/src/Microsoft.Graph/Generated/Models/UserTrainingContentEventInfo.cs index 3dc85bab3fd..28e57c9c00d 100644 --- a/src/Microsoft.Graph/Generated/Models/UserTrainingContentEventInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/UserTrainingContentEventInfo.cs @@ -112,7 +112,7 @@ public UserTrainingContentEventInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserTrainingContentEventInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserTrainingContentEventInfo(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("browser", Browser); writer.WriteDateTimeOffsetValue("contentDateTime", ContentDateTime); writer.WriteStringValue("ipAddress", IpAddress); diff --git a/src/Microsoft.Graph/Generated/Models/UserTrainingEventInfo.cs b/src/Microsoft.Graph/Generated/Models/UserTrainingEventInfo.cs index 70beaa32286..b693050f415 100644 --- a/src/Microsoft.Graph/Generated/Models/UserTrainingEventInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/UserTrainingEventInfo.cs @@ -122,7 +122,7 @@ public UserTrainingEventInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserTrainingEventInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserTrainingEventInfo(); } /// @@ -147,7 +147,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteEnumValue("latestTrainingStatus", LatestTrainingStatus); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/UserTrainingStatusInfo.cs b/src/Microsoft.Graph/Generated/Models/UserTrainingStatusInfo.cs index 4e25f7d9456..02bf273f20e 100644 --- a/src/Microsoft.Graph/Generated/Models/UserTrainingStatusInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/UserTrainingStatusInfo.cs @@ -86,7 +86,7 @@ public UserTrainingStatusInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.UserTrainingStatusInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserTrainingStatusInfo(); } /// @@ -110,7 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("assignedDateTime", AssignedDateTime); writer.WriteDateTimeOffsetValue("completionDateTime", CompletionDateTime); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/UserVirtualEventsRoot.cs b/src/Microsoft.Graph/Generated/Models/UserVirtualEventsRoot.cs index 268166a679a..b473fe8c49f 100644 --- a/src/Microsoft.Graph/Generated/Models/UserVirtualEventsRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/UserVirtualEventsRoot.cs @@ -35,7 +35,7 @@ public partial class UserVirtualEventsRoot : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UserVirtualEventsRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UserVirtualEventsRoot(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("webinars", Webinars); } diff --git a/src/Microsoft.Graph/Generated/Models/UxSetting.cs b/src/Microsoft.Graph/Generated/Models/UxSetting.cs index 16328ac13cc..a317e37d86b 100644 --- a/src/Microsoft.Graph/Generated/Models/UxSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/UxSetting.cs @@ -25,7 +25,7 @@ public partial class UxSetting : global::Microsoft.Graph.Beta.Models.Entity, IPa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.UxSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.UxSetting(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("restrictNonAdminAccess", RestrictNonAdminAccess); } diff --git a/src/Microsoft.Graph/Generated/Models/ValidatingDomains.cs b/src/Microsoft.Graph/Generated/Models/ValidatingDomains.cs index 1148fd26ce0..04f8cb29e76 100644 --- a/src/Microsoft.Graph/Generated/Models/ValidatingDomains.cs +++ b/src/Microsoft.Graph/Generated/Models/ValidatingDomains.cs @@ -58,7 +58,7 @@ public ValidatingDomains() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ValidatingDomains CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -85,7 +85,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("rootDomains", RootDomains); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/ValidationResult.cs b/src/Microsoft.Graph/Generated/Models/ValidationResult.cs index 7dde4f87e52..c59d65c6b68 100644 --- a/src/Microsoft.Graph/Generated/Models/ValidationResult.cs +++ b/src/Microsoft.Graph/Generated/Models/ValidationResult.cs @@ -90,7 +90,7 @@ public ValidationResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ValidationResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ValidationResult(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("message", Message); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("ruleName", RuleName); diff --git a/src/Microsoft.Graph/Generated/Models/ValueBasedAttribute.cs b/src/Microsoft.Graph/Generated/Models/ValueBasedAttribute.cs index 7dc15e8fcc9..5539f2ce184 100644 --- a/src/Microsoft.Graph/Generated/Models/ValueBasedAttribute.cs +++ b/src/Microsoft.Graph/Generated/Models/ValueBasedAttribute.cs @@ -42,7 +42,7 @@ public ValueBasedAttribute() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ValueBasedAttribute CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ValueBasedAttribute(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Vendor.cs b/src/Microsoft.Graph/Generated/Models/Vendor.cs index e13904b8c50..dd45051fea3 100644 --- a/src/Microsoft.Graph/Generated/Models/Vendor.cs +++ b/src/Microsoft.Graph/Generated/Models/Vendor.cs @@ -302,7 +302,7 @@ public Vendor() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Vendor CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Vendor(); } /// @@ -342,7 +342,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("address", Address); writer.WriteDecimalValue("balance", Balance); writer.WriteStringValue("blocked", Blocked); diff --git a/src/Microsoft.Graph/Generated/Models/VendorCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/VendorCollectionResponse.cs index f46c3523695..672624cf5b5 100644 --- a/src/Microsoft.Graph/Generated/Models/VendorCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/VendorCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class VendorCollectionResponse : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VendorCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VendorCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/VerifiableCredentialRequired.cs b/src/Microsoft.Graph/Generated/Models/VerifiableCredentialRequired.cs index 8c08bc93c3f..f5f363a621f 100644 --- a/src/Microsoft.Graph/Generated/Models/VerifiableCredentialRequired.cs +++ b/src/Microsoft.Graph/Generated/Models/VerifiableCredentialRequired.cs @@ -48,7 +48,7 @@ public VerifiableCredentialRequired() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VerifiableCredentialRequired CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VerifiableCredentialRequired(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("expiryDateTime", ExpiryDateTime); writer.WriteStringValue("url", Url); diff --git a/src/Microsoft.Graph/Generated/Models/VerifiableCredentialRequirementStatus.cs b/src/Microsoft.Graph/Generated/Models/VerifiableCredentialRequirementStatus.cs index 222eabd90e7..65f24d921f2 100644 --- a/src/Microsoft.Graph/Generated/Models/VerifiableCredentialRequirementStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/VerifiableCredentialRequirementStatus.cs @@ -52,7 +52,7 @@ public VerifiableCredentialRequirementStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VerifiableCredentialRequirementStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/VerifiableCredentialRetrieved.cs b/src/Microsoft.Graph/Generated/Models/VerifiableCredentialRetrieved.cs index 5ec37d73047..addccf7148b 100644 --- a/src/Microsoft.Graph/Generated/Models/VerifiableCredentialRetrieved.cs +++ b/src/Microsoft.Graph/Generated/Models/VerifiableCredentialRetrieved.cs @@ -32,7 +32,7 @@ public VerifiableCredentialRetrieved() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VerifiableCredentialRetrieved CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VerifiableCredentialRetrieved(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("expiryDateTime", ExpiryDateTime); } diff --git a/src/Microsoft.Graph/Generated/Models/VerifiableCredentialSettings.cs b/src/Microsoft.Graph/Generated/Models/VerifiableCredentialSettings.cs index 4b2504c0d88..90dc6196805 100644 --- a/src/Microsoft.Graph/Generated/Models/VerifiableCredentialSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/VerifiableCredentialSettings.cs @@ -68,7 +68,7 @@ public VerifiableCredentialSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VerifiableCredentialSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VerifiableCredentialSettings(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("credentialTypes", CredentialTypes); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/VerifiableCredentialType.cs b/src/Microsoft.Graph/Generated/Models/VerifiableCredentialType.cs index d46bb91ba92..03205c383b6 100644 --- a/src/Microsoft.Graph/Generated/Models/VerifiableCredentialType.cs +++ b/src/Microsoft.Graph/Generated/Models/VerifiableCredentialType.cs @@ -84,7 +84,7 @@ public VerifiableCredentialType() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VerifiableCredentialType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VerifiableCredentialType(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("credentialType", CredentialType); writer.WriteCollectionOfPrimitiveValues("issuers", Issuers); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/VerifiableCredentialVerified.cs b/src/Microsoft.Graph/Generated/Models/VerifiableCredentialVerified.cs index 7fb9f3e4730..ff0276bcb91 100644 --- a/src/Microsoft.Graph/Generated/Models/VerifiableCredentialVerified.cs +++ b/src/Microsoft.Graph/Generated/Models/VerifiableCredentialVerified.cs @@ -26,7 +26,7 @@ public VerifiableCredentialVerified() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VerifiableCredentialVerified CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VerifiableCredentialVerified(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/VerificationResult.cs b/src/Microsoft.Graph/Generated/Models/VerificationResult.cs index 9060fbf4369..33064830040 100644 --- a/src/Microsoft.Graph/Generated/Models/VerificationResult.cs +++ b/src/Microsoft.Graph/Generated/Models/VerificationResult.cs @@ -58,7 +58,7 @@ public VerificationResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VerificationResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VerificationResult(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("signatureValid", SignatureValid); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/VerifiedCredentialClaims.cs b/src/Microsoft.Graph/Generated/Models/VerifiedCredentialClaims.cs index 4e39e3ddc68..a4ee438c49c 100644 --- a/src/Microsoft.Graph/Generated/Models/VerifiedCredentialClaims.cs +++ b/src/Microsoft.Graph/Generated/Models/VerifiedCredentialClaims.cs @@ -52,7 +52,7 @@ public VerifiedCredentialClaims() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VerifiedCredentialClaims CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VerifiedCredentialClaims(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/VerifiedCredentialData.cs b/src/Microsoft.Graph/Generated/Models/VerifiedCredentialData.cs index 507e6f54edd..db0b792c79c 100644 --- a/src/Microsoft.Graph/Generated/Models/VerifiedCredentialData.cs +++ b/src/Microsoft.Graph/Generated/Models/VerifiedCredentialData.cs @@ -100,7 +100,7 @@ public VerifiedCredentialData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VerifiedCredentialData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VerifiedCredentialData(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("authority", Authority); writer.WriteObjectValue("claims", Claims); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/VerifiedCustomDomainCertificatesMetadata.cs b/src/Microsoft.Graph/Generated/Models/VerifiedCustomDomainCertificatesMetadata.cs index c60c8415661..87fd811aaa3 100644 --- a/src/Microsoft.Graph/Generated/Models/VerifiedCustomDomainCertificatesMetadata.cs +++ b/src/Microsoft.Graph/Generated/Models/VerifiedCustomDomainCertificatesMetadata.cs @@ -112,7 +112,7 @@ public VerifiedCustomDomainCertificatesMetadata() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VerifiedCustomDomainCertificatesMetadata CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VerifiedCustomDomainCertificatesMetadata(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("expiryDate", ExpiryDate); writer.WriteDateTimeOffsetValue("issueDate", IssueDate); writer.WriteStringValue("issuerName", IssuerName); diff --git a/src/Microsoft.Graph/Generated/Models/VerifiedDomain.cs b/src/Microsoft.Graph/Generated/Models/VerifiedDomain.cs index e19f35304db..b9c300761cb 100644 --- a/src/Microsoft.Graph/Generated/Models/VerifiedDomain.cs +++ b/src/Microsoft.Graph/Generated/Models/VerifiedDomain.cs @@ -112,7 +112,7 @@ public VerifiedDomain() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VerifiedDomain CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VerifiedDomain(); } /// @@ -137,7 +137,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("capabilities", Capabilities); writer.WriteBoolValue("isDefault", IsDefault); writer.WriteBoolValue("isInitial", IsInitial); diff --git a/src/Microsoft.Graph/Generated/Models/VerifiedPublisher.cs b/src/Microsoft.Graph/Generated/Models/VerifiedPublisher.cs index 2619a3e59ec..a1b35e2c300 100644 --- a/src/Microsoft.Graph/Generated/Models/VerifiedPublisher.cs +++ b/src/Microsoft.Graph/Generated/Models/VerifiedPublisher.cs @@ -90,7 +90,7 @@ public VerifiedPublisher() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VerifiedPublisher CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VerifiedPublisher(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("addedDateTime", AddedDateTime); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/VersionAction.cs b/src/Microsoft.Graph/Generated/Models/VersionAction.cs index b1970bb2ed4..53876241e9b 100644 --- a/src/Microsoft.Graph/Generated/Models/VersionAction.cs +++ b/src/Microsoft.Graph/Generated/Models/VersionAction.cs @@ -68,7 +68,7 @@ public VersionAction() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VersionAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VersionAction(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("newVersion", NewVersion); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/VerticalSection.cs b/src/Microsoft.Graph/Generated/Models/VerticalSection.cs index 43160f401b1..665d39c04c0 100644 --- a/src/Microsoft.Graph/Generated/Models/VerticalSection.cs +++ b/src/Microsoft.Graph/Generated/Models/VerticalSection.cs @@ -41,7 +41,7 @@ public partial class VerticalSection : global::Microsoft.Graph.Beta.Models.Entit /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VerticalSection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VerticalSection(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("emphasis", Emphasis); writer.WriteCollectionOfObjectValues("webparts", Webparts); diff --git a/src/Microsoft.Graph/Generated/Models/Video.cs b/src/Microsoft.Graph/Generated/Models/Video.cs index 47f3f8ebe8b..daf40c53629 100644 --- a/src/Microsoft.Graph/Generated/Models/Video.cs +++ b/src/Microsoft.Graph/Generated/Models/Video.cs @@ -132,7 +132,7 @@ public Video() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Video CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Video(); } /// @@ -162,7 +162,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("audioBitsPerSample", AudioBitsPerSample); writer.WriteIntValue("audioChannels", AudioChannels); writer.WriteStringValue("audioFormat", AudioFormat); diff --git a/src/Microsoft.Graph/Generated/Models/VideoNewsLinkPage.cs b/src/Microsoft.Graph/Generated/Models/VideoNewsLinkPage.cs index b6430907308..47c0f4815f0 100644 --- a/src/Microsoft.Graph/Generated/Models/VideoNewsLinkPage.cs +++ b/src/Microsoft.Graph/Generated/Models/VideoNewsLinkPage.cs @@ -73,7 +73,7 @@ public TimeSpan? VideoDuration /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VideoNewsLinkPage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VideoNewsLinkPage(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("bannerImageWebUrl", BannerImageWebUrl); writer.WriteObjectValue("newsSharepointIds", NewsSharepointIds); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEndpoint.cs b/src/Microsoft.Graph/Generated/Models/VirtualEndpoint.cs index 7968dac6e7b..d39904db370 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEndpoint.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEndpoint.cs @@ -44,7 +44,7 @@ public partial class VirtualEndpoint : global::Microsoft.Graph.Beta.Models.Entit set { BackingStore?.Set("bulkActions", value); } } #endif - /// The cloudApps property + /// A collection of cloud apps that are built on frontline shared options and provide Windows 365 end users with access to app-only sessions instead of a full desktop experience. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? CloudApps @@ -291,7 +291,7 @@ public partial class VirtualEndpoint : global::Microsoft.Graph.Beta.Models.Entit /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEndpoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEndpoint(); } /// @@ -327,7 +327,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("auditEvents", AuditEvents); writer.WriteCollectionOfObjectValues("bulkActions", BulkActions); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEvent.cs b/src/Microsoft.Graph/Generated/Models/VirtualEvent.cs index e7a170eee39..4f594b4504d 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEvent.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEvent.cs @@ -169,7 +169,7 @@ public string DisplayName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEvent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -204,7 +204,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("createdBy", CreatedBy); writer.WriteObjectValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventCollectionResponse.cs index 62ad7c062f4..24a2dae53fe 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class VirtualEventCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventExternalInformation.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventExternalInformation.cs index e6170d1439b..b6252d6e49a 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventExternalInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventExternalInformation.cs @@ -84,7 +84,7 @@ public VirtualEventExternalInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VirtualEventExternalInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventExternalInformation(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("applicationId", ApplicationId); writer.WriteStringValue("externalEventId", ExternalEventId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventExternalRegistrationInformation.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventExternalRegistrationInformation.cs index ba9cb15e36d..664c3d6d2a6 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventExternalRegistrationInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventExternalRegistrationInformation.cs @@ -84,7 +84,7 @@ public VirtualEventExternalRegistrationInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VirtualEventExternalRegistrationInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventExternalRegistrationInformation(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("referrer", Referrer); writer.WriteStringValue("registrationId", RegistrationId); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventPresenter.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventPresenter.cs index c8c7ca5bb20..6c1f9fe453b 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventPresenter.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventPresenter.cs @@ -83,7 +83,7 @@ public string Email /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventPresenter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventPresenter(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("email", Email); writer.WriteObjectValue("identity", Identity); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventPresenterCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventPresenterCollectionResponse.cs index 34200b1729d..2cfaabeee83 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventPresenterCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventPresenterCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class VirtualEventPresenterCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventPresenterCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventPresenterCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventPresenterDetails.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventPresenterDetails.cs index f24ec69f9ff..9ed506c5938 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventPresenterDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventPresenterDetails.cs @@ -164,7 +164,7 @@ public VirtualEventPresenterDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VirtualEventPresenterDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventPresenterDetails(); } /// @@ -191,7 +191,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("bio", Bio); writer.WriteStringValue("company", Company); writer.WriteStringValue("jobTitle", JobTitle); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventPresenterInfo.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventPresenterInfo.cs index 4599c3bbb17..0e70cd610e9 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventPresenterInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventPresenterInfo.cs @@ -42,7 +42,7 @@ public VirtualEventPresenterInfo() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventPresenterInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventPresenterInfo(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("presenterDetails", PresenterDetails); } diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistration.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistration.cs index 157657b6e40..3baf71edd2a 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistration.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistration.cs @@ -197,7 +197,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventRegistration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventRegistration(); } /// @@ -229,7 +229,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("cancelationDateTime", CancelationDateTime); writer.WriteStringValue("email", Email); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationCollectionResponse.cs index 90c2d08c266..89a054f0a44 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class VirtualEventRegistrationCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventRegistrationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventRegistrationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationConfiguration.cs index b73f7aa67c5..de8b653a94a 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationConfiguration.cs @@ -57,7 +57,7 @@ public string RegistrationWebUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventRegistrationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -84,7 +84,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("capacity", Capacity); writer.WriteCollectionOfObjectValues("questions", Questions); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationCustomQuestion.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationCustomQuestion.cs index d7ae5b27948..e4211c0d50f 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationCustomQuestion.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationCustomQuestion.cs @@ -48,7 +48,7 @@ public VirtualEventRegistrationCustomQuestion() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventRegistrationCustomQuestion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventRegistrationCustomQuestion(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("answerChoices", AnswerChoices); writer.WriteEnumValue("answerInputType", AnswerInputType); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationPredefinedQuestion.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationPredefinedQuestion.cs index 16f01ce253c..5e0eb472829 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationPredefinedQuestion.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationPredefinedQuestion.cs @@ -32,7 +32,7 @@ public VirtualEventRegistrationPredefinedQuestion() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventRegistrationPredefinedQuestion CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventRegistrationPredefinedQuestion(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("label", Label); } diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationQuestionAnswer.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationQuestionAnswer.cs index cea688249ee..d650e8fd6ba 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationQuestionAnswer.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationQuestionAnswer.cs @@ -122,7 +122,7 @@ public VirtualEventRegistrationQuestionAnswer() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VirtualEventRegistrationQuestionAnswer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventRegistrationQuestionAnswer(); } /// @@ -147,7 +147,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("booleanValue", BooleanValue); writer.WriteStringValue("displayName", DisplayName); writer.WriteCollectionOfPrimitiveValues("multiChoiceValues", MultiChoiceValues); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationQuestionBase.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationQuestionBase.cs index 33ca7980dd5..652da110785 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationQuestionBase.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationQuestionBase.cs @@ -41,7 +41,7 @@ public bool? IsRequired /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventRegistrationQuestionBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -68,7 +68,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteBoolValue("isRequired", IsRequired); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationQuestionBaseCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationQuestionBaseCollectionResponse.cs index b7a0f730c33..32b0abca4d8 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationQuestionBaseCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventRegistrationQuestionBaseCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class VirtualEventRegistrationQuestionBaseCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventRegistrationQuestionBaseCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventRegistrationQuestionBaseCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventSession.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventSession.cs index e3a0d7743f5..6ab5bc63e44 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventSession.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventSession.cs @@ -106,7 +106,7 @@ public VirtualEventSession() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventSession CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventSession(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("endDateTime", EndDateTime); writer.WriteCollectionOfObjectValues("presenters", Presenters); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventSessionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventSessionCollectionResponse.cs index b99eafb6adb..2fa11e41273 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventSessionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventSessionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class VirtualEventSessionCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventSessionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventSessionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventSettings.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventSettings.cs index db3cb28fc72..9b6d1d57867 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventSettings.cs @@ -58,7 +58,7 @@ public VirtualEventSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VirtualEventSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventSettings(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isAttendeeEmailNotificationEnabled", IsAttendeeEmailNotificationEnabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventTownhall.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventTownhall.cs index 661f2df5906..0bab952d532 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventTownhall.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventTownhall.cs @@ -70,7 +70,7 @@ public VirtualEventTownhall() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventTownhall CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventTownhall(); } /// @@ -93,7 +93,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("audience", Audience); writer.WriteCollectionOfObjectValues("coOrganizers", CoOrganizers); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventTownhallCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventTownhallCollectionResponse.cs index 736916f7b4c..f3842965c9e 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventTownhallCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventTownhallCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class VirtualEventTownhallCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventTownhallCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventTownhallCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventWebinar.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventWebinar.cs index d4f7830d35a..8d41ec2fd2b 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventWebinar.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventWebinar.cs @@ -80,7 +80,7 @@ public VirtualEventWebinar() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventWebinar CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventWebinar(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("audience", Audience); writer.WriteCollectionOfObjectValues("coOrganizers", CoOrganizers); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventWebinarCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventWebinarCollectionResponse.cs index 782867e3818..3a257e3024a 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventWebinarCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventWebinarCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class VirtualEventWebinarCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventWebinarCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventWebinarCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventWebinarRegistrationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventWebinarRegistrationConfiguration.cs index 80353fe7287..ef82a00414b 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventWebinarRegistrationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventWebinarRegistrationConfiguration.cs @@ -31,7 +31,7 @@ public bool? IsWaitlistEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventWebinarRegistrationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventWebinarRegistrationConfiguration(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("isManualApprovalEnabled", IsManualApprovalEnabled); writer.WriteBoolValue("isWaitlistEnabled", IsWaitlistEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualEventsRoot.cs b/src/Microsoft.Graph/Generated/Models/VirtualEventsRoot.cs index de3dbd9d348..054ce1e3ac3 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualEventsRoot.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualEventsRoot.cs @@ -67,7 +67,7 @@ public partial class VirtualEventsRoot : global::Microsoft.Graph.Beta.Models.Ent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualEventsRoot CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualEventsRoot(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("events", Events); writer.WriteCollectionOfObjectValues("townhalls", Townhalls); diff --git a/src/Microsoft.Graph/Generated/Models/VirtualMachineDetails.cs b/src/Microsoft.Graph/Generated/Models/VirtualMachineDetails.cs index 4544638a68e..70007520a34 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualMachineDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualMachineDetails.cs @@ -35,7 +35,7 @@ public partial class VirtualMachineDetails : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualMachineDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualMachineDetails(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("virtualMachine", VirtualMachine); } diff --git a/src/Microsoft.Graph/Generated/Models/VirtualMachineWithAwsStorageBucketAccessFinding.cs b/src/Microsoft.Graph/Generated/Models/VirtualMachineWithAwsStorageBucketAccessFinding.cs index be05979eb2e..c7fd304b929 100644 --- a/src/Microsoft.Graph/Generated/Models/VirtualMachineWithAwsStorageBucketAccessFinding.cs +++ b/src/Microsoft.Graph/Generated/Models/VirtualMachineWithAwsStorageBucketAccessFinding.cs @@ -79,7 +79,7 @@ public int? BucketCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VirtualMachineWithAwsStorageBucketAccessFinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VirtualMachineWithAwsStorageBucketAccessFinding(); } /// @@ -103,7 +103,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("accessibleCount", AccessibleCount); writer.WriteIntValue("bucketCount", BucketCount); diff --git a/src/Microsoft.Graph/Generated/Models/VisualInfo.cs b/src/Microsoft.Graph/Generated/Models/VisualInfo.cs index 368f01316f9..3f5a1139d8e 100644 --- a/src/Microsoft.Graph/Generated/Models/VisualInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/VisualInfo.cs @@ -132,7 +132,7 @@ public VisualInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VisualInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VisualInfo(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("attribution", Attribution); writer.WriteStringValue("backgroundColor", BackgroundColor); writer.WriteObjectValue("content", Content); diff --git a/src/Microsoft.Graph/Generated/Models/VisualProperties.cs b/src/Microsoft.Graph/Generated/Models/VisualProperties.cs index f1c8d4d0e02..1509208bc0a 100644 --- a/src/Microsoft.Graph/Generated/Models/VisualProperties.cs +++ b/src/Microsoft.Graph/Generated/Models/VisualProperties.cs @@ -84,7 +84,7 @@ public VisualProperties() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VisualProperties CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VisualProperties(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("body", Body); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("title", Title); diff --git a/src/Microsoft.Graph/Generated/Models/VoiceAuthenticationMethodConfiguration.cs b/src/Microsoft.Graph/Generated/Models/VoiceAuthenticationMethodConfiguration.cs index 75b50a3f169..b418e2bc8af 100644 --- a/src/Microsoft.Graph/Generated/Models/VoiceAuthenticationMethodConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/VoiceAuthenticationMethodConfiguration.cs @@ -48,7 +48,7 @@ public VoiceAuthenticationMethodConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VoiceAuthenticationMethodConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VoiceAuthenticationMethodConfiguration(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("includeTargets", IncludeTargets); writer.WriteBoolValue("isOfficePhoneAllowed", IsOfficePhoneAllowed); diff --git a/src/Microsoft.Graph/Generated/Models/VoiceAuthenticationMethodTarget.cs b/src/Microsoft.Graph/Generated/Models/VoiceAuthenticationMethodTarget.cs index 1f77606cebf..5a1db55b2df 100644 --- a/src/Microsoft.Graph/Generated/Models/VoiceAuthenticationMethodTarget.cs +++ b/src/Microsoft.Graph/Generated/Models/VoiceAuthenticationMethodTarget.cs @@ -19,7 +19,7 @@ public partial class VoiceAuthenticationMethodTarget : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VoiceAuthenticationMethodTarget CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VoiceAuthenticationMethodTarget(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/VpnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/VpnConfiguration.cs index b6c28e68598..ffbaeb7f689 100644 --- a/src/Microsoft.Graph/Generated/Models/VpnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/VpnConfiguration.cs @@ -97,7 +97,7 @@ public VpnConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VpnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -126,7 +126,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteStringValue("connectionName", ConnectionName); diff --git a/src/Microsoft.Graph/Generated/Models/VpnDnsRule.cs b/src/Microsoft.Graph/Generated/Models/VpnDnsRule.cs index 7ceee803ca5..50d00346a6f 100644 --- a/src/Microsoft.Graph/Generated/Models/VpnDnsRule.cs +++ b/src/Microsoft.Graph/Generated/Models/VpnDnsRule.cs @@ -113,7 +113,7 @@ public VpnDnsRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VpnDnsRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VpnDnsRule(); } /// @@ -138,7 +138,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("autoTrigger", AutoTrigger); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/VpnOnDemandRule.cs b/src/Microsoft.Graph/Generated/Models/VpnOnDemandRule.cs index dab46389516..d2793d93ca8 100644 --- a/src/Microsoft.Graph/Generated/Models/VpnOnDemandRule.cs +++ b/src/Microsoft.Graph/Generated/Models/VpnOnDemandRule.cs @@ -167,7 +167,7 @@ public VpnOnDemandRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VpnOnDemandRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VpnOnDemandRule(); } /// @@ -196,7 +196,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteCollectionOfPrimitiveValues("dnsSearchDomains", DnsSearchDomains); writer.WriteCollectionOfPrimitiveValues("dnsServerAddressMatch", DnsServerAddressMatch); diff --git a/src/Microsoft.Graph/Generated/Models/VpnProxyServer.cs b/src/Microsoft.Graph/Generated/Models/VpnProxyServer.cs index fa93edb4d43..dc3753c7923 100644 --- a/src/Microsoft.Graph/Generated/Models/VpnProxyServer.cs +++ b/src/Microsoft.Graph/Generated/Models/VpnProxyServer.cs @@ -91,7 +91,7 @@ public VpnProxyServer() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VpnProxyServer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("address", Address); writer.WriteStringValue("automaticConfigurationScriptUrl", AutomaticConfigurationScriptUrl); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/VpnRoute.cs b/src/Microsoft.Graph/Generated/Models/VpnRoute.cs index 138645267dc..26ef3666b3a 100644 --- a/src/Microsoft.Graph/Generated/Models/VpnRoute.cs +++ b/src/Microsoft.Graph/Generated/Models/VpnRoute.cs @@ -75,7 +75,7 @@ public VpnRoute() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VpnRoute CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VpnRoute(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("destinationPrefix", DestinationPrefix); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("prefixSize", PrefixSize); diff --git a/src/Microsoft.Graph/Generated/Models/VpnServer.cs b/src/Microsoft.Graph/Generated/Models/VpnServer.cs index 18c832deecf..3511c0c4bdd 100644 --- a/src/Microsoft.Graph/Generated/Models/VpnServer.cs +++ b/src/Microsoft.Graph/Generated/Models/VpnServer.cs @@ -91,7 +91,7 @@ public VpnServer() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VpnServer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VpnServer(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("address", Address); writer.WriteStringValue("description", Description); writer.WriteBoolValue("isDefaultServer", IsDefaultServer); diff --git a/src/Microsoft.Graph/Generated/Models/VpnTrafficRule.cs b/src/Microsoft.Graph/Generated/Models/VpnTrafficRule.cs index 4b1026e4606..3a0a425e2b4 100644 --- a/src/Microsoft.Graph/Generated/Models/VpnTrafficRule.cs +++ b/src/Microsoft.Graph/Generated/Models/VpnTrafficRule.cs @@ -189,7 +189,7 @@ public VpnTrafficRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VpnTrafficRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VpnTrafficRule(); } /// @@ -220,7 +220,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appId", AppId); writer.WriteEnumValue("appType", AppType); writer.WriteStringValue("claims", Claims); diff --git a/src/Microsoft.Graph/Generated/Models/VppLicensingType.cs b/src/Microsoft.Graph/Generated/Models/VppLicensingType.cs index 8793c1d83cc..e0946fe2a0e 100644 --- a/src/Microsoft.Graph/Generated/Models/VppLicensingType.cs +++ b/src/Microsoft.Graph/Generated/Models/VppLicensingType.cs @@ -77,7 +77,7 @@ public VppLicensingType() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VppLicensingType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VppLicensingType(); } /// @@ -101,7 +101,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("supportDeviceLicensing", SupportDeviceLicensing); writer.WriteBoolValue("supportsDeviceLicensing", SupportsDeviceLicensing); diff --git a/src/Microsoft.Graph/Generated/Models/VppToken.cs b/src/Microsoft.Graph/Generated/Models/VppToken.cs index 4d012123d71..300745ea7e4 100644 --- a/src/Microsoft.Graph/Generated/Models/VppToken.cs +++ b/src/Microsoft.Graph/Generated/Models/VppToken.cs @@ -202,7 +202,7 @@ public string Token /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VppToken CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VppToken(); } /// @@ -238,7 +238,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appleId", AppleId); writer.WriteBoolValue("automaticallyUpdateApps", AutomaticallyUpdateApps); diff --git a/src/Microsoft.Graph/Generated/Models/VppTokenActionResult.cs b/src/Microsoft.Graph/Generated/Models/VppTokenActionResult.cs index 20008adea2f..dbc339601fd 100644 --- a/src/Microsoft.Graph/Generated/Models/VppTokenActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/VppTokenActionResult.cs @@ -87,7 +87,7 @@ public VppTokenActionResult() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VppTokenActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -116,7 +116,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("actionName", ActionName); writer.WriteEnumValue("actionState", ActionState); writer.WriteDateTimeOffsetValue("lastUpdatedDateTime", LastUpdatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/VppTokenCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/VppTokenCollectionResponse.cs index 5bed50f42a1..3f849eeb3bb 100644 --- a/src/Microsoft.Graph/Generated/Models/VppTokenCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/VppTokenCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class VppTokenCollectionResponse : global::Microsoft.Graph.Beta.M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VppTokenCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VppTokenCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/VppTokenLicenseSummary.cs b/src/Microsoft.Graph/Generated/Models/VppTokenLicenseSummary.cs index 1c3e45a7f1d..13df5b37d09 100644 --- a/src/Microsoft.Graph/Generated/Models/VppTokenLicenseSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/VppTokenLicenseSummary.cs @@ -113,7 +113,7 @@ public VppTokenLicenseSummary() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VppTokenLicenseSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VppTokenLicenseSummary(); } /// @@ -138,7 +138,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("appleId", AppleId); writer.WriteIntValue("availableLicenseCount", AvailableLicenseCount); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/VppTokenRevokeLicensesActionResult.cs b/src/Microsoft.Graph/Generated/Models/VppTokenRevokeLicensesActionResult.cs index fbf78caef7a..ca002d81a62 100644 --- a/src/Microsoft.Graph/Generated/Models/VppTokenRevokeLicensesActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/VppTokenRevokeLicensesActionResult.cs @@ -38,7 +38,7 @@ public int? TotalLicensesCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VppTokenRevokeLicensesActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VppTokenRevokeLicensesActionResult(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("actionFailureReason", ActionFailureReason); writer.WriteIntValue("failedLicensesCount", FailedLicensesCount); diff --git a/src/Microsoft.Graph/Generated/Models/VulnerabilityState.cs b/src/Microsoft.Graph/Generated/Models/VulnerabilityState.cs index fa2e9df6261..feee1406f9a 100644 --- a/src/Microsoft.Graph/Generated/Models/VulnerabilityState.cs +++ b/src/Microsoft.Graph/Generated/Models/VulnerabilityState.cs @@ -90,7 +90,7 @@ public VulnerabilityState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.VulnerabilityState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VulnerabilityState(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("cve", Cve); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("severity", Severity); diff --git a/src/Microsoft.Graph/Generated/Models/VulnerableManagedDevice.cs b/src/Microsoft.Graph/Generated/Models/VulnerableManagedDevice.cs index 1582673bc3f..161ac2f7139 100644 --- a/src/Microsoft.Graph/Generated/Models/VulnerableManagedDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/VulnerableManagedDevice.cs @@ -58,7 +58,7 @@ public string ManagedDeviceId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.VulnerableManagedDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.VulnerableManagedDevice(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("lastSyncDateTime", LastSyncDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/WafAllowedHeadersDictionary.cs b/src/Microsoft.Graph/Generated/Models/WafAllowedHeadersDictionary.cs index ea3bec5a500..eb317fc3bd7 100644 --- a/src/Microsoft.Graph/Generated/Models/WafAllowedHeadersDictionary.cs +++ b/src/Microsoft.Graph/Generated/Models/WafAllowedHeadersDictionary.cs @@ -19,7 +19,7 @@ public partial class WafAllowedHeadersDictionary : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WafAllowedHeadersDictionary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WafAllowedHeadersDictionary(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WatermarkProtectionValues.cs b/src/Microsoft.Graph/Generated/Models/WatermarkProtectionValues.cs index a15c621b332..20d7dac738d 100644 --- a/src/Microsoft.Graph/Generated/Models/WatermarkProtectionValues.cs +++ b/src/Microsoft.Graph/Generated/Models/WatermarkProtectionValues.cs @@ -64,7 +64,7 @@ public WatermarkProtectionValues() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WatermarkProtectionValues CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WatermarkProtectionValues(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isEnabledForContentSharing", IsEnabledForContentSharing); writer.WriteBoolValue("isEnabledForVideo", IsEnabledForVideo); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WebAccount.cs b/src/Microsoft.Graph/Generated/Models/WebAccount.cs index 6c751043f80..f5d696ecce8 100644 --- a/src/Microsoft.Graph/Generated/Models/WebAccount.cs +++ b/src/Microsoft.Graph/Generated/Models/WebAccount.cs @@ -122,7 +122,7 @@ public WebAccount() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WebAccount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebAccount(); } /// @@ -147,7 +147,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteObjectValue("service", Service); diff --git a/src/Microsoft.Graph/Generated/Models/WebAccountCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WebAccountCollectionResponse.cs index ea4f6369452..755d9c2cb35 100644 --- a/src/Microsoft.Graph/Generated/Models/WebAccountCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WebAccountCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WebAccountCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WebAccountCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebAccountCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WebApp.cs b/src/Microsoft.Graph/Generated/Models/WebApp.cs index 0df97357cd4..87e2c5911e3 100644 --- a/src/Microsoft.Graph/Generated/Models/WebApp.cs +++ b/src/Microsoft.Graph/Generated/Models/WebApp.cs @@ -49,7 +49,7 @@ public WebApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WebApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebApp(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appUrl", AppUrl); writer.WriteBoolValue("useManagedBrowser", UseManagedBrowser); diff --git a/src/Microsoft.Graph/Generated/Models/WebApplication.cs b/src/Microsoft.Graph/Generated/Models/WebApplication.cs index f26df083eb8..20b046af319 100644 --- a/src/Microsoft.Graph/Generated/Models/WebApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/WebApplication.cs @@ -138,7 +138,7 @@ public WebApplication() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WebApplication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebApplication(); } /// @@ -164,7 +164,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("homePageUrl", HomePageUrl); writer.WriteObjectValue("implicitGrantSettings", ImplicitGrantSettings); writer.WriteStringValue("logoutUrl", LogoutUrl); diff --git a/src/Microsoft.Graph/Generated/Models/WebApplicationSegment.cs b/src/Microsoft.Graph/Generated/Models/WebApplicationSegment.cs index c1caa700258..5cdc1728fbe 100644 --- a/src/Microsoft.Graph/Generated/Models/WebApplicationSegment.cs +++ b/src/Microsoft.Graph/Generated/Models/WebApplicationSegment.cs @@ -90,7 +90,7 @@ public WebApplicationSegment() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WebApplicationSegment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebApplicationSegment(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("alternateUrl", AlternateUrl); writer.WriteCollectionOfObjectValues("corsConfigurations", CorsConfigurations); diff --git a/src/Microsoft.Graph/Generated/Models/WebPart.cs b/src/Microsoft.Graph/Generated/Models/WebPart.cs index 329cd7b7b9b..6bf83b9112e 100644 --- a/src/Microsoft.Graph/Generated/Models/WebPart.cs +++ b/src/Microsoft.Graph/Generated/Models/WebPart.cs @@ -19,7 +19,7 @@ public partial class WebPart : global::Microsoft.Graph.Beta.Models.Entity, IPars /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WebPart CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -44,7 +44,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WebPartCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WebPartCollectionResponse.cs index c7079fb20b1..d7fccc8c9a2 100644 --- a/src/Microsoft.Graph/Generated/Models/WebPartCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WebPartCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WebPartCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WebPartCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebPartCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WebPartData.cs b/src/Microsoft.Graph/Generated/Models/WebPartData.cs index a8daeab8773..38f1e63c641 100644 --- a/src/Microsoft.Graph/Generated/Models/WebPartData.cs +++ b/src/Microsoft.Graph/Generated/Models/WebPartData.cs @@ -148,7 +148,7 @@ public WebPartData() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WebPartData CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebPartData(); } /// @@ -174,7 +174,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("audiences", Audiences); writer.WriteStringValue("dataVersion", DataVersion); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/WebPartPosition.cs b/src/Microsoft.Graph/Generated/Models/WebPartPosition.cs index 26691de78e9..c600093395f 100644 --- a/src/Microsoft.Graph/Generated/Models/WebPartPosition.cs +++ b/src/Microsoft.Graph/Generated/Models/WebPartPosition.cs @@ -76,7 +76,7 @@ public WebPartPosition() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WebPartPosition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebPartPosition(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDoubleValue("columnId", ColumnId); writer.WriteDoubleValue("horizontalSectionId", HorizontalSectionId); writer.WriteBoolValue("isInVerticalSection", IsInVerticalSection); diff --git a/src/Microsoft.Graph/Generated/Models/WebSegmentConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WebSegmentConfiguration.cs index 68fac49bba9..d24ac113771 100644 --- a/src/Microsoft.Graph/Generated/Models/WebSegmentConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WebSegmentConfiguration.cs @@ -42,7 +42,7 @@ public WebSegmentConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WebSegmentConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebSegmentConfiguration(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("applicationSegments", ApplicationSegments); } diff --git a/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticationExtensionsClientInputs.cs b/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticationExtensionsClientInputs.cs index 4fe3baa2acd..65ef96a958f 100644 --- a/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticationExtensionsClientInputs.cs +++ b/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticationExtensionsClientInputs.cs @@ -52,7 +52,7 @@ public WebauthnAuthenticationExtensionsClientInputs() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WebauthnAuthenticationExtensionsClientInputs CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebauthnAuthenticationExtensionsClientInputs(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticationExtensionsClientOutputs.cs b/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticationExtensionsClientOutputs.cs index 42d5f64d892..a6216c4b5e9 100644 --- a/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticationExtensionsClientOutputs.cs +++ b/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticationExtensionsClientOutputs.cs @@ -52,7 +52,7 @@ public WebauthnAuthenticationExtensionsClientOutputs() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WebauthnAuthenticationExtensionsClientOutputs CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebauthnAuthenticationExtensionsClientOutputs(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticatorAttestationResponse.cs b/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticatorAttestationResponse.cs index e71671e0c42..68c172f73f9 100644 --- a/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticatorAttestationResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticatorAttestationResponse.cs @@ -84,7 +84,7 @@ public WebauthnAuthenticatorAttestationResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WebauthnAuthenticatorAttestationResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebauthnAuthenticatorAttestationResponse(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("attestationObject", AttestationObject); writer.WriteStringValue("clientDataJSON", ClientDataJSON); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticatorSelectionCriteria.cs b/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticatorSelectionCriteria.cs index 45a89e741b9..985682dd5b8 100644 --- a/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticatorSelectionCriteria.cs +++ b/src/Microsoft.Graph/Generated/Models/WebauthnAuthenticatorSelectionCriteria.cs @@ -90,7 +90,7 @@ public WebauthnAuthenticatorSelectionCriteria() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WebauthnAuthenticatorSelectionCriteria CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebauthnAuthenticatorSelectionCriteria(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("authenticatorAttachment", AuthenticatorAttachment); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("requireResidentKey", RequireResidentKey); diff --git a/src/Microsoft.Graph/Generated/Models/WebauthnCredentialCreationOptions.cs b/src/Microsoft.Graph/Generated/Models/WebauthnCredentialCreationOptions.cs index 9f470af3006..e0cf149afa3 100644 --- a/src/Microsoft.Graph/Generated/Models/WebauthnCredentialCreationOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/WebauthnCredentialCreationOptions.cs @@ -74,7 +74,7 @@ public WebauthnCredentialCreationOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WebauthnCredentialCreationOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebauthnCredentialCreationOptions(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("challengeTimeoutDateTime", ChallengeTimeoutDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("publicKey", PublicKey); diff --git a/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredential.cs b/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredential.cs index 872e0047dbf..166a89675e2 100644 --- a/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredential.cs +++ b/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredential.cs @@ -100,7 +100,7 @@ public WebauthnPublicKeyCredential() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WebauthnPublicKeyCredential CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebauthnPublicKeyCredential(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("clientExtensionResults", ClientExtensionResults); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialCreationOptions.cs b/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialCreationOptions.cs index 3f3c987c7e9..bcff95a0466 100644 --- a/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialCreationOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialCreationOptions.cs @@ -186,7 +186,7 @@ public WebauthnPublicKeyCredentialCreationOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WebauthnPublicKeyCredentialCreationOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebauthnPublicKeyCredentialCreationOptions(); } /// @@ -215,7 +215,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("attestation", Attestation); writer.WriteObjectValue("authenticatorSelection", AuthenticatorSelection); writer.WriteStringValue("challenge", Challenge); diff --git a/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialDescriptor.cs b/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialDescriptor.cs index 134efdab7f0..0f9b3314d5c 100644 --- a/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialDescriptor.cs +++ b/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialDescriptor.cs @@ -100,7 +100,7 @@ public WebauthnPublicKeyCredentialDescriptor() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WebauthnPublicKeyCredentialDescriptor CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebauthnPublicKeyCredentialDescriptor(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("transports", Transports); diff --git a/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialParameters.cs b/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialParameters.cs index 19721e07e93..84cddd501b3 100644 --- a/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialParameters.cs +++ b/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialParameters.cs @@ -74,7 +74,7 @@ public WebauthnPublicKeyCredentialParameters() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WebauthnPublicKeyCredentialParameters CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebauthnPublicKeyCredentialParameters(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("alg", Alg); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialRpEntity.cs b/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialRpEntity.cs index 36ef1a1c1c7..898140ac2dd 100644 --- a/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialRpEntity.cs +++ b/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialRpEntity.cs @@ -84,7 +84,7 @@ public WebauthnPublicKeyCredentialRpEntity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WebauthnPublicKeyCredentialRpEntity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebauthnPublicKeyCredentialRpEntity(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialUserEntity.cs b/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialUserEntity.cs index a1cbd21e839..2ae1fbd1d9f 100644 --- a/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialUserEntity.cs +++ b/src/Microsoft.Graph/Generated/Models/WebauthnPublicKeyCredentialUserEntity.cs @@ -100,7 +100,7 @@ public WebauthnPublicKeyCredentialUserEntity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WebauthnPublicKeyCredentialUserEntity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WebauthnPublicKeyCredentialUserEntity(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("id", Id); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/Website.cs b/src/Microsoft.Graph/Generated/Models/Website.cs index f23155d4751..4b047f3ae7e 100644 --- a/src/Microsoft.Graph/Generated/Models/Website.cs +++ b/src/Microsoft.Graph/Generated/Models/Website.cs @@ -90,7 +90,7 @@ public Website() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Website CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Website(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("address", Address); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Win32CatalogApp.cs b/src/Microsoft.Graph/Generated/Models/Win32CatalogApp.cs index 1cb94e81283..270c83edd2a 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32CatalogApp.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32CatalogApp.cs @@ -75,7 +75,7 @@ public Win32CatalogApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32CatalogApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32CatalogApp(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("latestUpgradeCatalogPackage", LatestUpgradeCatalogPackage); writer.WriteStringValue("mobileAppCatalogPackageId", MobileAppCatalogPackageId); diff --git a/src/Microsoft.Graph/Generated/Models/Win32CatalogAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/Win32CatalogAppAssignmentSettings.cs index f5ce832cfb8..51493a0ac32 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32CatalogAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32CatalogAppAssignmentSettings.cs @@ -27,7 +27,7 @@ public Win32CatalogAppAssignmentSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32CatalogAppAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32CatalogAppAssignmentSettings(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobApp.cs b/src/Microsoft.Graph/Generated/Models/Win32LobApp.cs index 3b2dcc7691d..119a66adea6 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobApp.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobApp.cs @@ -261,7 +261,7 @@ public Win32LobApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32LobApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -304,7 +304,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowAvailableUninstall", AllowAvailableUninstall); writer.WriteEnumValue("allowedArchitectures", AllowedArchitectures); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppAssignmentSettings.cs index 43ed977139c..078ccf9498e 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppAssignmentSettings.cs @@ -87,7 +87,7 @@ public Win32LobAppAssignmentSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32LobAppAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -116,7 +116,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("autoUpdateSettings", AutoUpdateSettings); writer.WriteEnumValue("deliveryOptimizationPriority", DeliveryOptimizationPriority); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppAutoUpdateSettings.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppAutoUpdateSettings.cs index f3d53b53c7f..eb46245e757 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppAutoUpdateSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppAutoUpdateSettings.cs @@ -59,7 +59,7 @@ public Win32LobAppAutoUpdateSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Win32LobAppAutoUpdateSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppAutoUpdateSettings(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("autoUpdateSupersededAppsState", AutoUpdateSupersededAppsState); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppCollectionResponse.cs index cc8da16a4f6..be458fa9427 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class Win32LobAppCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32LobAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppDetection.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppDetection.cs index 6ebed7f1f3c..b1402a20059 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppDetection.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppDetection.cs @@ -53,7 +53,7 @@ public Win32LobAppDetection() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Win32LobAppDetection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -81,7 +81,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppFileSystemDetection.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppFileSystemDetection.cs index baf824d73f4..14e7b9f1062 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppFileSystemDetection.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppFileSystemDetection.cs @@ -93,7 +93,7 @@ public Win32LobAppFileSystemDetection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32LobAppFileSystemDetection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppFileSystemDetection(); } /// @@ -118,7 +118,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("check32BitOn64System", Check32BitOn64System); writer.WriteEnumValue("detectionType", DetectionType); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppFileSystemRequirement.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppFileSystemRequirement.cs index 649ffad59d6..57af0a231d2 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppFileSystemRequirement.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppFileSystemRequirement.cs @@ -71,7 +71,7 @@ public Win32LobAppFileSystemRequirement() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32LobAppFileSystemRequirement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppFileSystemRequirement(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("check32BitOn64System", Check32BitOn64System); writer.WriteEnumValue("detectionType", DetectionType); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppFileSystemRule.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppFileSystemRule.cs index 37cccbfe5d7..2d8a48bc8d1 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppFileSystemRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppFileSystemRule.cs @@ -93,7 +93,7 @@ public Win32LobAppFileSystemRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32LobAppFileSystemRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppFileSystemRule(); } /// @@ -118,7 +118,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("check32BitOn64System", Check32BitOn64System); writer.WriteStringValue("comparisonValue", ComparisonValue); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppInstallExperience.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppInstallExperience.cs index af1524be725..b84b80ea41f 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppInstallExperience.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppInstallExperience.cs @@ -71,7 +71,7 @@ public Win32LobAppInstallExperience() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Win32LobAppInstallExperience CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppInstallExperience(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("deviceRestartBehavior", DeviceRestartBehavior); writer.WriteIntValue("maxRunTimeInMinutes", MaxRunTimeInMinutes); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppMsiInformation.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppMsiInformation.cs index af2fd61abcd..58a05d8bd39 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppMsiInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppMsiInformation.cs @@ -145,7 +145,7 @@ public Win32LobAppMsiInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Win32LobAppMsiInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppMsiInformation(); } /// @@ -172,7 +172,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("packageType", PackageType); writer.WriteStringValue("productCode", ProductCode); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppPowerShellScriptDetection.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppPowerShellScriptDetection.cs index 550b50474d3..f2b967203ab 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppPowerShellScriptDetection.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppPowerShellScriptDetection.cs @@ -55,7 +55,7 @@ public Win32LobAppPowerShellScriptDetection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32LobAppPowerShellScriptDetection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppPowerShellScriptDetection(); } /// @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("enforceSignatureCheck", EnforceSignatureCheck); writer.WriteBoolValue("runAs32Bit", RunAs32Bit); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppPowerShellScriptRequirement.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppPowerShellScriptRequirement.cs index dd85ac0ccd1..80b42d58699 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppPowerShellScriptRequirement.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppPowerShellScriptRequirement.cs @@ -83,7 +83,7 @@ public Win32LobAppPowerShellScriptRequirement() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32LobAppPowerShellScriptRequirement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppPowerShellScriptRequirement(); } /// @@ -108,7 +108,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("detectionType", DetectionType); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppPowerShellScriptRule.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppPowerShellScriptRule.cs index 1becde024d9..16967927142 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppPowerShellScriptRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppPowerShellScriptRule.cs @@ -105,7 +105,7 @@ public Win32LobAppPowerShellScriptRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32LobAppPowerShellScriptRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppPowerShellScriptRule(); } /// @@ -132,7 +132,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("comparisonValue", ComparisonValue); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppProductCodeDetection.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppProductCodeDetection.cs index 0fb3ffc9657..8ebe2f29218 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppProductCodeDetection.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppProductCodeDetection.cs @@ -65,7 +65,7 @@ public Win32LobAppProductCodeDetection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32LobAppProductCodeDetection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppProductCodeDetection(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("productCode", ProductCode); writer.WriteStringValue("productVersion", ProductVersion); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppProductCodeRule.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppProductCodeRule.cs index b291a6be728..e501dcd9910 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppProductCodeRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppProductCodeRule.cs @@ -65,7 +65,7 @@ public Win32LobAppProductCodeRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32LobAppProductCodeRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppProductCodeRule(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("productCode", ProductCode); writer.WriteStringValue("productVersion", ProductVersion); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppRegistryDetection.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppRegistryDetection.cs index 4288fe9f55e..d8ac2dad4b0 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppRegistryDetection.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppRegistryDetection.cs @@ -93,7 +93,7 @@ public Win32LobAppRegistryDetection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32LobAppRegistryDetection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppRegistryDetection(); } /// @@ -118,7 +118,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("check32BitOn64System", Check32BitOn64System); writer.WriteEnumValue("detectionType", DetectionType); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppRegistryRequirement.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppRegistryRequirement.cs index 642f4593c24..8cc012cb77c 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppRegistryRequirement.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppRegistryRequirement.cs @@ -71,7 +71,7 @@ public Win32LobAppRegistryRequirement() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32LobAppRegistryRequirement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppRegistryRequirement(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("check32BitOn64System", Check32BitOn64System); writer.WriteEnumValue("detectionType", DetectionType); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppRegistryRule.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppRegistryRule.cs index 7d2ff014dbf..4784f97f6bf 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppRegistryRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppRegistryRule.cs @@ -93,7 +93,7 @@ public Win32LobAppRegistryRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32LobAppRegistryRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppRegistryRule(); } /// @@ -118,7 +118,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("check32BitOn64System", Check32BitOn64System); writer.WriteStringValue("comparisonValue", ComparisonValue); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppRequirement.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppRequirement.cs index 1a10495de11..e4fa7554fa6 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppRequirement.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppRequirement.cs @@ -75,7 +75,7 @@ public Win32LobAppRequirement() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Win32LobAppRequirement CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -104,7 +104,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("detectionValue", DetectionValue); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("operator", Operator); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppRestartSettings.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppRestartSettings.cs index 5f3df531411..0a9c937e870 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppRestartSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppRestartSettings.cs @@ -71,7 +71,7 @@ public Win32LobAppRestartSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Win32LobAppRestartSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppRestartSettings(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("countdownDisplayBeforeRestartInMinutes", CountdownDisplayBeforeRestartInMinutes); writer.WriteIntValue("gracePeriodInMinutes", GracePeriodInMinutes); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppReturnCode.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppReturnCode.cs index 4801b985222..c0b706a4158 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppReturnCode.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppReturnCode.cs @@ -65,7 +65,7 @@ public Win32LobAppReturnCode() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Win32LobAppReturnCode CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32LobAppReturnCode(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("returnCode", ReturnCode); writer.WriteEnumValue("type", Type); diff --git a/src/Microsoft.Graph/Generated/Models/Win32LobAppRule.cs b/src/Microsoft.Graph/Generated/Models/Win32LobAppRule.cs index d750dec9f0b..649ce2d5961 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32LobAppRule.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32LobAppRule.cs @@ -59,7 +59,7 @@ public Win32LobAppRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Win32LobAppRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -88,7 +88,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("ruleType", RuleType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/Win32MobileAppCatalogPackage.cs b/src/Microsoft.Graph/Generated/Models/Win32MobileAppCatalogPackage.cs index e299260ce58..f1e981a7bb6 100644 --- a/src/Microsoft.Graph/Generated/Models/Win32MobileAppCatalogPackage.cs +++ b/src/Microsoft.Graph/Generated/Models/Win32MobileAppCatalogPackage.cs @@ -71,7 +71,7 @@ public Win32MobileAppCatalogPackage() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Win32MobileAppCatalogPackage CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Win32MobileAppCatalogPackage(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("applicableArchitectures", ApplicableArchitectures); } diff --git a/src/Microsoft.Graph/Generated/Models/WinGetApp.cs b/src/Microsoft.Graph/Generated/Models/WinGetApp.cs index 93635ffdc96..c33cb9881de 100644 --- a/src/Microsoft.Graph/Generated/Models/WinGetApp.cs +++ b/src/Microsoft.Graph/Generated/Models/WinGetApp.cs @@ -75,7 +75,7 @@ public WinGetApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WinGetApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WinGetApp(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("installExperience", InstallExperience); writer.WriteStringValue("manifestHash", ManifestHash); diff --git a/src/Microsoft.Graph/Generated/Models/WinGetAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/WinGetAppAssignmentSettings.cs index 00beb5ccd38..b48a976aac4 100644 --- a/src/Microsoft.Graph/Generated/Models/WinGetAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WinGetAppAssignmentSettings.cs @@ -65,7 +65,7 @@ public WinGetAppAssignmentSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WinGetAppAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WinGetAppAssignmentSettings(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("installTimeSettings", InstallTimeSettings); writer.WriteEnumValue("notifications", Notifications); diff --git a/src/Microsoft.Graph/Generated/Models/WinGetAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WinGetAppCollectionResponse.cs index 7e05cbc238d..05273e579eb 100644 --- a/src/Microsoft.Graph/Generated/Models/WinGetAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WinGetAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WinGetAppCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WinGetAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WinGetAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WinGetAppInstallExperience.cs b/src/Microsoft.Graph/Generated/Models/WinGetAppInstallExperience.cs index 44f31e5b98c..4d41da1e5ba 100644 --- a/src/Microsoft.Graph/Generated/Models/WinGetAppInstallExperience.cs +++ b/src/Microsoft.Graph/Generated/Models/WinGetAppInstallExperience.cs @@ -59,7 +59,7 @@ public WinGetAppInstallExperience() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WinGetAppInstallExperience CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WinGetAppInstallExperience(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("runAsAccount", RunAsAccount); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/WinGetAppInstallTimeSettings.cs b/src/Microsoft.Graph/Generated/Models/WinGetAppInstallTimeSettings.cs index f4268c7d5e0..dc9fb23caec 100644 --- a/src/Microsoft.Graph/Generated/Models/WinGetAppInstallTimeSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WinGetAppInstallTimeSettings.cs @@ -65,7 +65,7 @@ public WinGetAppInstallTimeSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WinGetAppInstallTimeSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WinGetAppInstallTimeSettings(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("deadlineDateTime", DeadlineDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("useLocalTime", UseLocalTime); diff --git a/src/Microsoft.Graph/Generated/Models/WinGetAppRestartSettings.cs b/src/Microsoft.Graph/Generated/Models/WinGetAppRestartSettings.cs index 2f7f898f57e..836857ce013 100644 --- a/src/Microsoft.Graph/Generated/Models/WinGetAppRestartSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WinGetAppRestartSettings.cs @@ -71,7 +71,7 @@ public WinGetAppRestartSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WinGetAppRestartSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WinGetAppRestartSettings(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("countdownDisplayBeforeRestartInMinutes", CountdownDisplayBeforeRestartInMinutes); writer.WriteIntValue("gracePeriodInMinutes", GracePeriodInMinutes); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10AppsForceUpdateSchedule.cs b/src/Microsoft.Graph/Generated/Models/Windows10AppsForceUpdateSchedule.cs index 3ec23adf43c..31560312591 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10AppsForceUpdateSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10AppsForceUpdateSchedule.cs @@ -71,7 +71,7 @@ public Windows10AppsForceUpdateSchedule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Windows10AppsForceUpdateSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10AppsForceUpdateSchedule(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("recurrence", Recurrence); writer.WriteBoolValue("runImmediatelyIfAfterStartDateTime", RunImmediatelyIfAfterStartDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10AssociatedApps.cs b/src/Microsoft.Graph/Generated/Models/Windows10AssociatedApps.cs index b147952707f..dd346ede4a2 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10AssociatedApps.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10AssociatedApps.cs @@ -75,7 +75,7 @@ public Windows10AssociatedApps() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Windows10AssociatedApps CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10AssociatedApps(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("appType", AppType); writer.WriteStringValue("identifier", Identifier); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10CertificateProfileBase.cs b/src/Microsoft.Graph/Generated/Models/Windows10CertificateProfileBase.cs index 04d2a77ec61..a6be72e3239 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10CertificateProfileBase.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10CertificateProfileBase.cs @@ -27,7 +27,7 @@ public Windows10CertificateProfileBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10CertificateProfileBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -51,7 +51,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Windows10CompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/Windows10CompliancePolicy.cs index b1cff7aea35..fb691af2021 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10CompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10CompliancePolicy.cs @@ -329,7 +329,7 @@ public Windows10CompliancePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10CompliancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10CompliancePolicy(); } /// @@ -385,7 +385,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("activeFirewallRequired", ActiveFirewallRequired); writer.WriteBoolValue("antiSpywareRequired", AntiSpywareRequired); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10CustomConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows10CustomConfiguration.cs index 92b71ec5884..236b207d152 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10CustomConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10CustomConfiguration.cs @@ -43,7 +43,7 @@ public Windows10CustomConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10CustomConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10CustomConfiguration(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("omaSettings", OmaSettings); } diff --git a/src/Microsoft.Graph/Generated/Models/Windows10DeviceFirmwareConfigurationInterface.cs b/src/Microsoft.Graph/Generated/Models/Windows10DeviceFirmwareConfigurationInterface.cs index 17f3fe33866..512e38e693f 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10DeviceFirmwareConfigurationInterface.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10DeviceFirmwareConfigurationInterface.cs @@ -153,7 +153,7 @@ public Windows10DeviceFirmwareConfigurationInterface() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10DeviceFirmwareConfigurationInterface CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10DeviceFirmwareConfigurationInterface(); } /// @@ -193,7 +193,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("bluetooth", Bluetooth); writer.WriteEnumValue("bootFromBuiltInNetworkAdapters", BootFromBuiltInNetworkAdapters); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10EasEmailProfileConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows10EasEmailProfileConfiguration.cs index f892972e28f..2ae9267431b 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10EasEmailProfileConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10EasEmailProfileConfiguration.cs @@ -101,7 +101,7 @@ public Windows10EasEmailProfileConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10EasEmailProfileConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10EasEmailProfileConfiguration(); } /// @@ -129,7 +129,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("accountName", AccountName); writer.WriteEnumValue("durationOfEmailToSync", DurationOfEmailToSync); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10EndpointProtectionConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows10EndpointProtectionConfiguration.cs index 6a4ae103803..7336c41b670 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10EndpointProtectionConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10EndpointProtectionConfiguration.cs @@ -1934,7 +1934,7 @@ public Windows10EndpointProtectionConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10EndpointProtectionConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10EndpointProtectionConfiguration(); } /// @@ -2179,7 +2179,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("applicationGuardAllowCameraMicrophoneRedirection", ApplicationGuardAllowCameraMicrophoneRedirection); writer.WriteBoolValue("applicationGuardAllowFileSaveOnHost", ApplicationGuardAllowFileSaveOnHost); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10EnrollmentCompletionPageConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows10EnrollmentCompletionPageConfiguration.cs index eaa4e49958e..1b3cff4671a 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10EnrollmentCompletionPageConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10EnrollmentCompletionPageConfiguration.cs @@ -119,7 +119,7 @@ public Windows10EnrollmentCompletionPageConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10EnrollmentCompletionPageConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10EnrollmentCompletionPageConfiguration(); } /// @@ -150,7 +150,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowDeviceResetOnInstallFailure", AllowDeviceResetOnInstallFailure); writer.WriteBoolValue("allowDeviceUseOnInstallFailure", AllowDeviceUseOnInstallFailure); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10EnrollmentCompletionPageConfigurationPolicySetItem.cs b/src/Microsoft.Graph/Generated/Models/Windows10EnrollmentCompletionPageConfigurationPolicySetItem.cs index 369b97811af..2f4cf8aea74 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10EnrollmentCompletionPageConfigurationPolicySetItem.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10EnrollmentCompletionPageConfigurationPolicySetItem.cs @@ -33,7 +33,7 @@ public Windows10EnrollmentCompletionPageConfigurationPolicySetItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10EnrollmentCompletionPageConfigurationPolicySetItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10EnrollmentCompletionPageConfigurationPolicySetItem(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("priority", Priority); } diff --git a/src/Microsoft.Graph/Generated/Models/Windows10EnterpriseModernAppManagementConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows10EnterpriseModernAppManagementConfiguration.cs index 5b00beaf63c..540f5fb1125 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10EnterpriseModernAppManagementConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10EnterpriseModernAppManagementConfiguration.cs @@ -33,7 +33,7 @@ public Windows10EnterpriseModernAppManagementConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10EnterpriseModernAppManagementConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10EnterpriseModernAppManagementConfiguration(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("uninstallBuiltInApps", UninstallBuiltInApps); } diff --git a/src/Microsoft.Graph/Generated/Models/Windows10GeneralConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows10GeneralConfiguration.cs index d29f921e72b..8566b21c123 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10GeneralConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10GeneralConfiguration.cs @@ -2066,7 +2066,7 @@ public Windows10GeneralConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10GeneralConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10GeneralConfiguration(); } /// @@ -2368,7 +2368,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("accountsBlockAddingNonMicrosoftAccountEmail", AccountsBlockAddingNonMicrosoftAccountEmail); writer.WriteEnumValue("activateAppsWithVoice", ActivateAppsWithVoice); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10ImportedPFXCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/Windows10ImportedPFXCertificateProfile.cs index 822c14a5c0e..36dd4e49fd0 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10ImportedPFXCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10ImportedPFXCertificateProfile.cs @@ -49,7 +49,7 @@ public Windows10ImportedPFXCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10ImportedPFXCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10ImportedPFXCertificateProfile(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("intendedPurpose", IntendedPurpose); writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", ManagedDeviceCertificateStates); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10MobileCompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/Windows10MobileCompliancePolicy.cs index c8839467c07..f10a3fa8af9 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10MobileCompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10MobileCompliancePolicy.cs @@ -165,7 +165,7 @@ public Windows10MobileCompliancePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10MobileCompliancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10MobileCompliancePolicy(); } /// @@ -202,7 +202,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("activeFirewallRequired", ActiveFirewallRequired); writer.WriteBoolValue("bitLockerEnabled", BitLockerEnabled); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10NetworkBoundaryConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows10NetworkBoundaryConfiguration.cs index a2f1e2bc13a..61f6a770f06 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10NetworkBoundaryConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10NetworkBoundaryConfiguration.cs @@ -43,7 +43,7 @@ public Windows10NetworkBoundaryConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10NetworkBoundaryConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10NetworkBoundaryConfiguration(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("windowsNetworkIsolationPolicy", WindowsNetworkIsolationPolicy); } diff --git a/src/Microsoft.Graph/Generated/Models/Windows10NetworkProxyServer.cs b/src/Microsoft.Graph/Generated/Models/Windows10NetworkProxyServer.cs index 24468d617e9..c0376fce0df 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10NetworkProxyServer.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10NetworkProxyServer.cs @@ -91,7 +91,7 @@ public Windows10NetworkProxyServer() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Windows10NetworkProxyServer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10NetworkProxyServer(); } /// @@ -114,7 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("address", Address); writer.WriteCollectionOfPrimitiveValues("exceptions", Exceptions); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10PFXImportCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/Windows10PFXImportCertificateProfile.cs index ef3b5a17a30..7700713bdad 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10PFXImportCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10PFXImportCertificateProfile.cs @@ -33,7 +33,7 @@ public Windows10PFXImportCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10PFXImportCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10PFXImportCertificateProfile(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("keyStorageProvider", KeyStorageProvider); } diff --git a/src/Microsoft.Graph/Generated/Models/Windows10PkcsCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/Windows10PkcsCertificateProfile.cs index 93ddf540f20..9279ec398b7 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10PkcsCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10PkcsCertificateProfile.cs @@ -161,7 +161,7 @@ public Windows10PkcsCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10PkcsCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10PkcsCertificateProfile(); } /// @@ -189,7 +189,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateStore", CertificateStore); writer.WriteStringValue("certificateTemplateName", CertificateTemplateName); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10SecureAssessmentConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows10SecureAssessmentConfiguration.cs index d100411d5f9..1995b659b33 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10SecureAssessmentConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10SecureAssessmentConfiguration.cs @@ -115,7 +115,7 @@ public Windows10SecureAssessmentConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10SecureAssessmentConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10SecureAssessmentConfiguration(); } /// @@ -142,7 +142,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowPrinting", AllowPrinting); writer.WriteBoolValue("allowScreenCapture", AllowScreenCapture); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10TeamGeneralConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows10TeamGeneralConfiguration.cs index ea618c65a34..934cd709623 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10TeamGeneralConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10TeamGeneralConfiguration.cs @@ -178,7 +178,7 @@ public Windows10TeamGeneralConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10TeamGeneralConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10TeamGeneralConfiguration(); } /// @@ -217,7 +217,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("azureOperationalInsightsBlockTelemetry", AzureOperationalInsightsBlockTelemetry); writer.WriteStringValue("azureOperationalInsightsWorkspaceId", AzureOperationalInsightsWorkspaceId); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10VpnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows10VpnConfiguration.cs index f0ec6faf2c4..b8620742949 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10VpnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10VpnConfiguration.cs @@ -317,7 +317,7 @@ public Windows10VpnConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10VpnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10VpnConfiguration(); } /// @@ -361,7 +361,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("associatedApps", AssociatedApps); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10VpnProxyServer.cs b/src/Microsoft.Graph/Generated/Models/Windows10VpnProxyServer.cs index de14daacee5..515006aa8cf 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10VpnProxyServer.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10VpnProxyServer.cs @@ -33,7 +33,7 @@ public Windows10VpnProxyServer() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10VpnProxyServer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10VpnProxyServer(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("bypassProxyServerForLocalAddress", BypassProxyServerForLocalAddress); } diff --git a/src/Microsoft.Graph/Generated/Models/Windows10XCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/Windows10XCertificateProfile.cs index 3a3cc80fbcf..9f8c57b6a48 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10XCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10XCertificateProfile.cs @@ -27,7 +27,7 @@ public Windows10XCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10XCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -51,7 +51,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Windows10XCustomSubjectAlternativeName.cs b/src/Microsoft.Graph/Generated/Models/Windows10XCustomSubjectAlternativeName.cs index 512506235a3..e52fcdff0d7 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10XCustomSubjectAlternativeName.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10XCustomSubjectAlternativeName.cs @@ -75,7 +75,7 @@ public Windows10XCustomSubjectAlternativeName() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Windows10XCustomSubjectAlternativeName CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10XCustomSubjectAlternativeName(); } /// @@ -97,7 +97,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("sanType", SanType); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10XSCEPCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/Windows10XSCEPCertificateProfile.cs index 09fcb9fd3a5..b2935fd3e81 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10XSCEPCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10XSCEPCertificateProfile.cs @@ -155,7 +155,7 @@ public Windows10XSCEPCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10XSCEPCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10XSCEPCertificateProfile(); } /// @@ -187,7 +187,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateStore", CertificateStore); writer.WriteEnumValue("certificateValidityPeriodScale", CertificateValidityPeriodScale); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10XTrustedRootCertificate.cs b/src/Microsoft.Graph/Generated/Models/Windows10XTrustedRootCertificate.cs index 7104091281f..2dd1f293688 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10XTrustedRootCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10XTrustedRootCertificate.cs @@ -65,7 +65,7 @@ public Windows10XTrustedRootCertificate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10XTrustedRootCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10XTrustedRootCertificate(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certFileName", CertFileName); writer.WriteEnumValue("destinationStore", DestinationStore); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10XVpnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows10XVpnConfiguration.cs index e61357a8c42..403b7b33756 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10XVpnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10XVpnConfiguration.cs @@ -65,7 +65,7 @@ public Windows10XVpnConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10XVpnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10XVpnConfiguration(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteGuidValue("authenticationCertificateId", AuthenticationCertificateId); writer.WriteByteArrayValue("customXml", CustomXml); diff --git a/src/Microsoft.Graph/Generated/Models/Windows10XWifiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows10XWifiConfiguration.cs index 112eabeec2b..e5b59c05a96 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows10XWifiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows10XWifiConfiguration.cs @@ -65,7 +65,7 @@ public Windows10XWifiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows10XWifiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows10XWifiConfiguration(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteGuidValue("authenticationCertificateId", AuthenticationCertificateId); writer.WriteByteArrayValue("customXml", CustomXml); diff --git a/src/Microsoft.Graph/Generated/Models/Windows81CertificateProfileBase.cs b/src/Microsoft.Graph/Generated/Models/Windows81CertificateProfileBase.cs index 43f96f33d80..948a7899b3f 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows81CertificateProfileBase.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows81CertificateProfileBase.cs @@ -59,7 +59,7 @@ public Windows81CertificateProfileBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows81CertificateProfileBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -85,7 +85,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", CustomSubjectAlternativeNames); writer.WriteCollectionOfObjectValues("extendedKeyUsages", ExtendedKeyUsages); diff --git a/src/Microsoft.Graph/Generated/Models/Windows81CompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/Windows81CompliancePolicy.cs index 610f4d49b94..8093c021948 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows81CompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows81CompliancePolicy.cs @@ -113,7 +113,7 @@ public Windows81CompliancePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows81CompliancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows81CompliancePolicy(); } /// @@ -143,7 +143,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("osMaximumVersion", OsMaximumVersion); writer.WriteStringValue("osMinimumVersion", OsMinimumVersion); diff --git a/src/Microsoft.Graph/Generated/Models/Windows81GeneralConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows81GeneralConfiguration.cs index efa94503479..7da285fcd3d 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows81GeneralConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows81GeneralConfiguration.cs @@ -267,7 +267,7 @@ public Windows81GeneralConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows81GeneralConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows81GeneralConfiguration(); } /// @@ -321,7 +321,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("accountsBlockAddingNonMicrosoftAccountEmail", AccountsBlockAddingNonMicrosoftAccountEmail); writer.WriteBoolValue("browserBlockAutofill", BrowserBlockAutofill); diff --git a/src/Microsoft.Graph/Generated/Models/Windows81SCEPCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/Windows81SCEPCertificateProfile.cs index 3fa6f93134e..3a923344bd9 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows81SCEPCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows81SCEPCertificateProfile.cs @@ -131,7 +131,7 @@ public Windows81SCEPCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows81SCEPCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows81SCEPCertificateProfile(); } /// @@ -159,7 +159,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateStore", CertificateStore); writer.WriteEnumValue("hashAlgorithm", HashAlgorithm); diff --git a/src/Microsoft.Graph/Generated/Models/Windows81TrustedRootCertificate.cs b/src/Microsoft.Graph/Generated/Models/Windows81TrustedRootCertificate.cs index d19bb03d397..8e880777502 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows81TrustedRootCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows81TrustedRootCertificate.cs @@ -65,7 +65,7 @@ public Windows81TrustedRootCertificate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows81TrustedRootCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows81TrustedRootCertificate(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certFileName", CertFileName); writer.WriteEnumValue("destinationStore", DestinationStore); diff --git a/src/Microsoft.Graph/Generated/Models/Windows81VpnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows81VpnConfiguration.cs index c24f17ed8dd..440320c953a 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows81VpnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows81VpnConfiguration.cs @@ -77,7 +77,7 @@ public Windows81VpnConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows81VpnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("connectionType", ConnectionType); writer.WriteBoolValue("enableSplitTunneling", EnableSplitTunneling); diff --git a/src/Microsoft.Graph/Generated/Models/Windows81VpnProxyServer.cs b/src/Microsoft.Graph/Generated/Models/Windows81VpnProxyServer.cs index a75563454a2..bbe73d159b6 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows81VpnProxyServer.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows81VpnProxyServer.cs @@ -39,7 +39,7 @@ public Windows81VpnProxyServer() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows81VpnProxyServer CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows81VpnProxyServer(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("automaticallyDetectProxySettings", AutomaticallyDetectProxySettings); writer.WriteBoolValue("bypassProxyServerForLocalAddress", BypassProxyServerForLocalAddress); diff --git a/src/Microsoft.Graph/Generated/Models/Windows81WifiImportConfiguration.cs b/src/Microsoft.Graph/Generated/Models/Windows81WifiImportConfiguration.cs index 2d916652715..beda0992b53 100644 --- a/src/Microsoft.Graph/Generated/Models/Windows81WifiImportConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/Windows81WifiImportConfiguration.cs @@ -75,7 +75,7 @@ public Windows81WifiImportConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Windows81WifiImportConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Windows81WifiImportConfiguration(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteByteArrayValue("payload", Payload); writer.WriteStringValue("payloadFileName", PayloadFileName); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsAppIdentifier.cs b/src/Microsoft.Graph/Generated/Models/WindowsAppIdentifier.cs index 27eb368be60..b0667156d3c 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsAppIdentifier.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsAppIdentifier.cs @@ -43,7 +43,7 @@ public WindowsAppIdentifier() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsAppIdentifier CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsAppIdentifier(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("windowsAppId", WindowsAppId); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsAppX.cs b/src/Microsoft.Graph/Generated/Models/WindowsAppX.cs index 4e5a1b95ed9..6b563d561a6 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsAppX.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsAppX.cs @@ -119,7 +119,7 @@ public WindowsAppX() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsAppX CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsAppX(); } /// @@ -145,7 +145,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("applicableArchitectures", ApplicableArchitectures); writer.WriteStringValue("identityName", IdentityName); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsAppXAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsAppXAppAssignmentSettings.cs index 2a1c0c90472..64fd624442a 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsAppXAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsAppXAppAssignmentSettings.cs @@ -33,7 +33,7 @@ public WindowsAppXAppAssignmentSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsAppXAppAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsAppXAppAssignmentSettings(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("useDeviceContext", UseDeviceContext); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsAppXCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsAppXCollectionResponse.cs index f4139b0b2cd..1e5cfa041a0 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsAppXCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsAppXCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsAppXCollectionResponse : global::Microsoft.Graph.Bet /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsAppXCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsAppXCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsApplication.cs b/src/Microsoft.Graph/Generated/Models/WindowsApplication.cs index 96789fa402c..ea9146f8343 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsApplication.cs @@ -84,7 +84,7 @@ public WindowsApplication() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsApplication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsApplication(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("packageSid", PackageSid); writer.WriteCollectionOfPrimitiveValues("redirectUris", RedirectUris); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsAssignedAccessProfile.cs b/src/Microsoft.Graph/Generated/Models/WindowsAssignedAccessProfile.cs index eae82a820ab..a2d74751069 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsAssignedAccessProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsAssignedAccessProfile.cs @@ -106,7 +106,7 @@ public List UserAccounts /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsAssignedAccessProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsAssignedAccessProfile(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("appUserModelIds", AppUserModelIds); writer.WriteCollectionOfPrimitiveValues("desktopAppPaths", DesktopAppPaths); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfile.cs b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfile.cs index 3020ae02026..8fb77679dcc 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfile.cs @@ -254,7 +254,7 @@ public List RoleScopeTagIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -298,7 +298,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignedDevices", AssignedDevices); writer.WriteCollectionOfObjectValues("assignments", Assignments); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfileAssignment.cs b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfileAssignment.cs index 59fe14693fe..b8a2be6d814 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfileAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfileAssignment.cs @@ -58,7 +58,7 @@ public string SourceId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfileAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfileAssignment(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("source", Source); writer.WriteStringValue("sourceId", SourceId); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfileAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfileAssignmentCollectionResponse.cs index 1bdcb09e28d..7ed872b580c 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfileAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfileAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsAutopilotDeploymentProfileAssignmentCollectionRespon /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfileAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfileAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfileCollectionResponse.cs index 4966b855168..014d67276d1 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsAutopilotDeploymentProfileCollectionResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfilePolicySetItem.cs b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfilePolicySetItem.cs index 833406f6d2e..d96b0e921f7 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfilePolicySetItem.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeploymentProfilePolicySetItem.cs @@ -27,7 +27,7 @@ public WindowsAutopilotDeploymentProfilePolicySetItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfilePolicySetItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeploymentProfilePolicySetItem(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeviceIdentity.cs b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeviceIdentity.cs index ee7aceec7c5..7b2dced5966 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeviceIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeviceIdentity.cs @@ -388,7 +388,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeviceIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeviceIdentity(); } /// @@ -435,7 +435,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("addressableUserName", AddressableUserName); writer.WriteStringValue("azureActiveDirectoryDeviceId", AzureActiveDirectoryDeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeviceIdentityCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeviceIdentityCollectionResponse.cs index a335094fbd3..24b31ac6cec 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeviceIdentityCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotDeviceIdentityCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsAutopilotDeviceIdentityCollectionResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeviceIdentityCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsAutopilotDeviceIdentityCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotSettings.cs index f844b7f45f9..d6ab81d533f 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsAutopilotSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsAutopilotSettings.cs @@ -38,7 +38,7 @@ public DateTimeOffset? LastSyncDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsAutopilotSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsAutopilotSettings(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("lastManualSyncTriggerDateTime", LastManualSyncTriggerDateTime); writer.WriteDateTimeOffsetValue("lastSyncDateTime", LastSyncDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsCertificateProfileBase.cs b/src/Microsoft.Graph/Generated/Models/WindowsCertificateProfileBase.cs index 5459278096e..26185e64b95 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsCertificateProfileBase.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsCertificateProfileBase.cs @@ -63,7 +63,7 @@ public WindowsCertificateProfileBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsCertificateProfileBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -98,7 +98,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateValidityPeriodScale", CertificateValidityPeriodScale); writer.WriteIntValue("certificateValidityPeriodValue", CertificateValidityPeriodValue); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDefenderAdvancedThreatProtectionConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsDefenderAdvancedThreatProtectionConfiguration.cs index 497e80bd69c..42f631e046a 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDefenderAdvancedThreatProtectionConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDefenderAdvancedThreatProtectionConfiguration.cs @@ -109,7 +109,7 @@ public WindowsDefenderAdvancedThreatProtectionConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDefenderAdvancedThreatProtectionConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDefenderAdvancedThreatProtectionConfiguration(); } /// @@ -135,7 +135,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("advancedThreatProtectionAutoPopulateOnboardingBlob", AdvancedThreatProtectionAutoPopulateOnboardingBlob); writer.WriteStringValue("advancedThreatProtectionOffboardingBlob", AdvancedThreatProtectionOffboardingBlob); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicy.cs b/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicy.cs index 7b552e41bc3..828d5ab7146 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicy.cs @@ -175,7 +175,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicy(); } /// @@ -205,7 +205,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteByteArrayValue("content", Content); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyAssignment.cs b/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyAssignment.cs index 6e05a253ec8..b8a01216d0f 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyAssignment.cs @@ -36,7 +36,7 @@ public partial class WindowsDefenderApplicationControlSupplementalPolicyAssignme /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyAssignmentCollectionResponse.cs index 010dff87c2c..b41172edcec 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsDefenderApplicationControlSupplementalPolicyAssignme /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyCollectionResponse.cs index da300557fc0..bfad437e10f 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsDefenderApplicationControlSupplementalPolicyCollecti /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus.cs b/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus.cs index 56a4b25e4d8..906ffda7953 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus.cs @@ -160,7 +160,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus(); } /// @@ -189,7 +189,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("deploymentStatus", DeploymentStatus); writer.WriteStringValue("deviceId", DeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatusCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatusCollectionResponse.cs index 04a9cf7edf9..14d0aefdac9 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatusCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatusCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsDefenderApplicationControlSupplementalPolicyDeployme /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatusCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatusCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyDeploymentSummary.cs b/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyDeploymentSummary.cs index d7c3b2dcbec..cbd242ff4f2 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyDeploymentSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDefenderApplicationControlSupplementalPolicyDeploymentSummary.cs @@ -32,7 +32,7 @@ public int? FailedDeviceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyDeploymentSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDefenderApplicationControlSupplementalPolicyDeploymentSummary(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("deployedDeviceCount", DeployedDeviceCount); writer.WriteIntValue("failedDeviceCount", FailedDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDefenderScanActionResult.cs b/src/Microsoft.Graph/Generated/Models/WindowsDefenderScanActionResult.cs index bc8652c22d9..a5394dac49a 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDefenderScanActionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDefenderScanActionResult.cs @@ -36,7 +36,7 @@ public string ScanType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDefenderScanActionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDefenderScanActionResult(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("scanType", ScanType); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDeliveryOptimizationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsDeliveryOptimizationConfiguration.cs index 037f46a7322..3b3f637496f 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDeliveryOptimizationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDeliveryOptimizationConfiguration.cs @@ -179,7 +179,7 @@ public WindowsDeliveryOptimizationConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDeliveryOptimizationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDeliveryOptimizationConfiguration(); } /// @@ -215,7 +215,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteLongValue("backgroundDownloadFromHttpDelayInSeconds", BackgroundDownloadFromHttpDelayInSeconds); writer.WriteObjectValue("bandwidthMode", BandwidthMode); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDeviceADAccount.cs b/src/Microsoft.Graph/Generated/Models/WindowsDeviceADAccount.cs index c62fa3ca554..a3747d4992b 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDeviceADAccount.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDeviceADAccount.cs @@ -58,7 +58,7 @@ public WindowsDeviceADAccount() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDeviceADAccount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDeviceADAccount(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("domainName", DomainName); writer.WriteStringValue("userName", UserName); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDeviceAccount.cs b/src/Microsoft.Graph/Generated/Models/WindowsDeviceAccount.cs index ca457c99672..265703dd34e 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDeviceAccount.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDeviceAccount.cs @@ -68,7 +68,7 @@ public WindowsDeviceAccount() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsDeviceAccount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -95,7 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("password", Password); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDeviceAzureADAccount.cs b/src/Microsoft.Graph/Generated/Models/WindowsDeviceAzureADAccount.cs index 7689b38f7b5..820e73d6e4c 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDeviceAzureADAccount.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDeviceAzureADAccount.cs @@ -42,7 +42,7 @@ public WindowsDeviceAzureADAccount() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDeviceAzureADAccount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDeviceAzureADAccount(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userPrincipalName", UserPrincipalName); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDeviceMalwareState.cs b/src/Microsoft.Graph/Generated/Models/WindowsDeviceMalwareState.cs index f83c2d3d417..5d9504c811b 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDeviceMalwareState.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDeviceMalwareState.cs @@ -100,7 +100,7 @@ public DateTimeOffset? LastStateChangeDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareState(); } /// @@ -129,7 +129,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("additionalInformationUrl", AdditionalInformationUrl); writer.WriteEnumValue("category", Category); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDeviceMalwareStateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsDeviceMalwareStateCollectionResponse.cs index 66dbe064b4e..5b2e03c03ff 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDeviceMalwareStateCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDeviceMalwareStateCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsDeviceMalwareStateCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareStateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDeviceMalwareStateCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDomainJoinConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsDomainJoinConfiguration.cs index 2c70cedc146..971deb7599b 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDomainJoinConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDomainJoinConfiguration.cs @@ -97,7 +97,7 @@ public WindowsDomainJoinConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDomainJoinConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDomainJoinConfiguration(); } /// @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("activeDirectoryDomainName", ActiveDirectoryDomainName); writer.WriteStringValue("computerNameStaticPrefix", ComputerNameStaticPrefix); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateInventory.cs b/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateInventory.cs index 6b78fc46db3..dc3c48bf588 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateInventory.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateInventory.cs @@ -114,7 +114,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateInventory CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateInventory(); } /// @@ -142,7 +142,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("applicableDeviceCount", ApplicableDeviceCount); writer.WriteEnumValue("approvalStatus", ApprovalStatus); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateInventoryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateInventoryCollectionResponse.cs index 2cd79568f4e..bbf3355eb62 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateInventoryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateInventoryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsDriverUpdateInventoryCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateInventoryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateInventoryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfile.cs b/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfile.cs index 9e2fb54ffba..897ad96cdc1 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfile.cs @@ -152,7 +152,7 @@ public List RoleScopeTagIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfile(); } /// @@ -183,7 +183,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("approvalType", ApprovalType); writer.WriteCollectionOfObjectValues("assignments", Assignments); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileAssignment.cs b/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileAssignment.cs index 3aa27a8bdc9..c88a0ebd535 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileAssignment.cs @@ -36,7 +36,7 @@ public partial class WindowsDriverUpdateProfileAssignment : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfileAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfileAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileAssignmentCollectionResponse.cs index 8b7210573ee..07e84b20d14 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsDriverUpdateProfileAssignmentCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfileAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfileAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileCollectionResponse.cs index 95a8d500cf3..d454e499d33 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsDriverUpdateProfileCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileInventorySyncStatus.cs b/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileInventorySyncStatus.cs index 4e4214ffbd6..2535348fb64 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileInventorySyncStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsDriverUpdateProfileInventorySyncStatus.cs @@ -65,7 +65,7 @@ public WindowsDriverUpdateProfileInventorySyncStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfileInventorySyncStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsDriverUpdateProfileInventorySyncStatus(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("driverInventorySyncState", DriverInventorySyncState); writer.WriteDateTimeOffsetValue("lastSuccessfulSyncDateTime", LastSuccessfulSyncDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsEnrollmentStatusScreenSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsEnrollmentStatusScreenSettings.cs index aba7febf48d..08621133725 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsEnrollmentStatusScreenSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsEnrollmentStatusScreenSettings.cs @@ -105,7 +105,7 @@ public WindowsEnrollmentStatusScreenSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsEnrollmentStatusScreenSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsEnrollmentStatusScreenSettings(); } /// @@ -132,7 +132,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowDeviceUseBeforeProfileAndAppInstallComplete", AllowDeviceUseBeforeProfileAndAppInstallComplete); writer.WriteBoolValue("allowDeviceUseOnInstallFailure", AllowDeviceUseOnInstallFailure); writer.WriteBoolValue("allowLogCollectionOnInstallFailure", AllowLogCollectionOnInstallFailure); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateCatalogItem.cs b/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateCatalogItem.cs index fb796e19e2e..38ebc31c789 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateCatalogItem.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateCatalogItem.cs @@ -43,7 +43,7 @@ public WindowsFeatureUpdateCatalogItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateCatalogItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateCatalogItem(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("version", Version); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfile.cs b/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfile.cs index 0c71a39ef3a..d97e8615ac7 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfile.cs @@ -162,7 +162,7 @@ public List RoleScopeTagIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfile(); } /// @@ -193,7 +193,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfileAssignment.cs b/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfileAssignment.cs index 10f332ee1ed..8576960e565 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfileAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfileAssignment.cs @@ -36,7 +36,7 @@ public partial class WindowsFeatureUpdateProfileAssignment : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfileAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfileAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfileAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfileAssignmentCollectionResponse.cs index d0b8d7d49a0..d4aecfde7ca 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfileAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfileAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsFeatureUpdateProfileAssignmentCollectionResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfileAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfileAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfileCollectionResponse.cs index c6093c61ab0..ee87843dd95 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsFeatureUpdateProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsFeatureUpdateProfileCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsFeatureUpdateProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsFirewallNetworkProfile.cs b/src/Microsoft.Graph/Generated/Models/WindowsFirewallNetworkProfile.cs index db00af87f01..438a524579b 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsFirewallNetworkProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsFirewallNetworkProfile.cs @@ -191,7 +191,7 @@ public WindowsFirewallNetworkProfile() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsFirewallNetworkProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsFirewallNetworkProfile(); } /// @@ -234,7 +234,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("authorizedApplicationRulesFromGroupPolicyMerged", AuthorizedApplicationRulesFromGroupPolicyMerged); writer.WriteBoolValue("authorizedApplicationRulesFromGroupPolicyNotMerged", AuthorizedApplicationRulesFromGroupPolicyNotMerged); writer.WriteBoolValue("connectionSecurityRulesFromGroupPolicyMerged", ConnectionSecurityRulesFromGroupPolicyMerged); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsFirewallRule.cs b/src/Microsoft.Graph/Generated/Models/WindowsFirewallRule.cs index 21ff8c0f153..0973a26fc3a 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsFirewallRule.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsFirewallRule.cs @@ -249,7 +249,7 @@ public WindowsFirewallRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsFirewallRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsFirewallRule(); } /// @@ -285,7 +285,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsHealthMonitoringConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsHealthMonitoringConfiguration.cs index 32e236db302..464a8a2e0a0 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsHealthMonitoringConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsHealthMonitoringConfiguration.cs @@ -55,7 +55,7 @@ public WindowsHealthMonitoringConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsHealthMonitoringConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsHealthMonitoringConfiguration(); } /// @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("allowDeviceHealthMonitoring", AllowDeviceHealthMonitoring); writer.WriteStringValue("configDeviceHealthMonitoringCustomScope", ConfigDeviceHealthMonitoringCustomScope); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsHelloForBusinessAuthenticationMethod.cs b/src/Microsoft.Graph/Generated/Models/WindowsHelloForBusinessAuthenticationMethod.cs index da01362ec68..681f35321ff 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsHelloForBusinessAuthenticationMethod.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsHelloForBusinessAuthenticationMethod.cs @@ -64,7 +64,7 @@ public WindowsHelloForBusinessAuthenticationMethod() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsHelloForBusinessAuthenticationMethod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsHelloForBusinessAuthenticationMethod(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("device", Device); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsHelloForBusinessAuthenticationMethodCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsHelloForBusinessAuthenticationMethodCollectionResponse.cs index e8899071ec3..4214f962889 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsHelloForBusinessAuthenticationMethodCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsHelloForBusinessAuthenticationMethodCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsHelloForBusinessAuthenticationMethodCollectionRespon /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsHelloForBusinessAuthenticationMethodCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsHelloForBusinessAuthenticationMethodCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsIdentityProtectionConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsIdentityProtectionConfiguration.cs index 153b6a3da8d..3f36d3c785d 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsIdentityProtectionConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsIdentityProtectionConfiguration.cs @@ -111,7 +111,7 @@ public WindowsIdentityProtectionConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsIdentityProtectionConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsIdentityProtectionConfiguration(); } /// @@ -144,7 +144,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("enhancedAntiSpoofingForFacialFeaturesEnabled", EnhancedAntiSpoofingForFacialFeaturesEnabled); writer.WriteIntValue("pinExpirationInDays", PinExpirationInDays); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtection.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtection.cs index b1a689fae5d..0f59bc3d28d 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtection.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtection.cs @@ -327,7 +327,7 @@ public WindowsInformationProtection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -377,7 +377,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteBoolValue("azureRightsManagementServicesAllowed", AzureRightsManagementServicesAllowed); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionApp.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionApp.cs index 2cb74b4c340..37c9ac719ad 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionApp.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionApp.cs @@ -123,7 +123,7 @@ public WindowsInformationProtectionApp() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("denied", Denied); writer.WriteStringValue("description", Description); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLearningSummary.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLearningSummary.cs index c33a194e2eb..ff7d06da1be 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLearningSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLearningSummary.cs @@ -48,7 +48,7 @@ public int? DeviceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLearningSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLearningSummary(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("applicationName", ApplicationName); writer.WriteEnumValue("applicationType", ApplicationType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLearningSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLearningSummaryCollectionResponse.cs index 2badb9b0c49..c73929d4987 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLearningSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLearningSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsInformationProtectionAppLearningSummaryCollectionRes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLearningSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLearningSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLockerFile.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLockerFile.cs index eba1bc40d84..99114eddfb5 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLockerFile.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLockerFile.cs @@ -84,7 +84,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFile(); } /// @@ -107,7 +107,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteByteArrayValue("file", File); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLockerFileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLockerFileCollectionResponse.cs index 496d8fe9919..718335160ca 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLockerFileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionAppLockerFileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsInformationProtectionAppLockerFileCollectionResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionAppLockerFileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDataRecoveryCertificate.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDataRecoveryCertificate.cs index 11aedf93481..64cb87ece19 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDataRecoveryCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDataRecoveryCertificate.cs @@ -107,7 +107,7 @@ public WindowsInformationProtectionDataRecoveryCertificate() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionDataRecoveryCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionDataRecoveryCertificate(); } /// @@ -131,7 +131,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteByteArrayValue("certificate", Certificate); writer.WriteStringValue("description", Description); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDesktopApp.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDesktopApp.cs index 182b9069dcc..881955aee21 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDesktopApp.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDesktopApp.cs @@ -75,7 +75,7 @@ public WindowsInformationProtectionDesktopApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionDesktopApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionDesktopApp(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("binaryName", BinaryName); writer.WriteStringValue("binaryVersionHigh", BinaryVersionHigh); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDeviceRegistration.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDeviceRegistration.cs index 2796b1accb1..3ad3dde8345 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDeviceRegistration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDeviceRegistration.cs @@ -106,7 +106,7 @@ public string UserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionDeviceRegistration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionDeviceRegistration(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceMacAddress", DeviceMacAddress); writer.WriteStringValue("deviceName", DeviceName); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDeviceRegistrationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDeviceRegistrationCollectionResponse.cs index 7a41ae4951f..09521085710 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDeviceRegistrationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionDeviceRegistrationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsInformationProtectionDeviceRegistrationCollectionRes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionDeviceRegistrationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionDeviceRegistrationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionIPRangeCollection.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionIPRangeCollection.cs index a5366f5d238..9802590c30d 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionIPRangeCollection.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionIPRangeCollection.cs @@ -85,7 +85,7 @@ public WindowsInformationProtectionIPRangeCollection() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionIPRangeCollection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionIPRangeCollection(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("ranges", Ranges); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionNetworkLearningSummary.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionNetworkLearningSummary.cs index 6b02113bff8..160f54c58ed 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionNetworkLearningSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionNetworkLearningSummary.cs @@ -42,7 +42,7 @@ public string Url /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionNetworkLearningSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionNetworkLearningSummary(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("deviceCount", DeviceCount); writer.WriteStringValue("url", Url); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionNetworkLearningSummaryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionNetworkLearningSummaryCollectionResponse.cs index c935aac82db..7c7389ddda5 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionNetworkLearningSummaryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionNetworkLearningSummaryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsInformationProtectionNetworkLearningSummaryCollectio /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionNetworkLearningSummaryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionNetworkLearningSummaryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionPolicy.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionPolicy.cs index bcfbec86ae0..eac14ea7c2c 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionPolicy.cs @@ -109,7 +109,7 @@ public WindowsInformationProtectionPolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionPolicy(); } /// @@ -140,7 +140,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("daysWithoutContactBeforeUnenroll", DaysWithoutContactBeforeUnenroll); writer.WriteStringValue("mdmEnrollmentUrl", MdmEnrollmentUrl); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionPolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionPolicyCollectionResponse.cs index b530f2a7a72..5299a064f7b 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionPolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionPolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsInformationProtectionPolicyCollectionResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionPolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionPolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionProxiedDomainCollection.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionProxiedDomainCollection.cs index d064a8232cb..2ed3eb09764 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionProxiedDomainCollection.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionProxiedDomainCollection.cs @@ -85,7 +85,7 @@ public WindowsInformationProtectionProxiedDomainCollection() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionProxiedDomainCollection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionProxiedDomainCollection(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("proxiedDomains", ProxiedDomains); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionResourceCollection.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionResourceCollection.cs index 6be0d4955b2..f731e206a1c 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionResourceCollection.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionResourceCollection.cs @@ -85,7 +85,7 @@ public WindowsInformationProtectionResourceCollection() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionResourceCollection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionResourceCollection(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("resources", Resources); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionStoreApp.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionStoreApp.cs index 47fbaa419ce..8d6fd79230e 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionStoreApp.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionStoreApp.cs @@ -27,7 +27,7 @@ public WindowsInformationProtectionStoreApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionStoreApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionStoreApp(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionWipeAction.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionWipeAction.cs index bbf4ba6e4c0..2e4ee4f2366 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionWipeAction.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionWipeAction.cs @@ -96,7 +96,7 @@ public string TargetedUserId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionWipeAction CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionWipeAction(); } /// @@ -121,7 +121,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("lastCheckInDateTime", LastCheckInDateTime); writer.WriteEnumValue("status", Status); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionWipeActionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionWipeActionCollectionResponse.cs index 464bd21b7c7..bc754d5adca 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionWipeActionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsInformationProtectionWipeActionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsInformationProtectionWipeActionCollectionResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionWipeActionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsInformationProtectionWipeActionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskActiveDirectoryGroup.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskActiveDirectoryGroup.cs index f76832757b2..7c2bbb0cea1 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskActiveDirectoryGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskActiveDirectoryGroup.cs @@ -43,7 +43,7 @@ public WindowsKioskActiveDirectoryGroup() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsKioskActiveDirectoryGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskActiveDirectoryGroup(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("groupName", GroupName); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskAppBase.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskAppBase.cs index 0f7ce4bf4e1..0d9cc5c7a0e 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskAppBase.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskAppBase.cs @@ -87,7 +87,7 @@ public WindowsKioskAppBase() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsKioskAppBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -118,7 +118,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("appType", AppType); writer.WriteBoolValue("autoLaunch", AutoLaunch); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskAppConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskAppConfiguration.cs index a58b1cf97a1..3d644fd1e7f 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskAppConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskAppConfiguration.cs @@ -53,7 +53,7 @@ public WindowsKioskAppConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsKioskAppConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskAutologon.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskAutologon.cs index f58fb585fc2..7d372f16115 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskAutologon.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskAutologon.cs @@ -27,7 +27,7 @@ public WindowsKioskAutologon() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsKioskAutologon CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskAutologon(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskAzureADGroup.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskAzureADGroup.cs index d21aaf03543..7d64868cc93 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskAzureADGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskAzureADGroup.cs @@ -59,7 +59,7 @@ public WindowsKioskAzureADGroup() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsKioskAzureADGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskAzureADGroup(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("groupId", GroupId); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskAzureADUser.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskAzureADUser.cs index 0c1c3f8948a..9df43af420e 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskAzureADUser.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskAzureADUser.cs @@ -59,7 +59,7 @@ public WindowsKioskAzureADUser() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsKioskAzureADUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskAzureADUser(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userId", UserId); writer.WriteStringValue("userPrincipalName", UserPrincipalName); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskConfiguration.cs index 7c496c2ea4e..7a1484f11f3 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskConfiguration.cs @@ -137,7 +137,7 @@ public WindowsKioskConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsKioskConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskConfiguration(); } /// @@ -166,7 +166,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("edgeKioskEnablePublicBrowsing", EdgeKioskEnablePublicBrowsing); writer.WriteCollectionOfPrimitiveValues("kioskBrowserBlockedUrlExceptions", KioskBrowserBlockedUrlExceptions); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskDesktopApp.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskDesktopApp.cs index 5a60eb1463f..ab4aedf9989 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskDesktopApp.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskDesktopApp.cs @@ -75,7 +75,7 @@ public WindowsKioskDesktopApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsKioskDesktopApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskDesktopApp(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("desktopApplicationId", DesktopApplicationId); writer.WriteStringValue("desktopApplicationLinkPath", DesktopApplicationLinkPath); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskForceUpdateSchedule.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskForceUpdateSchedule.cs index 631ba1aae38..a319bc86c4f 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskForceUpdateSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskForceUpdateSchedule.cs @@ -83,7 +83,7 @@ public WindowsKioskForceUpdateSchedule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsKioskForceUpdateSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskForceUpdateSchedule(); } /// @@ -108,7 +108,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("dayofMonth", DayofMonth); writer.WriteEnumValue("dayofWeek", DayofWeek); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskLocalGroup.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskLocalGroup.cs index 433186a2b64..a386fd58799 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskLocalGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskLocalGroup.cs @@ -43,7 +43,7 @@ public WindowsKioskLocalGroup() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsKioskLocalGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskLocalGroup(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("groupName", GroupName); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskLocalUser.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskLocalUser.cs index 7a736c4781d..346bc42c4b9 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskLocalUser.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskLocalUser.cs @@ -43,7 +43,7 @@ public WindowsKioskLocalUser() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsKioskLocalUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskLocalUser(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("userName", UserName); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskMultipleApps.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskMultipleApps.cs index a0e8ecfffe7..5688db7e18b 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskMultipleApps.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskMultipleApps.cs @@ -77,7 +77,7 @@ public WindowsKioskMultipleApps() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsKioskMultipleApps CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskMultipleApps(); } /// @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowAccessToDownloadsFolder", AllowAccessToDownloadsFolder); writer.WriteCollectionOfObjectValues("apps", Apps); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskProfile.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskProfile.cs index 5c232defabc..b8edbc56714 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskProfile.cs @@ -116,7 +116,7 @@ public WindowsKioskProfile() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsKioskProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskProfile(); } /// @@ -140,7 +140,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("appConfiguration", AppConfiguration); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("profileId", ProfileId); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskSingleUWPApp.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskSingleUWPApp.cs index 67d6d11381f..b41df61a633 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskSingleUWPApp.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskSingleUWPApp.cs @@ -43,7 +43,7 @@ public WindowsKioskSingleUWPApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsKioskSingleUWPApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskSingleUWPApp(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("uwpApp", UwpApp); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskSingleWin32App.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskSingleWin32App.cs index bd47af062d9..7105b91f768 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskSingleWin32App.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskSingleWin32App.cs @@ -43,7 +43,7 @@ public WindowsKioskSingleWin32App() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsKioskSingleWin32App CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskSingleWin32App(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("win32App", Win32App); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskUWPApp.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskUWPApp.cs index 13925a64568..9edfada67e9 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskUWPApp.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskUWPApp.cs @@ -75,7 +75,7 @@ public WindowsKioskUWPApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsKioskUWPApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskUWPApp(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appId", AppId); writer.WriteStringValue("appUserModelId", AppUserModelId); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskUser.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskUser.cs index 817d31a40b0..b41580a42ab 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskUser.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskUser.cs @@ -53,7 +53,7 @@ public WindowsKioskUser() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsKioskUser CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -84,7 +84,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskVisitor.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskVisitor.cs index d24cf15d013..c96962f9e67 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskVisitor.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskVisitor.cs @@ -27,7 +27,7 @@ public WindowsKioskVisitor() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsKioskVisitor CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskVisitor(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsKioskWin32App.cs b/src/Microsoft.Graph/Generated/Models/WindowsKioskWin32App.cs index 28409114d0e..7f11b387ec2 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsKioskWin32App.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsKioskWin32App.cs @@ -77,7 +77,7 @@ public WindowsKioskWin32App() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsKioskWin32App CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsKioskWin32App(); } /// @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("classicAppPath", ClassicAppPath); writer.WriteStringValue("edgeKiosk", EdgeKiosk); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareCategoryCount.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareCategoryCount.cs index 59c9edd2cc8..346f7d32e13 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsMalwareCategoryCount.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareCategoryCount.cs @@ -83,7 +83,7 @@ public WindowsMalwareCategoryCount() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsMalwareCategoryCount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsMalwareCategoryCount(); } /// @@ -108,7 +108,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("activeMalwareDetectionCount", ActiveMalwareDetectionCount); writer.WriteEnumValue("category", Category); writer.WriteIntValue("deviceCount", DeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareExecutionStateCount.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareExecutionStateCount.cs index 4d21a6dd820..0ab3b63e047 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsMalwareExecutionStateCount.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareExecutionStateCount.cs @@ -71,7 +71,7 @@ public WindowsMalwareExecutionStateCount() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsMalwareExecutionStateCount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsMalwareExecutionStateCount(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("deviceCount", DeviceCount); writer.WriteEnumValue("executionState", ExecutionState); writer.WriteDateTimeOffsetValue("lastUpdateDateTime", LastUpdateDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareInformation.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareInformation.cs index 9884fad014d..77871298a0f 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsMalwareInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareInformation.cs @@ -86,7 +86,7 @@ public DateTimeOffset? LastDetectionDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsMalwareInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsMalwareInformation(); } /// @@ -111,7 +111,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("additionalInformationUrl", AdditionalInformationUrl); writer.WriteEnumValue("category", Category); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareInformationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareInformationCollectionResponse.cs index 86e8f6fc758..6aa979d228e 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsMalwareInformationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareInformationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsMalwareInformationCollectionResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsMalwareInformationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsMalwareInformationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareNameCount.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareNameCount.cs index 704625956e7..89345783fc3 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsMalwareNameCount.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareNameCount.cs @@ -97,7 +97,7 @@ public WindowsMalwareNameCount() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsMalwareNameCount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsMalwareNameCount(); } /// @@ -121,7 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("deviceCount", DeviceCount); writer.WriteDateTimeOffsetValue("lastUpdateDateTime", LastUpdateDateTime); writer.WriteStringValue("malwareIdentifier", MalwareIdentifier); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareOverview.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareOverview.cs index 5bcb549d8f8..b2fcda40bc0 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsMalwareOverview.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareOverview.cs @@ -167,7 +167,7 @@ public WindowsMalwareOverview() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsMalwareOverview CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsMalwareOverview(); } /// @@ -196,7 +196,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("malwareCategorySummary", MalwareCategorySummary); writer.WriteIntValue("malwareDetectedDeviceCount", MalwareDetectedDeviceCount); writer.WriteCollectionOfObjectValues("malwareExecutionStateSummary", MalwareExecutionStateSummary); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareSeverityCount.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareSeverityCount.cs index 187c5c889cc..2d46f8f6bf8 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsMalwareSeverityCount.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareSeverityCount.cs @@ -77,7 +77,7 @@ public WindowsMalwareSeverityCount() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsMalwareSeverityCount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsMalwareSeverityCount(); } /// @@ -101,7 +101,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("distinctMalwareCount", DistinctMalwareCount); writer.WriteDateTimeOffsetValue("lastUpdateDateTime", LastUpdateDateTime); writer.WriteIntValue("malwareDetectionCount", MalwareDetectionCount); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMalwareStateCount.cs b/src/Microsoft.Graph/Generated/Models/WindowsMalwareStateCount.cs index 4cd28ccb56d..1ceaaf9be40 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsMalwareStateCount.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsMalwareStateCount.cs @@ -83,7 +83,7 @@ public WindowsMalwareStateCount() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsMalwareStateCount CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsMalwareStateCount(); } /// @@ -108,7 +108,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("deviceCount", DeviceCount); writer.WriteIntValue("distinctMalwareCount", DistinctMalwareCount); writer.WriteDateTimeOffsetValue("lastUpdateDateTime", LastUpdateDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsManagedAppProtection.cs b/src/Microsoft.Graph/Generated/Models/WindowsManagedAppProtection.cs index 23454c00b3d..2539c5d53de 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsManagedAppProtection.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsManagedAppProtection.cs @@ -317,7 +317,7 @@ public WindowsManagedAppProtection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsManagedAppProtection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsManagedAppProtection(); } /// @@ -361,7 +361,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("allowedInboundDataTransferSources", AllowedInboundDataTransferSources); writer.WriteEnumValue("allowedOutboundClipboardSharingLevel", AllowedOutboundClipboardSharingLevel); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsManagedAppProtectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsManagedAppProtectionCollectionResponse.cs index d7a07ac87bf..30cff4d30f0 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsManagedAppProtectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsManagedAppProtectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsManagedAppProtectionCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsManagedAppProtectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsManagedAppProtectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsManagedAppRegistration.cs b/src/Microsoft.Graph/Generated/Models/WindowsManagedAppRegistration.cs index 103b6a8e4a7..2a1db5e0ef8 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsManagedAppRegistration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsManagedAppRegistration.cs @@ -27,7 +27,7 @@ public WindowsManagedAppRegistration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsManagedAppRegistration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsManagedAppRegistration(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsManagedDevice.cs b/src/Microsoft.Graph/Generated/Models/WindowsManagedDevice.cs index 8d6f6524edf..97dc5f15cb4 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsManagedDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsManagedDevice.cs @@ -27,7 +27,7 @@ public WindowsManagedDevice() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsManagedDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsManagedDevice(); } /// @@ -46,7 +46,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsManagementApp.cs b/src/Microsoft.Graph/Generated/Models/WindowsManagementApp.cs index a6651514bf2..a6c5c3752f9 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsManagementApp.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsManagementApp.cs @@ -74,7 +74,7 @@ public string ManagedInstallerConfiguredDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsManagementApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsManagementApp(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("availableVersion", AvailableVersion); writer.WriteCollectionOfObjectValues("healthStates", HealthStates); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsManagementAppHealthState.cs b/src/Microsoft.Graph/Generated/Models/WindowsManagementAppHealthState.cs index 150a3190a51..604d3176e84 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsManagementAppHealthState.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsManagementAppHealthState.cs @@ -80,7 +80,7 @@ public DateTimeOffset? LastCheckInDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsManagementAppHealthState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsManagementAppHealthState(); } /// @@ -104,7 +104,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceName", DeviceName); writer.WriteStringValue("deviceOSVersion", DeviceOSVersion); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsManagementAppHealthSummary.cs b/src/Microsoft.Graph/Generated/Models/WindowsManagementAppHealthSummary.cs index fccc7acd7dd..7581158bea8 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsManagementAppHealthSummary.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsManagementAppHealthSummary.cs @@ -38,7 +38,7 @@ public int? UnknownDeviceCount /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsManagementAppHealthSummary CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsManagementAppHealthSummary(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("healthyDeviceCount", HealthyDeviceCount); writer.WriteIntValue("unhealthyDeviceCount", UnhealthyDeviceCount); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMicrosoftEdgeApp.cs b/src/Microsoft.Graph/Generated/Models/WindowsMicrosoftEdgeApp.cs index 9810117467f..df9d5ba2cbc 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsMicrosoftEdgeApp.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsMicrosoftEdgeApp.cs @@ -49,7 +49,7 @@ public WindowsMicrosoftEdgeApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsMicrosoftEdgeApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsMicrosoftEdgeApp(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("channel", Channel); writer.WriteStringValue("displayLanguageLocale", DisplayLanguageLocale); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMinimumOperatingSystem.cs b/src/Microsoft.Graph/Generated/Models/WindowsMinimumOperatingSystem.cs index fa1b739dad2..23b75def84a 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsMinimumOperatingSystem.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsMinimumOperatingSystem.cs @@ -131,7 +131,7 @@ public WindowsMinimumOperatingSystem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsMinimumOperatingSystem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsMinimumOperatingSystem(); } /// @@ -164,7 +164,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("v10_0", V100); writer.WriteBoolValue("v10_1607", V101607); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMobileMSI.cs b/src/Microsoft.Graph/Generated/Models/WindowsMobileMSI.cs index 22a6e4d765d..1118b94d620 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsMobileMSI.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsMobileMSI.cs @@ -103,7 +103,7 @@ public WindowsMobileMSI() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsMobileMSI CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsMobileMSI(); } /// @@ -128,7 +128,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("commandLine", CommandLine); writer.WriteStringValue("identityVersion", IdentityVersion); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsMobileMSICollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsMobileMSICollectionResponse.cs index 083a6339f57..0bb53653ffb 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsMobileMSICollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsMobileMSICollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsMobileMSICollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsMobileMSICollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsMobileMSICollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsNetworkIsolationPolicy.cs b/src/Microsoft.Graph/Generated/Models/WindowsNetworkIsolationPolicy.cs index 987b7abcae0..65da197c7ec 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsNetworkIsolationPolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsNetworkIsolationPolicy.cs @@ -161,7 +161,7 @@ public WindowsNetworkIsolationPolicy() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsNetworkIsolationPolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsNetworkIsolationPolicy(); } /// @@ -189,7 +189,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("enterpriseCloudResources", EnterpriseCloudResources); writer.WriteCollectionOfPrimitiveValues("enterpriseInternalProxyServers", EnterpriseInternalProxyServers); writer.WriteCollectionOfObjectValues("enterpriseIPRanges", EnterpriseIPRanges); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPackageInformation.cs b/src/Microsoft.Graph/Generated/Models/WindowsPackageInformation.cs index 52fddfa11fa..970db5642c9 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPackageInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPackageInformation.cs @@ -155,7 +155,7 @@ public WindowsPackageInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsPackageInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsPackageInformation(); } /// @@ -182,7 +182,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("applicableArchitecture", ApplicableArchitecture); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("identityName", IdentityName); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPhone81AppX.cs b/src/Microsoft.Graph/Generated/Models/WindowsPhone81AppX.cs index 9080e3a1c65..ced55b39b2d 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPhone81AppX.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPhone81AppX.cs @@ -145,7 +145,7 @@ public WindowsPhone81AppX() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsPhone81AppX CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -177,7 +177,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("applicableArchitectures", ApplicableArchitectures); writer.WriteStringValue("identityName", IdentityName); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPhone81AppXBundle.cs b/src/Microsoft.Graph/Generated/Models/WindowsPhone81AppXBundle.cs index 8222e426cd0..37c818a1a4a 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPhone81AppXBundle.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPhone81AppXBundle.cs @@ -43,7 +43,7 @@ public WindowsPhone81AppXBundle() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsPhone81AppXBundle CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsPhone81AppXBundle(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("appXPackageInformationList", AppXPackageInformationList); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPhone81CertificateProfileBase.cs b/src/Microsoft.Graph/Generated/Models/WindowsPhone81CertificateProfileBase.cs index 5940c2d8943..6805b158bf9 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPhone81CertificateProfileBase.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPhone81CertificateProfileBase.cs @@ -79,7 +79,7 @@ public WindowsPhone81CertificateProfileBase() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsPhone81CertificateProfileBase CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("certificateValidityPeriodScale", CertificateValidityPeriodScale); writer.WriteIntValue("certificateValidityPeriodValue", CertificateValidityPeriodValue); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPhone81CompliancePolicy.cs b/src/Microsoft.Graph/Generated/Models/WindowsPhone81CompliancePolicy.cs index baced6f30b0..22f89a76344 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPhone81CompliancePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPhone81CompliancePolicy.cs @@ -113,7 +113,7 @@ public WindowsPhone81CompliancePolicy() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsPhone81CompliancePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsPhone81CompliancePolicy(); } /// @@ -143,7 +143,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("osMaximumVersion", OsMaximumVersion); writer.WriteStringValue("osMinimumVersion", OsMinimumVersion); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPhone81CustomConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsPhone81CustomConfiguration.cs index 3a3934bb376..ae969eb52af 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPhone81CustomConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPhone81CustomConfiguration.cs @@ -43,7 +43,7 @@ public WindowsPhone81CustomConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsPhone81CustomConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsPhone81CustomConfiguration(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("omaSettings", OmaSettings); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPhone81GeneralConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsPhone81GeneralConfiguration.cs index 021df1bf7ad..88a5b9d14dc 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPhone81GeneralConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPhone81GeneralConfiguration.cs @@ -211,7 +211,7 @@ public WindowsPhone81GeneralConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsPhone81GeneralConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsPhone81GeneralConfiguration(); } /// @@ -259,7 +259,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("appsBlockCopyPaste", AppsBlockCopyPaste); writer.WriteBoolValue("bluetoothBlocked", BluetoothBlocked); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPhone81ImportedPFXCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/WindowsPhone81ImportedPFXCertificateProfile.cs index b66e48be042..9c2d1301f39 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPhone81ImportedPFXCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPhone81ImportedPFXCertificateProfile.cs @@ -49,7 +49,7 @@ public WindowsPhone81ImportedPFXCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsPhone81ImportedPFXCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsPhone81ImportedPFXCertificateProfile(); } /// @@ -70,7 +70,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("intendedPurpose", IntendedPurpose); writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", ManagedDeviceCertificateStates); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPhone81SCEPCertificateProfile.cs b/src/Microsoft.Graph/Generated/Models/WindowsPhone81SCEPCertificateProfile.cs index 7059774e503..cced3842eb5 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPhone81SCEPCertificateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPhone81SCEPCertificateProfile.cs @@ -125,7 +125,7 @@ public WindowsPhone81SCEPCertificateProfile() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsPhone81SCEPCertificateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsPhone81SCEPCertificateProfile(); } /// @@ -152,7 +152,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("hashAlgorithm", HashAlgorithm); writer.WriteEnumValue("keySize", KeySize); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPhone81StoreApp.cs b/src/Microsoft.Graph/Generated/Models/WindowsPhone81StoreApp.cs index 46be7552367..17e3583b038 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPhone81StoreApp.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPhone81StoreApp.cs @@ -43,7 +43,7 @@ public WindowsPhone81StoreApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsPhone81StoreApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsPhone81StoreApp(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appStoreUrl", AppStoreUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPhone81TrustedRootCertificate.cs b/src/Microsoft.Graph/Generated/Models/WindowsPhone81TrustedRootCertificate.cs index d10aec64244..5fba9c6368f 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPhone81TrustedRootCertificate.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPhone81TrustedRootCertificate.cs @@ -59,7 +59,7 @@ public WindowsPhone81TrustedRootCertificate() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsPhone81TrustedRootCertificate CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsPhone81TrustedRootCertificate(); } /// @@ -80,7 +80,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("certFileName", CertFileName); writer.WriteByteArrayValue("trustedRootCertificate", TrustedRootCertificate); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPhone81VpnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsPhone81VpnConfiguration.cs index 4bb6f0762db..6c4d8cd4c80 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPhone81VpnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPhone81VpnConfiguration.cs @@ -83,7 +83,7 @@ public WindowsPhone81VpnConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsPhone81VpnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsPhone81VpnConfiguration(); } /// @@ -108,7 +108,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteBoolValue("bypassVpnOnCompanyWifi", BypassVpnOnCompanyWifi); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPhoneEASEmailProfileConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsPhoneEASEmailProfileConfiguration.cs index c7124026062..bc81fc2ebef 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPhoneEASEmailProfileConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPhoneEASEmailProfileConfiguration.cs @@ -107,7 +107,7 @@ public WindowsPhoneEASEmailProfileConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsPhoneEASEmailProfileConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsPhoneEASEmailProfileConfiguration(); } /// @@ -136,7 +136,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("accountName", AccountName); writer.WriteEnumValue("durationOfEmailToSync", DurationOfEmailToSync); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPhoneXAP.cs b/src/Microsoft.Graph/Generated/Models/WindowsPhoneXAP.cs index d17ee1c184f..cba8e2accc8 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPhoneXAP.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPhoneXAP.cs @@ -75,7 +75,7 @@ public WindowsPhoneXAP() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsPhoneXAP CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsPhoneXAP(); } /// @@ -97,7 +97,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("identityVersion", IdentityVersion); writer.WriteObjectValue("minimumSupportedOperatingSystem", MinimumSupportedOperatingSystem); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsPrivacyDataAccessControlItem.cs b/src/Microsoft.Graph/Generated/Models/WindowsPrivacyDataAccessControlItem.cs index acee136682f..9bf8e3c48df 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsPrivacyDataAccessControlItem.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsPrivacyDataAccessControlItem.cs @@ -64,7 +64,7 @@ public string AppPackageFamilyName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsPrivacyDataAccessControlItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsPrivacyDataAccessControlItem(); } /// @@ -87,7 +87,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("accessLevel", AccessLevel); writer.WriteStringValue("appDisplayName", AppDisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsProtectionState.cs b/src/Microsoft.Graph/Generated/Models/WindowsProtectionState.cs index 86a13cacae7..20908228a81 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsProtectionState.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsProtectionState.cs @@ -206,7 +206,7 @@ public bool? TamperProtectionEnabled /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsProtectionState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsProtectionState(); } /// @@ -246,7 +246,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("antiMalwareVersion", AntiMalwareVersion); writer.WriteCollectionOfObjectValues("detectedMalwareState", DetectedMalwareState); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateApprovalSetting.cs b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateApprovalSetting.cs index d93bbc31bb8..a0add9d892d 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateApprovalSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateApprovalSetting.cs @@ -77,7 +77,7 @@ public WindowsQualityUpdateApprovalSetting() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateApprovalSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateApprovalSetting(); } /// @@ -101,7 +101,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("approvalMethodType", ApprovalMethodType); writer.WriteIntValue("deferredDeploymentInDay", DeferredDeploymentInDay); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateCatalogItem.cs b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateCatalogItem.cs index 971f4712132..c20d248e028 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateCatalogItem.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateCatalogItem.cs @@ -77,7 +77,7 @@ public WindowsQualityUpdateCatalogItem() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateCatalogItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateCatalogItem(); } /// @@ -101,7 +101,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("classification", Classification); writer.WriteBoolValue("isExpeditable", IsExpeditable); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateCatalogItemPolicyDetail.cs b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateCatalogItemPolicyDetail.cs index 91a88df02e2..6054878ef7e 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateCatalogItemPolicyDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateCatalogItemPolicyDetail.cs @@ -81,7 +81,7 @@ public WindowsQualityUpdateCatalogItemPolicyDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateCatalogItemPolicyDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateCatalogItemPolicyDetail(); } /// @@ -104,7 +104,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("approvalStatus", ApprovalStatus); writer.WriteStringValue("catalogItemId", CatalogItemId); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateCatalogProductRevision.cs b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateCatalogProductRevision.cs index 8c5222c7205..4f25fca33f7 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateCatalogProductRevision.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateCatalogProductRevision.cs @@ -139,7 +139,7 @@ public WindowsQualityUpdateCatalogProductRevision() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateCatalogProductRevision CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateCatalogProductRevision(); } /// @@ -165,7 +165,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteObjectValue("knowledgeBaseArticle", KnowledgeBaseArticle); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicy.cs b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicy.cs index 340b1560543..5b15fe4155c 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicy.cs @@ -118,7 +118,7 @@ public List RoleScopeTagIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicy(); } /// @@ -145,7 +145,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("approvalSettings", ApprovalSettings); writer.WriteCollectionOfObjectValues("assignments", Assignments); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicyAssignment.cs b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicyAssignment.cs index 973e58c9ea6..0ae5a83f62e 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicyAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicyAssignment.cs @@ -36,7 +36,7 @@ public partial class WindowsQualityUpdatePolicyAssignment : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicyAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicyAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicyAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicyAssignmentCollectionResponse.cs index b1f531b26b1..c884c179043 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicyAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicyAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsQualityUpdatePolicyAssignmentCollectionResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicyAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicyAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicyCollectionResponse.cs index 865ad31bcd2..11b1c7f3d1f 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdatePolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsQualityUpdatePolicyCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdatePolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProductBuildVersionDetail.cs b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProductBuildVersionDetail.cs index 117efbab9ad..028a98501ec 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProductBuildVersionDetail.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProductBuildVersionDetail.cs @@ -77,7 +77,7 @@ public WindowsQualityUpdateProductBuildVersionDetail() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProductBuildVersionDetail CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProductBuildVersionDetail(); } /// @@ -101,7 +101,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("buildNumber", BuildNumber); writer.WriteIntValue("majorVersionNumber", MajorVersionNumber); writer.WriteIntValue("minorVersionNumber", MinorVersionNumber); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProductKnowledgeBaseArticle.cs b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProductKnowledgeBaseArticle.cs index f884a7d69bf..e5d40ebf6cc 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProductKnowledgeBaseArticle.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProductKnowledgeBaseArticle.cs @@ -85,7 +85,7 @@ public WindowsQualityUpdateProductKnowledgeBaseArticle() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProductKnowledgeBaseArticle CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProductKnowledgeBaseArticle(); } /// @@ -107,7 +107,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("articleId", ArticleId); writer.WriteStringValue("articleUrl", ArticleUrl); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfile.cs b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfile.cs index a78e86a20f1..0f6e106521d 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfile.cs @@ -144,7 +144,7 @@ public List RoleScopeTagIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfile(); } /// @@ -172,7 +172,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignments", Assignments); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfileAssignment.cs b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfileAssignment.cs index b7a080a6e3c..62181e001a5 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfileAssignment.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfileAssignment.cs @@ -36,7 +36,7 @@ public partial class WindowsQualityUpdateProfileAssignment : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfileAssignment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfileAssignment(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("target", Target); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfileAssignmentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfileAssignmentCollectionResponse.cs index 35663854baa..6ffe52c1a34 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfileAssignmentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfileAssignmentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsQualityUpdateProfileAssignmentCollectionResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfileAssignmentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfileAssignmentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfileCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfileCollectionResponse.cs index bc74770ae73..d9ef88e4bf8 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfileCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsQualityUpdateProfileCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsQualityUpdateProfileCollectionResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfileCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsQualityUpdateProfileCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsRestoreDeviceEnrollmentConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsRestoreDeviceEnrollmentConfiguration.cs index 70e03936060..d61ba74295a 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsRestoreDeviceEnrollmentConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsRestoreDeviceEnrollmentConfiguration.cs @@ -33,7 +33,7 @@ public WindowsRestoreDeviceEnrollmentConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsRestoreDeviceEnrollmentConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsRestoreDeviceEnrollmentConfiguration(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("state", State); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsSetting.cs b/src/Microsoft.Graph/Generated/Models/WindowsSetting.cs index 1731c2dc20e..bc2418371ad 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsSetting.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsSetting.cs @@ -73,7 +73,7 @@ public string WindowsDeviceId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsSetting CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsSetting(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("instances", Instances); writer.WriteStringValue("payloadType", PayloadType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsSettingCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsSettingCollectionResponse.cs index 7f42b8f0742..fccf103aad4 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsSettingCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsSettingCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsSettingCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsSettingCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsSettingCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsSettingInstance.cs b/src/Microsoft.Graph/Generated/Models/WindowsSettingInstance.cs index d60523817a1..391a129ce49 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsSettingInstance.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsSettingInstance.cs @@ -53,7 +53,7 @@ public string Payload /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsSettingInstance CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsSettingInstance(); } /// @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("expirationDateTime", ExpirationDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsSettingInstanceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsSettingInstanceCollectionResponse.cs index 9fc89b84148..2c583102d94 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsSettingInstanceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsSettingInstanceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsSettingInstanceCollectionResponse : global::Microsof /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsSettingInstanceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsSettingInstanceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsStoreApp.cs b/src/Microsoft.Graph/Generated/Models/WindowsStoreApp.cs index 4cb7a90308f..c7c7ef81363 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsStoreApp.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsStoreApp.cs @@ -43,7 +43,7 @@ public WindowsStoreApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsStoreApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsStoreApp(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appStoreUrl", AppStoreUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsStoreAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsStoreAppCollectionResponse.cs index df14b7bc72f..40186cb9802 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsStoreAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsStoreAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsStoreAppCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsStoreAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsStoreAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppX.cs b/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppX.cs index 57758405786..0515e171d1d 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppX.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppX.cs @@ -141,7 +141,7 @@ public WindowsUniversalAppX() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUniversalAppX CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUniversalAppX(); } /// @@ -169,7 +169,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("applicableArchitectures", ApplicableArchitectures); writer.WriteEnumValue("applicableDeviceTypes", ApplicableDeviceTypes); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppXAppAssignmentSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppXAppAssignmentSettings.cs index 66edc6980bb..7bcece30ee9 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppXAppAssignmentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppXAppAssignmentSettings.cs @@ -13,7 +13,7 @@ namespace Microsoft.Graph.Beta.Models [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class WindowsUniversalAppXAppAssignmentSettings : global::Microsoft.Graph.Beta.Models.MobileAppAssignmentSettings, IParsable { - /// Whether or not to use device execution context for Windows Universal AppX mobile app. + /// If true, uses device execution context for Windows Universal AppX mobile app. Device-context install is not allowed when this type of app is targeted with Available intent. Defaults to false. public bool? UseDeviceContext { get { return BackingStore?.Get("useDeviceContext"); } @@ -33,7 +33,7 @@ public WindowsUniversalAppXAppAssignmentSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUniversalAppXAppAssignmentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUniversalAppXAppAssignmentSettings(); } /// @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("useDeviceContext", UseDeviceContext); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppXCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppXCollectionResponse.cs index 5eeaf443428..52c03dac1b9 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppXCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppXCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsUniversalAppXCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUniversalAppXCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUniversalAppXCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppXContainedApp.cs b/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppXContainedApp.cs index 3de7d0582d9..177ff66bbc6 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppXContainedApp.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUniversalAppXContainedApp.cs @@ -43,7 +43,7 @@ public WindowsUniversalAppXContainedApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUniversalAppXContainedApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUniversalAppXContainedApp(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appUserModelId", AppUserModelId); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdateActiveHoursInstall.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdateActiveHoursInstall.cs index 80c9b49f46f..b70c86eeccf 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdateActiveHoursInstall.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdateActiveHoursInstall.cs @@ -39,7 +39,7 @@ public WindowsUpdateActiveHoursInstall() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdateActiveHoursInstall CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdateActiveHoursInstall(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeValue("activeHoursEnd", ActiveHoursEnd); writer.WriteTimeValue("activeHoursStart", ActiveHoursStart); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdateCatalogItem.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdateCatalogItem.cs index f38b92790e5..32206a062d1 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdateCatalogItem.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdateCatalogItem.cs @@ -48,7 +48,7 @@ public DateTimeOffset? ReleaseDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdateCatalogItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -76,7 +76,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("displayName", DisplayName); writer.WriteDateTimeOffsetValue("endOfSupportDate", EndOfSupportDate); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdateCatalogItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdateCatalogItemCollectionResponse.cs index 8429328eca0..db4b439a501 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdateCatalogItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdateCatalogItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsUpdateCatalogItemCollectionResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdateCatalogItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdateCatalogItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdateForBusinessConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdateForBusinessConfiguration.cs index d1d425edc2c..c334655161d 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdateForBusinessConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdateForBusinessConfiguration.cs @@ -254,7 +254,7 @@ public WindowsUpdateForBusinessConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdateForBusinessConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdateForBusinessConfiguration(); } /// @@ -309,7 +309,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("allowWindows11Upgrade", AllowWindows11Upgrade); writer.WriteEnumValue("automaticUpdateMode", AutomaticUpdateMode); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdateInstallScheduleType.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdateInstallScheduleType.cs index 7f8b3f60e5f..f8ca8b5665b 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdateInstallScheduleType.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdateInstallScheduleType.cs @@ -52,7 +52,7 @@ public WindowsUpdateInstallScheduleType() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdateInstallScheduleType CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -78,7 +78,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdateRolloutSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdateRolloutSettings.cs index 5807d3e5eb1..b5c5d3e793e 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdateRolloutSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdateRolloutSettings.cs @@ -71,7 +71,7 @@ public WindowsUpdateRolloutSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdateRolloutSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdateRolloutSettings(); } /// @@ -94,7 +94,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("offerEndDateTimeInUTC", OfferEndDateTimeInUTC); writer.WriteIntValue("offerIntervalInDays", OfferIntervalInDays); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdateScheduledInstall.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdateScheduledInstall.cs index ccb744f7a9d..c5dd0eb52d7 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdateScheduledInstall.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdateScheduledInstall.cs @@ -39,7 +39,7 @@ public WindowsUpdateScheduledInstall() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdateScheduledInstall CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdateScheduledInstall(); } /// @@ -60,7 +60,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("scheduledInstallDay", ScheduledInstallDay); writer.WriteTimeValue("scheduledInstallTime", ScheduledInstallTime); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdateState.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdateState.cs index a427b3b0c3a..303069e76e7 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdateState.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdateState.cs @@ -133,7 +133,7 @@ public string UserPrincipalName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdateState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdateState(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceDisplayName", DeviceDisplayName); writer.WriteStringValue("deviceId", DeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContent.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContent.cs index dda22a490e5..135c72af2bb 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContent.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContent.cs @@ -100,7 +100,7 @@ public ApplicableContent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContent(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("catalogEntry", CatalogEntry); writer.WriteStringValue("catalogEntryId", CatalogEntryId); writer.WriteCollectionOfObjectValues("matchedDevices", MatchedDevices); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContentCollectionResponse.cs index 2e72911030f..cff0f735c5b 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ApplicableContentCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContentDeviceMatch.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContentDeviceMatch.cs index 4c43443a434..1f569a829f2 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContentDeviceMatch.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContentDeviceMatch.cs @@ -84,7 +84,7 @@ public ApplicableContentDeviceMatch() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatch CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatch(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("deviceId", DeviceId); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("recommendedBy", RecommendedBy); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContentDeviceMatchCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContentDeviceMatchCollectionResponse.cs index 56b0320e9a7..30aed02e79e 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContentDeviceMatchCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ApplicableContentDeviceMatchCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ApplicableContentDeviceMatchCollectionResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatchCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ApplicableContentDeviceMatchCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/AzureADDevice.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/AzureADDevice.cs index c02711e51d6..60dabdababb 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/AzureADDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/AzureADDevice.cs @@ -58,7 +58,7 @@ public AzureADDevice() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.AzureADDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.AzureADDevice(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("enrollment", Enrollment); writer.WriteCollectionOfObjectValues("errors", Errors); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/AzureADDeviceRegistrationError.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/AzureADDeviceRegistrationError.cs index a3a3f9dee6b..29a800d49d8 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/AzureADDeviceRegistrationError.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/AzureADDeviceRegistrationError.cs @@ -32,7 +32,7 @@ public AzureADDeviceRegistrationError() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.AzureADDeviceRegistrationError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.AzureADDeviceRegistrationError(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("reason", Reason); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/BuildVersionDetails.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/BuildVersionDetails.cs index d72a73f2331..d7d44224f14 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/BuildVersionDetails.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/BuildVersionDetails.cs @@ -76,7 +76,7 @@ public BuildVersionDetails() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.BuildVersionDetails CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.BuildVersionDetails(); } /// @@ -100,7 +100,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("buildNumber", BuildNumber); writer.WriteIntValue("majorVersion", MajorVersion); writer.WriteIntValue("minorVersion", MinorVersion); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Catalog.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Catalog.cs index 264d75f7eb2..d545dd48ccf 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Catalog.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Catalog.cs @@ -35,7 +35,7 @@ public partial class Catalog : global::Microsoft.Graph.Beta.Models.Entity, IPars /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.Catalog CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.Catalog(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("entries", Entries); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CatalogContent.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CatalogContent.cs index 0531a6fa290..77b4e21a445 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CatalogContent.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CatalogContent.cs @@ -42,7 +42,7 @@ public CatalogContent() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.CatalogContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.CatalogContent(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("catalogEntry", CatalogEntry); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CatalogEntry.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CatalogEntry.cs index 508c3bdb273..ec877b6885e 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CatalogEntry.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CatalogEntry.cs @@ -47,7 +47,7 @@ public DateTimeOffset? ReleaseDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.CatalogEntry CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("deployableUntilDateTime", DeployableUntilDateTime); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CatalogEntryCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CatalogEntryCollectionResponse.cs index 166cd642ab0..0a1f0ec1ce3 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CatalogEntryCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CatalogEntryCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class CatalogEntryCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.CatalogEntryCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.CatalogEntryCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ComplianceChange.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ComplianceChange.cs index a0dff0462e0..76720713a52 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ComplianceChange.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ComplianceChange.cs @@ -53,7 +53,7 @@ public DateTimeOffset? RevokedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ComplianceChange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -81,7 +81,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteBoolValue("isRevoked", IsRevoked); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ComplianceChangeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ComplianceChangeCollectionResponse.cs index 0fa70bd45f0..fd3451e50f6 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ComplianceChangeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ComplianceChangeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ComplianceChangeCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ComplianceChangeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ComplianceChangeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ComplianceChangeRule.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ComplianceChangeRule.cs index 121142c0d9c..b71ff6d9a11 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ComplianceChangeRule.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ComplianceChangeRule.cs @@ -70,7 +70,7 @@ public ComplianceChangeRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.ComplianceChangeRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -98,7 +98,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteDateTimeOffsetValue("lastEvaluatedDateTime", LastEvaluatedDateTime); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentApplicabilitySettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentApplicabilitySettings.cs index 99a075c2767..1983d2e87e4 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentApplicabilitySettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentApplicabilitySettings.cs @@ -84,7 +84,7 @@ public ContentApplicabilitySettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.ContentApplicabilitySettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ContentApplicabilitySettings(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfPrimitiveValues("offerWhileRecommendedBy", OfferWhileRecommendedBy); writer.WriteObjectValue("safeguard", Safeguard); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentApproval.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentApproval.cs index 869227ddd36..f3c21129018 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentApproval.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentApproval.cs @@ -74,7 +74,7 @@ public ContentApproval() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ContentApproval CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ContentApproval(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("content", Content); writer.WriteCollectionOfObjectValues("deployments", Deployments); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentApprovalRule.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentApprovalRule.cs index 1b199ca0b23..9b795aebf7f 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentApprovalRule.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentApprovalRule.cs @@ -48,7 +48,7 @@ public ContentApprovalRule() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ContentApprovalRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ContentApprovalRule(); } /// @@ -69,7 +69,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("contentFilter", ContentFilter); writer.WriteTimeSpanValue("durationBeforeDeploymentStart", DurationBeforeDeploymentStart); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentFilter.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentFilter.cs index e9e26f856ed..299fe796919 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ContentFilter.cs @@ -52,7 +52,7 @@ public ContentFilter() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.ContentFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -81,7 +81,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CveInformation.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CveInformation.cs index 56e47ba6d86..3fa01c1cb33 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CveInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/CveInformation.cs @@ -84,7 +84,7 @@ public CveInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.CveInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.CveInformation(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("number", Number); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("url", Url); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DateDrivenRolloutSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DateDrivenRolloutSettings.cs index b78e54ea647..9acb1d246a6 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DateDrivenRolloutSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DateDrivenRolloutSettings.cs @@ -32,7 +32,7 @@ public DateDrivenRolloutSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DateDrivenRolloutSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DateDrivenRolloutSettings(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeployableContent.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeployableContent.cs index f0ebe0664c5..2f68bf8f66b 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeployableContent.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeployableContent.cs @@ -52,7 +52,7 @@ public DeployableContent() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeployableContent CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Deployment.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Deployment.cs index 5f8fe68e3bd..5202d89aed6 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Deployment.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Deployment.cs @@ -95,7 +95,7 @@ public DateTimeOffset? LastModifiedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.Deployment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.Deployment(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("audience", Audience); writer.WriteObjectValue("content", Content); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentAudience.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentAudience.cs index 7f4845c6abe..5166eea1b5b 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentAudience.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentAudience.cs @@ -67,7 +67,7 @@ public partial class DeploymentAudience : global::Microsoft.Graph.Beta.Models.En /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentAudience CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentAudience(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("applicableContent", ApplicableContent); writer.WriteCollectionOfObjectValues("exclusions", Exclusions); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentAudienceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentAudienceCollectionResponse.cs index 72a081cea87..400a90f4d0c 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentAudienceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentAudienceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeploymentAudienceCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentAudienceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentAudienceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentCollectionResponse.cs index b7b9a06c7c8..d201eb8c0da 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class DeploymentCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentSettings.cs index 8411c1650ae..8c4aac6271e 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentSettings.cs @@ -132,7 +132,7 @@ public DeploymentSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentSettings(); } /// @@ -157,7 +157,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("contentApplicability", ContentApplicability); writer.WriteObjectValue("expedite", Expedite); writer.WriteObjectValue("monitoring", Monitoring); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentState.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentState.cs index 7d77a958493..1763e9ba523 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentState.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentState.cs @@ -80,7 +80,7 @@ public DeploymentState() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentState CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentState(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("effectiveValue", EffectiveValue); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("reasons", Reasons); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentStateReason.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentStateReason.cs index 164289d00fa..0102837a9c5 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentStateReason.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DeploymentStateReason.cs @@ -58,7 +58,7 @@ public DeploymentStateReason() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentStateReason CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DeploymentStateReason(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("value", Value); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DriverUpdateCatalogEntry.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DriverUpdateCatalogEntry.cs index 96cedfef8bd..00b80439763 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DriverUpdateCatalogEntry.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DriverUpdateCatalogEntry.cs @@ -128,7 +128,7 @@ public DriverUpdateCatalogEntry() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DriverUpdateCatalogEntry CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DriverUpdateCatalogEntry(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("driverClass", DriverClass); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DriverUpdateFilter.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DriverUpdateFilter.cs index dd0eef39b8b..9e046bab500 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DriverUpdateFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DriverUpdateFilter.cs @@ -26,7 +26,7 @@ public DriverUpdateFilter() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DriverUpdateFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DriverUpdateFilter(); } /// @@ -45,7 +45,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DurationDrivenRolloutSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DurationDrivenRolloutSettings.cs index 30f7469fa78..d5c82f7c592 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DurationDrivenRolloutSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/DurationDrivenRolloutSettings.cs @@ -32,7 +32,7 @@ public DurationDrivenRolloutSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DurationDrivenRolloutSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.DurationDrivenRolloutSettings(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteTimeSpanValue("durationUntilDeploymentEnd", DurationUntilDeploymentEnd); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Edition.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Edition.cs index 06118dd0875..dab03fb1e14 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Edition.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Edition.cs @@ -101,7 +101,7 @@ public string ReleasedName /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.Edition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.Edition(); } /// @@ -127,7 +127,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("deviceFamily", DeviceFamily); writer.WriteDateTimeOffsetValue("endOfServiceDateTime", EndOfServiceDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/EditionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/EditionCollectionResponse.cs index 0018869ecd5..fe3c0dba6b8 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/EditionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/EditionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class EditionCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.EditionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.EditionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ExpediteSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ExpediteSettings.cs index c434c880330..b0667c23ee7 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ExpediteSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ExpediteSettings.cs @@ -64,7 +64,7 @@ public ExpediteSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.ExpediteSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ExpediteSettings(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isExpedited", IsExpedited); writer.WriteBoolValue("isReadinessTest", IsReadinessTest); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/FeatureUpdateCatalogEntry.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/FeatureUpdateCatalogEntry.cs index 2d5c12905f4..3f8e69570cc 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/FeatureUpdateCatalogEntry.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/FeatureUpdateCatalogEntry.cs @@ -58,7 +58,7 @@ public FeatureUpdateCatalogEntry() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.FeatureUpdateCatalogEntry CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.FeatureUpdateCatalogEntry(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("buildNumber", BuildNumber); writer.WriteStringValue("version", Version); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/GradualRolloutSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/GradualRolloutSettings.cs index 8c1485d21b5..f7229a2172b 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/GradualRolloutSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/GradualRolloutSettings.cs @@ -58,7 +58,7 @@ public GradualRolloutSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.GradualRolloutSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteTimeSpanValue("durationBetweenOffers", DurationBetweenOffers); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ItemBody.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ItemBody.cs index 70fc74a0308..f1ad7cb00be 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ItemBody.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ItemBody.cs @@ -74,7 +74,7 @@ public ItemBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.ItemBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ItemBody(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("content", Content); writer.WriteEnumValue("contentType", ContentType); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnowledgeBaseArticle.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnowledgeBaseArticle.cs index cab401bc3e7..d3459a8b829 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnowledgeBaseArticle.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnowledgeBaseArticle.cs @@ -35,7 +35,7 @@ public string Url /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnowledgeBaseArticle CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnowledgeBaseArticle(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("url", Url); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnownIssue.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnownIssue.cs index 9a126ee51fe..330a404d3d4 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnownIssue.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnownIssue.cs @@ -155,7 +155,7 @@ public string WebViewUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnownIssue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnownIssue(); } /// @@ -185,7 +185,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteCollectionOfObjectValues("knownIssueHistories", KnownIssueHistories); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnownIssueCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnownIssueCollectionResponse.cs index 65787aa1b9b..4b51708d7d0 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnownIssueCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnownIssueCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class KnownIssueCollectionResponse : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnownIssueCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnownIssueCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnownIssueHistoryItem.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnownIssueHistoryItem.cs index a441840f12b..bfff46f7143 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnownIssueHistoryItem.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/KnownIssueHistoryItem.cs @@ -74,7 +74,7 @@ public KnownIssueHistoryItem() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnownIssueHistoryItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.KnownIssueHistoryItem(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("body", Body); writer.WriteDateTimeOffsetValue("createdDateTime", CreatedDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/MonitoringRule.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/MonitoringRule.cs index f6eb148d8d1..615ab13520a 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/MonitoringRule.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/MonitoringRule.cs @@ -70,7 +70,7 @@ public MonitoringRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.MonitoringRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.MonitoringRule(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("action", Action); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("signal", Signal); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/MonitoringSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/MonitoringSettings.cs index 588756b5c4f..0eb0647b5cf 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/MonitoringSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/MonitoringSettings.cs @@ -68,7 +68,7 @@ public MonitoringSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.MonitoringSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.MonitoringSettings(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("monitoringRules", MonitoringRules); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/OperationalInsightsConnection.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/OperationalInsightsConnection.cs index 62d848f081a..988267b0d09 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/OperationalInsightsConnection.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/OperationalInsightsConnection.cs @@ -74,7 +74,7 @@ public OperationalInsightsConnection() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.OperationalInsightsConnection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.OperationalInsightsConnection(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("azureResourceGroupName", AzureResourceGroupName); writer.WriteStringValue("azureSubscriptionId", AzureSubscriptionId); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Product.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Product.cs index b792367bfcb..9f4ea87f780 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Product.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/Product.cs @@ -115,7 +115,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.Product CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.Product(); } /// @@ -140,7 +140,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("editions", Editions); writer.WriteCollectionOfPrimitiveValues("friendlyNames", FriendlyNames); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ProductCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ProductCollectionResponse.cs index 704bb3a6ee8..a6caee01765 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ProductCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ProductCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProductCollectionResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ProductCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ProductCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ProductRevision.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ProductRevision.cs index 533ebc57e34..952a82f5278 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ProductRevision.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ProductRevision.cs @@ -127,7 +127,7 @@ public string Version /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ProductRevision CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ProductRevision(); } /// @@ -154,7 +154,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("catalogEntry", CatalogEntry); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ProductRevisionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ProductRevisionCollectionResponse.cs index f86e7bdbc69..2ef79d0b281 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ProductRevisionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ProductRevisionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ProductRevisionCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ProductRevisionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ProductRevisionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/QualityUpdateCatalogEntry.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/QualityUpdateCatalogEntry.cs index 895027cb1a5..95af77aa4a6 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/QualityUpdateCatalogEntry.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/QualityUpdateCatalogEntry.cs @@ -108,7 +108,7 @@ public QualityUpdateCatalogEntry() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.QualityUpdateCatalogEntry CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.QualityUpdateCatalogEntry(); } /// @@ -134,7 +134,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("catalogName", CatalogName); writer.WriteObjectValue("cveSeverityInformation", CveSeverityInformation); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/QualityUpdateCveSeverityInformation.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/QualityUpdateCveSeverityInformation.cs index 2adf24348f8..e6b2ab5896a 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/QualityUpdateCveSeverityInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/QualityUpdateCveSeverityInformation.cs @@ -80,7 +80,7 @@ public QualityUpdateCveSeverityInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.QualityUpdateCveSeverityInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.QualityUpdateCveSeverityInformation(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("exploitedCves", ExploitedCves); writer.WriteDoubleValue("maxBaseScore", MaxBaseScore); writer.WriteEnumValue("maxSeverity", MaxSeverity); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/QualityUpdateFilter.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/QualityUpdateFilter.cs index f6d78b4ebfa..c2705154e41 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/QualityUpdateFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/QualityUpdateFilter.cs @@ -38,7 +38,7 @@ public QualityUpdateFilter() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.QualityUpdateFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.QualityUpdateFilter(); } /// @@ -59,7 +59,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("cadence", Cadence); writer.WriteEnumValue("classification", Classification); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/RateDrivenRolloutSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/RateDrivenRolloutSettings.cs index 026fc669efa..92e4f11553c 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/RateDrivenRolloutSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/RateDrivenRolloutSettings.cs @@ -32,7 +32,7 @@ public RateDrivenRolloutSettings() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.RateDrivenRolloutSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.RateDrivenRolloutSettings(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("devicesPerOffer", DevicesPerOffer); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/RemediationUpdateFilter.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/RemediationUpdateFilter.cs index 25c3ef19147..b8d6d122981 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/RemediationUpdateFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/RemediationUpdateFilter.cs @@ -32,7 +32,7 @@ public RemediationUpdateFilter() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.RemediationUpdateFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.RemediationUpdateFilter(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("remediationType", RemediationType); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ResourceConnection.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ResourceConnection.cs index 1d688ab2268..0e2a2d3ece4 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ResourceConnection.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ResourceConnection.cs @@ -25,7 +25,7 @@ public partial class ResourceConnection : global::Microsoft.Graph.Beta.Models.En /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ResourceConnection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -50,7 +50,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("state", State); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ResourceConnectionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ResourceConnectionCollectionResponse.cs index 165b12537c6..3ed802b4a00 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ResourceConnectionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ResourceConnectionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ResourceConnectionCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ResourceConnectionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ResourceConnectionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SafeguardProfile.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SafeguardProfile.cs index 5c11431dcd7..3366c1b96d3 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SafeguardProfile.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SafeguardProfile.cs @@ -58,7 +58,7 @@ public SafeguardProfile() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.SafeguardProfile CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.SafeguardProfile(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("category", Category); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SafeguardSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SafeguardSettings.cs index 2d463fbd591..5d7ac82f5a0 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SafeguardSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SafeguardSettings.cs @@ -68,7 +68,7 @@ public SafeguardSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.SafeguardSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.SafeguardSettings(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("disabledSafeguardProfiles", DisabledSafeguardProfiles); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ScheduleSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ScheduleSettings.cs index 9e38e90bc77..f710d896ac0 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ScheduleSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ScheduleSettings.cs @@ -74,7 +74,7 @@ public ScheduleSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.ScheduleSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ScheduleSettings(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("gradualRollout", GradualRollout); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ServicingPeriod.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ServicingPeriod.cs index 89ad2d66681..ac8eb2a1ce4 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ServicingPeriod.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/ServicingPeriod.cs @@ -80,7 +80,7 @@ public ServicingPeriod() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.ServicingPeriod CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.ServicingPeriod(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("endDateTime", EndDateTime); writer.WriteStringValue("name", Name); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SoftwareUpdateCatalogEntry.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SoftwareUpdateCatalogEntry.cs index c0c06dec47a..2c02b4c5a3e 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SoftwareUpdateCatalogEntry.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SoftwareUpdateCatalogEntry.cs @@ -26,7 +26,7 @@ public SoftwareUpdateCatalogEntry() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.SoftwareUpdateCatalogEntry CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SoftwareUpdateFilter.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SoftwareUpdateFilter.cs index 0c2f039f806..50928c52485 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SoftwareUpdateFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/SoftwareUpdateFilter.cs @@ -26,7 +26,7 @@ public SoftwareUpdateFilter() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.SoftwareUpdateFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -53,7 +53,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAsset.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAsset.cs index 528ddbb26f4..a4d40670c3c 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAsset.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAsset.cs @@ -19,7 +19,7 @@ public partial class UpdatableAsset : global::Microsoft.Graph.Beta.Models.Entity /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAsset CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -44,7 +44,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAssetCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAssetCollectionResponse.cs index 7bd58d5d548..d3837887291 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAssetCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAssetCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UpdatableAssetCollectionResponse : global::Microsoft.Graph. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAssetCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAssetCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAssetError.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAssetError.cs index 7c2f5ea8596..a7d91c1d425 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAssetError.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAssetError.cs @@ -52,7 +52,7 @@ public UpdatableAssetError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAssetError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -77,7 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAssetGroup.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAssetGroup.cs index 2656acedcb0..02ef63f26c4 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAssetGroup.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatableAssetGroup.cs @@ -42,7 +42,7 @@ public UpdatableAssetGroup() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAssetGroup CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatableAssetGroup(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("members", Members); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdateCategoryEnrollmentInformation.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdateCategoryEnrollmentInformation.cs index 9b5a58d8050..56f7e7c648b 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdateCategoryEnrollmentInformation.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdateCategoryEnrollmentInformation.cs @@ -64,7 +64,7 @@ public UpdateCategoryEnrollmentInformation() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdateCategoryEnrollmentInformation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdateCategoryEnrollmentInformation(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("enrollmentState", EnrollmentState); writer.WriteDateTimeOffsetValue("lastModifiedDateTime", LastModifiedDateTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdateManagementEnrollment.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdateManagementEnrollment.cs index 902dd0d1e02..cad5ea9457c 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdateManagementEnrollment.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdateManagementEnrollment.cs @@ -100,7 +100,7 @@ public UpdateManagementEnrollment() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdateManagementEnrollment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdateManagementEnrollment(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("driver", Driver); writer.WriteObjectValue("feature", Feature); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatePolicy.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatePolicy.cs index a03e659e523..c4bd36c1668 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatePolicy.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatePolicy.cs @@ -89,7 +89,7 @@ public DateTimeOffset? CreatedDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatePolicy CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatePolicy(); } /// @@ -113,7 +113,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("audience", Audience); writer.WriteCollectionOfObjectValues("complianceChangeRules", ComplianceChangeRules); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatePolicyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatePolicyCollectionResponse.cs index f1e7d42027f..fe0d3f7e21b 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatePolicyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UpdatePolicyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class UpdatePolicyCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatePolicyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.UpdatePolicyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UserExperienceSettings.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UserExperienceSettings.cs index 120403b9ca0..bd286c3646a 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UserExperienceSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/UserExperienceSettings.cs @@ -70,7 +70,7 @@ public UserExperienceSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WindowsUpdates.UserExperienceSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsUpdates.UserExperienceSettings(); } /// @@ -93,7 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("daysUntilForcedReboot", DaysUntilForcedReboot); writer.WriteBoolValue("isHotpatchEnabled", IsHotpatchEnabled); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/WindowsUpdateFilter.cs b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/WindowsUpdateFilter.cs index e73340508b1..42a22edbf78 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsUpdates/WindowsUpdateFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsUpdates/WindowsUpdateFilter.cs @@ -26,7 +26,7 @@ public WindowsUpdateFilter() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsUpdates.WindowsUpdateFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsVpnConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsVpnConfiguration.cs index 2cbc7c3e6e1..be8147e618f 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsVpnConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsVpnConfiguration.cs @@ -75,7 +75,7 @@ public WindowsVpnConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsVpnConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -104,7 +104,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("connectionName", ConnectionName); writer.WriteByteArrayValue("customXml", CustomXml); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsWebApp.cs b/src/Microsoft.Graph/Generated/Models/WindowsWebApp.cs index ad9bb66ee91..23f1d5681cd 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsWebApp.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsWebApp.cs @@ -43,7 +43,7 @@ public WindowsWebApp() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsWebApp CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsWebApp(); } /// @@ -63,7 +63,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("appUrl", AppUrl); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsWebAppCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WindowsWebAppCollectionResponse.cs index 58ef8aba7a9..2cea8db1ddc 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsWebAppCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsWebAppCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WindowsWebAppCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsWebAppCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsWebAppCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WindowsWifiConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsWifiConfiguration.cs index aa0e2cc114f..313ad166a23 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsWifiConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsWifiConfiguration.cs @@ -155,7 +155,7 @@ public WindowsWifiConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsWifiConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -192,7 +192,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("connectAutomatically", ConnectAutomatically); writer.WriteBoolValue("connectToPreferredNetwork", ConnectToPreferredNetwork); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsWifiEnterpriseEAPConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsWifiEnterpriseEAPConfiguration.cs index 5b821d43aa7..ac69ff81832 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsWifiEnterpriseEAPConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsWifiEnterpriseEAPConfiguration.cs @@ -239,7 +239,7 @@ public WindowsWifiEnterpriseEAPConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsWifiEnterpriseEAPConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsWifiEnterpriseEAPConfiguration(); } /// @@ -285,7 +285,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); writer.WriteIntValue("authenticationPeriodInSeconds", AuthenticationPeriodInSeconds); diff --git a/src/Microsoft.Graph/Generated/Models/WindowsWiredNetworkConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WindowsWiredNetworkConfiguration.cs index 3d4e1ce776a..069559d130f 100644 --- a/src/Microsoft.Graph/Generated/Models/WindowsWiredNetworkConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WindowsWiredNetworkConfiguration.cs @@ -241,7 +241,7 @@ public WindowsWiredNetworkConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WindowsWiredNetworkConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WindowsWiredNetworkConfiguration(); } /// @@ -284,7 +284,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("authenticationBlockPeriodInMinutes", AuthenticationBlockPeriodInMinutes); writer.WriteEnumValue("authenticationMethod", AuthenticationMethod); diff --git a/src/Microsoft.Graph/Generated/Models/WorkPosition.cs b/src/Microsoft.Graph/Generated/Models/WorkPosition.cs index fd678fcfc70..5d1c47b6d6c 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkPosition.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkPosition.cs @@ -96,7 +96,7 @@ public WorkPosition() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkPosition CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkPosition(); } /// @@ -120,7 +120,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("categories", Categories); writer.WriteCollectionOfObjectValues("colleagues", Colleagues); diff --git a/src/Microsoft.Graph/Generated/Models/WorkPositionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkPositionCollectionResponse.cs index 3f0067da756..41820d8391c 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkPositionCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkPositionCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkPositionCollectionResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkPositionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkPositionCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/Workbook.cs b/src/Microsoft.Graph/Generated/Models/Workbook.cs index 2a123012109..7ed4714d5d5 100644 --- a/src/Microsoft.Graph/Generated/Models/Workbook.cs +++ b/src/Microsoft.Graph/Generated/Models/Workbook.cs @@ -131,7 +131,7 @@ public partial class Workbook : global::Microsoft.Graph.Beta.Models.Entity, IPar /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Workbook CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Workbook(); } /// @@ -157,7 +157,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("application", Application); writer.WriteCollectionOfObjectValues("comments", Comments); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookApplication.cs b/src/Microsoft.Graph/Generated/Models/WorkbookApplication.cs index 9e8bd03ee53..30f6d3d695e 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookApplication.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookApplication.cs @@ -35,7 +35,7 @@ public string CalculationMode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookApplication CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookApplication(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("calculationMode", CalculationMode); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChart.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChart.cs index 9672badf667..7dfe8c32738 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChart.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChart.cs @@ -171,7 +171,7 @@ public double? Width /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChart CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChart(); } /// @@ -202,7 +202,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("axes", Axes); writer.WriteObjectValue("dataLabels", DataLabels); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartAreaFormat.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartAreaFormat.cs index eea0f3a5d02..83e5ced3b74 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartAreaFormat.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartAreaFormat.cs @@ -51,7 +51,7 @@ public partial class WorkbookChartAreaFormat : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartAreaFormat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartAreaFormat(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("fill", Fill); writer.WriteObjectValue("font", Font); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartAxes.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartAxes.cs index d6825df6a49..93a02dd82dc 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartAxes.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartAxes.cs @@ -67,7 +67,7 @@ public partial class WorkbookChartAxes : global::Microsoft.Graph.Beta.Models.Ent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartAxes CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartAxes(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("categoryAxis", CategoryAxis); writer.WriteObjectValue("seriesAxis", SeriesAxis); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartAxis.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartAxis.cs index 4043a5fefe1..579fcfe7774 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartAxis.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartAxis.cs @@ -147,7 +147,7 @@ public UntypedNode MinorUnit /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartAxis CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartAxis(); } /// @@ -174,7 +174,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("format", Format); writer.WriteObjectValue("majorGridlines", MajorGridlines); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartAxisFormat.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartAxisFormat.cs index 90e56ced9b2..dde221e750d 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartAxisFormat.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartAxisFormat.cs @@ -51,7 +51,7 @@ public partial class WorkbookChartAxisFormat : global::Microsoft.Graph.Beta.Mode /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartAxisFormat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartAxisFormat(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("font", Font); writer.WriteObjectValue("line", Line); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartAxisTitle.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartAxisTitle.cs index 9dd019b18fd..c8c34174f34 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartAxisTitle.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartAxisTitle.cs @@ -57,7 +57,7 @@ public bool? Visible /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitle CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitle(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("format", Format); writer.WriteStringValue("text", Text); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartAxisTitleFormat.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartAxisTitleFormat.cs index 74f44710e20..807dd932966 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartAxisTitleFormat.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartAxisTitleFormat.cs @@ -35,7 +35,7 @@ public partial class WorkbookChartAxisTitleFormat : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitleFormat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartAxisTitleFormat(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("font", Font); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartCollectionResponse.cs index 919566a8b98..e453b7a3d4c 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkbookChartCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartDataLabelFormat.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartDataLabelFormat.cs index c593e16d088..2137be4eca4 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartDataLabelFormat.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartDataLabelFormat.cs @@ -51,7 +51,7 @@ public partial class WorkbookChartDataLabelFormat : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartDataLabelFormat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartDataLabelFormat(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("fill", Fill); writer.WriteObjectValue("font", Font); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartDataLabels.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartDataLabels.cs index d013a40257f..ee352c46771 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartDataLabels.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartDataLabels.cs @@ -103,7 +103,7 @@ public bool? ShowValue /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartDataLabels CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartDataLabels(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("format", Format); writer.WriteStringValue("position", Position); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartFill.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartFill.cs index 826d0dfb100..9093e982fa9 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartFill.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartFill.cs @@ -19,7 +19,7 @@ public partial class WorkbookChartFill : global::Microsoft.Graph.Beta.Models.Ent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartFill CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartFill(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartFont.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartFont.cs index a9dabdf84f1..c975d6ead10 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartFont.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartFont.cs @@ -85,7 +85,7 @@ public string Underline /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartFont CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartFont(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("bold", Bold); writer.WriteStringValue("color", Color); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartGridlines.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartGridlines.cs index 123141b0842..cc063c24291 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartGridlines.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartGridlines.cs @@ -41,7 +41,7 @@ public bool? Visible /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartGridlines CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartGridlines(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("format", Format); writer.WriteBoolValue("visible", Visible); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartGridlinesFormat.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartGridlinesFormat.cs index 569bcaa6b7e..642e8c2ca68 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartGridlinesFormat.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartGridlinesFormat.cs @@ -35,7 +35,7 @@ public partial class WorkbookChartGridlinesFormat : global::Microsoft.Graph.Beta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartGridlinesFormat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartGridlinesFormat(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("line", Line); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartLegend.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartLegend.cs index 5b1972f476c..7bafd97672a 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartLegend.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartLegend.cs @@ -63,7 +63,7 @@ public bool? Visible /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartLegend CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartLegend(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("format", Format); writer.WriteBoolValue("overlay", Overlay); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartLegendFormat.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartLegendFormat.cs index 8d6c68c8613..de2d9c7db27 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartLegendFormat.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartLegendFormat.cs @@ -51,7 +51,7 @@ public partial class WorkbookChartLegendFormat : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartLegendFormat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartLegendFormat(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("fill", Fill); writer.WriteObjectValue("font", Font); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartLineFormat.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartLineFormat.cs index cd167cf639a..d7235546086 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartLineFormat.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartLineFormat.cs @@ -35,7 +35,7 @@ public string Color /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartLineFormat(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("color", Color); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartPoint.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartPoint.cs index 53e1b2a565d..7fb91859c96 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartPoint.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartPoint.cs @@ -51,7 +51,7 @@ public UntypedNode Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartPoint CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartPoint(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("format", Format); writer.WriteObjectValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartPointCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartPointCollectionResponse.cs index 29b7a1bfe65..67b3369e680 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartPointCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartPointCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkbookChartPointCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartPointCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartPointCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartPointFormat.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartPointFormat.cs index 2eea0a40bb2..c65484b04ac 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartPointFormat.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartPointFormat.cs @@ -35,7 +35,7 @@ public partial class WorkbookChartPointFormat : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartPointFormat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartPointFormat(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("fill", Fill); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartSeries.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartSeries.cs index 80ec7599b1d..56c9da8bb40 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartSeries.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartSeries.cs @@ -67,7 +67,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartSeries CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartSeries(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("format", Format); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartSeriesCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartSeriesCollectionResponse.cs index 8bb0db1153e..c804c8bb82c 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartSeriesCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartSeriesCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkbookChartSeriesCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartSeriesCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartSeriesCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartSeriesFormat.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartSeriesFormat.cs index 1d254034359..d24cac728b9 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartSeriesFormat.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartSeriesFormat.cs @@ -51,7 +51,7 @@ public partial class WorkbookChartSeriesFormat : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartSeriesFormat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartSeriesFormat(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("fill", Fill); writer.WriteObjectValue("line", Line); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartTitle.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartTitle.cs index 2a79a7a81fd..c2a90b8265d 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartTitle.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartTitle.cs @@ -63,7 +63,7 @@ public bool? Visible /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartTitle CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartTitle(); } /// @@ -86,7 +86,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("format", Format); writer.WriteBoolValue("overlay", Overlay); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookChartTitleFormat.cs b/src/Microsoft.Graph/Generated/Models/WorkbookChartTitleFormat.cs index 36bd12dbc19..800f30450e5 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookChartTitleFormat.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookChartTitleFormat.cs @@ -51,7 +51,7 @@ public partial class WorkbookChartTitleFormat : global::Microsoft.Graph.Beta.Mod /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookChartTitleFormat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookChartTitleFormat(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("fill", Fill); writer.WriteObjectValue("font", Font); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookComment.cs b/src/Microsoft.Graph/Generated/Models/WorkbookComment.cs index 447a389faf6..731db8e74dc 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookComment.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookComment.cs @@ -83,7 +83,7 @@ public string ContentType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookComment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookComment(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("content", Content); writer.WriteStringValue("contentType", ContentType); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookCommentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkbookCommentCollectionResponse.cs index 1fae4ef50c2..9454e758c1c 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookCommentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookCommentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkbookCommentCollectionResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookCommentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookCommentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookCommentReply.cs b/src/Microsoft.Graph/Generated/Models/WorkbookCommentReply.cs index d33e33193a8..6cb5acd11d7 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookCommentReply.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookCommentReply.cs @@ -67,7 +67,7 @@ public string ContentType /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookCommentReply CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookCommentReply(); } /// @@ -89,7 +89,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("content", Content); writer.WriteStringValue("contentType", ContentType); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookCommentReplyCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkbookCommentReplyCollectionResponse.cs index d5f6489b87a..aa001dddfca 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookCommentReplyCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookCommentReplyCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkbookCommentReplyCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookCommentReplyCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookCommentReplyCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTask.cs b/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTask.cs index 7bd34abb7ca..aa1af37d006 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTask.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTask.cs @@ -155,7 +155,7 @@ public string Title /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookDocumentTask(); } /// @@ -185,7 +185,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("assignees", Assignees); writer.WriteCollectionOfObjectValues("changes", Changes); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskChange.cs b/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskChange.cs index cda00350113..662a261ce3b 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskChange.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskChange.cs @@ -145,7 +145,7 @@ public string UndoChangeId /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChange(); } /// @@ -175,7 +175,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("assignee", Assignee); writer.WriteObjectValue("changedBy", ChangedBy); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskChangeCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskChangeCollectionResponse.cs index d005669c903..c09342ae3d1 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskChangeCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskChangeCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkbookDocumentTaskChangeCollectionResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChangeCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskChangeCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskCollectionResponse.cs index 713614f1112..c940b86b51d 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkbookDocumentTaskCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskSchedule.cs b/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskSchedule.cs index 2e7b32e2b78..cfd3accfc76 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookDocumentTaskSchedule.cs @@ -64,7 +64,7 @@ public WorkbookDocumentTaskSchedule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookDocumentTaskSchedule(); } /// @@ -86,7 +86,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("dueDateTime", DueDateTime); writer.WriteStringValue("@odata.type", OdataType); writer.WriteDateTimeOffsetValue("startDateTime", StartDateTime); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookEmailIdentity.cs b/src/Microsoft.Graph/Generated/Models/WorkbookEmailIdentity.cs index 0024b780f26..b846b833342 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookEmailIdentity.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookEmailIdentity.cs @@ -100,7 +100,7 @@ public WorkbookEmailIdentity() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WorkbookEmailIdentity CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookEmailIdentity(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("email", Email); writer.WriteStringValue("id", Id); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookFilter.cs b/src/Microsoft.Graph/Generated/Models/WorkbookFilter.cs index 2f9356bf84d..8936d10b6ff 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookFilter.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookFilter.cs @@ -35,7 +35,7 @@ public partial class WorkbookFilter : global::Microsoft.Graph.Beta.Models.Entity /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookFilter CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookFilter(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("criteria", Criteria); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookFilterCriteria.cs b/src/Microsoft.Graph/Generated/Models/WorkbookFilterCriteria.cs index 0d023066bcf..616479d1cc9 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookFilterCriteria.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookFilterCriteria.cs @@ -180,7 +180,7 @@ public WorkbookFilterCriteria() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WorkbookFilterCriteria CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookFilterCriteria(); } /// @@ -208,7 +208,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("color", Color); writer.WriteStringValue("criterion1", Criterion1); writer.WriteStringValue("criterion2", Criterion2); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookFormatProtection.cs b/src/Microsoft.Graph/Generated/Models/WorkbookFormatProtection.cs index 85f28b5885f..96f464c87f9 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookFormatProtection.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookFormatProtection.cs @@ -31,7 +31,7 @@ public bool? Locked /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookFormatProtection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookFormatProtection(); } /// @@ -52,7 +52,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("formulaHidden", FormulaHidden); writer.WriteBoolValue("locked", Locked); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookFunctionResult.cs b/src/Microsoft.Graph/Generated/Models/WorkbookFunctionResult.cs index 7ee7356278a..ec0e63b114b 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookFunctionResult.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookFunctionResult.cs @@ -51,7 +51,7 @@ public UntypedNode Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookFunctionResult CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookFunctionResult(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("error", Error); writer.WriteObjectValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookFunctions.cs b/src/Microsoft.Graph/Generated/Models/WorkbookFunctions.cs index c390ee31edb..fb6ae66e19a 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookFunctions.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookFunctions.cs @@ -19,7 +19,7 @@ public partial class WorkbookFunctions : global::Microsoft.Graph.Beta.Models.Ent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookFunctions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookFunctions(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookIcon.cs b/src/Microsoft.Graph/Generated/Models/WorkbookIcon.cs index d001e85759a..97188cb52f5 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookIcon.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookIcon.cs @@ -74,7 +74,7 @@ public WorkbookIcon() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WorkbookIcon CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookIcon(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("index", Index); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("set", Set); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookNamedItem.cs b/src/Microsoft.Graph/Generated/Models/WorkbookNamedItem.cs index 1818c324d07..46acb8c365c 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookNamedItem.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookNamedItem.cs @@ -121,7 +121,7 @@ public bool? Visible /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookNamedItem CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookNamedItem(); } /// @@ -147,7 +147,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("comment", Comment); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookNamedItemCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkbookNamedItemCollectionResponse.cs index 4a81beaf31d..f9d16b4e27e 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookNamedItemCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookNamedItemCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkbookNamedItemCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookNamedItemCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookNamedItemCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookOperation.cs b/src/Microsoft.Graph/Generated/Models/WorkbookOperation.cs index 1addad8eba2..6b6c0bd38d7 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookOperation.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookOperation.cs @@ -57,7 +57,7 @@ public string ResourceLocation /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookOperation CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookOperation(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("error", Error); writer.WriteStringValue("resourceLocation", ResourceLocation); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookOperationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkbookOperationCollectionResponse.cs index d81af926867..349c5d4acac 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookOperationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookOperationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkbookOperationCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookOperationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookOperationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookOperationError.cs b/src/Microsoft.Graph/Generated/Models/WorkbookOperationError.cs index 7cad0e1dbc2..c464f66e422 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookOperationError.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookOperationError.cs @@ -100,7 +100,7 @@ public WorkbookOperationError() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WorkbookOperationError CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookOperationError(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("code", Code); writer.WriteObjectValue("innerError", InnerError); writer.WriteStringValue("message", Message); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookPivotTable.cs b/src/Microsoft.Graph/Generated/Models/WorkbookPivotTable.cs index 3d166104a0e..a4f47e4facf 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookPivotTable.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookPivotTable.cs @@ -51,7 +51,7 @@ public string Name /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookPivotTable CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookPivotTable(); } /// @@ -72,7 +72,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("name", Name); writer.WriteObjectValue("worksheet", Worksheet); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookPivotTableCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkbookPivotTableCollectionResponse.cs index 879005882e6..e956ea3bc37 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookPivotTableCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookPivotTableCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkbookPivotTableCollectionResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookPivotTableCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookPivotTableCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookRange.cs b/src/Microsoft.Graph/Generated/Models/WorkbookRange.cs index 189b8772fc9..5e745ccb6d5 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookRange.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookRange.cs @@ -259,7 +259,7 @@ public UntypedNode ValueTypes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookRange CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookRange(); } /// @@ -298,7 +298,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("address", Address); writer.WriteStringValue("addressLocal", AddressLocal); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookRangeBorder.cs b/src/Microsoft.Graph/Generated/Models/WorkbookRangeBorder.cs index 4bac6423da6..dccf172bcfb 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookRangeBorder.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookRangeBorder.cs @@ -83,7 +83,7 @@ public string Weight /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookRangeBorder CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookRangeBorder(); } /// @@ -106,7 +106,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("color", Color); writer.WriteStringValue("sideIndex", SideIndex); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookRangeFill.cs b/src/Microsoft.Graph/Generated/Models/WorkbookRangeFill.cs index e419bef3938..ac93fcf6424 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookRangeFill.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookRangeFill.cs @@ -35,7 +35,7 @@ public string Color /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookRangeFill CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookRangeFill(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("color", Color); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookRangeFont.cs b/src/Microsoft.Graph/Generated/Models/WorkbookRangeFont.cs index c9eee1071c1..4e87e69c9b2 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookRangeFont.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookRangeFont.cs @@ -85,7 +85,7 @@ public string Underline /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookRangeFont CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookRangeFont(); } /// @@ -110,7 +110,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteBoolValue("bold", Bold); writer.WriteStringValue("color", Color); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookRangeFormat.cs b/src/Microsoft.Graph/Generated/Models/WorkbookRangeFormat.cs index c146ebc4be3..45f0ccce3a0 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookRangeFormat.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookRangeFormat.cs @@ -133,7 +133,7 @@ public bool? WrapText /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookRangeFormat(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("borders", Borders); writer.WriteDoubleValue("columnWidth", ColumnWidth); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookRangeSort.cs b/src/Microsoft.Graph/Generated/Models/WorkbookRangeSort.cs index 473604be6a8..e51bf0f3a4a 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookRangeSort.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookRangeSort.cs @@ -19,7 +19,7 @@ public partial class WorkbookRangeSort : global::Microsoft.Graph.Beta.Models.Ent /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookRangeSort CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookRangeSort(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookRangeView.cs b/src/Microsoft.Graph/Generated/Models/WorkbookRangeView.cs index 18a98898ba6..e075d956224 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookRangeView.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookRangeView.cs @@ -181,7 +181,7 @@ public UntypedNode ValueTypes /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookRangeView CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookRangeView(); } /// @@ -212,7 +212,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("cellAddresses", CellAddresses); writer.WriteIntValue("columnCount", ColumnCount); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookSessionInfo.cs b/src/Microsoft.Graph/Generated/Models/WorkbookSessionInfo.cs index 1d6464f3816..4cacae92ede 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookSessionInfo.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookSessionInfo.cs @@ -74,7 +74,7 @@ public WorkbookSessionInfo() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WorkbookSessionInfo CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookSessionInfo(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("id", Id); writer.WriteStringValue("@odata.type", OdataType); writer.WriteBoolValue("persistChanges", PersistChanges); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookSortField.cs b/src/Microsoft.Graph/Generated/Models/WorkbookSortField.cs index fdf64106efd..77625eb3e54 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookSortField.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookSortField.cs @@ -128,7 +128,7 @@ public WorkbookSortField() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WorkbookSortField CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookSortField(); } /// @@ -154,7 +154,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("ascending", Ascending); writer.WriteStringValue("color", Color); writer.WriteStringValue("dataOption", DataOption); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookTable.cs b/src/Microsoft.Graph/Generated/Models/WorkbookTable.cs index a22c262a363..3fa034eee93 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookTable.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookTable.cs @@ -173,7 +173,7 @@ public string Style /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookTable CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookTable(); } /// @@ -206,7 +206,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("columns", Columns); writer.WriteBoolValue("highlightFirstColumn", HighlightFirstColumn); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookTableCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkbookTableCollectionResponse.cs index d1db9ae65e1..9906bb4cc1c 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookTableCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookTableCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkbookTableCollectionResponse : global::Microsoft.Graph.B /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookTableCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookTableCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookTableColumn.cs b/src/Microsoft.Graph/Generated/Models/WorkbookTableColumn.cs index 9aa4332d94c..92269967563 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookTableColumn.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookTableColumn.cs @@ -73,7 +73,7 @@ public UntypedNode Values /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookTableColumn CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookTableColumn(); } /// @@ -96,7 +96,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("filter", Filter); writer.WriteIntValue("index", Index); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookTableColumnCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkbookTableColumnCollectionResponse.cs index d852cecdb7b..2a7d3df90a9 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookTableColumnCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookTableColumnCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkbookTableColumnCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookTableColumnCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookTableColumnCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookTableRow.cs b/src/Microsoft.Graph/Generated/Models/WorkbookTableRow.cs index a28f9637152..f91e9480582 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookTableRow.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookTableRow.cs @@ -41,7 +41,7 @@ public UntypedNode Values /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookTableRow CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookTableRow(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("index", Index); writer.WriteObjectValue("values", Values); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookTableRowCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkbookTableRowCollectionResponse.cs index ec11f65c07b..a0d94277595 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookTableRowCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookTableRowCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkbookTableRowCollectionResponse : global::Microsoft.Grap /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookTableRowCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookTableRowCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookTableSort.cs b/src/Microsoft.Graph/Generated/Models/WorkbookTableSort.cs index f3d500a1dff..0e576a0fd0b 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookTableSort.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookTableSort.cs @@ -57,7 +57,7 @@ public string Method /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookTableSort CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookTableSort(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("fields", Fields); writer.WriteBoolValue("matchCase", MatchCase); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookWorksheet.cs b/src/Microsoft.Graph/Generated/Models/WorkbookWorksheet.cs index 678e44a644e..42f3784bf29 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookWorksheet.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookWorksheet.cs @@ -153,7 +153,7 @@ public string Visibility /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookWorksheet CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookWorksheet(); } /// @@ -181,7 +181,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("charts", Charts); writer.WriteStringValue("name", Name); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookWorksheetCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkbookWorksheetCollectionResponse.cs index 4cf1c6a8387..c6897d7dcb3 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookWorksheetCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookWorksheetCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkbookWorksheetCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookWorksheetCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookWorksheetCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookWorksheetProtection.cs b/src/Microsoft.Graph/Generated/Models/WorkbookWorksheetProtection.cs index d4542dab43b..8c3754a7787 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookWorksheetProtection.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookWorksheetProtection.cs @@ -41,7 +41,7 @@ public bool? Protected /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkbookWorksheetProtection CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookWorksheetProtection(); } /// @@ -62,7 +62,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("options", Options); writer.WriteBoolValue("protected", Protected); diff --git a/src/Microsoft.Graph/Generated/Models/WorkbookWorksheetProtectionOptions.cs b/src/Microsoft.Graph/Generated/Models/WorkbookWorksheetProtectionOptions.cs index 30fb4eb9f54..8728892adc4 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkbookWorksheetProtectionOptions.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkbookWorksheetProtectionOptions.cs @@ -118,7 +118,7 @@ public WorkbookWorksheetProtectionOptions() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WorkbookWorksheetProtectionOptions CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkbookWorksheetProtectionOptions(); } /// @@ -149,7 +149,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowAutoFilter", AllowAutoFilter); writer.WriteBoolValue("allowDeleteColumns", AllowDeleteColumns); writer.WriteBoolValue("allowDeleteRows", AllowDeleteRows); diff --git a/src/Microsoft.Graph/Generated/Models/WorkforceIntegration.cs b/src/Microsoft.Graph/Generated/Models/WorkforceIntegration.cs index a2315b1323e..a8ba60ec8c0 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkforceIntegration.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkforceIntegration.cs @@ -104,7 +104,7 @@ public WorkforceIntegration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkforceIntegration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkforceIntegration(); } /// @@ -131,7 +131,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteIntValue("apiVersion", ApiVersion); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Models/WorkforceIntegrationCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkforceIntegrationCollectionResponse.cs index db491424297..8e32f9f7dbd 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkforceIntegrationCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkforceIntegrationCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkforceIntegrationCollectionResponse : global::Microsoft. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkforceIntegrationCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkforceIntegrationCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkforceIntegrationEncryption.cs b/src/Microsoft.Graph/Generated/Models/WorkforceIntegrationEncryption.cs index 9d7a5bc4429..eb282eded70 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkforceIntegrationEncryption.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkforceIntegrationEncryption.cs @@ -74,7 +74,7 @@ public WorkforceIntegrationEncryption() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WorkforceIntegrationEncryption CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkforceIntegrationEncryption(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("protocol", Protocol); writer.WriteStringValue("secret", Secret); diff --git a/src/Microsoft.Graph/Generated/Models/WorkingHours.cs b/src/Microsoft.Graph/Generated/Models/WorkingHours.cs index 5cc2b90ed7c..fa9ccd8ba1b 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkingHours.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkingHours.cs @@ -97,7 +97,7 @@ public WorkingHours() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WorkingHours CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkingHours(); } /// @@ -121,7 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfEnumValues("daysOfWeek", DaysOfWeek); writer.WriteTimeValue("endTime", EndTime); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/WorkingTimeSchedule.cs b/src/Microsoft.Graph/Generated/Models/WorkingTimeSchedule.cs index 20777275757..87e9dc4f894 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkingTimeSchedule.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkingTimeSchedule.cs @@ -19,7 +19,7 @@ public partial class WorkingTimeSchedule : global::Microsoft.Graph.Beta.Models.E /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkingTimeSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkingTimeSchedule(); } /// @@ -38,7 +38,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); } } diff --git a/src/Microsoft.Graph/Generated/Models/Workplace.cs b/src/Microsoft.Graph/Generated/Models/Workplace.cs index d4b31a7395a..dcb27cf2790 100644 --- a/src/Microsoft.Graph/Generated/Models/Workplace.cs +++ b/src/Microsoft.Graph/Generated/Models/Workplace.cs @@ -68,7 +68,7 @@ public Workplace() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.Workplace CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Workplace(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("sensorDevices", SensorDevices); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/WorkplaceSensor.cs b/src/Microsoft.Graph/Generated/Models/WorkplaceSensor.cs index 71fb5bd2061..0a0ffe9fb82 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkplaceSensor.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkplaceSensor.cs @@ -106,7 +106,7 @@ public WorkplaceSensor() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WorkplaceSensor CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkplaceSensor(); } /// @@ -130,7 +130,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("placeId", PlaceId); diff --git a/src/Microsoft.Graph/Generated/Models/WorkplaceSensorDevice.cs b/src/Microsoft.Graph/Generated/Models/WorkplaceSensorDevice.cs index 33a11423ec3..ac0cbc96cba 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkplaceSensorDevice.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkplaceSensorDevice.cs @@ -179,7 +179,7 @@ public List Tags /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkplaceSensorDevice CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkplaceSensorDevice(); } /// @@ -208,7 +208,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("description", Description); writer.WriteStringValue("deviceId", DeviceId); diff --git a/src/Microsoft.Graph/Generated/Models/WorkplaceSensorDeviceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkplaceSensorDeviceCollectionResponse.cs index 27a0ebb6ee1..b15f8d949c1 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkplaceSensorDeviceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkplaceSensorDeviceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkplaceSensorDeviceCollectionResponse : global::Microsoft /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkplaceSensorDeviceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkplaceSensorDeviceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WorkplaceSensorDeviceTelemetry.cs b/src/Microsoft.Graph/Generated/Models/WorkplaceSensorDeviceTelemetry.cs index 78388902ee9..b0eed280608 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkplaceSensorDeviceTelemetry.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkplaceSensorDeviceTelemetry.cs @@ -140,7 +140,7 @@ public WorkplaceSensorDeviceTelemetry() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WorkplaceSensorDeviceTelemetry CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkplaceSensorDeviceTelemetry(); } /// @@ -168,7 +168,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("boolValue", BoolValue); writer.WriteStringValue("deviceId", DeviceId); writer.WriteObjectValue("eventValue", EventValue); diff --git a/src/Microsoft.Graph/Generated/Models/WorkplaceSensorEventValue.cs b/src/Microsoft.Graph/Generated/Models/WorkplaceSensorEventValue.cs index 2009043542e..49caaf05db5 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkplaceSensorEventValue.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkplaceSensorEventValue.cs @@ -74,7 +74,7 @@ public WorkplaceSensorEventValue() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WorkplaceSensorEventValue CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkplaceSensorEventValue(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("eventType", EventType); writer.WriteStringValue("@odata.type", OdataType); writer.WriteObjectValue("user", User); diff --git a/src/Microsoft.Graph/Generated/Models/Workspace.cs b/src/Microsoft.Graph/Generated/Models/Workspace.cs index 4a82c80ed01..5a21f0493ff 100644 --- a/src/Microsoft.Graph/Generated/Models/Workspace.cs +++ b/src/Microsoft.Graph/Generated/Models/Workspace.cs @@ -134,7 +134,7 @@ public Workspace() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.Workspace CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.Workspace(); } /// @@ -161,7 +161,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("building", Building); writer.WriteIntValue("capacity", Capacity); diff --git a/src/Microsoft.Graph/Generated/Models/WorkspaceCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/WorkspaceCollectionResponse.cs index f2ed90cf335..f736b4ace2c 100644 --- a/src/Microsoft.Graph/Generated/Models/WorkspaceCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/WorkspaceCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class WorkspaceCollectionResponse : global::Microsoft.Graph.Beta. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.WorkspaceCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WorkspaceCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/WritebackConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WritebackConfiguration.cs index 8f975f9281b..b177d5ea05f 100644 --- a/src/Microsoft.Graph/Generated/Models/WritebackConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WritebackConfiguration.cs @@ -58,7 +58,7 @@ public WritebackConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WritebackConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("@odata.type")?.GetStringValue(); return mappingValue switch { @@ -84,7 +84,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("isEnabled", IsEnabled); writer.WriteStringValue("@odata.type", OdataType); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/WslDistributionConfiguration.cs b/src/Microsoft.Graph/Generated/Models/WslDistributionConfiguration.cs index cabf2ffd898..1a0feef2adb 100644 --- a/src/Microsoft.Graph/Generated/Models/WslDistributionConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/WslDistributionConfiguration.cs @@ -100,7 +100,7 @@ public WslDistributionConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.WslDistributionConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.WslDistributionConfiguration(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("distribution", Distribution); writer.WriteStringValue("maximumOSVersion", MaximumOSVersion); writer.WriteStringValue("minimumOSVersion", MinimumOSVersion); diff --git a/src/Microsoft.Graph/Generated/Models/X509CertificateAuthenticationMethodConfiguration.cs b/src/Microsoft.Graph/Generated/Models/X509CertificateAuthenticationMethodConfiguration.cs index e27988e6e64..9c257d7a345 100644 --- a/src/Microsoft.Graph/Generated/Models/X509CertificateAuthenticationMethodConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/X509CertificateAuthenticationMethodConfiguration.cs @@ -106,7 +106,7 @@ public X509CertificateAuthenticationMethodConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.X509CertificateAuthenticationMethodConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.X509CertificateAuthenticationMethodConfiguration(); } /// @@ -130,7 +130,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteObjectValue("authenticationModeConfiguration", AuthenticationModeConfiguration); writer.WriteCollectionOfObjectValues("certificateAuthorityScopes", CertificateAuthorityScopes); diff --git a/src/Microsoft.Graph/Generated/Models/X509CertificateAuthenticationModeConfiguration.cs b/src/Microsoft.Graph/Generated/Models/X509CertificateAuthenticationModeConfiguration.cs index 65438cdcb8c..af7ec4dfeb3 100644 --- a/src/Microsoft.Graph/Generated/Models/X509CertificateAuthenticationModeConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/X509CertificateAuthenticationModeConfiguration.cs @@ -80,7 +80,7 @@ public X509CertificateAuthenticationModeConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.X509CertificateAuthenticationModeConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.X509CertificateAuthenticationModeConfiguration(); } /// @@ -103,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteCollectionOfObjectValues("rules", Rules); writer.WriteEnumValue("x509CertificateAuthenticationDefaultMode", X509CertificateAuthenticationDefaultMode); diff --git a/src/Microsoft.Graph/Generated/Models/X509CertificateAuthorityScope.cs b/src/Microsoft.Graph/Generated/Models/X509CertificateAuthorityScope.cs index 5ef1f7464b0..e8bdedd5ad1 100644 --- a/src/Microsoft.Graph/Generated/Models/X509CertificateAuthorityScope.cs +++ b/src/Microsoft.Graph/Generated/Models/X509CertificateAuthorityScope.cs @@ -100,7 +100,7 @@ public X509CertificateAuthorityScope() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.X509CertificateAuthorityScope CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.X509CertificateAuthorityScope(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("includeTargets", IncludeTargets); writer.WriteStringValue("@odata.type", OdataType); writer.WriteStringValue("publicKeyInfrastructureIdentifier", PublicKeyInfrastructureIdentifier); diff --git a/src/Microsoft.Graph/Generated/Models/X509CertificateCombinationConfiguration.cs b/src/Microsoft.Graph/Generated/Models/X509CertificateCombinationConfiguration.cs index c796b2256af..d62edaeb18b 100644 --- a/src/Microsoft.Graph/Generated/Models/X509CertificateCombinationConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/X509CertificateCombinationConfiguration.cs @@ -58,7 +58,7 @@ public X509CertificateCombinationConfiguration() : base() /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.X509CertificateCombinationConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.X509CertificateCombinationConfiguration(); } /// @@ -79,7 +79,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("allowedIssuerSkis", AllowedIssuerSkis); writer.WriteCollectionOfPrimitiveValues("allowedPolicyOIDs", AllowedPolicyOIDs); diff --git a/src/Microsoft.Graph/Generated/Models/X509CertificateIssuerHintsConfiguration.cs b/src/Microsoft.Graph/Generated/Models/X509CertificateIssuerHintsConfiguration.cs index a13dcde99a3..efd83dce363 100644 --- a/src/Microsoft.Graph/Generated/Models/X509CertificateIssuerHintsConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/X509CertificateIssuerHintsConfiguration.cs @@ -58,7 +58,7 @@ public X509CertificateIssuerHintsConfiguration() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.X509CertificateIssuerHintsConfiguration CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.X509CertificateIssuerHintsConfiguration(); } /// @@ -79,7 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteEnumValue("state", State); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Models/X509CertificateRule.cs b/src/Microsoft.Graph/Generated/Models/X509CertificateRule.cs index 2ef57600c4b..26164f9b290 100644 --- a/src/Microsoft.Graph/Generated/Models/X509CertificateRule.cs +++ b/src/Microsoft.Graph/Generated/Models/X509CertificateRule.cs @@ -118,7 +118,7 @@ public X509CertificateRule() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.X509CertificateRule CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.X509CertificateRule(); } /// @@ -144,7 +144,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("identifier", Identifier); writer.WriteStringValue("issuerSubjectIdentifier", IssuerSubjectIdentifier); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/X509CertificateUserBinding.cs b/src/Microsoft.Graph/Generated/Models/X509CertificateUserBinding.cs index 65e7018afd9..9b609aea671 100644 --- a/src/Microsoft.Graph/Generated/Models/X509CertificateUserBinding.cs +++ b/src/Microsoft.Graph/Generated/Models/X509CertificateUserBinding.cs @@ -96,7 +96,7 @@ public X509CertificateUserBinding() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.X509CertificateUserBinding CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.X509CertificateUserBinding(); } /// @@ -120,7 +120,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("priority", Priority); writer.WriteEnumValue("trustAffinityLevel", TrustAffinityLevel); diff --git a/src/Microsoft.Graph/Generated/Models/ZebraFotaArtifact.cs b/src/Microsoft.Graph/Generated/Models/ZebraFotaArtifact.cs index a2b776e7f6c..92f0c1ab477 100644 --- a/src/Microsoft.Graph/Generated/Models/ZebraFotaArtifact.cs +++ b/src/Microsoft.Graph/Generated/Models/ZebraFotaArtifact.cs @@ -116,7 +116,7 @@ public string ReleaseNotesUrl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ZebraFotaArtifact CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ZebraFotaArtifact(); } /// @@ -141,7 +141,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("boardSupportPackageVersion", BoardSupportPackageVersion); writer.WriteStringValue("description", Description); diff --git a/src/Microsoft.Graph/Generated/Models/ZebraFotaArtifactCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ZebraFotaArtifactCollectionResponse.cs index 6453c1365d1..1167f7aff56 100644 --- a/src/Microsoft.Graph/Generated/Models/ZebraFotaArtifactCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ZebraFotaArtifactCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ZebraFotaArtifactCollectionResponse : global::Microsoft.Gra /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ZebraFotaArtifactCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ZebraFotaArtifactCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ZebraFotaConnector.cs b/src/Microsoft.Graph/Generated/Models/ZebraFotaConnector.cs index b8e8eef943c..d550b619f75 100644 --- a/src/Microsoft.Graph/Generated/Models/ZebraFotaConnector.cs +++ b/src/Microsoft.Graph/Generated/Models/ZebraFotaConnector.cs @@ -70,7 +70,7 @@ public DateTimeOffset? LastSyncDateTime /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ZebraFotaConnector CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ZebraFotaConnector(); } /// @@ -94,7 +94,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteStringValue("enrollmentAuthorizationUrl", EnrollmentAuthorizationUrl); writer.WriteStringValue("enrollmentToken", EnrollmentToken); diff --git a/src/Microsoft.Graph/Generated/Models/ZebraFotaDeployment.cs b/src/Microsoft.Graph/Generated/Models/ZebraFotaDeployment.cs index 7c6a1dcea53..0479303dec9 100644 --- a/src/Microsoft.Graph/Generated/Models/ZebraFotaDeployment.cs +++ b/src/Microsoft.Graph/Generated/Models/ZebraFotaDeployment.cs @@ -116,7 +116,7 @@ public List RoleScopeTagIds /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ZebraFotaDeployment CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ZebraFotaDeployment(); } /// @@ -141,7 +141,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("deploymentAssignments", DeploymentAssignments); writer.WriteObjectValue("deploymentSettings", DeploymentSettings); diff --git a/src/Microsoft.Graph/Generated/Models/ZebraFotaDeploymentCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/ZebraFotaDeploymentCollectionResponse.cs index d18cd7091ba..2d209c60d44 100644 --- a/src/Microsoft.Graph/Generated/Models/ZebraFotaDeploymentCollectionResponse.cs +++ b/src/Microsoft.Graph/Generated/Models/ZebraFotaDeploymentCollectionResponse.cs @@ -35,7 +35,7 @@ public partial class ZebraFotaDeploymentCollectionResponse : global::Microsoft.G /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Models.ZebraFotaDeploymentCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ZebraFotaDeploymentCollectionResponse(); } /// @@ -55,7 +55,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Models/ZebraFotaDeploymentSettings.cs b/src/Microsoft.Graph/Generated/Models/ZebraFotaDeploymentSettings.cs index 10786c73b89..8b589f386bf 100644 --- a/src/Microsoft.Graph/Generated/Models/ZebraFotaDeploymentSettings.cs +++ b/src/Microsoft.Graph/Generated/Models/ZebraFotaDeploymentSettings.cs @@ -200,7 +200,7 @@ public ZebraFotaDeploymentSettings() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ZebraFotaDeploymentSettings CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ZebraFotaDeploymentSettings(); } /// @@ -236,7 +236,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("batteryRuleMinimumBatteryLevelPercentage", BatteryRuleMinimumBatteryLevelPercentage); writer.WriteBoolValue("batteryRuleRequireCharger", BatteryRuleRequireCharger); writer.WriteStringValue("deviceModel", DeviceModel); diff --git a/src/Microsoft.Graph/Generated/Models/ZebraFotaDeploymentStatus.cs b/src/Microsoft.Graph/Generated/Models/ZebraFotaDeploymentStatus.cs index 97d6f84a2d4..dc5e2c59f51 100644 --- a/src/Microsoft.Graph/Generated/Models/ZebraFotaDeploymentStatus.cs +++ b/src/Microsoft.Graph/Generated/Models/ZebraFotaDeploymentStatus.cs @@ -143,7 +143,7 @@ public ZebraFotaDeploymentStatus() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Models.ZebraFotaDeploymentStatus CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Models.ZebraFotaDeploymentStatus(); } /// @@ -178,7 +178,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("cancelRequested", CancelRequested); writer.WriteDateTimeOffsetValue("completeOrCanceledDateTime", CompleteOrCanceledDateTime); writer.WriteEnumValue("errorCode", ErrorCode); diff --git a/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/AlertRecordsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/AlertRecordsRequestBuilder.cs index 26c0343a63b..4df481dcf23 100644 --- a/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/AlertRecordsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/AlertRecordsRequestBuilder.cs @@ -105,7 +105,7 @@ public AlertRecordsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/Item/AlertRecordItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/Item/AlertRecordItemRequestBuilder.cs index 01ccd2a0c1a..19693117b6e 100644 --- a/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/Item/AlertRecordItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/Item/AlertRecordItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRecord body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRecord body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/ChangeAlertRecordsPortalNotificationAsSentPostRequestBody.cs b/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/ChangeAlertRecordsPortalNotificationAsSentPostRequestBody.cs index 4504f5e534e..21021a4b0fa 100644 --- a/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/ChangeAlertRecordsPortalNotificationAsSentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/ChangeAlertRecordsPortalNotificationAsSentPostRequestBody.cs @@ -52,7 +52,7 @@ public ChangeAlertRecordsPortalNotificationAsSentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent.ChangeAlertRecordsPortalNotificationAsSentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent.ChangeAlertRecordsPortalNotificationAsSentPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("alertRecordIds", AlertRecordIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSentRequestBuilder.cs index 1c41bc97522..fb5658d6524 100644 --- a/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent/MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSentRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Monitoring.AlertRecords public async Task PostAsync(global::Microsoft.Graph.Beta.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent.ChangeAlertRecordsPortalNotificationAsSentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementChangeAlertRecordsPortalNotificationAsSent.ChangeAlertRecordsPortalNotificationAsSentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsGetResponse.cs b/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsGetResponse.cs index dd7d7ef2c9d..a674a222efe 100644 --- a/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsGetResponse.cs @@ -37,7 +37,7 @@ public partial class GetPortalNotificationsGetResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementGetPortalNotifications.GetPortalNotificationsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementGetPortalNotifications.GetPortalNotificationsGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsResponse.cs b/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsResponse.cs index 8d1b2ff6cfa..3ab1758afb9 100644 --- a/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsResponse.cs +++ b/src/Microsoft.Graph/Generated/Monitoring/AlertRecords/MicrosoftGraphDeviceManagementGetPortalNotifications/GetPortalNotificationsResponse.cs @@ -20,7 +20,7 @@ public partial class GetPortalNotificationsResponse : global::Microsoft.Graph.Be /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementGetPortalNotifications.GetPortalNotificationsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Monitoring.AlertRecords.MicrosoftGraphDeviceManagementGetPortalNotifications.GetPortalNotificationsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Monitoring/AlertRules/AlertRulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Monitoring/AlertRules/AlertRulesRequestBuilder.cs index abf7147f517..c495f83e5ca 100644 --- a/src/Microsoft.Graph/Generated/Monitoring/AlertRules/AlertRulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Monitoring/AlertRules/AlertRulesRequestBuilder.cs @@ -93,7 +93,7 @@ public AlertRulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Monitoring/AlertRules/Item/AlertRuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Monitoring/AlertRules/Item/AlertRuleItemRequestBuilder.cs index c6646849969..9fc5a4a01bf 100644 --- a/src/Microsoft.Graph/Generated/Monitoring/AlertRules/Item/AlertRuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Monitoring/AlertRules/Item/AlertRuleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagement.AlertRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Monitoring/MonitoringRequestBuilder.cs b/src/Microsoft.Graph/Generated/Monitoring/MonitoringRequestBuilder.cs index b8199a38476..b9a344fa00b 100644 --- a/src/Microsoft.Graph/Generated/Monitoring/MonitoringRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Monitoring/MonitoringRequestBuilder.cs @@ -86,7 +86,7 @@ public MonitoringRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.DeviceManagement.Monitoring body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -128,7 +128,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DeviceManagement.Monitoring body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Network/NetworkRequestBuilder.cs b/src/Microsoft.Graph/Generated/Network/NetworkRequestBuilder.cs index b4b20756a13..934f8c62226 100644 --- a/src/Microsoft.Graph/Generated/Network/NetworkRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Network/NetworkRequestBuilder.cs @@ -74,7 +74,7 @@ public NetworkRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.Network body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Network body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/AlertsRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/AlertsRequestBuilder.cs index 09a5ec40515..30b77ca76ff 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/AlertsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/AlertsRequestBuilder.cs @@ -88,8 +88,8 @@ public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Usage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -100,8 +100,8 @@ public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Usage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -112,8 +112,8 @@ public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Usage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -133,7 +133,7 @@ public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.Alert body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.Alert body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/Item/AlertItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/Item/AlertItemRequestBuilder.cs index d46e6c1a70f..30600138c58 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/Item/AlertItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/Item/AlertItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.Alert body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.Alert body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime/GetAlertFrequenciesWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime/GetAlertFrequenciesWithStartDateTimeWithEndDateTimeGetResponse.cs index bd8877f6e79..44a1d81511d 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime/GetAlertFrequenciesWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime/GetAlertFrequenciesWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class GetAlertFrequenciesWithStartDateTimeWithEndDateTimeGetRespo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime.GetAlertFrequenciesWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime.GetAlertFrequenciesWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime/GetAlertFrequenciesWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime/GetAlertFrequenciesWithStartDateTimeWithEndDateTimeResponse.cs index cfcaaa8d41e..63dc51946b0 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime/GetAlertFrequenciesWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime/GetAlertFrequenciesWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetAlertFrequenciesWithStartDateTimeWithEndDateTimeResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime.GetAlertFrequenciesWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertFrequenciesWithStartDateTimeWithEndDateTime.GetAlertFrequenciesWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime/GetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime/GetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeGetResponse.cs index ce6f4ae610b..8c1453b0a22 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime/GetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime/GetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class GetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeGe /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime.GetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime.GetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime/GetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime/GetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeResponse.cs index 0c5f1e04fe4..8a99577f1f7 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime/GetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime/GetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeRe /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime.GetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertSeveritySummariesWithStartDateTimeWithEndDateTime.GetAlertSeveritySummariesWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime/GetAlertSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime/GetAlertSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs index bc2e2a0a469..38bc3033877 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime/GetAlertSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime/GetAlertSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class GetAlertSummariesWithStartDateTimeWithEndDateTimeGetRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime.GetAlertSummariesWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime.GetAlertSummariesWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime/GetAlertSummariesWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime/GetAlertSummariesWithStartDateTimeWithEndDateTimeResponse.cs index 0e8edabeeb4..a40420ba038 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime/GetAlertSummariesWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Alerts/MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime/GetAlertSummariesWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetAlertSummariesWithStartDateTimeWithEndDateTimeResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime.GetAlertSummariesWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Alerts.MicrosoftGraphNetworkaccessGetAlertSummariesWithStartDateTimeWithEndDateTime.GetAlertSummariesWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/BranchesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/BranchesRequestBuilder.cs index 36a989e5484..2caefaa27a8 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/BranchesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/BranchesRequestBuilder.cs @@ -99,7 +99,7 @@ public BranchesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.BranchSite body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.BranchSite body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/BranchSiteItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/BranchSiteItemRequestBuilder.cs index 5e2df491060..ba363537ebb 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/BranchSiteItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/BranchSiteItemRequestBuilder.cs @@ -123,7 +123,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.BranchSite body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.BranchSite body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ConnectivityConfiguration/ConnectivityConfigurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ConnectivityConfiguration/ConnectivityConfigurationRequestBuilder.cs index 9108e97ae3f..824ea646026 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ConnectivityConfiguration/ConnectivityConfigurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ConnectivityConfiguration/ConnectivityConfigurationRequestBuilder.cs @@ -107,7 +107,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.BranchConnectivityConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -171,7 +171,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.BranchConnectivityConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ConnectivityConfiguration/Links/Item/ConnectivityConfigurationLinkItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ConnectivityConfiguration/Links/Item/ConnectivityConfigurationLinkItemRequestBuilder.cs index e422cdeb4fd..099c31bcc5c 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ConnectivityConfiguration/Links/Item/ConnectivityConfigurationLinkItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ConnectivityConfiguration/Links/Item/ConnectivityConfigurationLinkItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectivityConfigurationLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectivityConfigurationLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ConnectivityConfiguration/Links/LinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ConnectivityConfiguration/Links/LinksRequestBuilder.cs index b9c294b8cfb..a622284e092 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ConnectivityConfiguration/Links/LinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ConnectivityConfiguration/Links/LinksRequestBuilder.cs @@ -97,7 +97,7 @@ public LinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectivityConfigurationLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectivityConfigurationLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/DeviceLinks/DeviceLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/DeviceLinks/DeviceLinksRequestBuilder.cs index dbc8bcfba92..60aa98cae3e 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/DeviceLinks/DeviceLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/DeviceLinks/DeviceLinksRequestBuilder.cs @@ -99,7 +99,7 @@ public DeviceLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.DeviceLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.DeviceLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/DeviceLinks/Item/DeviceLinkItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/DeviceLinks/Item/DeviceLinkItemRequestBuilder.cs index 2bc81c78ac8..f0e70801a9b 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/DeviceLinks/Item/DeviceLinkItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/DeviceLinks/Item/DeviceLinkItemRequestBuilder.cs @@ -101,7 +101,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.DeviceLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.DeviceLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/ForwardingProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/ForwardingProfilesRequestBuilder.cs index 8dda1b62a48..664d18cbef8 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/ForwardingProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/ForwardingProfilesRequestBuilder.cs @@ -98,7 +98,7 @@ public ForwardingProfilesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/Item/ForwardingProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/Item/ForwardingProfileItemRequestBuilder.cs index 82e85f28c06..82e18e6ba06 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/Item/ForwardingProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/Item/ForwardingProfileItemRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs index bebb1292e1a..76eaeab3b6e 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/Item/Policies/PoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/Item/Policies/PoliciesRequestBuilder.cs index a0a5492272b..1cd860ecdb4 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/Item/Policies/PoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/Branches/Item/ForwardingProfiles/Item/Policies/PoliciesRequestBuilder.cs @@ -97,7 +97,7 @@ public PoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/ConnectivityRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/ConnectivityRequestBuilder.cs index 3d313c3ba57..73af9dded2a 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/ConnectivityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/ConnectivityRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.Connectivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.Connectivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ConnectivityConfiguration/ConnectivityConfigurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ConnectivityConfiguration/ConnectivityConfigurationRequestBuilder.cs index 672ff3c703a..48e980bcc3b 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ConnectivityConfiguration/ConnectivityConfigurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ConnectivityConfiguration/ConnectivityConfigurationRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetworkConnectivityConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetworkConnectivityConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ConnectivityConfiguration/Links/Item/ConnectivityConfigurationLinkItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ConnectivityConfiguration/Links/Item/ConnectivityConfigurationLinkItemRequestBuilder.cs index a4fe9ef0455..b4822afad8a 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ConnectivityConfiguration/Links/Item/ConnectivityConfigurationLinkItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ConnectivityConfiguration/Links/Item/ConnectivityConfigurationLinkItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectivityConfigurationLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectivityConfigurationLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ConnectivityConfiguration/Links/LinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ConnectivityConfiguration/Links/LinksRequestBuilder.cs index a57b683f6d8..096ccb94a8c 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ConnectivityConfiguration/Links/LinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ConnectivityConfiguration/Links/LinksRequestBuilder.cs @@ -93,7 +93,7 @@ public LinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectivityConfigurationLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ConnectivityConfigurationLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/DeviceLinks/DeviceLinksRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/DeviceLinks/DeviceLinksRequestBuilder.cs index 323d9372a44..65f494a5941 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/DeviceLinks/DeviceLinksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/DeviceLinks/DeviceLinksRequestBuilder.cs @@ -93,7 +93,7 @@ public DeviceLinksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.DeviceLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.DeviceLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/DeviceLinks/Item/DeviceLinkItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/DeviceLinks/Item/DeviceLinkItemRequestBuilder.cs index 40e9b60987f..1d8987a3b3e 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/DeviceLinks/Item/DeviceLinkItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/DeviceLinks/Item/DeviceLinkItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.DeviceLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.DeviceLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/ForwardingProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/ForwardingProfilesRequestBuilder.cs index d06cbfececb..2e990f807ad 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/ForwardingProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/ForwardingProfilesRequestBuilder.cs @@ -93,7 +93,7 @@ public ForwardingProfilesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/Item/ForwardingProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/Item/ForwardingProfileItemRequestBuilder.cs index ade65fef5b1..3cef2773dec 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/Item/ForwardingProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/Item/ForwardingProfileItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs index b4f1e9b2c8c..029d1deac59 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/Item/Policies/PoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/Item/Policies/PoliciesRequestBuilder.cs index 978420444f4..ae8436c3bbd 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/Item/Policies/PoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/ForwardingProfiles/Item/Policies/PoliciesRequestBuilder.cs @@ -93,7 +93,7 @@ public PoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/RemoteNetworkItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/RemoteNetworkItemRequestBuilder.cs index e17b9a7e42f..9b759da0451 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/RemoteNetworkItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/Item/RemoteNetworkItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetwork body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetwork body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/RemoteNetworksRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/RemoteNetworksRequestBuilder.cs index de9cc606efd..49a2d060376 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/RemoteNetworksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Connectivity/RemoteNetworks/RemoteNetworksRequestBuilder.cs @@ -94,7 +94,7 @@ public RemoteNetworksRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetwork body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetwork body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/FilteringPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/FilteringPoliciesRequestBuilder.cs index cc960ca77ea..d22dcefc04f 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/FilteringPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/FilteringPoliciesRequestBuilder.cs @@ -94,7 +94,7 @@ public FilteringPoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/Item/FilteringPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/Item/FilteringPolicyItemRequestBuilder.cs index 36a709fdbc1..06f55f15ac5 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/Item/FilteringPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/Item/FilteringPolicyItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs index 575f52c2c04..cf2a2645a57 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs index 0325edc4ee4..36bf93430d2 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs @@ -93,7 +93,7 @@ public PolicyRulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/FilteringProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/FilteringProfilesRequestBuilder.cs index bbb3bdad2fc..29e97e1fa9a 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/FilteringProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/FilteringProfilesRequestBuilder.cs @@ -94,7 +94,7 @@ public FilteringProfilesRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/Item/FilteringProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/Item/FilteringProfileItemRequestBuilder.cs index b907908cc6b..4a9ff105cc9 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/Item/FilteringProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/Item/FilteringProfileItemRequestBuilder.cs @@ -109,7 +109,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.FilteringProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs index b3ed3a8cea6..0f44daff37a 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs @@ -64,8 +64,8 @@ public async Task DeleteAsync(Action - /// Read the properties and relationships of a threatIntelligencePolicyLink object. - /// Find more info here + /// Get a tlsInspectionPolicyLink object. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -88,8 +88,8 @@ public async Task DeleteAsync(Action(requestInfo, global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Update the properties of a tlsInspectionPolicyLink object. - /// Find more info here + /// Update the properties of a threatIntelligencePolicyLink object. + /// Find more info here /// /// A /// The request body @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -133,7 +133,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Read the properties and relationships of a threatIntelligencePolicyLink object. + /// Get a tlsInspectionPolicyLink object. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -152,7 +152,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of a tlsInspectionPolicyLink object. + /// Update the properties of a threatIntelligencePolicyLink object. /// /// A /// The request body @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -191,7 +191,7 @@ public partial class PolicyLinkItemRequestBuilderDeleteRequestConfiguration : Re { } /// - /// Read the properties and relationships of a threatIntelligencePolicyLink object. + /// Get a tlsInspectionPolicyLink object. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class PolicyLinkItemRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/Item/Policies/PoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/Item/Policies/PoliciesRequestBuilder.cs index f729d26c768..b4f65808c0a 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/Item/Policies/PoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/FilteringProfiles/Item/Policies/PoliciesRequestBuilder.cs @@ -54,8 +54,8 @@ public PoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b { } /// - /// Get a list of the tlsInspectionPolicyLink objects on a filtering profile. - /// Find more info here + /// Get a list of the threatIntelligencePolicyLink objects and their properties. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -95,7 +95,7 @@ public PoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -104,7 +104,7 @@ public PoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Get a list of the tlsInspectionPolicyLink objects on a filtering profile. + /// Get a list of the threatIntelligencePolicyLink objects and their properties. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -154,7 +154,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.NetworkAccess.FilteringProfiles.Item.Policies.PoliciesRequestBuilder(rawUrl, RequestAdapter); } /// - /// Get a list of the tlsInspectionPolicyLink objects on a filtering profile. + /// Get a list of the threatIntelligencePolicyLink objects and their properties. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class PoliciesRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/ForwardingPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/ForwardingPoliciesRequestBuilder.cs index 594ee6af5ed..b8739d6edcd 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/ForwardingPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/ForwardingPoliciesRequestBuilder.cs @@ -94,7 +94,7 @@ public ForwardingPoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/ForwardingPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/ForwardingPolicyItemRequestBuilder.cs index 3a950d940b6..9da07638c33 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/ForwardingPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/ForwardingPolicyItemRequestBuilder.cs @@ -109,7 +109,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/MicrosoftGraphNetworkaccessUpdatePolicyRules/MicrosoftGraphNetworkaccessUpdatePolicyRulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/MicrosoftGraphNetworkaccessUpdatePolicyRules/MicrosoftGraphNetworkaccessUpdatePolicyRulesRequestBuilder.cs index ee3f03be692..60a6dcf3ff3 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/MicrosoftGraphNetworkaccessUpdatePolicyRules/MicrosoftGraphNetworkaccessUpdatePolicyRulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/MicrosoftGraphNetworkaccessUpdatePolicyRules/MicrosoftGraphNetworkaccessUpdatePolicyRulesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.NetworkAccess.Forwardin public async Task PostAsync(global::Microsoft.Graph.Beta.NetworkAccess.ForwardingPolicies.Item.MicrosoftGraphNetworkaccessUpdatePolicyRules.UpdatePolicyRulesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.NetworkAccess.ForwardingPolicies.Item.MicrosoftGraphNetworkaccessUpdatePolicyRules.UpdatePolicyRulesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/MicrosoftGraphNetworkaccessUpdatePolicyRules/UpdatePolicyRulesPostRequestBody.cs b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/MicrosoftGraphNetworkaccessUpdatePolicyRules/UpdatePolicyRulesPostRequestBody.cs index 47f61ab09a4..b366e6aae59 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/MicrosoftGraphNetworkaccessUpdatePolicyRules/UpdatePolicyRulesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/MicrosoftGraphNetworkaccessUpdatePolicyRules/UpdatePolicyRulesPostRequestBody.cs @@ -53,7 +53,7 @@ public UpdatePolicyRulesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.NetworkAccess.ForwardingPolicies.Item.MicrosoftGraphNetworkaccessUpdatePolicyRules.UpdatePolicyRulesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.ForwardingPolicies.Item.MicrosoftGraphNetworkaccessUpdatePolicyRules.UpdatePolicyRulesPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfObjectValues("rules", Rules); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs index 75cb768331c..9ac30a51b85 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs index 58395fef902..ae64e253dcd 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs @@ -93,7 +93,7 @@ public PolicyRulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/ForwardingProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/ForwardingProfilesRequestBuilder.cs index d42cecc21a0..687f4cda15b 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/ForwardingProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/ForwardingProfilesRequestBuilder.cs @@ -94,7 +94,7 @@ public ForwardingProfilesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/Item/ForwardingProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/Item/ForwardingProfileItemRequestBuilder.cs index c45aecd5a81..b30ab6daa73 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/Item/ForwardingProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/Item/ForwardingProfileItemRequestBuilder.cs @@ -110,7 +110,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -171,7 +171,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs index a10ff1fde7d..2ca130ed4b8 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/Item/Policies/Item/PolicyLinkItemRequestBuilder.cs @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/Item/Policies/PoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/Item/Policies/PoliciesRequestBuilder.cs index dea5c42c3b1..bab79f202ee 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/Item/Policies/PoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/ForwardingProfiles/Item/Policies/PoliciesRequestBuilder.cs @@ -94,7 +94,7 @@ public PoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyLink body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Connections/ConnectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Connections/ConnectionsRequestBuilder.cs index d9e6a762f88..70aea90dd7f 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Connections/ConnectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Connections/ConnectionsRequestBuilder.cs @@ -94,7 +94,7 @@ public ConnectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.Connection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.Connection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Connections/Item/ConnectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Connections/Item/ConnectionItemRequestBuilder.cs index 04703915103..7e9ae172281 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Connections/Item/ConnectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Connections/Item/ConnectionItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.Connection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.Connection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/LogsRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/LogsRequestBuilder.cs index fcbb7422eaa..ea92c2b3417 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/LogsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/LogsRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.Logs body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.Logs body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/RemoteNetworks/Item/RemoteNetworkHealthEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/RemoteNetworks/Item/RemoteNetworkHealthEventItemRequestBuilder.cs index 28cedbd840c..72d9a49bfcb 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/RemoteNetworks/Item/RemoteNetworkHealthEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/RemoteNetworks/Item/RemoteNetworkHealthEventItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetworkHealthEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetworkHealthEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/RemoteNetworks/RemoteNetworksRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/RemoteNetworks/RemoteNetworksRequestBuilder.cs index 1506f0157c8..4aebe87af43 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/RemoteNetworks/RemoteNetworksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/RemoteNetworks/RemoteNetworksRequestBuilder.cs @@ -94,7 +94,7 @@ public RemoteNetworksRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetworkHealthEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.RemoteNetworkHealthEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Traffic/Item/NetworkAccessTrafficTransactionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Traffic/Item/NetworkAccessTrafficTransactionItemRequestBuilder.cs index 0bb6c433aff..b02f1016dea 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Traffic/Item/NetworkAccessTrafficTransactionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Traffic/Item/NetworkAccessTrafficTransactionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.NetworkAccessTraffic body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.NetworkAccessTraffic body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Traffic/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Traffic/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs index e77978a1859..a01ea4bbdee 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Traffic/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Traffic/Item/User/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Traffic/TrafficRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Traffic/TrafficRequestBuilder.cs index be040f1dbaf..0dd4e178320 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Traffic/TrafficRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Logs/Traffic/TrafficRequestBuilder.cs @@ -94,7 +94,7 @@ public TrafficRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.NetworkAccessTraffic body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.NetworkAccessTraffic body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/NetworkAccessRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/NetworkAccessRequestBuilder.cs index b3faaee23da..f573e3540a5 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/NetworkAccessRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/NetworkAccessRequestBuilder.cs @@ -158,7 +158,7 @@ public NetworkAccessRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.NetworkAccessRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -200,7 +200,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.NetworkAccessRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime/CrossTenantAccessReportWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime/CrossTenantAccessReportWithStartDateTimeWithEndDateTimeGetResponse.cs index d4ee999188e..dbbac04837a 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime/CrossTenantAccessReportWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime/CrossTenantAccessReportWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class CrossTenantAccessReportWithStartDateTimeWithEndDateTimeGetR /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime.CrossTenantAccessReportWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime.CrossTenantAccessReportWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime/CrossTenantAccessReportWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime/CrossTenantAccessReportWithStartDateTimeWithEndDateTimeResponse.cs index dc7a7856beb..59f62e10a42 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime/CrossTenantAccessReportWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime/CrossTenantAccessReportWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class CrossTenantAccessReportWithStartDateTimeWithEndDateTimeResp /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime.CrossTenantAccessReportWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime.CrossTenantAccessReportWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime/DestinationReportWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime/DestinationReportWithStartDateTimeWithEndDateTimeGetResponse.cs index a0ba32bb519..bedb7d4c742 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime/DestinationReportWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime/DestinationReportWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class DestinationReportWithStartDateTimeWithEndDateTimeGetRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime.DestinationReportWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime.DestinationReportWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime/DestinationReportWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime/DestinationReportWithStartDateTimeWithEndDateTimeResponse.cs index d4a850d0d4a..6b1e8cf780d 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime/DestinationReportWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime/DestinationReportWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class DestinationReportWithStartDateTimeWithEndDateTimeResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime.DestinationReportWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime.DestinationReportWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime/DeviceReportWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime/DeviceReportWithStartDateTimeWithEndDateTimeGetResponse.cs index 72942fba7dd..b712736a496 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime/DeviceReportWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime/DeviceReportWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class DeviceReportWithStartDateTimeWithEndDateTimeGetResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime.DeviceReportWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime.DeviceReportWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime/DeviceReportWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime/DeviceReportWithStartDateTimeWithEndDateTimeResponse.cs index 1fa4960212f..ef72318add4 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime/DeviceReportWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime/DeviceReportWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class DeviceReportWithStartDateTimeWithEndDateTimeResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime.DeviceReportWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime.DeviceReportWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime/EntitiesSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime/EntitiesSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs index ac496d65d9e..b0f33e69390 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime/EntitiesSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime/EntitiesSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class EntitiesSummariesWithStartDateTimeWithEndDateTimeGetRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime.EntitiesSummariesWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime.EntitiesSummariesWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime/EntitiesSummariesWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime/EntitiesSummariesWithStartDateTimeWithEndDateTimeResponse.cs index 093bf1a356d..cbd06bcf54f 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime/EntitiesSummariesWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime/EntitiesSummariesWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class EntitiesSummariesWithStartDateTimeWithEndDateTimeResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime.EntitiesSummariesWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime.EntitiesSummariesWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime/GetConnectionSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime/GetConnectionSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs index bbe2b7216ea..8b1c76ddc60 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime/GetConnectionSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime/GetConnectionSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class GetConnectionSummariesWithStartDateTimeWithEndDateTimeGetRe /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime.GetConnectionSummariesWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime.GetConnectionSummariesWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime/GetConnectionSummariesWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime/GetConnectionSummariesWithStartDateTimeWithEndDateTimeResponse.cs index fba7fbf0f2d..6da90c5813b 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime/GetConnectionSummariesWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime/GetConnectionSummariesWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetConnectionSummariesWithStartDateTimeWithEndDateTimeRespo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime.GetConnectionSummariesWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime.GetConnectionSummariesWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedBy/GetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedByGetResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedBy/GetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedByGetResponse.cs index 51632938e84..6071cbc3ba7 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedBy/GetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedByGetResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedBy/GetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedByGetResponse.cs @@ -37,7 +37,7 @@ public partial class GetDestinationSummariesWithStartDateTimeWithEndDateTimeWith /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedBy.GetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedByGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedBy.GetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedByGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedBy/GetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedByResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedBy/GetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedByResponse.cs index 2e03cafe107..253b838c5fa 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedBy/GetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedByResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedBy/GetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedByResponse.cs @@ -20,7 +20,7 @@ public partial class GetDestinationSummariesWithStartDateTimeWithEndDateTimeWith /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedBy.GetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedByResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedBy.GetDestinationSummariesWithStartDateTimeWithEndDateTimeWithAggregatedByResponse(); } } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId/GetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserIdGetResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId/GetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserIdGetResponse.cs index bcb7272b0ad..26934c7faec 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId/GetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId/GetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserIdGetResponse.cs @@ -37,7 +37,7 @@ public partial class GetDiscoveredApplicationSegmentReportWithStartDateTimeWithE /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId.GetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId.GetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserIdGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId/GetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserIdResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId/GetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserIdResponse.cs index eb5df231038..88512a6a523 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId/GetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserIdResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId/GetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserIdResponse.cs @@ -20,7 +20,7 @@ public partial class GetDiscoveredApplicationSegmentReportWithStartDateTimeWithE /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId.GetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId.GetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime/TransactionSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime/TransactionSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs index cc29b76331c..a9ceef09de6 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime/TransactionSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime/TransactionSummariesWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class TransactionSummariesWithStartDateTimeWithEndDateTimeGetResp /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime.TransactionSummariesWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime.TransactionSummariesWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime/TransactionSummariesWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime/TransactionSummariesWithStartDateTimeWithEndDateTimeResponse.cs index b301211cbdd..d743162621f 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime/TransactionSummariesWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime/TransactionSummariesWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class TransactionSummariesWithStartDateTimeWithEndDateTimeRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime.TransactionSummariesWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime.TransactionSummariesWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdGetResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdGetResponse.cs index 1cad3edff8c..28762e7ee93 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdGetResponse.cs @@ -37,7 +37,7 @@ public partial class UsageProfilingWithStartDateTimeWithEndDateTimeWithAggregate /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessUsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId.UsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessUsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId.UsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdResponse.cs index 5f14912e918..15b8ede8f83 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdResponse.cs @@ -20,7 +20,7 @@ public partial class UsageProfilingWithStartDateTimeWithEndDateTimeWithAggregate /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessUsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId.UsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessUsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId.UsageProfilingWithStartDateTimeWithEndDateTimeWithAggregatedBydiscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdGetResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdGetResponse.cs index 7386977bdab..f38ea524bd2 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdGetResponse.cs @@ -37,7 +37,7 @@ public partial class UserReportWithStartDateTimeWithEndDateTimediscoveredApplica /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId.UserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId.UserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdResponse.cs index 5c246de7e48..0593d6354f8 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId/UserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdResponse.cs @@ -20,7 +20,7 @@ public partial class UserReportWithStartDateTimeWithEndDateTimediscoveredApplica /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId.UserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId.UserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime/WebCategoryReportWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime/WebCategoryReportWithStartDateTimeWithEndDateTimeGetResponse.cs index 6f924610f1c..aa098af4a78 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime/WebCategoryReportWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime/WebCategoryReportWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -37,7 +37,7 @@ public partial class WebCategoryReportWithStartDateTimeWithEndDateTimeGetRespons /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime.WebCategoryReportWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime.WebCategoryReportWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -57,7 +57,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime/WebCategoryReportWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime/WebCategoryReportWithStartDateTimeWithEndDateTimeResponse.cs index 6e999f81812..dd54dfa5a32 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime/WebCategoryReportWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime/WebCategoryReportWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class WebCategoryReportWithStartDateTimeWithEndDateTimeResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime.WebCategoryReportWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime.WebCategoryReportWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/ReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/ReportsRequestBuilder.cs index f56065356a0..5be627be1d1 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Reports/ReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Reports/ReportsRequestBuilder.cs @@ -100,8 +100,8 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessCrossTenantAccessReportWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -112,8 +112,8 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessDestinationReportWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -124,8 +124,8 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessDeviceReportWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -136,8 +136,8 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessEntitiesSummariesWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -148,8 +148,8 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessGetConnectionSummariesWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -161,9 +161,9 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetCrossTenantSummaryWithStartDateTimeWithEndDateTimeWithDiscoveryPivotDateTime.MicrosoftGraphNetworkaccessGetCrossTenantSummaryWithStartDateTimeWithEndDateTimeWithDiscoveryPivotDateTimeRequestBuilder MicrosoftGraphNetworkaccessGetCrossTenantSummaryWithStartDateTimeWithEndDateTimeWithDiscoveryPivotDateTime(DateTimeOffset? discoveryPivotDateTime, DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = discoveryPivotDateTime ?? throw new ArgumentNullException(nameof(discoveryPivotDateTime)); - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(discoveryPivotDateTime, null)) throw new ArgumentNullException(nameof(discoveryPivotDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetCrossTenantSummaryWithStartDateTimeWithEndDateTimeWithDiscoveryPivotDateTime.MicrosoftGraphNetworkaccessGetCrossTenantSummaryWithStartDateTimeWithEndDateTimeWithDiscoveryPivotDateTimeRequestBuilder(PathParameters, RequestAdapter, discoveryPivotDateTime, endDateTime, startDateTime); } /// @@ -176,8 +176,8 @@ public async Task DeleteAsync(Action @@ -189,9 +189,9 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetDeviceUsageSummaryWithStartDateTimeWithEndDateTimeWithActivityPivotDateTime.MicrosoftGraphNetworkaccessGetDeviceUsageSummaryWithStartDateTimeWithEndDateTimeWithActivityPivotDateTimeRequestBuilder MicrosoftGraphNetworkaccessGetDeviceUsageSummaryWithStartDateTimeWithEndDateTimeWithActivityPivotDateTime(DateTimeOffset? activityPivotDateTime, DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = activityPivotDateTime ?? throw new ArgumentNullException(nameof(activityPivotDateTime)); - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(activityPivotDateTime, null)) throw new ArgumentNullException(nameof(activityPivotDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetDeviceUsageSummaryWithStartDateTimeWithEndDateTimeWithActivityPivotDateTime.MicrosoftGraphNetworkaccessGetDeviceUsageSummaryWithStartDateTimeWithEndDateTimeWithActivityPivotDateTimeRequestBuilder(PathParameters, RequestAdapter, activityPivotDateTime, endDateTime, startDateTime); } /// @@ -202,8 +202,8 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId.MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserIdRequestBuilder MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserId.MicrosoftGraphNetworkaccessGetDiscoveredApplicationSegmentReportWithStartDateTimeWithEndDateTimeuserIdUserIdRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -214,8 +214,8 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessTransactionSummariesWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -228,8 +228,8 @@ public async Task DeleteAsync(Action @@ -240,8 +240,8 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId.MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdRequestBuilder MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationId.MicrosoftGraphNetworkaccessUserReportWithStartDateTimeWithEndDateTimediscoveredApplicationSegmentIdDiscoveredApplicationSegmentIdApplicationIdApplicationIdRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -252,8 +252,8 @@ public async Task DeleteAsync(ActionUsage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTimeRequestBuilder MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.NetworkAccess.Reports.MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTime.MicrosoftGraphNetworkaccessWebCategoryReportWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// @@ -273,7 +273,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.Reports body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -334,7 +334,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.Reports body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Settings/ConditionalAccess/ConditionalAccessRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Settings/ConditionalAccess/ConditionalAccessRequestBuilder.cs index ff5f2bae5c2..7715be958fe 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Settings/ConditionalAccess/ConditionalAccessRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Settings/ConditionalAccess/ConditionalAccessRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ConditionalAccessSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ConditionalAccessSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Settings/CrossTenantAccess/CrossTenantAccessRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Settings/CrossTenantAccess/CrossTenantAccessRequestBuilder.cs index 0af168cba9e..7aa83c7472e 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Settings/CrossTenantAccess/CrossTenantAccessRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Settings/CrossTenantAccess/CrossTenantAccessRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.CrossTenantAccessSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.CrossTenantAccessSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Settings/ForwardingOptions/ForwardingOptionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Settings/ForwardingOptions/ForwardingOptionsRequestBuilder.cs index 951113133a7..903c4f406d2 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Settings/ForwardingOptions/ForwardingOptionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Settings/ForwardingOptions/ForwardingOptionsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingOptions body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ForwardingOptions body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Settings/SettingsRequestBuilder.cs index d341c5767af..d24b30baf20 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Settings/SettingsRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.Settings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.Settings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/TenantStatus/TenantStatusRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/TenantStatus/TenantStatusRequestBuilder.cs index 983ba2a910b..bae9a1c807d 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/TenantStatus/TenantStatusRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/TenantStatus/TenantStatusRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.TenantStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.TenantStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs index 48898ccbe63..2e2b6c8bf61 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs index 6d61ba8c6bd..94f2dddd36e 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs @@ -93,7 +93,7 @@ public PolicyRulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/Item/ThreatIntelligencePolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/Item/ThreatIntelligencePolicyItemRequestBuilder.cs index 39905154f31..8546070380e 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/Item/ThreatIntelligencePolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/Item/ThreatIntelligencePolicyItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligencePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligencePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/ThreatIntelligencePoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/ThreatIntelligencePoliciesRequestBuilder.cs index 3628ac8588a..2dd9b61b896 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/ThreatIntelligencePoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/ThreatIntelligencePolicies/ThreatIntelligencePoliciesRequestBuilder.cs @@ -95,7 +95,7 @@ public ThreatIntelligencePoliciesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligencePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ThreatIntelligencePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Tls/ExternalCertificateAuthorityCertificates/ExternalCertificateAuthorityCertificatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Tls/ExternalCertificateAuthorityCertificates/ExternalCertificateAuthorityCertificatesRequestBuilder.cs index 550e9a8566c..2cf50dd922d 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Tls/ExternalCertificateAuthorityCertificates/ExternalCertificateAuthorityCertificatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Tls/ExternalCertificateAuthorityCertificates/ExternalCertificateAuthorityCertificatesRequestBuilder.cs @@ -95,7 +95,7 @@ public ExternalCertificateAuthorityCertificatesRequestBuilder(string rawUrl, IRe public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ExternalCertificateAuthorityCertificate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ExternalCertificateAuthorityCertificate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Tls/ExternalCertificateAuthorityCertificates/Item/ExternalCertificateAuthorityCertificateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Tls/ExternalCertificateAuthorityCertificates/Item/ExternalCertificateAuthorityCertificateItemRequestBuilder.cs index 8213502fc76..39f785cbdcc 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Tls/ExternalCertificateAuthorityCertificates/Item/ExternalCertificateAuthorityCertificateItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Tls/ExternalCertificateAuthorityCertificates/Item/ExternalCertificateAuthorityCertificateItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.ExternalCertificateAuthorityCertificate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.ExternalCertificateAuthorityCertificate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/Tls/TlsRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/Tls/TlsRequestBuilder.cs index 2eee16a77e8..3ee19720122 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/Tls/TlsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/Tls/TlsRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.TlsTermination body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.TlsTermination body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs index 9033431e5d4..3cb254f5db0 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/Item/PolicyRules/Item/PolicyRuleItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs index cb8bef0f9ba..922085d6491 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/Item/PolicyRules/PolicyRulesRequestBuilder.cs @@ -95,7 +95,7 @@ public PolicyRulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.PolicyRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/Item/TlsInspectionPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/Item/TlsInspectionPolicyItemRequestBuilder.cs index 6a6ec34c4ff..8c6e601782b 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/Item/TlsInspectionPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/Item/TlsInspectionPolicyItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/TlsInspectionPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/TlsInspectionPoliciesRequestBuilder.cs index ef018bfe668..6418370f9c5 100644 --- a/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/TlsInspectionPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/NetworkAccess/TlsInspectionPolicies/TlsInspectionPoliciesRequestBuilder.cs @@ -95,7 +95,7 @@ public TlsInspectionPoliciesRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Networkaccess.TlsInspectionPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Delta/DeltaGetResponse.cs index f02bde0c8fe..9143ca1358d 100644 --- a/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Oauth2PermissionGrants.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Oauth2PermissionGrants.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Delta/DeltaResponse.cs index 9e8b037aa0f..c044d9e9243 100644 --- a/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Oauth2Permissi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Oauth2PermissionGrants.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Oauth2PermissionGrants.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Item/OAuth2PermissionGrantItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Item/OAuth2PermissionGrantItemRequestBuilder.cs index 4a048b33c14..f1bbaac228e 100644 --- a/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Item/OAuth2PermissionGrantItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Item/OAuth2PermissionGrantItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OAuth2PermissionGrant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OAuth2PermissionGrant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Oauth2PermissionGrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Oauth2PermissionGrantsRequestBuilder.cs index ee2b7ba8da1..34ad3c8d292 100644 --- a/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Oauth2PermissionGrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Oauth2PermissionGrants/Oauth2PermissionGrantsRequestBuilder.cs @@ -101,7 +101,7 @@ public Oauth2PermissionGrantsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OAuth2PermissionGrant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OAuth2PermissionGrant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/AgentGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/AgentGroupsRequestBuilder.cs index ed05a6c3551..b5d6fec764f 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/AgentGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/AgentGroupsRequestBuilder.cs @@ -93,7 +93,7 @@ public AgentGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnPremisesAgentGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesAgentGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/Agents/AgentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/Agents/AgentsRequestBuilder.cs index 9bf1888e126..81673b381b1 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/Agents/AgentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/Agents/AgentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AgentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnPremisesAgent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesAgent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/Agents/Item/AgentGroups/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/Agents/Item/AgentGroups/Ref/RefRequestBuilder.cs index 35733b08452..d0abc3be142 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/Agents/Item/AgentGroups/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/Agents/Item/AgentGroups/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/onPremisesPublishingProfiles/{onPremisesPublishingProfile%2Did}/agentGroups/{onPremisesAgentGroup%2Did}/agents/{onPremisesAgent%2Did}/agentGroups/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/Agents/Item/OnPremisesAgentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/Agents/Item/OnPremisesAgentItemRequestBuilder.cs index 093b313596b..23d1d57d7c8 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/Agents/Item/OnPremisesAgentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/Agents/Item/OnPremisesAgentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnPremisesAgent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesAgent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/OnPremisesAgentGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/OnPremisesAgentGroupItemRequestBuilder.cs index f28da688200..d915d100f95 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/OnPremisesAgentGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/OnPremisesAgentGroupItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnPremisesAgentGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesAgentGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/Item/AgentGroups/AgentGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/Item/AgentGroups/AgentGroupsRequestBuilder.cs index 6cdf63d8626..04128491316 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/Item/AgentGroups/AgentGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/Item/AgentGroups/AgentGroupsRequestBuilder.cs @@ -99,7 +99,7 @@ public AgentGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnPremisesAgentGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesAgentGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/Item/AgentGroups/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/Item/AgentGroups/Ref/RefRequestBuilder.cs index 8900e252d0e..a57586c2d31 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/Item/AgentGroups/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/Item/AgentGroups/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/onPremisesPublishingProfiles/{onPremisesPublishingProfile%2Did}/agentGroups/{onPremisesAgentGroup%2Did}/publishedResources/{publishedResource%2Did}/agentGroups/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/Item/PublishedResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/Item/PublishedResourceItemRequestBuilder.cs index d58fb1be54a..40f09c9dfc1 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/Item/PublishedResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/Item/PublishedResourceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PublishedResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PublishedResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/PublishedResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/PublishedResourcesRequestBuilder.cs index a314e38dd28..b838b448393 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/PublishedResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/AgentGroups/Item/PublishedResources/PublishedResourcesRequestBuilder.cs @@ -93,7 +93,7 @@ public PublishedResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PublishedResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PublishedResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Agents/AgentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Agents/AgentsRequestBuilder.cs index 5ab1b0499a2..9c07250154c 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Agents/AgentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Agents/AgentsRequestBuilder.cs @@ -93,7 +93,7 @@ public AgentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnPremisesAgent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesAgent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Agents/Item/AgentGroups/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Agents/Item/AgentGroups/Ref/RefRequestBuilder.cs index e98a114544a..8ce681b1f18 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Agents/Item/AgentGroups/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Agents/Item/AgentGroups/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/onPremisesPublishingProfiles/{onPremisesPublishingProfile%2Did}/agents/{onPremisesAgent%2Did}/agentGroups/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Agents/Item/OnPremisesAgentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Agents/Item/OnPremisesAgentItemRequestBuilder.cs index cfacb4c77be..a03b9b72ef3 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Agents/Item/OnPremisesAgentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Agents/Item/OnPremisesAgentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnPremisesAgent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesAgent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/ConnectorGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/ConnectorGroupsRequestBuilder.cs index c01b15ead16..2ab5d821db7 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/ConnectorGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/ConnectorGroupsRequestBuilder.cs @@ -93,7 +93,7 @@ public ConnectorGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ConnectorGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ConnectorGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/Item/Applications/Item/Logo/LogoRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/Item/Applications/Item/Logo/LogoRequestBuilder.cs index c804da4e5cd..92c84823e6c 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/Item/Applications/Item/Logo/LogoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/Item/Applications/Item/Logo/LogoRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/Item/ConnectorGroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/Item/ConnectorGroupItemRequestBuilder.cs index 25d5a94b990..cabb5eebc4c 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/Item/ConnectorGroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/Item/ConnectorGroupItemRequestBuilder.cs @@ -130,7 +130,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ConnectorGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -191,7 +191,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ConnectorGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/Item/Members/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/Item/Members/Ref/RefRequestBuilder.cs index 98534ae38a9..84f76c48b73 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/Item/Members/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/ConnectorGroups/Item/Members/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/onPremisesPublishingProfiles/{onPremisesPublishingProfile%2Did}/connectorGroups/{connectorGroup%2Did}/members/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Connectors/ConnectorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Connectors/ConnectorsRequestBuilder.cs index e9121fd9d2f..ff5f626377f 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Connectors/ConnectorsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Connectors/ConnectorsRequestBuilder.cs @@ -93,7 +93,7 @@ public ConnectorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Connector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Connector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Connectors/Item/ConnectorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Connectors/Item/ConnectorItemRequestBuilder.cs index d24ab4bef59..21fa180618e 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Connectors/Item/ConnectorItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Connectors/Item/ConnectorItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Connector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Connector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Connectors/Item/MemberOf/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Connectors/Item/MemberOf/Ref/RefRequestBuilder.cs index 93b6f72efcc..946c61db9d1 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Connectors/Item/MemberOf/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/Connectors/Item/MemberOf/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/onPremisesPublishingProfiles/{onPremisesPublishingProfile%2Did}/connectors/{connector%2Did}/memberOf/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/OnPremisesPublishingProfileItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/OnPremisesPublishingProfileItemRequestBuilder.cs index 0700279dcf0..67251d5ed2f 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/OnPremisesPublishingProfileItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/OnPremisesPublishingProfileItemRequestBuilder.cs @@ -132,7 +132,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OnPremisesPublishingProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesPublishingProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/Item/AgentGroups/AgentGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/Item/AgentGroups/AgentGroupsRequestBuilder.cs index 428ba4432ea..1b014959eeb 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/Item/AgentGroups/AgentGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/Item/AgentGroups/AgentGroupsRequestBuilder.cs @@ -99,7 +99,7 @@ public AgentGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnPremisesAgentGroup body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesAgentGroup body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/Item/AgentGroups/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/Item/AgentGroups/Ref/RefRequestBuilder.cs index 4b4b0e22d7a..4385dbee11e 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/Item/AgentGroups/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/Item/AgentGroups/Ref/RefRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/onPremisesPublishingProfiles/{onPremisesPublishingProfile%2Did}/publishedResources/{publishedResource%2Did}/agentGroups/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/Item/PublishedResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/Item/PublishedResourceItemRequestBuilder.cs index be285f95385..73c0618c010 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/Item/PublishedResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/Item/PublishedResourceItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PublishedResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PublishedResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/PublishedResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/PublishedResourcesRequestBuilder.cs index 71f5a449de7..378a8673de9 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/PublishedResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/Item/PublishedResources/PublishedResourcesRequestBuilder.cs @@ -94,7 +94,7 @@ public PublishedResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PublishedResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PublishedResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/OnPremisesPublishingProfilesRequestBuilder.cs b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/OnPremisesPublishingProfilesRequestBuilder.cs index fdc1697a2b7..ce85939ec30 100644 --- a/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/OnPremisesPublishingProfilesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/OnPremisesPublishingProfiles/OnPremisesPublishingProfilesRequestBuilder.cs @@ -93,7 +93,7 @@ public OnPremisesPublishingProfilesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OnPremisesPublishingProfile body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OnPremisesPublishingProfile body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Organization/Delta/DeltaGetResponse.cs index beeae5422eb..0234d5c7b94 100644 --- a/src/Microsoft.Graph/Generated/Organization/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Organization/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Organization.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Organization/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Organization/Delta/DeltaResponse.cs index b057922b555..827c988571c 100644 --- a/src/Microsoft.Graph/Generated/Organization/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Organization/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Organization.D /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Organization.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsPostRequestBody.cs index 91be7fbb888..ddf3b22edcd 100644 --- a/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetByIdsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Organization.GetByIds.GetByIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.GetByIds.GetByIdsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteCollectionOfPrimitiveValues("types", Types); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsPostResponse.cs b/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsPostResponse.cs index cfd1fa888e4..e4e0c0dd994 100644 --- a/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetByIdsPostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Organization.GetByIds.GetByIdsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.GetByIds.GetByIdsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsRequestBuilder.cs index 08df38c0139..a5fdff54386 100644 --- a/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsGetByIdsPostResponseAsync(global::Microsoft.Graph.Beta.Organization.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Organization.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Organization.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsResponse.cs b/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsResponse.cs index 78700bf5aa0..f03d250b78b 100644 --- a/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/Organization/GetByIds/GetByIdsResponse.cs @@ -20,7 +20,7 @@ public partial class GetByIdsResponse : global::Microsoft.Graph.Beta.Organizatio /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Organization.GetByIds.GetByIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.GetByIds.GetByIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Organization/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Organization/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs index cbf6c38a7dc..9d70b787b77 100644 --- a/src/Microsoft.Graph/Generated/Organization/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Organization/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetUserOwnedObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Organization.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("type", Type); writer.WriteStringValue("userId", UserId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Organization/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs index 51cf95af247..9cb3782be82 100644 --- a/src/Microsoft.Graph/Generated/Organization/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs @@ -52,7 +52,7 @@ public GetUserOwnedObjectsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Organization.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Organization.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/BackgroundImage/BackgroundImageRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/BackgroundImage/BackgroundImageRequestBuilder.cs index 494bfa6ad0f..ee372a33bf5 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/BackgroundImage/BackgroundImageRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/BackgroundImage/BackgroundImageRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); var errorMapping = new Dictionary> @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, string contentTyp public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/BannerLogo/BannerLogoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/BannerLogo/BannerLogoRequestBuilder.cs index 9070d50f6de..4e333ad133d 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/BannerLogo/BannerLogoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/BannerLogo/BannerLogoRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); var errorMapping = new Dictionary> @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, string contentTyp public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/BrandingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/BrandingRequestBuilder.cs index 9949d796439..6470dd7b6db 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/BrandingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/BrandingRequestBuilder.cs @@ -147,7 +147,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OrganizationalBranding body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -208,7 +208,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OrganizationalBranding body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/CustomCSS/CustomCSSRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/CustomCSS/CustomCSSRequestBuilder.cs index 131b8ddeb5c..720eb8358c1 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/CustomCSS/CustomCSSRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/CustomCSS/CustomCSSRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); var errorMapping = new Dictionary> @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, string contentTyp public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Favicon/FaviconRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Favicon/FaviconRequestBuilder.cs index 8df87bc368c..a6a4a85f647 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Favicon/FaviconRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Favicon/FaviconRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); var errorMapping = new Dictionary> @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, string contentTyp public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/HeaderLogo/HeaderLogoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/HeaderLogo/HeaderLogoRequestBuilder.cs index 1fa1d1a3213..3c6ffec6954 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/HeaderLogo/HeaderLogoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/HeaderLogo/HeaderLogoRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); var errorMapping = new Dictionary> @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, string contentTyp public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/BackgroundImage/BackgroundImageRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/BackgroundImage/BackgroundImageRequestBuilder.cs index 169cd9fd0f6..140b076c707 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/BackgroundImage/BackgroundImageRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/BackgroundImage/BackgroundImageRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); var errorMapping = new Dictionary> @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, string contentTyp public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/BannerLogo/BannerLogoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/BannerLogo/BannerLogoRequestBuilder.cs index c19bf1426d1..dc9199d509b 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/BannerLogo/BannerLogoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/BannerLogo/BannerLogoRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task GetAsync(Action PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); var errorMapping = new Dictionary> @@ -160,7 +160,7 @@ public RequestInformation ToPutRequestInformation(Stream body, string contentTyp public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/CustomCSS/CustomCSSRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/CustomCSS/CustomCSSRequestBuilder.cs index ec8c45c03c8..4c1ae1de8a7 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/CustomCSS/CustomCSSRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/CustomCSS/CustomCSSRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); var errorMapping = new Dictionary> @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, string contentTyp public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/Favicon/FaviconRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/Favicon/FaviconRequestBuilder.cs index aa406eccdf4..c23c4798d2d 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/Favicon/FaviconRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/Favicon/FaviconRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); var errorMapping = new Dictionary> @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, string contentTyp public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/HeaderLogo/HeaderLogoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/HeaderLogo/HeaderLogoRequestBuilder.cs index 88618c20952..01759ebf355 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/HeaderLogo/HeaderLogoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/HeaderLogo/HeaderLogoRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); var errorMapping = new Dictionary> @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, string contentTyp public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/OrganizationalBrandingLocalizationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/OrganizationalBrandingLocalizationItemRequestBuilder.cs index 4d6dc9c78ce..27777f1e67b 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/OrganizationalBrandingLocalizationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/OrganizationalBrandingLocalizationItemRequestBuilder.cs @@ -141,7 +141,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OrganizationalBrandingLocalization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -202,7 +202,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OrganizationalBrandingLocalization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/SquareLogo/SquareLogoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/SquareLogo/SquareLogoRequestBuilder.cs index f19dfacce6d..caaf2c2cf58 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/SquareLogo/SquareLogoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/SquareLogo/SquareLogoRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); var errorMapping = new Dictionary> @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, string contentTyp public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/SquareLogoDark/SquareLogoDarkRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/SquareLogoDark/SquareLogoDarkRequestBuilder.cs index 2418234a34e..7e6d8e4106c 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/SquareLogoDark/SquareLogoDarkRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/Item/SquareLogoDark/SquareLogoDarkRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); var errorMapping = new Dictionary> @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, string contentTyp public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/LocalizationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/LocalizationsRequestBuilder.cs index ba7a5b8d32c..5eae6369f17 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/LocalizationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/Localizations/LocalizationsRequestBuilder.cs @@ -95,7 +95,7 @@ public LocalizationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.OrganizationalBrandingLocalization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.OrganizationalBrandingLocalization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/SquareLogo/SquareLogoRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/SquareLogo/SquareLogoRequestBuilder.cs index 58233655a0a..2fa47a20bef 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/SquareLogo/SquareLogoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/SquareLogo/SquareLogoRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); var errorMapping = new Dictionary> @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, string contentTyp public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Branding/SquareLogoDark/SquareLogoDarkRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Branding/SquareLogoDark/SquareLogoDarkRequestBuilder.cs index 79ae16ddf29..e1bdafbe205 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Branding/SquareLogoDark/SquareLogoDarkRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Branding/SquareLogoDark/SquareLogoDarkRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, string contentType, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = ToPutRequestInformation(body, contentType, requestConfiguration); var errorMapping = new Dictionary> @@ -159,7 +159,7 @@ public RequestInformation ToPutRequestInformation(Stream body, string contentTyp public RequestInformation ToPutRequestInformation(Stream body, string contentType, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); if(string.IsNullOrEmpty(contentType)) throw new ArgumentNullException(nameof(contentType)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/CertificateBasedAuthConfiguration/CertificateBasedAuthConfigurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/CertificateBasedAuthConfiguration/CertificateBasedAuthConfigurationRequestBuilder.cs index bf32435bcf2..9a9feaab8c7 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/CertificateBasedAuthConfiguration/CertificateBasedAuthConfigurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/CertificateBasedAuthConfiguration/CertificateBasedAuthConfigurationRequestBuilder.cs @@ -95,7 +95,7 @@ public CertificateBasedAuthConfigurationRequestBuilder(string rawUrl, IRequestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CertificateBasedAuthConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CertificateBasedAuthConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs index 37f2acbb79f..d2a6530002b 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Organization.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs index e56d5727e1c..55a3b711417 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Organization.Item.CheckMemberGroups.CheckMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Item.CheckMemberGroups.CheckMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs index 31033f4461b..7a174f5f6b5 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsCheckMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.Organization.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Organization.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Organization.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs index e21c69eac20..c64f69260b8 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberGroupsResponse : global::Microsoft.Graph.Beta.Or /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Organization.Item.CheckMemberGroups.CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Item.CheckMemberGroups.CheckMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs index eb33042a8dd..0374cd8224b 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Organization.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs index 0c7d98a84e6..9cadf1a24e9 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Organization.Item.CheckMemberObjects.CheckMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Item.CheckMemberObjects.CheckMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs index f2c5c66f753..57e49b90a28 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsCheckMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.Organization.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Organization.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Organization.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs index d50c7b186d7..9f0400eff2c 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberObjectsResponse : global::Microsoft.Graph.Beta.O /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Organization.Item.CheckMemberObjects.CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Item.CheckMemberObjects.CheckMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Extensions/ExtensionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Extensions/ExtensionsRequestBuilder.cs index 9dad01fab7c..93826ca17fe 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Extensions/ExtensionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Extensions/ExtensionsRequestBuilder.cs @@ -93,7 +93,7 @@ public ExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Extensions/Item/ExtensionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Extensions/Item/ExtensionItemRequestBuilder.cs index 47c13853ca7..1170219f55c 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Extensions/Item/ExtensionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Extensions/Item/ExtensionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Extension body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs index c9946ff64ff..16ff0d59adb 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Organization.Item.GetMemberGroups.GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Item.GetMemberGroups.GetMemberGroupsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs index 5bce22f940c..4fb9fc4ced5 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Organization.Item.GetMemberGroups.GetMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Item.GetMemberGroups.GetMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs index eb420b625cc..4e033ebb0fa 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsGetMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.Organization.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Organization.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Organization.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsResponse.cs index e3485181a3c..9a7cdec4438 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberGroups/GetMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberGroupsResponse : global::Microsoft.Graph.Beta.Orga /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Organization.Item.GetMemberGroups.GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Item.GetMemberGroups.GetMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs index d6fd9ce54f5..430aedad15a 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Organization.Item.GetMemberObjects.GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Item.GetMemberObjects.GetMemberObjectsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs index 11b08a31e8c..f2b467b990a 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Organization.Item.GetMemberObjects.GetMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Item.GetMemberObjects.GetMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs index 5a2895b692a..4f6f38d63a9 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.Organization.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Organization.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Organization.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsResponse.cs index 256af90fdf1..e79ee732b02 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/GetMemberObjects/GetMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberObjectsResponse : global::Microsoft.Graph.Beta.Org /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Organization.Item.GetMemberObjects.GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Item.GetMemberObjects.GetMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/OrganizationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/OrganizationItemRequestBuilder.cs index a1e5ab10bf4..bcfb7c80a85 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/OrganizationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/OrganizationItemRequestBuilder.cs @@ -164,7 +164,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Organization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -225,7 +225,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Organization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/PartnerInformation/PartnerInformationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/PartnerInformation/PartnerInformationRequestBuilder.cs index 6c44660f912..8583b15e8fa 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/PartnerInformation/PartnerInformationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/PartnerInformation/PartnerInformationRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PartnerInformation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PartnerInformation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/SetMobileDeviceManagementAuthority/SetMobileDeviceManagementAuthorityPostResponse.cs b/src/Microsoft.Graph/Generated/Organization/Item/SetMobileDeviceManagementAuthority/SetMobileDeviceManagementAuthorityPostResponse.cs index e64e132f0f2..78aaada6772 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/SetMobileDeviceManagementAuthority/SetMobileDeviceManagementAuthorityPostResponse.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/SetMobileDeviceManagementAuthority/SetMobileDeviceManagementAuthorityPostResponse.cs @@ -42,7 +42,7 @@ public SetMobileDeviceManagementAuthorityPostResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Organization.Item.SetMobileDeviceManagementAuthority.SetMobileDeviceManagementAuthorityPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Item.SetMobileDeviceManagementAuthority.SetMobileDeviceManagementAuthorityPostResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteIntValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/SetMobileDeviceManagementAuthority/SetMobileDeviceManagementAuthorityResponse.cs b/src/Microsoft.Graph/Generated/Organization/Item/SetMobileDeviceManagementAuthority/SetMobileDeviceManagementAuthorityResponse.cs index 182dc028c3a..73364de233f 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/SetMobileDeviceManagementAuthority/SetMobileDeviceManagementAuthorityResponse.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/SetMobileDeviceManagementAuthority/SetMobileDeviceManagementAuthorityResponse.cs @@ -20,7 +20,7 @@ public partial class SetMobileDeviceManagementAuthorityResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Organization.Item.SetMobileDeviceManagementAuthority.SetMobileDeviceManagementAuthorityResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.Item.SetMobileDeviceManagementAuthority.SetMobileDeviceManagementAuthorityResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Settings/ContactInsights/ContactInsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Settings/ContactInsights/ContactInsightsRequestBuilder.cs index 166362e34f8..7785bd0e396 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Settings/ContactInsights/ContactInsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Settings/ContactInsights/ContactInsightsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InsightsSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InsightsSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Settings/ItemInsights/ItemInsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Settings/ItemInsights/ItemInsightsRequestBuilder.cs index 43531495c4e..3d11ba90465 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Settings/ItemInsights/ItemInsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Settings/ItemInsights/ItemInsightsRequestBuilder.cs @@ -100,7 +100,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InsightsSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InsightsSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Settings/MicrosoftApplicationDataAccess/MicrosoftApplicationDataAccessRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Settings/MicrosoftApplicationDataAccess/MicrosoftApplicationDataAccessRequestBuilder.cs index aada86f9bea..f49cc16e963 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Settings/MicrosoftApplicationDataAccess/MicrosoftApplicationDataAccessRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Settings/MicrosoftApplicationDataAccess/MicrosoftApplicationDataAccessRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MicrosoftApplicationDataAccessSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MicrosoftApplicationDataAccessSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Settings/PeopleInsights/PeopleInsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Settings/PeopleInsights/PeopleInsightsRequestBuilder.cs index 314459674a4..7ff83b698cc 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Settings/PeopleInsights/PeopleInsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Settings/PeopleInsights/PeopleInsightsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.InsightsSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.InsightsSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/Item/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/Item/Settings/SettingsRequestBuilder.cs index f70da065554..33afa24b083 100644 --- a/src/Microsoft.Graph/Generated/Organization/Item/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/Item/Settings/SettingsRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.OrganizationSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.OrganizationSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/OrganizationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/OrganizationRequestBuilder.cs index 14835dbab43..04ec6c64da1 100644 --- a/src/Microsoft.Graph/Generated/Organization/OrganizationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/OrganizationRequestBuilder.cs @@ -118,7 +118,7 @@ public OrganizationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Organization body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Organization body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Organization/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/Organization/ValidateProperties/ValidatePropertiesPostRequestBody.cs index b4cd78cb6b3..4a641c98f80 100644 --- a/src/Microsoft.Graph/Generated/Organization/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Organization/ValidateProperties/ValidatePropertiesPostRequestBody.cs @@ -90,7 +90,7 @@ public ValidatePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Organization.ValidateProperties.ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Organization.ValidateProperties.ValidatePropertiesPostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("entityType", EntityType); writer.WriteStringValue("mailNickname", MailNickname); diff --git a/src/Microsoft.Graph/Generated/Organization/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Organization/ValidateProperties/ValidatePropertiesRequestBuilder.cs index c96ed73cb9b..fb0d3240271 100644 --- a/src/Microsoft.Graph/Generated/Organization/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Organization/ValidateProperties/ValidatePropertiesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Organization.ValidatePr public async Task PostAsync(global::Microsoft.Graph.Beta.Organization.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Organization.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PayloadResponse/Item/PayloadResponseItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PayloadResponse/Item/PayloadResponseItemRequestBuilder.cs index aa0c0bb2873..ec85c70ed89 100644 --- a/src/Microsoft.Graph/Generated/PayloadResponse/Item/PayloadResponseItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PayloadResponse/Item/PayloadResponseItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PayloadResponse body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PayloadResponse body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PayloadResponse/PayloadResponseRequestBuilder.cs b/src/Microsoft.Graph/Generated/PayloadResponse/PayloadResponseRequestBuilder.cs index 1f3047208a0..b2171b46a25 100644 --- a/src/Microsoft.Graph/Generated/PayloadResponse/PayloadResponseRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PayloadResponse/PayloadResponseRequestBuilder.cs @@ -93,7 +93,7 @@ public PayloadResponseRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PayloadResponse body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PayloadResponse body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Delta/DeltaGetResponse.cs index 9f6178fd688..91ad3038ae9 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PermissionGrants.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Delta/DeltaResponse.cs index 8fca59a4da3..368d8738f4c 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.PermissionGran /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PermissionGrants.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsPostRequestBody.cs b/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsPostRequestBody.cs index 7981c629600..c8de8fd0b5e 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetByIdsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PermissionGrants.GetByIds.GetByIdsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.GetByIds.GetByIdsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteCollectionOfPrimitiveValues("types", Types); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsPostResponse.cs b/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsPostResponse.cs index c2534363392..22721b56f90 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsPostResponse.cs @@ -36,7 +36,7 @@ public partial class GetByIdsPostResponse : global::Microsoft.Graph.Beta.Models. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PermissionGrants.GetByIds.GetByIdsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.GetByIds.GetByIdsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsRequestBuilder.cs index 53892264af0..74ccc382cbc 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsGetByIdsPostResponseAsync(global::Microsoft.Graph.Beta.PermissionGrants.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetByIdsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.PermissionGrants.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PermissionGrants.GetByIds.GetByIdsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsResponse.cs b/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsResponse.cs index 8e67ff0025b..dfae5c6bd35 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsResponse.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/GetByIds/GetByIdsResponse.cs @@ -20,7 +20,7 @@ public partial class GetByIdsResponse : global::Microsoft.Graph.Beta.PermissionG /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PermissionGrants.GetByIds.GetByIdsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.GetByIds.GetByIdsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/PermissionGrants/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs index 434a9980ca4..a3e0d6a55cb 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/GetUserOwnedObjects/GetUserOwnedObjectsPostRequestBody.cs @@ -68,7 +68,7 @@ public GetUserOwnedObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PermissionGrants.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody(); } /// @@ -89,7 +89,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("type", Type); writer.WriteStringValue("userId", UserId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PermissionGrants/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs index 02938bdf6b1..c347047026c 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/GetUserOwnedObjects/GetUserOwnedObjectsRequestBuilder.cs @@ -52,7 +52,7 @@ public GetUserOwnedObjectsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.PermissionGrants.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PermissionGrants.GetUserOwnedObjects.GetUserOwnedObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs index c40a3c835c7..c73198d2154 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("groupIds", GroupIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs index 4eefd76eeb3..462f4dd5ad5 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberGroups.CheckMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberGroups.CheckMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs index d43f50198ab..15227bc01be 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsCheckMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public CheckMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberGroups.CheckMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs index df8742bf8a6..29b9e7cd956 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberGroups/CheckMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberGroupsResponse : global::Microsoft.Graph.Beta.Pe /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberGroups.CheckMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberGroups.CheckMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs index f6a5ee05f1c..b958cb43f1d 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsPostRequestBody.cs @@ -52,7 +52,7 @@ public CheckMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("ids", Ids); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs index b11f80fb1e2..aa2cfaf0469 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberObjects.CheckMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberObjects.CheckMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs index 06c0d844494..3136d6ee7d6 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsCheckMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CheckMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberObjects.CheckMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs index a0ab2085748..d1bae7d1f8b 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/CheckMemberObjects/CheckMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class CheckMemberObjectsResponse : global::Microsoft.Graph.Beta.P /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberObjects.CheckMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.Item.CheckMemberObjects.CheckMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs index a3c3132f030..3295aaad6d5 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberGroupsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberGroups.GetMemberGroupsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberGroups.GetMemberGroupsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs index dc26eb19f14..824de90311d 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberGroups.GetMemberGroupsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberGroups.GetMemberGroupsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs index 057ea565b5b..c3957862aa6 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsRequestBuilder.cs @@ -51,7 +51,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsGetMemberGroupsPostResponseAsync(global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -78,7 +78,7 @@ public GetMemberGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -101,7 +101,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberGroups.GetMemberGroupsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsResponse.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsResponse.cs index ea9e2bffad5..22fa68fe5ee 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsResponse.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberGroups/GetMemberGroupsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberGroupsResponse : global::Microsoft.Graph.Beta.Perm /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberGroups.GetMemberGroupsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberGroups.GetMemberGroupsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs index 73997e230ef..e4e765d0479 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsPostRequestBody.cs @@ -42,7 +42,7 @@ public GetMemberObjectsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberObjects.GetMemberObjectsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberObjects.GetMemberObjectsPostRequestBody(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("securityEnabledOnly", SecurityEnabledOnly); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs index f33944bf66d..8ce024f4900 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsPostResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberObjects.GetMemberObjectsPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberObjects.GetMemberObjectsPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs index 10cb459705a..678cdca160f 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsRequestBuilder.cs @@ -50,7 +50,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsGetMemberObjectsPostResponseAsync(global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public GetMemberObjectsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberObjects.GetMemberObjectsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsResponse.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsResponse.cs index 364951db40c..fd396ac295c 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsResponse.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/GetMemberObjects/GetMemberObjectsResponse.cs @@ -20,7 +20,7 @@ public partial class GetMemberObjectsResponse : global::Microsoft.Graph.Beta.Per /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberObjects.GetMemberObjectsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.Item.GetMemberObjects.GetMemberObjectsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs index 7ea7532eb1b..439bd779e0d 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/Item/ResourceSpecificPermissionGrantItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/PermissionGrantsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PermissionGrants/PermissionGrantsRequestBuilder.cs index 999b2db61d7..ee726592acc 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/PermissionGrantsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/PermissionGrantsRequestBuilder.cs @@ -111,7 +111,7 @@ public PermissionGrantsRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -153,7 +153,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ResourceSpecificPermissionGrant body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/ValidateProperties/ValidatePropertiesPostRequestBody.cs b/src/Microsoft.Graph/Generated/PermissionGrants/ValidateProperties/ValidatePropertiesPostRequestBody.cs index 3a859470273..17bb17b6a0e 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/ValidateProperties/ValidatePropertiesPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/ValidateProperties/ValidatePropertiesPostRequestBody.cs @@ -90,7 +90,7 @@ public ValidatePropertiesPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PermissionGrants.ValidateProperties.ValidatePropertiesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PermissionGrants.ValidateProperties.ValidatePropertiesPostRequestBody(); } /// @@ -113,7 +113,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("displayName", DisplayName); writer.WriteStringValue("entityType", EntityType); writer.WriteStringValue("mailNickname", MailNickname); diff --git a/src/Microsoft.Graph/Generated/PermissionGrants/ValidateProperties/ValidatePropertiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/PermissionGrants/ValidateProperties/ValidatePropertiesRequestBuilder.cs index f6bfc348830..341bbd46bb0 100644 --- a/src/Microsoft.Graph/Generated/PermissionGrants/ValidateProperties/ValidatePropertiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PermissionGrants/ValidateProperties/ValidatePropertiesRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.PermissionGrants.Valida public async Task PostAsync(global::Microsoft.Graph.Beta.PermissionGrants.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PermissionGrants.ValidateProperties.ValidatePropertiesPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Places/Item/Descendants/DescendantsGetResponse.cs b/src/Microsoft.Graph/Generated/Places/Item/Descendants/DescendantsGetResponse.cs index 753dc702f39..41b4eda15ad 100644 --- a/src/Microsoft.Graph/Generated/Places/Item/Descendants/DescendantsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Places/Item/Descendants/DescendantsGetResponse.cs @@ -36,7 +36,7 @@ public partial class DescendantsGetResponse : global::Microsoft.Graph.Beta.Model /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Places.Item.Descendants.DescendantsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Places.Item.Descendants.DescendantsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Places/Item/Descendants/DescendantsResponse.cs b/src/Microsoft.Graph/Generated/Places/Item/Descendants/DescendantsResponse.cs index f597b917bbc..149d01cbe98 100644 --- a/src/Microsoft.Graph/Generated/Places/Item/Descendants/DescendantsResponse.cs +++ b/src/Microsoft.Graph/Generated/Places/Item/Descendants/DescendantsResponse.cs @@ -20,7 +20,7 @@ public partial class DescendantsResponse : global::Microsoft.Graph.Beta.Places.I /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Places.Item.Descendants.DescendantsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Places.Item.Descendants.DescendantsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/Item/RoomItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/Item/RoomItemRequestBuilder.cs index 1a39b6536ab..1961543593d 100644 --- a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/Item/RoomItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/Item/RoomItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Room body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Room body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/RoomsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/RoomsRequestBuilder.cs index a4970bbfe39..dd6441df411 100644 --- a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/RoomsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Rooms/RoomsRequestBuilder.cs @@ -93,7 +93,7 @@ public RoomsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Room body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Room body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/RoomsWithPlaceId/RoomsWithPlaceIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/RoomsWithPlaceId/RoomsWithPlaceIdRequestBuilder.cs index f9b916aa554..7aae5c5492b 100644 --- a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/RoomsWithPlaceId/RoomsWithPlaceIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/RoomsWithPlaceId/RoomsWithPlaceIdRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Room body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Room body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Workspaces/Item/WorkspaceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Workspaces/Item/WorkspaceItemRequestBuilder.cs index e1502ea0477..e57d66f43b4 100644 --- a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Workspaces/Item/WorkspaceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Workspaces/Item/WorkspaceItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Workspace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Workspace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Workspaces/WorkspacesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Workspaces/WorkspacesRequestBuilder.cs index 5fa06c6a8f4..e50c03f5772 100644 --- a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Workspaces/WorkspacesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/Workspaces/WorkspacesRequestBuilder.cs @@ -93,7 +93,7 @@ public WorkspacesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Workspace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Workspace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/WorkspacesWithPlaceId/WorkspacesWithPlaceIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/WorkspacesWithPlaceId/WorkspacesWithPlaceIdRequestBuilder.cs index f7dd3ac3581..21b88a35861 100644 --- a/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/WorkspacesWithPlaceId/WorkspacesWithPlaceIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Places/Item/GraphRoomList/WorkspacesWithPlaceId/WorkspacesWithPlaceIdRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Workspace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Workspace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Places/Item/PlaceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Places/Item/PlaceItemRequestBuilder.cs index 35db4399a92..6dc3e0db5b9 100644 --- a/src/Microsoft.Graph/Generated/Places/Item/PlaceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Places/Item/PlaceItemRequestBuilder.cs @@ -93,7 +93,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Place body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Place body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PlacesWithPlaceId/PlacesWithPlaceIdRequestBuilder.cs b/src/Microsoft.Graph/Generated/PlacesWithPlaceId/PlacesWithPlaceIdRequestBuilder.cs index ca76085861a..30eabbf06a1 100644 --- a/src/Microsoft.Graph/Generated/PlacesWithPlaceId/PlacesWithPlaceIdRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PlacesWithPlaceId/PlacesWithPlaceIdRequestBuilder.cs @@ -77,7 +77,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Place body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -119,7 +119,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Place body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Buckets/BucketsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Buckets/BucketsRequestBuilder.cs index 621cc50d102..8eaa0caa64a 100644 --- a/src/Microsoft.Graph/Generated/Planner/Buckets/BucketsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Buckets/BucketsRequestBuilder.cs @@ -101,7 +101,7 @@ public BucketsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Buckets/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Planner/Buckets/Delta/DeltaGetResponse.cs index 355f542b68b..aa06e4f2df6 100644 --- a/src/Microsoft.Graph/Generated/Planner/Buckets/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Planner/Buckets/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Planner.Buckets.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Buckets.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Planner/Buckets/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Planner/Buckets/Delta/DeltaResponse.cs index b6e091806b2..fc5b3df76e2 100644 --- a/src/Microsoft.Graph/Generated/Planner/Buckets/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Planner/Buckets/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Planner.Bucket /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Planner.Buckets.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Buckets.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/PlannerBucketItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/PlannerBucketItemRequestBuilder.cs index 51b513314db..8117241f7cf 100644 --- a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/PlannerBucketItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/PlannerBucketItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs index 4254bab3a8d..73b1d373565 100644 --- a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Planner.Buckets.Item.Tasks.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Buckets.Item.Tasks.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Delta/DeltaResponse.cs index 280b01554c2..e5f73bf66b7 100644 --- a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Planner.Bucket /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Planner.Buckets.Item.Tasks.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Buckets.Item.Tasks.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs index de0334a6ed8..a15dc87a515 100644 --- a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs index f9748bd21a7..ec230e207ea 100644 --- a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs index f84adad5744..76f5774f8b9 100644 --- a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs index f4576eeb2ff..7f80d1d3bc3 100644 --- a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs index 550055944cd..07968e241c8 100644 --- a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/TasksRequestBuilder.cs index 779f0fd771e..92b6d261e43 100644 --- a/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Buckets/Item/Tasks/TasksRequestBuilder.cs @@ -100,7 +100,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/PlannerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/PlannerRequestBuilder.cs index 8907d9859ac..e5bd76d7bbd 100644 --- a/src/Microsoft.Graph/Generated/Planner/PlannerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/PlannerRequestBuilder.cs @@ -98,7 +98,7 @@ public PlannerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.Planner body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -140,7 +140,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Planner body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Delta/DeltaGetResponse.cs index 8296afe90b8..033919a11ce 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Planner.Plans.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Plans.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Delta/DeltaResponse.cs index 5f5682e7f25..8b5a0581407 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Planner.Plans. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Planner.Plans.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Plans.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs index a9b062c0bc3..26d7ae95463 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Archive/ArchivePostRequestBody.cs @@ -52,7 +52,7 @@ public ArchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Planner.Plans.Item.Archive.ArchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Plans.Item.Archive.ArchivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("justification", Justification); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs index 3d282c888fd..06beb69c853 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Archive/ArchiveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Planner.Plans.Item.Arch public async Task PostAsync(global::Microsoft.Graph.Beta.Planner.Plans.Item.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Planner.Plans.Item.Archive.ArchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs index 46715d235d6..3950d540696 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/BucketsRequestBuilder.cs @@ -100,7 +100,7 @@ public BucketsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs index 169c978762c..950cfb11728 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Planner.Plans.Item.Buckets.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Plans.Item.Buckets.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs index b28802d852d..d891fe70213 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Planner.Plans. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Planner.Plans.Item.Buckets.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Plans.Item.Buckets.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs index 1ce37772fcc..85564c598b6 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/PlannerBucketItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucket body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs index 7336413ec7b..f073d1f0c2a 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs index 2820330f829..5747e614505 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Planner.Plans. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Plans.Item.Buckets.Item.Tasks.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs index a0ff72a8ae4..d895235aa07 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs index 5de3a72a8ce..1e2843d8c01 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs index d945116af94..35ee309eed3 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs index 9ae5ac0ff73..fa91f900449 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs index e0c11d35f32..1fef20a85ad 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs index e8db482afd8..d3172b4481c 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Buckets/Item/Tasks/TasksRequestBuilder.cs @@ -99,7 +99,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Details/DetailsRequestBuilder.cs index d95f692b58b..3574c7f68de 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Details/DetailsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerPlanDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlanDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs index c8b0958a953..4e5eec57729 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/MoveToContainer/MoveToContainerPostRequestBody.cs @@ -53,7 +53,7 @@ public MoveToContainerPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("container", Container); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs index 821bd4fd3e8..75f9f305ccd 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/MoveToContainer/MoveToContainerRequestBuilder.cs @@ -52,7 +52,7 @@ public MoveToContainerRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Planner.Plans.Item.MoveToContainer.MoveToContainerPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs index 896b8489993..e6afc9efd85 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/PlannerPlanItemRequestBuilder.cs @@ -135,7 +135,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -196,7 +196,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs index 0f3ee4c5e27..566294d11ad 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Planner.Plans.Item.Tasks.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Plans.Item.Tasks.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs index 7325a0ea9f0..3d328d49e90 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Planner.Plans. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Planner.Plans.Item.Tasks.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Plans.Item.Tasks.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs index fef40d87a0c..9bb75b22de0 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs index 86c4819896f..13b97960a19 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs index 7bffe2473d3..6a94b084a76 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/Details/DetailsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs index 8abda0fde65..09f98e8f3e1 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/PlannerTaskItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs index 358100f06b1..46854660198 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs index 7a251aab1a8..16a45eaddd9 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Tasks/TasksRequestBuilder.cs @@ -100,7 +100,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs index 0a667854dde..f97a38237f3 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Unarchive/UnarchivePostRequestBody.cs @@ -52,7 +52,7 @@ public UnarchivePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("justification", Justification); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs index f85c4235dd0..8809a316755 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/Item/Unarchive/UnarchiveRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Planner.Plans.Item.Unar public async Task PostAsync(global::Microsoft.Graph.Beta.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Planner.Plans.Item.Unarchive.UnarchivePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Plans/PlansRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Plans/PlansRequestBuilder.cs index 0cb4effbe1d..711b2012eb4 100644 --- a/src/Microsoft.Graph/Generated/Planner/Plans/PlansRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Plans/PlansRequestBuilder.cs @@ -101,7 +101,7 @@ public PlansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerPlan body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Rosters/Item/AssignSensitivityLabel/AssignSensitivityLabelPostRequestBody.cs b/src/Microsoft.Graph/Generated/Planner/Rosters/Item/AssignSensitivityLabel/AssignSensitivityLabelPostRequestBody.cs index 514f8e56c21..1df78961f04 100644 --- a/src/Microsoft.Graph/Generated/Planner/Rosters/Item/AssignSensitivityLabel/AssignSensitivityLabelPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Planner/Rosters/Item/AssignSensitivityLabel/AssignSensitivityLabelPostRequestBody.cs @@ -59,7 +59,7 @@ public AssignSensitivityLabelPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Planner.Rosters.Item.AssignSensitivityLabel.AssignSensitivityLabelPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Rosters.Item.AssignSensitivityLabel.AssignSensitivityLabelPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("assignmentMethod", AssignmentMethod); writer.WriteStringValue("sensitivityLabelId", SensitivityLabelId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Planner/Rosters/Item/AssignSensitivityLabel/AssignSensitivityLabelRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Rosters/Item/AssignSensitivityLabel/AssignSensitivityLabelRequestBuilder.cs index bc95ba85f0c..5984a94a7d4 100644 --- a/src/Microsoft.Graph/Generated/Planner/Rosters/Item/AssignSensitivityLabel/AssignSensitivityLabelRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Rosters/Item/AssignSensitivityLabel/AssignSensitivityLabelRequestBuilder.cs @@ -52,7 +52,7 @@ public AssignSensitivityLabelRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Planner.Rosters.Item.AssignSensitivityLabel.AssignSensitivityLabelPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Planner.Rosters.Item.AssignSensitivityLabel.AssignSensitivityLabelPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Rosters/Item/Members/Item/PlannerRosterMemberItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Rosters/Item/Members/Item/PlannerRosterMemberItemRequestBuilder.cs index 17228f7967f..183fb891aa9 100644 --- a/src/Microsoft.Graph/Generated/Planner/Rosters/Item/Members/Item/PlannerRosterMemberItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Rosters/Item/Members/Item/PlannerRosterMemberItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerRosterMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerRosterMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Rosters/Item/Members/MembersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Rosters/Item/Members/MembersRequestBuilder.cs index 6ada8cda711..6bee9f22938 100644 --- a/src/Microsoft.Graph/Generated/Planner/Rosters/Item/Members/MembersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Rosters/Item/Members/MembersRequestBuilder.cs @@ -95,7 +95,7 @@ public MembersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerRosterMember body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerRosterMember body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Rosters/Item/PlannerRosterItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Rosters/Item/PlannerRosterItemRequestBuilder.cs index 06d0a7ae1a2..378425bf9be 100644 --- a/src/Microsoft.Graph/Generated/Planner/Rosters/Item/PlannerRosterItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Rosters/Item/PlannerRosterItemRequestBuilder.cs @@ -116,7 +116,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerRoster body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerRoster body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Rosters/RostersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Rosters/RostersRequestBuilder.cs index b8cebb014c3..d524246712d 100644 --- a/src/Microsoft.Graph/Generated/Planner/Rosters/RostersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Rosters/RostersRequestBuilder.cs @@ -94,7 +94,7 @@ public RostersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerRoster body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerRoster body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Tasks/Delta/DeltaGetResponse.cs b/src/Microsoft.Graph/Generated/Planner/Tasks/Delta/DeltaGetResponse.cs index 450793abca0..9daa5066d3d 100644 --- a/src/Microsoft.Graph/Generated/Planner/Tasks/Delta/DeltaGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Planner/Tasks/Delta/DeltaGetResponse.cs @@ -36,7 +36,7 @@ public partial class DeltaGetResponse : global::Microsoft.Graph.Beta.Models.Base /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Planner.Tasks.Delta.DeltaGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Tasks.Delta.DeltaGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Planner/Tasks/Delta/DeltaResponse.cs b/src/Microsoft.Graph/Generated/Planner/Tasks/Delta/DeltaResponse.cs index 4a28506fa37..9be4a244bf7 100644 --- a/src/Microsoft.Graph/Generated/Planner/Tasks/Delta/DeltaResponse.cs +++ b/src/Microsoft.Graph/Generated/Planner/Tasks/Delta/DeltaResponse.cs @@ -20,7 +20,7 @@ public partial class DeltaResponse : global::Microsoft.Graph.Beta.Planner.Tasks. /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Planner.Tasks.Delta.DeltaResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Planner.Tasks.Delta.DeltaResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Planner/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs index 8052ac45557..309033234a7 100644 --- a/src/Microsoft.Graph/Generated/Planner/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Tasks/Item/AssignedToTaskBoardFormat/AssignedToTaskBoardFormatRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerAssignedToTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs index 58ffba4cd29..ef2958e83de 100644 --- a/src/Microsoft.Graph/Generated/Planner/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Tasks/Item/BucketTaskBoardFormat/BucketTaskBoardFormatRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerBucketTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Tasks/Item/Details/DetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Tasks/Item/Details/DetailsRequestBuilder.cs index 6d2de412fef..9e473291f2b 100644 --- a/src/Microsoft.Graph/Generated/Planner/Tasks/Item/Details/DetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Tasks/Item/Details/DetailsRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTaskDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Tasks/Item/PlannerTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Tasks/Item/PlannerTaskItemRequestBuilder.cs index c72e1ba4dd5..5623d522f2f 100644 --- a/src/Microsoft.Graph/Generated/Planner/Tasks/Item/PlannerTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Tasks/Item/PlannerTaskItemRequestBuilder.cs @@ -123,7 +123,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -184,7 +184,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs index d8e73f60a33..59a2a38bc78 100644 --- a/src/Microsoft.Graph/Generated/Planner/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Tasks/Item/ProgressTaskBoardFormat/ProgressTaskBoardFormatRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerProgressTaskBoardTaskFormat body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Planner/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Planner/Tasks/TasksRequestBuilder.cs index e6b7d0c852b..dde7d8e4ebc 100644 --- a/src/Microsoft.Graph/Generated/Planner/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Planner/Tasks/TasksRequestBuilder.cs @@ -101,7 +101,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PlannerTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AccessReviewPolicy/AccessReviewPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AccessReviewPolicy/AccessReviewPolicyRequestBuilder.cs index 89cc586db4d..f091185a683 100644 --- a/src/Microsoft.Graph/Generated/Policies/AccessReviewPolicy/AccessReviewPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AccessReviewPolicy/AccessReviewPolicyRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AccessReviewPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AccessReviewPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/ActivityBasedTimeoutPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/ActivityBasedTimeoutPoliciesRequestBuilder.cs index 9e77b0b1aa8..902cf8d4050 100644 --- a/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/ActivityBasedTimeoutPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/ActivityBasedTimeoutPoliciesRequestBuilder.cs @@ -95,7 +95,7 @@ public ActivityBasedTimeoutPoliciesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ActivityBasedTimeoutPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ActivityBasedTimeoutPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/ActivityBasedTimeoutPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/ActivityBasedTimeoutPolicyItemRequestBuilder.cs index a06d7ccf255..d5e46102558 100644 --- a/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/ActivityBasedTimeoutPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/ActivityBasedTimeoutPolicies/Item/ActivityBasedTimeoutPolicyItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ActivityBasedTimeoutPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ActivityBasedTimeoutPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AdminConsentRequestPolicy/AdminConsentRequestPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AdminConsentRequestPolicy/AdminConsentRequestPolicyRequestBuilder.cs index 0732c7ac464..72b9b2e45b1 100644 --- a/src/Microsoft.Graph/Generated/Policies/AdminConsentRequestPolicy/AdminConsentRequestPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AdminConsentRequestPolicy/AdminConsentRequestPolicyRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AdminConsentRequestPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AdminConsentRequestPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AppManagementPolicies/AppManagementPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AppManagementPolicies/AppManagementPoliciesRequestBuilder.cs index ce9c808bb03..2737f0bbe3e 100644 --- a/src/Microsoft.Graph/Generated/Policies/AppManagementPolicies/AppManagementPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AppManagementPolicies/AppManagementPoliciesRequestBuilder.cs @@ -95,7 +95,7 @@ public AppManagementPoliciesRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AppManagementPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AppManagementPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AppManagementPolicies/Item/AppManagementPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AppManagementPolicies/Item/AppManagementPolicyItemRequestBuilder.cs index ce908f97d72..58b94607204 100644 --- a/src/Microsoft.Graph/Generated/Policies/AppManagementPolicies/Item/AppManagementPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AppManagementPolicies/Item/AppManagementPolicyItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AppManagementPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppManagementPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AuthenticationFlowsPolicy/AuthenticationFlowsPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AuthenticationFlowsPolicy/AuthenticationFlowsPolicyRequestBuilder.cs index b8195fec0f4..88da436f600 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthenticationFlowsPolicy/AuthenticationFlowsPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthenticationFlowsPolicy/AuthenticationFlowsPolicyRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationFlowsPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationFlowsPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/AuthenticationMethodConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/AuthenticationMethodConfigurationsRequestBuilder.cs index 8cd6abda6c6..3067efdbded 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/AuthenticationMethodConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/AuthenticationMethodConfigurationsRequestBuilder.cs @@ -93,7 +93,7 @@ public AuthenticationMethodConfigurationsRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/Item/AuthenticationMethodConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/Item/AuthenticationMethodConfigurationItemRequestBuilder.cs index 1e000892035..ea9dc45b1e0 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/Item/AuthenticationMethodConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthenticationMethodsPolicy/AuthenticationMethodConfigurations/Item/AuthenticationMethodConfigurationItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AuthenticationMethodsPolicy/AuthenticationMethodsPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AuthenticationMethodsPolicy/AuthenticationMethodsPolicyRequestBuilder.cs index 8b69e8e6637..e259eff1ab2 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthenticationMethodsPolicy/AuthenticationMethodsPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthenticationMethodsPolicy/AuthenticationMethodsPolicyRequestBuilder.cs @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodsPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodsPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/AuthenticationStrengthPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/AuthenticationStrengthPoliciesRequestBuilder.cs index a58b884cacb..0f49b286eef 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/AuthenticationStrengthPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/AuthenticationStrengthPoliciesRequestBuilder.cs @@ -107,7 +107,7 @@ public AuthenticationStrengthPoliciesRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -149,7 +149,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesGetResponse.cs b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesGetResponse.cs index a6e700326dd..f62462848c6 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesGetResponse.cs @@ -36,7 +36,7 @@ public partial class FindByMethodModeWithAuthenticationMethodModesGetResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Policies.AuthenticationStrengthPolicies.FindByMethodModeWithAuthenticationMethodModes.FindByMethodModeWithAuthenticationMethodModesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Policies.AuthenticationStrengthPolicies.FindByMethodModeWithAuthenticationMethodModes.FindByMethodModeWithAuthenticationMethodModesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesResponse.cs b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesResponse.cs index 10fb1880fe6..3907ae854b1 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesResponse.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/FindByMethodModeWithAuthenticationMethodModes/FindByMethodModeWithAuthenticationMethodModesResponse.cs @@ -20,7 +20,7 @@ public partial class FindByMethodModeWithAuthenticationMethodModesResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Policies.AuthenticationStrengthPolicies.FindByMethodModeWithAuthenticationMethodModes.FindByMethodModeWithAuthenticationMethodModesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Policies.AuthenticationStrengthPolicies.FindByMethodModeWithAuthenticationMethodModes.FindByMethodModeWithAuthenticationMethodModesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/AuthenticationStrengthPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/AuthenticationStrengthPolicyItemRequestBuilder.cs index 49c071a5794..b138562c82c 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/AuthenticationStrengthPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/AuthenticationStrengthPolicyItemRequestBuilder.cs @@ -117,7 +117,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -178,7 +178,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationStrengthPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/CombinationConfigurations/CombinationConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/CombinationConfigurations/CombinationConfigurationsRequestBuilder.cs index 3efcb8d991d..c1b1e21ecac 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/CombinationConfigurations/CombinationConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/CombinationConfigurations/CombinationConfigurationsRequestBuilder.cs @@ -93,7 +93,7 @@ public CombinationConfigurationsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs index f0b1721db81..8aa93a94149 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/CombinationConfigurations/Item/AuthenticationCombinationConfigurationItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationCombinationConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsPostRequestBody.cs index 98e46957f89..a6a6d9f2fdd 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsPostRequestBody.cs @@ -53,7 +53,7 @@ public UpdateAllowedCombinationsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Policies.AuthenticationStrengthPolicies.Item.UpdateAllowedCombinations.UpdateAllowedCombinationsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Policies.AuthenticationStrengthPolicies.Item.UpdateAllowedCombinations.UpdateAllowedCombinationsPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfEnumValues("allowedCombinations", AllowedCombinations); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsRequestBuilder.cs index f66ef153eed..8861bc888cc 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthenticationStrengthPolicies/Item/UpdateAllowedCombinations/UpdateAllowedCombinationsRequestBuilder.cs @@ -52,7 +52,7 @@ public UpdateAllowedCombinationsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Policies.AuthenticationStrengthPolicies.Item.UpdateAllowedCombinations.UpdateAllowedCombinationsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Policies.AuthenticationStrengthPolicies.Item.UpdateAllowedCombinations.UpdateAllowedCombinationsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/AuthorizationPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/AuthorizationPolicyRequestBuilder.cs index e1799a4393e..569cd3efed5 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/AuthorizationPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/AuthorizationPolicyRequestBuilder.cs @@ -94,7 +94,7 @@ public AuthorizationPolicyRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthorizationPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthorizationPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/Item/AuthorizationPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/Item/AuthorizationPolicyItemRequestBuilder.cs index 40f4edcfac6..fb1e63edb30 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/Item/AuthorizationPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/Item/AuthorizationPolicyItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthorizationPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthorizationPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/Item/DefaultUserRoleOverrides/DefaultUserRoleOverridesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/Item/DefaultUserRoleOverrides/DefaultUserRoleOverridesRequestBuilder.cs index 033ca9e0e77..4706b5e37ca 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/Item/DefaultUserRoleOverrides/DefaultUserRoleOverridesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/Item/DefaultUserRoleOverrides/DefaultUserRoleOverridesRequestBuilder.cs @@ -93,7 +93,7 @@ public DefaultUserRoleOverridesRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DefaultUserRoleOverride body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DefaultUserRoleOverride body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/Item/DefaultUserRoleOverrides/Item/DefaultUserRoleOverrideItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/Item/DefaultUserRoleOverrides/Item/DefaultUserRoleOverrideItemRequestBuilder.cs index 013e8ef408b..94baa7a5799 100644 --- a/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/Item/DefaultUserRoleOverrides/Item/DefaultUserRoleOverrideItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/AuthorizationPolicy/Item/DefaultUserRoleOverrides/Item/DefaultUserRoleOverrideItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DefaultUserRoleOverride body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DefaultUserRoleOverride body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/B2cAuthenticationMethodsPolicy/B2cAuthenticationMethodsPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/B2cAuthenticationMethodsPolicy/B2cAuthenticationMethodsPolicyRequestBuilder.cs index eae6488508e..0513ae0cbd5 100644 --- a/src/Microsoft.Graph/Generated/Policies/B2cAuthenticationMethodsPolicy/B2cAuthenticationMethodsPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/B2cAuthenticationMethodsPolicy/B2cAuthenticationMethodsPolicyRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.B2cAuthenticationMethodsPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.B2cAuthenticationMethodsPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/ClaimsMappingPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/ClaimsMappingPoliciesRequestBuilder.cs index 0af875a8c56..08e9d119272 100644 --- a/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/ClaimsMappingPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/ClaimsMappingPoliciesRequestBuilder.cs @@ -95,7 +95,7 @@ public ClaimsMappingPoliciesRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ClaimsMappingPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ClaimsMappingPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/ClaimsMappingPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/ClaimsMappingPolicyItemRequestBuilder.cs index d6b39ad6f58..b897f455518 100644 --- a/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/ClaimsMappingPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/ClaimsMappingPolicies/Item/ClaimsMappingPolicyItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ClaimsMappingPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ClaimsMappingPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/CrossTenantAccessPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/CrossTenantAccessPolicyRequestBuilder.cs index 6558afe1e5f..214c656e8b0 100644 --- a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/CrossTenantAccessPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/CrossTenantAccessPolicyRequestBuilder.cs @@ -116,7 +116,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Default/DefaultRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Default/DefaultRequestBuilder.cs index e8600eb94de..cd109e1a2ea 100644 --- a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Default/DefaultRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Default/DefaultRequestBuilder.cs @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyConfigurationDefault body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyConfigurationDefault body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilder.cs index d26fac5dcb8..d4b87fb3d17 100644 --- a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/CrossTenantAccessPolicyConfigurationPartnerTenantItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyConfigurationPartner body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyConfigurationPartner body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs index d66e0c7208a..a3e305fb633 100644 --- a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs @@ -82,8 +82,8 @@ public async Task DeleteAsync(Action(requestInfo, global::Microsoft.Graph.Beta.Models.CrossTenantIdentitySyncPolicyPartner.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Create a cross-tenant user synchronization policy for a partner-specific configuration. - /// Find more info here + /// Update the user synchronization policy of a partner-specific configuration. + /// Find more info here /// /// A /// The request body @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PutAsync(global::Microsoft.Graph.Beta.Models.CrossTenantIdentitySyncPolicyPartner body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -146,7 +146,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create a cross-tenant user synchronization policy for a partner-specific configuration. + /// Update the user synchronization policy of a partner-specific configuration. /// /// A /// The request body @@ -160,7 +160,7 @@ public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.M public RequestInformation ToPutRequestInformation(global::Microsoft.Graph.Beta.Models.CrossTenantIdentitySyncPolicyPartner body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/PartnersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/PartnersRequestBuilder.cs index 9f3e7c2791d..d62fb01474b 100644 --- a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/PartnersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/PartnersRequestBuilder.cs @@ -95,7 +95,7 @@ public PartnersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyConfigurationPartner body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CrossTenantAccessPolicyConfigurationPartner body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Templates/MultiTenantOrganizationIdentitySynchronization/MultiTenantOrganizationIdentitySynchronizationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Templates/MultiTenantOrganizationIdentitySynchronization/MultiTenantOrganizationIdentitySynchronizationRequestBuilder.cs index a5ba56720d3..7066f38a877 100644 --- a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Templates/MultiTenantOrganizationIdentitySynchronization/MultiTenantOrganizationIdentitySynchronizationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Templates/MultiTenantOrganizationIdentitySynchronization/MultiTenantOrganizationIdentitySynchronizationRequestBuilder.cs @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationIdentitySyncPolicyTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationIdentitySyncPolicyTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Templates/MultiTenantOrganizationPartnerConfiguration/MultiTenantOrganizationPartnerConfigurationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Templates/MultiTenantOrganizationPartnerConfiguration/MultiTenantOrganizationPartnerConfigurationRequestBuilder.cs index 6d2126bd440..9ca14b94289 100644 --- a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Templates/MultiTenantOrganizationPartnerConfiguration/MultiTenantOrganizationPartnerConfigurationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Templates/MultiTenantOrganizationPartnerConfiguration/MultiTenantOrganizationPartnerConfigurationRequestBuilder.cs @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationPartnerConfigurationTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MultiTenantOrganizationPartnerConfigurationTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Templates/TemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Templates/TemplatesRequestBuilder.cs index 48c4baedc63..eaf145f4479 100644 --- a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Templates/TemplatesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Templates/TemplatesRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PolicyTemplate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PolicyTemplate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/DefaultAppManagementPolicy/DefaultAppManagementPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/DefaultAppManagementPolicy/DefaultAppManagementPolicyRequestBuilder.cs index ff362587fea..8f0f7c61106 100644 --- a/src/Microsoft.Graph/Generated/Policies/DefaultAppManagementPolicy/DefaultAppManagementPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/DefaultAppManagementPolicy/DefaultAppManagementPolicyRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TenantAppManagementPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TenantAppManagementPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/DirectoryRoleAccessReviewPolicy/DirectoryRoleAccessReviewPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/DirectoryRoleAccessReviewPolicy/DirectoryRoleAccessReviewPolicyRequestBuilder.cs index b8eec52feea..0099f2ec8fd 100644 --- a/src/Microsoft.Graph/Generated/Policies/DirectoryRoleAccessReviewPolicy/DirectoryRoleAccessReviewPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/DirectoryRoleAccessReviewPolicy/DirectoryRoleAccessReviewPolicyRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DirectoryRoleAccessReviewPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryRoleAccessReviewPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/ExternalIdentitiesPolicy/ExternalIdentitiesPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ExternalIdentitiesPolicy/ExternalIdentitiesPolicyRequestBuilder.cs index c1c0c8b3aee..6268e4d6425 100644 --- a/src/Microsoft.Graph/Generated/Policies/ExternalIdentitiesPolicy/ExternalIdentitiesPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/ExternalIdentitiesPolicy/ExternalIdentitiesPolicyRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ExternalIdentitiesPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ExternalIdentitiesPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/FeatureRolloutPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/FeatureRolloutPoliciesRequestBuilder.cs index e04a43535f7..5b4c7f2f88e 100644 --- a/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/FeatureRolloutPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/FeatureRolloutPoliciesRequestBuilder.cs @@ -95,7 +95,7 @@ public FeatureRolloutPoliciesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.FeatureRolloutPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.FeatureRolloutPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs index c20a0a0f1e9..0281eabf461 100644 --- a/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/Item/AppliesTo/AppliesToRequestBuilder.cs @@ -100,7 +100,7 @@ public AppliesToRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.DirectoryObject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.DirectoryObject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/Item/AppliesTo/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/Item/AppliesTo/Ref/RefRequestBuilder.cs index e9efc85040e..50d0b46ffd7 100644 --- a/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/Item/AppliesTo/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/Item/AppliesTo/Ref/RefRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/policies/featureRolloutPolicies/{featureRolloutPolicy%2Did}/appliesTo/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/Item/FeatureRolloutPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/Item/FeatureRolloutPolicyItemRequestBuilder.cs index 23838278e50..22801d46671 100644 --- a/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/Item/FeatureRolloutPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/FeatureRolloutPolicies/Item/FeatureRolloutPolicyItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.FeatureRolloutPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.FeatureRolloutPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/FederatedTokenValidationPolicy/FederatedTokenValidationPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/FederatedTokenValidationPolicy/FederatedTokenValidationPolicyRequestBuilder.cs index 4fe750e47cc..03259bd8179 100644 --- a/src/Microsoft.Graph/Generated/Policies/FederatedTokenValidationPolicy/FederatedTokenValidationPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/FederatedTokenValidationPolicy/FederatedTokenValidationPolicyRequestBuilder.cs @@ -57,8 +57,8 @@ public async Task DeleteAsync(Action - /// Get a list of the federatedTokenValidationPolicy objects and their properties. - /// Find more info here + /// Read the properties and relationships of a federatedTokenValidationPolicy object. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.FederatedTokenValidationPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -126,7 +126,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Get a list of the federatedTokenValidationPolicy objects and their properties. + /// Read the properties and relationships of a federatedTokenValidationPolicy object. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.FederatedTokenValidationPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -184,7 +184,7 @@ public partial class FederatedTokenValidationPolicyRequestBuilderDeleteRequestCo { } /// - /// Get a list of the federatedTokenValidationPolicy objects and their properties. + /// Read the properties and relationships of a federatedTokenValidationPolicy object. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class FederatedTokenValidationPolicyRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/HomeRealmDiscoveryPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/HomeRealmDiscoveryPoliciesRequestBuilder.cs index 5951f3fc3f3..c4bccf24441 100644 --- a/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/HomeRealmDiscoveryPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/HomeRealmDiscoveryPoliciesRequestBuilder.cs @@ -95,7 +95,7 @@ public HomeRealmDiscoveryPoliciesRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HomeRealmDiscoveryPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HomeRealmDiscoveryPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/HomeRealmDiscoveryPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/HomeRealmDiscoveryPolicyItemRequestBuilder.cs index 7139236f828..68f3d75884d 100644 --- a/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/HomeRealmDiscoveryPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/HomeRealmDiscoveryPolicies/Item/HomeRealmDiscoveryPolicyItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HomeRealmDiscoveryPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HomeRealmDiscoveryPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/IdentitySecurityDefaultsEnforcementPolicy/IdentitySecurityDefaultsEnforcementPolicyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/IdentitySecurityDefaultsEnforcementPolicy/IdentitySecurityDefaultsEnforcementPolicyRequestBuilder.cs index ac9f1c1b40a..8a4944ee02c 100644 --- a/src/Microsoft.Graph/Generated/Policies/IdentitySecurityDefaultsEnforcementPolicy/IdentitySecurityDefaultsEnforcementPolicyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/IdentitySecurityDefaultsEnforcementPolicy/IdentitySecurityDefaultsEnforcementPolicyRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.IdentitySecurityDefaultsEnforcementPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.IdentitySecurityDefaultsEnforcementPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/MobileAppManagementPolicies/Item/IncludedGroups/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/MobileAppManagementPolicies/Item/IncludedGroups/Ref/RefRequestBuilder.cs index 9462e33b17c..c36ae04a99a 100644 --- a/src/Microsoft.Graph/Generated/Policies/MobileAppManagementPolicies/Item/IncludedGroups/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/MobileAppManagementPolicies/Item/IncludedGroups/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/policies/mobileAppManagementPolicies/{mobilityManagementPolicy%2Did}/includedGroups/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/MobileAppManagementPolicies/Item/MobilityManagementPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/MobileAppManagementPolicies/Item/MobilityManagementPolicyItemRequestBuilder.cs index 892543d2aef..19ed6446a48 100644 --- a/src/Microsoft.Graph/Generated/Policies/MobileAppManagementPolicies/Item/MobilityManagementPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/MobileAppManagementPolicies/Item/MobilityManagementPolicyItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobilityManagementPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobilityManagementPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/MobileAppManagementPolicies/MobileAppManagementPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/MobileAppManagementPolicies/MobileAppManagementPoliciesRequestBuilder.cs index da423f255e1..8ce94f91bcd 100644 --- a/src/Microsoft.Graph/Generated/Policies/MobileAppManagementPolicies/MobileAppManagementPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/MobileAppManagementPolicies/MobileAppManagementPoliciesRequestBuilder.cs @@ -94,7 +94,7 @@ public MobileAppManagementPoliciesRequestBuilder(string rawUrl, IRequestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobilityManagementPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobilityManagementPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/MobileDeviceManagementPolicies/Item/IncludedGroups/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/MobileDeviceManagementPolicies/Item/IncludedGroups/Ref/RefRequestBuilder.cs index bb092612f22..7ffae3dcb0b 100644 --- a/src/Microsoft.Graph/Generated/Policies/MobileDeviceManagementPolicies/Item/IncludedGroups/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/MobileDeviceManagementPolicies/Item/IncludedGroups/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/policies/mobileDeviceManagementPolicies/{mobilityManagementPolicy%2Did}/includedGroups/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/MobileDeviceManagementPolicies/Item/MobilityManagementPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/MobileDeviceManagementPolicies/Item/MobilityManagementPolicyItemRequestBuilder.cs index 507dea27c25..548e1b6ea87 100644 --- a/src/Microsoft.Graph/Generated/Policies/MobileDeviceManagementPolicies/Item/MobilityManagementPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/MobileDeviceManagementPolicies/Item/MobilityManagementPolicyItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MobilityManagementPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MobilityManagementPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/MobileDeviceManagementPolicies/MobileDeviceManagementPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/MobileDeviceManagementPolicies/MobileDeviceManagementPoliciesRequestBuilder.cs index 7f80907c105..f8694a81302 100644 --- a/src/Microsoft.Graph/Generated/Policies/MobileDeviceManagementPolicies/MobileDeviceManagementPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/MobileDeviceManagementPolicies/MobileDeviceManagementPoliciesRequestBuilder.cs @@ -94,7 +94,7 @@ public MobileDeviceManagementPoliciesRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MobilityManagementPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MobilityManagementPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Excludes/ExcludesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Excludes/ExcludesRequestBuilder.cs index 2e053b593eb..4b8ae413ae9 100644 --- a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Excludes/ExcludesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Excludes/ExcludesRequestBuilder.cs @@ -95,7 +95,7 @@ public ExcludesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PermissionGrantConditionSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionGrantConditionSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Excludes/Item/PermissionGrantConditionSetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Excludes/Item/PermissionGrantConditionSetItemRequestBuilder.cs index ef4d80f592e..3652fbaa8fa 100644 --- a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Excludes/Item/PermissionGrantConditionSetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Excludes/Item/PermissionGrantConditionSetItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PermissionGrantConditionSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionGrantConditionSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Includes/IncludesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Includes/IncludesRequestBuilder.cs index 76b86d76772..13a3665b299 100644 --- a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Includes/IncludesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Includes/IncludesRequestBuilder.cs @@ -95,7 +95,7 @@ public IncludesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PermissionGrantConditionSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionGrantConditionSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Includes/Item/PermissionGrantConditionSetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Includes/Item/PermissionGrantConditionSetItemRequestBuilder.cs index f8f76b9b7e9..c39c39bc4ad 100644 --- a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Includes/Item/PermissionGrantConditionSetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/Includes/Item/PermissionGrantConditionSetItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PermissionGrantConditionSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionGrantConditionSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/PermissionGrantPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/PermissionGrantPolicyItemRequestBuilder.cs index f5e2d9932d7..3b65556131b 100644 --- a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/PermissionGrantPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/Item/PermissionGrantPolicyItemRequestBuilder.cs @@ -111,7 +111,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PermissionGrantPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -172,7 +172,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionGrantPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/PermissionGrantPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/PermissionGrantPoliciesRequestBuilder.cs index 40fb6fb0de2..6d24189778c 100644 --- a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/PermissionGrantPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPolicies/PermissionGrantPoliciesRequestBuilder.cs @@ -95,7 +95,7 @@ public PermissionGrantPoliciesRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PermissionGrantPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionGrantPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPreApprovalPolicies/Item/PermissionGrantPreApprovalPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPreApprovalPolicies/Item/PermissionGrantPreApprovalPolicyItemRequestBuilder.cs index 74e1d06fa3f..c94e0de434f 100644 --- a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPreApprovalPolicies/Item/PermissionGrantPreApprovalPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPreApprovalPolicies/Item/PermissionGrantPreApprovalPolicyItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PermissionGrantPreApprovalPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionGrantPreApprovalPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPreApprovalPolicies/PermissionGrantPreApprovalPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPreApprovalPolicies/PermissionGrantPreApprovalPoliciesRequestBuilder.cs index f89171c1185..5ace294ab7d 100644 --- a/src/Microsoft.Graph/Generated/Policies/PermissionGrantPreApprovalPolicies/PermissionGrantPreApprovalPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/PermissionGrantPreApprovalPolicies/PermissionGrantPreApprovalPoliciesRequestBuilder.cs @@ -95,7 +95,7 @@ public PermissionGrantPreApprovalPoliciesRequestBuilder(string rawUrl, IRequestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PermissionGrantPreApprovalPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PermissionGrantPreApprovalPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/PoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/PoliciesRequestBuilder.cs index d7fb9d3c34f..a0a6db713d1 100644 --- a/src/Microsoft.Graph/Generated/Policies/PoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/PoliciesRequestBuilder.cs @@ -242,7 +242,7 @@ public PoliciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.PolicyRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -284,7 +284,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PolicyRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/EffectiveRules/EffectiveRulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/EffectiveRules/EffectiveRulesRequestBuilder.cs index a5b7a033246..afbb048fb0e 100644 --- a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/EffectiveRules/EffectiveRulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/EffectiveRules/EffectiveRulesRequestBuilder.cs @@ -94,7 +94,7 @@ public EffectiveRulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/EffectiveRules/Item/UnifiedRoleManagementPolicyRuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/EffectiveRules/Item/UnifiedRoleManagementPolicyRuleItemRequestBuilder.cs index 6981570815b..5295b43d683 100644 --- a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/EffectiveRules/Item/UnifiedRoleManagementPolicyRuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/EffectiveRules/Item/UnifiedRoleManagementPolicyRuleItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/Rules/Item/UnifiedRoleManagementPolicyRuleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/Rules/Item/UnifiedRoleManagementPolicyRuleItemRequestBuilder.cs index 1de07590c98..1448986382d 100644 --- a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/Rules/Item/UnifiedRoleManagementPolicyRuleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/Rules/Item/UnifiedRoleManagementPolicyRuleItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/Rules/RulesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/Rules/RulesRequestBuilder.cs index d3397201133..f2b771de955 100644 --- a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/Rules/RulesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/Rules/RulesRequestBuilder.cs @@ -94,7 +94,7 @@ public RulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyRule body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyRule body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/UnifiedRoleManagementPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/UnifiedRoleManagementPolicyItemRequestBuilder.cs index 347ec41af23..a79ac290e41 100644 --- a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/UnifiedRoleManagementPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/Item/UnifiedRoleManagementPolicyItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/RoleManagementPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/RoleManagementPoliciesRequestBuilder.cs index 3e4ff3637be..79d83724328 100644 --- a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/RoleManagementPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicies/RoleManagementPoliciesRequestBuilder.cs @@ -94,7 +94,7 @@ public RoleManagementPoliciesRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicyAssignments/Item/UnifiedRoleManagementPolicyAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicyAssignments/Item/UnifiedRoleManagementPolicyAssignmentItemRequestBuilder.cs index 5bc09fcfa21..0d12cebba38 100644 --- a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicyAssignments/Item/UnifiedRoleManagementPolicyAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicyAssignments/Item/UnifiedRoleManagementPolicyAssignmentItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicyAssignments/RoleManagementPolicyAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicyAssignments/RoleManagementPolicyAssignmentsRequestBuilder.cs index 49aa4221b7f..19f09006b03 100644 --- a/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicyAssignments/RoleManagementPolicyAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/RoleManagementPolicyAssignments/RoleManagementPolicyAssignmentsRequestBuilder.cs @@ -94,7 +94,7 @@ public RoleManagementPolicyAssignmentsRequestBuilder(string rawUrl, IRequestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleManagementPolicyAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Excludes/ExcludesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Excludes/ExcludesRequestBuilder.cs index d9190f9c0f6..b2f5c191699 100644 --- a/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Excludes/ExcludesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Excludes/ExcludesRequestBuilder.cs @@ -93,7 +93,7 @@ public ExcludesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationConditionSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationConditionSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Excludes/Item/ServicePrincipalCreationConditionSetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Excludes/Item/ServicePrincipalCreationConditionSetItemRequestBuilder.cs index 268ebc47d0e..8864176251d 100644 --- a/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Excludes/Item/ServicePrincipalCreationConditionSetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Excludes/Item/ServicePrincipalCreationConditionSetItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationConditionSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationConditionSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Includes/IncludesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Includes/IncludesRequestBuilder.cs index 3373846e41e..a91c0c2a453 100644 --- a/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Includes/IncludesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Includes/IncludesRequestBuilder.cs @@ -93,7 +93,7 @@ public IncludesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationConditionSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationConditionSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Includes/Item/ServicePrincipalCreationConditionSetItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Includes/Item/ServicePrincipalCreationConditionSetItemRequestBuilder.cs index 10cae7db2ba..b9a6cf5e0ab 100644 --- a/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Includes/Item/ServicePrincipalCreationConditionSetItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/Includes/Item/ServicePrincipalCreationConditionSetItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationConditionSet body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationConditionSet body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/ServicePrincipalCreationPolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/ServicePrincipalCreationPolicyItemRequestBuilder.cs index c80415d4be2..1ffb58b9d0b 100644 --- a/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/ServicePrincipalCreationPolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/Item/ServicePrincipalCreationPolicyItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/ServicePrincipalCreationPoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/ServicePrincipalCreationPoliciesRequestBuilder.cs index b45bea1a45a..0bafb3e1054 100644 --- a/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/ServicePrincipalCreationPoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/ServicePrincipalCreationPolicies/ServicePrincipalCreationPoliciesRequestBuilder.cs @@ -93,7 +93,7 @@ public ServicePrincipalCreationPoliciesRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationPolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ServicePrincipalCreationPolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/TokenIssuancePolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/TokenIssuancePolicyItemRequestBuilder.cs index f4709791537..0798159b41a 100644 --- a/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/TokenIssuancePolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/Item/TokenIssuancePolicyItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TokenIssuancePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TokenIssuancePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/TokenIssuancePoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/TokenIssuancePoliciesRequestBuilder.cs index 9e9516d1030..cb22d36741a 100644 --- a/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/TokenIssuancePoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/TokenIssuancePolicies/TokenIssuancePoliciesRequestBuilder.cs @@ -95,7 +95,7 @@ public TokenIssuancePoliciesRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TokenIssuancePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TokenIssuancePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/TokenLifetimePolicyItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/TokenLifetimePolicyItemRequestBuilder.cs index 79a420968c4..873ba107b1a 100644 --- a/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/TokenLifetimePolicyItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/Item/TokenLifetimePolicyItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.TokenLifetimePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.TokenLifetimePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/TokenLifetimePoliciesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/TokenLifetimePoliciesRequestBuilder.cs index 8ca2188bbf4..df9ebeaf6fc 100644 --- a/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/TokenLifetimePoliciesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/TokenLifetimePolicies/TokenLifetimePoliciesRequestBuilder.cs @@ -95,7 +95,7 @@ public TokenLifetimePoliciesRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.TokenLifetimePolicy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.TokenLifetimePolicy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Connectors/ConnectorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Connectors/ConnectorsRequestBuilder.cs index 7534fda29f3..90dba9bd3ed 100644 --- a/src/Microsoft.Graph/Generated/Print/Connectors/ConnectorsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Connectors/ConnectorsRequestBuilder.cs @@ -94,7 +94,7 @@ public ConnectorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Connectors/Item/PrintConnectorItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Connectors/Item/PrintConnectorItemRequestBuilder.cs index 0b236b43eb7..7c60f886cb3 100644 --- a/src/Microsoft.Graph/Generated/Print/Connectors/Item/PrintConnectorItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Connectors/Item/PrintConnectorItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintConnector body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -160,7 +160,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintConnector body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Operations/Item/PrintOperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Operations/Item/PrintOperationItemRequestBuilder.cs index 4f42f505a9d..0f2f97cbb4e 100644 --- a/src/Microsoft.Graph/Generated/Print/Operations/Item/PrintOperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Operations/Item/PrintOperationItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Operations/OperationsRequestBuilder.cs index c1ec15756b6..d538ca0b8ec 100644 --- a/src/Microsoft.Graph/Generated/Print/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintOperation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintOperation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrintRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrintRequestBuilder.cs index cff8636f2e2..efc6f546285 100644 --- a/src/Microsoft.Graph/Generated/Print/PrintRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrintRequestBuilder.cs @@ -116,7 +116,7 @@ public PrintRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.Print body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Print body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/AllowedGroups/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/AllowedGroups/Ref/RefRequestBuilder.cs index 42e98bd539d..87ec5488561 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/AllowedGroups/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/AllowedGroups/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/print/printerShares/{printerShare%2Did}/allowedGroups/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/AllowedUsers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/AllowedUsers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs index 639cbadf97e..256cd41c079 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/AllowedUsers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/AllowedUsers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -76,7 +76,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -120,7 +120,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/AllowedUsers/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/AllowedUsers/Ref/RefRequestBuilder.cs index bc4d01350f3..9a1077fe4a8 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/AllowedUsers/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/AllowedUsers/Ref/RefRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/print/printerShares/{printerShare%2Did}/allowedUsers/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Abort/AbortPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Abort/AbortPostRequestBody.cs index d02f941bc93..059350a3f54 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Abort/AbortPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Abort/AbortPostRequestBody.cs @@ -52,7 +52,7 @@ public AbortPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Print.PrinterShares.Item.Jobs.Item.Abort.AbortPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Print.PrinterShares.Item.Jobs.Item.Abort.AbortPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reason", Reason); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Abort/AbortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Abort/AbortRequestBuilder.cs index fc10165bd6e..544a724e8d6 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Abort/AbortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Abort/AbortRequestBuilder.cs @@ -51,7 +51,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Print.PrinterShares.Ite public async Task PostAsync(global::Microsoft.Graph.Beta.Print.PrinterShares.Item.Jobs.Item.Abort.AbortPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Print.PrinterShares.Item.Jobs.Item.Abort.AbortPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs index 644c2bcd7f5..bcb11269032 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs @@ -97,7 +97,7 @@ public DocumentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintDocument body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index b83a71357d6..bc8bbb8e92e 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Print.PrinterShares.Item.Jobs.Item.Documents.Item.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Print.PrinterShares.Item.Jobs.Item.Documents.Item.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("properties", Properties); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 8700681f0c4..64824311ee2 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -53,7 +53,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Print.PrinterShares.Item.Jobs.Item.Documents.Item.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Print.PrinterShares.Item.Jobs.Item.Documents.Item.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs index 059fec72059..6dcb80ea3bd 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintDocument body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs index 8af16d8c041..4293b81d620 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -162,7 +162,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/PrintJobItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/PrintJobItemRequestBuilder.cs index e4b18a7efbd..7c33be8ceb4 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/PrintJobItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/PrintJobItemRequestBuilder.cs @@ -155,7 +155,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -219,7 +219,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs index d73edce19fb..6089099b01e 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs @@ -69,7 +69,7 @@ public RedirectPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Print.PrinterShares.Item.Jobs.Item.Redirect.RedirectPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Print.PrinterShares.Item.Jobs.Item.Redirect.RedirectPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("configuration", Configuration); writer.WriteStringValue("destinationPrinterId", DestinationPrinterId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs index 80bb1e7ff83..2253ef1487c 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs @@ -53,7 +53,7 @@ public RedirectRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Print.PrinterShares.Item.Jobs.Item.Redirect.RedirectPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -77,7 +77,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Print.PrinterShares.Item.Jobs.Item.Redirect.RedirectPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs index 62a2229f232..6e46c02b198 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs index 32c30172702..dddfdaa76cc 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs @@ -97,7 +97,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/JobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/JobsRequestBuilder.cs index 755a9dc3328..a2514dfbde0 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/JobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/Jobs/JobsRequestBuilder.cs @@ -97,7 +97,7 @@ public JobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/PrinterShareItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/PrinterShareItemRequestBuilder.cs index ade6e698e7e..fd4421a2b6f 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/PrinterShareItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/Item/PrinterShareItemRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrinterShare body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -191,7 +191,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrinterShare body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/PrinterShares/PrinterSharesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/PrinterShares/PrinterSharesRequestBuilder.cs index 749bd83d983..3ede0f7b194 100644 --- a/src/Microsoft.Graph/Generated/Print/PrinterShares/PrinterSharesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/PrinterShares/PrinterSharesRequestBuilder.cs @@ -97,7 +97,7 @@ public PrinterSharesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrinterShare body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrinterShare body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Create/CreatePostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/Printers/Create/CreatePostRequestBody.cs index 8442bcc1bb2..a78cc696bc2 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Create/CreatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Create/CreatePostRequestBody.cs @@ -139,7 +139,7 @@ public CreatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Print.Printers.Create.CreatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Print.Printers.Create.CreatePostRequestBody(); } /// @@ -165,7 +165,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("certificateSigningRequest", CertificateSigningRequest); writer.WriteStringValue("connectorId", ConnectorId); writer.WriteStringValue("displayName", DisplayName); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Create/CreateRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Create/CreateRequestBuilder.cs index b4164c54e33..d86d0c827aa 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Create/CreateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Create/CreateRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Print.Printers.Create.C public async Task PostAsync(global::Microsoft.Graph.Beta.Print.Printers.Create.CreatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Print.Printers.Create.CreatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Abort/AbortPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Abort/AbortPostRequestBody.cs index bf1f033f2cf..bf9a3c37c15 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Abort/AbortPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Abort/AbortPostRequestBody.cs @@ -52,7 +52,7 @@ public AbortPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Print.Printers.Item.Jobs.Item.Abort.AbortPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Print.Printers.Item.Jobs.Item.Abort.AbortPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reason", Reason); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Abort/AbortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Abort/AbortRequestBuilder.cs index 01fc8a37129..42d0bd691ce 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Abort/AbortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Abort/AbortRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Print.Printers.Item.Job public async Task PostAsync(global::Microsoft.Graph.Beta.Print.Printers.Item.Jobs.Item.Abort.AbortPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Print.Printers.Item.Jobs.Item.Abort.AbortPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs index bb7f9d5bea8..82912a87f13 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs @@ -94,7 +94,7 @@ public DocumentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintDocument body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index db59e661655..721c0eb32ce 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Print.Printers.Item.Jobs.Item.Documents.Item.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Print.Printers.Item.Jobs.Item.Documents.Item.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("properties", Properties); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index 181dcf90053..46d7124b9a4 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Print.Printers.Item.Jobs.Item.Documents.Item.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Print.Printers.Item.Jobs.Item.Documents.Item.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs index d3dbabb9e38..efb165ae31f 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintDocument body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs index 75aaae6ce24..cebe16569bf 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/PrintJobItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/PrintJobItemRequestBuilder.cs index 5b38358c002..c883873bd2d 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/PrintJobItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/PrintJobItemRequestBuilder.cs @@ -146,7 +146,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -207,7 +207,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs index 49d79ebbb76..1fa3b5c388e 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs @@ -69,7 +69,7 @@ public RedirectPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Print.Printers.Item.Jobs.Item.Redirect.RedirectPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Print.Printers.Item.Jobs.Item.Redirect.RedirectPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("configuration", Configuration); writer.WriteStringValue("destinationPrinterId", DestinationPrinterId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs index e1f2a5edf40..7d5d858a8d9 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs @@ -52,7 +52,7 @@ public RedirectRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Print.Printers.Item.Jobs.Item.Redirect.RedirectPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Print.Printers.Item.Jobs.Item.Redirect.RedirectPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs index f87aa9c0b42..c44b9bfb335 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs index 0df18733300..c4a96a6a7d8 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs @@ -93,7 +93,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/JobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/JobsRequestBuilder.cs index ab6bf89bdd9..a72d3efc274 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/JobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/Jobs/JobsRequestBuilder.cs @@ -95,7 +95,7 @@ public JobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/PrinterItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/PrinterItemRequestBuilder.cs index 45af7845d05..7b5d44e1825 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/PrinterItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/PrinterItemRequestBuilder.cs @@ -147,7 +147,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Printer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -208,7 +208,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Printer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/TaskTriggers/Item/PrintTaskTriggerItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/TaskTriggers/Item/PrintTaskTriggerItemRequestBuilder.cs index 7c7d045ab29..cafdcf5df41 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/TaskTriggers/Item/PrintTaskTriggerItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/TaskTriggers/Item/PrintTaskTriggerItemRequestBuilder.cs @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintTaskTrigger body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintTaskTrigger body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/Item/TaskTriggers/TaskTriggersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/Item/TaskTriggers/TaskTriggersRequestBuilder.cs index f9024b27e8e..efb4480aeb9 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/Item/TaskTriggers/TaskTriggersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/Item/TaskTriggers/TaskTriggersRequestBuilder.cs @@ -95,7 +95,7 @@ public TaskTriggersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintTaskTrigger body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintTaskTrigger body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Printers/PrintersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Printers/PrintersRequestBuilder.cs index c6a9527354f..76d57a64660 100644 --- a/src/Microsoft.Graph/Generated/Print/Printers/PrintersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Printers/PrintersRequestBuilder.cs @@ -100,7 +100,7 @@ public PrintersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Printer body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Printer body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Services/Item/Endpoints/EndpointsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Services/Item/Endpoints/EndpointsRequestBuilder.cs index 2e7a804de29..4922a7200a8 100644 --- a/src/Microsoft.Graph/Generated/Print/Services/Item/Endpoints/EndpointsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Services/Item/Endpoints/EndpointsRequestBuilder.cs @@ -94,7 +94,7 @@ public EndpointsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintServiceEndpoint body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintServiceEndpoint body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Services/Item/Endpoints/Item/PrintServiceEndpointItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Services/Item/Endpoints/Item/PrintServiceEndpointItemRequestBuilder.cs index b6385f6a90e..5030268b81d 100644 --- a/src/Microsoft.Graph/Generated/Print/Services/Item/Endpoints/Item/PrintServiceEndpointItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Services/Item/Endpoints/Item/PrintServiceEndpointItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintServiceEndpoint body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintServiceEndpoint body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Services/Item/PrintServiceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Services/Item/PrintServiceItemRequestBuilder.cs index d0ff6f17271..b32f7bf5b20 100644 --- a/src/Microsoft.Graph/Generated/Print/Services/Item/PrintServiceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Services/Item/PrintServiceItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintService body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintService body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Services/ServicesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Services/ServicesRequestBuilder.cs index f7e582cc910..d0c6157f86c 100644 --- a/src/Microsoft.Graph/Generated/Print/Services/ServicesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Services/ServicesRequestBuilder.cs @@ -94,7 +94,7 @@ public ServicesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintService body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintService body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedGroups/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedGroups/Ref/RefRequestBuilder.cs index 18338431395..0cfe1a32b95 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedGroups/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedGroups/Ref/RefRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/print/shares/{printerShare%2Did}/allowedGroups/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs index 6163142171b..a58e811e3e4 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -74,7 +74,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -116,7 +116,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Ref/RefRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Ref/RefRequestBuilder.cs index 14e16d9fe51..fd434451be7 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Ref/RefRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/AllowedUsers/Ref/RefRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ReferenceCreate body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, "{+baseurl}/print/shares/{printerShare%2Did}/allowedUsers/$ref", PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Abort/AbortPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Abort/AbortPostRequestBody.cs index 984c8ad820f..b0a21f60ee0 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Abort/AbortPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Abort/AbortPostRequestBody.cs @@ -52,7 +52,7 @@ public AbortPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Print.Shares.Item.Jobs.Item.Abort.AbortPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Print.Shares.Item.Jobs.Item.Abort.AbortPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reason", Reason); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Abort/AbortRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Abort/AbortRequestBuilder.cs index cb878499c25..6eb660f975b 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Abort/AbortRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Abort/AbortRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.Print.Shares.Item.Jobs. public async Task PostAsync(global::Microsoft.Graph.Beta.Print.Shares.Item.Jobs.Item.Abort.AbortPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Print.Shares.Item.Jobs.Item.Abort.AbortPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs index d50c4088073..8a23466bf69 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/DocumentsRequestBuilder.cs @@ -93,7 +93,7 @@ public DocumentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintDocument body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs index 04d0faf2b1a..ce8d25d284d 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionPostRequestBody.cs @@ -53,7 +53,7 @@ public CreateUploadSessionPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Print.Shares.Item.Jobs.Item.Documents.Item.CreateUploadSession.CreateUploadSessionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Print.Shares.Item.Jobs.Item.Documents.Item.CreateUploadSession.CreateUploadSessionPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("properties", Properties); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs index eae8416ba4a..1476e891109 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/CreateUploadSession/CreateUploadSessionRequestBuilder.cs @@ -52,7 +52,7 @@ public CreateUploadSessionRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Print.Shares.Item.Jobs.Item.Documents.Item.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Print.Shares.Item.Jobs.Item.Documents.Item.CreateUploadSession.CreateUploadSessionPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs index 0191537ce83..4b46baba745 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/PrintDocumentItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintDocument body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs index 77c67bdd12a..b47789ecb43 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Documents/Item/Value/ContentRequestBuilder.cs @@ -95,7 +95,7 @@ public async Task GetAsync(Action PutAsync(Stream body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPutRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -156,7 +156,7 @@ public RequestInformation ToPutRequestInformation(Stream body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/PrintJobItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/PrintJobItemRequestBuilder.cs index 50ca5dfb8f4..1fd8681a692 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/PrintJobItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/PrintJobItemRequestBuilder.cs @@ -144,7 +144,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -205,7 +205,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs index f7e12fe075a..b051ec51956 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Redirect/RedirectPostRequestBody.cs @@ -69,7 +69,7 @@ public RedirectPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Print.Shares.Item.Jobs.Item.Redirect.RedirectPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Print.Shares.Item.Jobs.Item.Redirect.RedirectPostRequestBody(); } /// @@ -90,7 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("configuration", Configuration); writer.WriteStringValue("destinationPrinterId", DestinationPrinterId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs index 980f430bd05..3f00967d113 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Redirect/RedirectRequestBuilder.cs @@ -52,7 +52,7 @@ public RedirectRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Print.Shares.Item.Jobs.Item.Redirect.RedirectPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Print.Shares.Item.Jobs.Item.Redirect.RedirectPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs index 16ebc95ce43..1a12819142c 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs index 0001c1f7450..07fecc8c80c 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/Item/Tasks/TasksRequestBuilder.cs @@ -93,7 +93,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/JobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/JobsRequestBuilder.cs index 15c7d3a8760..3bdbde25220 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/JobsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/Jobs/JobsRequestBuilder.cs @@ -95,7 +95,7 @@ public JobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintJob body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintJob body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/Item/PrinterShareItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/Item/PrinterShareItemRequestBuilder.cs index d4c6141cad8..d2a9879b238 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/Item/PrinterShareItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/Item/PrinterShareItemRequestBuilder.cs @@ -123,7 +123,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrinterShare body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -184,7 +184,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrinterShare body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/Shares/SharesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/Shares/SharesRequestBuilder.cs index 2f03d73de04..6477a81d69f 100644 --- a/src/Microsoft.Graph/Generated/Print/Shares/SharesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/Shares/SharesRequestBuilder.cs @@ -95,7 +95,7 @@ public SharesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrinterShare body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrinterShare body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/TaskDefinitions/Item/PrintTaskDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/TaskDefinitions/Item/PrintTaskDefinitionItemRequestBuilder.cs index b604b75b773..f70030236d1 100644 --- a/src/Microsoft.Graph/Generated/Print/TaskDefinitions/Item/PrintTaskDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/TaskDefinitions/Item/PrintTaskDefinitionItemRequestBuilder.cs @@ -105,7 +105,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintTaskDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -166,7 +166,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintTaskDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/TaskDefinitions/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/TaskDefinitions/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs index af5f4af67c2..008865766e9 100644 --- a/src/Microsoft.Graph/Generated/Print/TaskDefinitions/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/TaskDefinitions/Item/Tasks/Item/PrintTaskItemRequestBuilder.cs @@ -110,7 +110,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -171,7 +171,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/TaskDefinitions/Item/Tasks/TasksRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/TaskDefinitions/Item/Tasks/TasksRequestBuilder.cs index 05c28c8ff6a..9829b693dd5 100644 --- a/src/Microsoft.Graph/Generated/Print/TaskDefinitions/Item/Tasks/TasksRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/TaskDefinitions/Item/Tasks/TasksRequestBuilder.cs @@ -94,7 +94,7 @@ public TasksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintTask body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Print/TaskDefinitions/TaskDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Print/TaskDefinitions/TaskDefinitionsRequestBuilder.cs index 2d989f6a30d..2fd53e3696b 100644 --- a/src/Microsoft.Graph/Generated/Print/TaskDefinitions/TaskDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Print/TaskDefinitions/TaskDefinitionsRequestBuilder.cs @@ -95,7 +95,7 @@ public TaskDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintTaskDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintTaskDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Privacy/PrivacyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Privacy/PrivacyRequestBuilder.cs index 9b464def2c1..eb3356b93a6 100644 --- a/src/Microsoft.Graph/Generated/Privacy/PrivacyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Privacy/PrivacyRequestBuilder.cs @@ -80,7 +80,7 @@ public PrivacyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.Privacy body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -122,7 +122,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Privacy body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Approvers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Approvers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs index 5ba21039eee..92889b94781 100644 --- a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Approvers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Approvers/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -76,7 +76,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -120,7 +120,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Collaborators/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Collaborators/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs index a4315680449..e6c5051d816 100644 --- a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Collaborators/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Collaborators/Item/MailboxSettings/MailboxSettingsRequestBuilder.cs @@ -76,7 +76,7 @@ public MailboxSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -120,7 +120,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MailboxSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Notes/Item/AuthoredNoteItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Notes/Item/AuthoredNoteItemRequestBuilder.cs index 3e348650c51..885c788d78b 100644 --- a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Notes/Item/AuthoredNoteItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Notes/Item/AuthoredNoteItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthoredNote body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthoredNote body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Notes/NotesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Notes/NotesRequestBuilder.cs index db87ec398da..e46ee86b883 100644 --- a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Notes/NotesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/Notes/NotesRequestBuilder.cs @@ -99,7 +99,7 @@ public NotesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AuthoredNote body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AuthoredNote body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/SubjectRightsRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/SubjectRightsRequestItemRequestBuilder.cs index 5dd045d0367..2c7f1f0522a 100644 --- a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/SubjectRightsRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/Item/SubjectRightsRequestItemRequestBuilder.cs @@ -167,7 +167,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SubjectRightsRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -231,7 +231,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SubjectRightsRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/SubjectRightsRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/SubjectRightsRequestsRequestBuilder.cs index b6beda2db1a..01354819ae9 100644 --- a/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/SubjectRightsRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Privacy/SubjectRightsRequests/SubjectRightsRequestsRequestBuilder.cs @@ -99,7 +99,7 @@ public SubjectRightsRequestsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.SubjectRightsRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.SubjectRightsRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/PrivilegedAccessItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/PrivilegedAccessItemRequestBuilder.cs index 17c19fadb60..230d6b961a7 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/PrivilegedAccessItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/PrivilegedAccessItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccess body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccess body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/GovernanceResourceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/GovernanceResourceItemRequestBuilder.cs index fdbd0ebc7d6..a48fc9e570b 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/GovernanceResourceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/GovernanceResourceItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs index 83be771c48f..87aaa86591b 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs index 996b3d0c014..abbe7ee0d3d 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs index 564c6c1a031..c0f7f6cb470 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs index 9fe3a19d830..d48c465ec77 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs @@ -101,7 +101,7 @@ public UpdateRequestPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PrivilegedAccess.Item.Resources.Item.RoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedAccess.Item.Resources.Item.RoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("assignmentState", AssignmentState); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("reason", Reason); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs index 60f1d62bf6b..0e1af0f7c2a 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs @@ -51,7 +51,7 @@ public UpdateRequestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.PrivilegedAccess.Item.Resources.Item.RoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PrivilegedAccess.Item.Resources.Item.RoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/RoleAssignmentRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/RoleAssignmentRequestsRequestBuilder.cs index bac3a9a2c34..a23c65d85b8 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/RoleAssignmentRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignmentRequests/RoleAssignmentRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public RoleAssignmentRequestsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Export/ExportGetResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Export/ExportGetResponse.cs index ae48760063d..773872db727 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Export/ExportGetResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Export/ExportGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PrivilegedAccess.Item.Resources.Item.RoleAssignments.Export.ExportGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedAccess.Item.Resources.Item.RoleAssignments.Export.ExportGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Export/ExportResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Export/ExportResponse.cs index 1c2275fb83f..77cb11923e3 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Export/ExportResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Export/ExportResponse.cs @@ -20,7 +20,7 @@ public partial class ExportResponse : global::Microsoft.Graph.Beta.PrivilegedAcc /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PrivilegedAccess.Item.Resources.Item.RoleAssignments.Export.ExportResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedAccess.Item.Resources.Item.RoleAssignments.Export.ExportResponse(); } } diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs index 58725d4068f..7ef308ea651 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs index 753899f0d18..b2dde9c398b 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Item/Subject/SubjectRequestBuilder.cs index cffafa521f0..7a411cd1410 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/Item/Subject/SubjectRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs index d7995dbf452..b9579b173aa 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public RoleAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs index d4c4c1106e7..00b534541db 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleDefinitions/RoleDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleDefinitions/RoleDefinitionsRequestBuilder.cs index 1c79ffe524e..92d0393abd3 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleDefinitions/RoleDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleDefinitions/RoleDefinitionsRequestBuilder.cs @@ -93,7 +93,7 @@ public RoleDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs index 1e17d5cf1c8..cce9cdb74ed 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs index 24f9cda1f17..5a3771fdcb1 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleSettings/RoleSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleSettings/RoleSettingsRequestBuilder.cs index 0c861fde819..b10c9404d4b 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleSettings/RoleSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Item/RoleSettings/RoleSettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public RoleSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Register/RegisterPostRequestBody.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Register/RegisterPostRequestBody.cs index 3ec993c9d06..0cc0f63e62a 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Register/RegisterPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Register/RegisterPostRequestBody.cs @@ -52,7 +52,7 @@ public RegisterPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PrivilegedAccess.Item.Resources.Register.RegisterPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedAccess.Item.Resources.Register.RegisterPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("externalId", ExternalId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Register/RegisterRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Register/RegisterRequestBuilder.cs index 2b6cdae328f..38643f7d348 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Register/RegisterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/Register/RegisterRequestBuilder.cs @@ -49,7 +49,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.PrivilegedAccess.Item.R public async Task PostAsync(global::Microsoft.Graph.Beta.PrivilegedAccess.Item.Resources.Register.RegisterPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -72,7 +72,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PrivilegedAccess.Item.Resources.Register.RegisterPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/ResourcesRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/ResourcesRequestBuilder.cs index 9adaa3527dd..5d682664149 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/ResourcesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/Resources/ResourcesRequestBuilder.cs @@ -99,7 +99,7 @@ public ResourcesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceResource body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceResource body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs index c7c1f41b327..b4b09a8cfb6 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/GovernanceRoleAssignmentRequestItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs index 5ffd0e419ca..e857e07595e 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs index a136e9c36eb..f1282368bd3 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/Subject/SubjectRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs index dfe0287544e..f12dcdfbac0 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestPostRequestBody.cs @@ -101,7 +101,7 @@ public UpdateRequestPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PrivilegedAccess.Item.RoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedAccess.Item.RoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody(); } /// @@ -124,7 +124,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("assignmentState", AssignmentState); writer.WriteStringValue("decision", Decision); writer.WriteStringValue("reason", Reason); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs index 1e36ce63c88..316fd0fa30b 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/Item/UpdateRequest/UpdateRequestRequestBuilder.cs @@ -51,7 +51,7 @@ public UpdateRequestRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.PrivilegedAccess.Item.RoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PrivilegedAccess.Item.RoleAssignmentRequests.Item.UpdateRequest.UpdateRequestPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/RoleAssignmentRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/RoleAssignmentRequestsRequestBuilder.cs index 079559b24fa..9751f1fa676 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/RoleAssignmentRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignmentRequests/RoleAssignmentRequestsRequestBuilder.cs @@ -93,7 +93,7 @@ public RoleAssignmentRequestsRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Export/ExportGetResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Export/ExportGetResponse.cs index e26b02bc637..860325282ae 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Export/ExportGetResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Export/ExportGetResponse.cs @@ -36,7 +36,7 @@ public List Value /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PrivilegedAccess.Item.RoleAssignments.Export.ExportGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedAccess.Item.RoleAssignments.Export.ExportGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfPrimitiveValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Export/ExportResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Export/ExportResponse.cs index 0a5924a1f7e..95cb809ea4f 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Export/ExportResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Export/ExportResponse.cs @@ -20,7 +20,7 @@ public partial class ExportResponse : global::Microsoft.Graph.Beta.PrivilegedAcc /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PrivilegedAccess.Item.RoleAssignments.Export.ExportResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedAccess.Item.RoleAssignments.Export.ExportResponse(); } } diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs index bedf5ba559a..a8173d64fe3 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Item/GovernanceRoleAssignmentItemRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs index cd4f719e3a7..3008f2b9830 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Item/Subject/SubjectRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Item/Subject/SubjectRequestBuilder.cs index 61310ccf606..bba9312b68a 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Item/Subject/SubjectRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/Item/Subject/SubjectRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceSubject body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs index 34527849d4a..d606c3e2049 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleAssignments/RoleAssignmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public RoleAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs index 631f6c27857..1eb7f044627 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleDefinitions/Item/GovernanceRoleDefinitionItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleDefinitions/RoleDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleDefinitions/RoleDefinitionsRequestBuilder.cs index aa486415f1d..388a087b1e5 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleDefinitions/RoleDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleDefinitions/RoleDefinitionsRequestBuilder.cs @@ -93,7 +93,7 @@ public RoleDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs index 4ef023f00ab..3c2fafcf15b 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleSettings/Item/GovernanceRoleSettingItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs index 8e77e5921a3..01535dc8d39 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleSettings/Item/RoleDefinition/RoleDefinitionRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleSettings/RoleSettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleSettings/RoleSettingsRequestBuilder.cs index 436ecce087c..e372878739b 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleSettings/RoleSettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/Item/RoleSettings/RoleSettingsRequestBuilder.cs @@ -93,7 +93,7 @@ public RoleSettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.GovernanceRoleSetting body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedAccess/PrivilegedAccessRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedAccess/PrivilegedAccessRequestBuilder.cs index ea198eb16c3..c45a1f8dbcd 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedAccess/PrivilegedAccessRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedAccess/PrivilegedAccessRequestBuilder.cs @@ -93,7 +93,7 @@ public PrivilegedAccessRequestBuilder(string rawUrl, IRequestAdapter requestAdap public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegedAccess body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedAccess body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/PrivilegedApprovalItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/PrivilegedApprovalItemRequestBuilder.cs index 5668081f731..80058b0719e 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/PrivilegedApprovalItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/PrivilegedApprovalItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedApproval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedApproval body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/RoleInfoRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/RoleInfoRequestBuilder.cs index 781e47fe905..2b79225feee 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/RoleInfoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/RoleInfoRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/SelfActivate/SelfActivatePostRequestBody.cs b/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/SelfActivate/SelfActivatePostRequestBody.cs index cd074060520..46a643d8ebd 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/SelfActivate/SelfActivatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/SelfActivate/SelfActivatePostRequestBody.cs @@ -100,7 +100,7 @@ public SelfActivatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PrivilegedApproval.Item.RoleInfo.SelfActivate.SelfActivatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedApproval.Item.RoleInfo.SelfActivate.SelfActivatePostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("duration", Duration); writer.WriteStringValue("reason", Reason); writer.WriteStringValue("ticketNumber", TicketNumber); diff --git a/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/SelfActivate/SelfActivateRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/SelfActivate/SelfActivateRequestBuilder.cs index e5d1b1526e0..90e364bf0da 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/SelfActivate/SelfActivateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/SelfActivate/SelfActivateRequestBuilder.cs @@ -51,7 +51,7 @@ public SelfActivateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.PrivilegedApproval.Item.RoleInfo.SelfActivate.SelfActivatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PrivilegedApproval.Item.RoleInfo.SelfActivate.SelfActivatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/Settings/SettingsRequestBuilder.cs index 81c9903188b..7b68479fd11 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/Settings/SettingsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/Summary/SummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/Summary/SummaryRequestBuilder.cs index 9451b9a1ece..47765cc109f 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/Summary/SummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedApproval/Item/RoleInfo/Summary/SummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedApproval/MyRequests/MyRequestsGetResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedApproval/MyRequests/MyRequestsGetResponse.cs index 8681c9d171b..b17555939db 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedApproval/MyRequests/MyRequestsGetResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedApproval/MyRequests/MyRequestsGetResponse.cs @@ -36,7 +36,7 @@ public partial class MyRequestsGetResponse : global::Microsoft.Graph.Beta.Models /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PrivilegedApproval.MyRequests.MyRequestsGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedApproval.MyRequests.MyRequestsGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/PrivilegedApproval/MyRequests/MyRequestsResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedApproval/MyRequests/MyRequestsResponse.cs index d4b979eae8f..ceef043fcfd 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedApproval/MyRequests/MyRequestsResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedApproval/MyRequests/MyRequestsResponse.cs @@ -20,7 +20,7 @@ public partial class MyRequestsResponse : global::Microsoft.Graph.Beta.Privilege /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PrivilegedApproval.MyRequests.MyRequestsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedApproval.MyRequests.MyRequestsResponse(); } } diff --git a/src/Microsoft.Graph/Generated/PrivilegedApproval/PrivilegedApprovalRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedApproval/PrivilegedApprovalRequestBuilder.cs index 4ddf1be1b70..89d8562cfb7 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedApproval/PrivilegedApprovalRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedApproval/PrivilegedApprovalRequestBuilder.cs @@ -99,7 +99,7 @@ public PrivilegedApprovalRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegedApproval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedApproval body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedOperationEvents/Item/PrivilegedOperationEventItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedOperationEvents/Item/PrivilegedOperationEventItemRequestBuilder.cs index 8e0bedbd192..b57d9c68c61 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedOperationEvents/Item/PrivilegedOperationEventItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedOperationEvents/Item/PrivilegedOperationEventItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedOperationEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedOperationEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedOperationEvents/PrivilegedOperationEventsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedOperationEvents/PrivilegedOperationEventsRequestBuilder.cs index 0beb46d9d8a..9f04ee9e3a4 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedOperationEvents/PrivilegedOperationEventsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedOperationEvents/PrivilegedOperationEventsRequestBuilder.cs @@ -93,7 +93,7 @@ public PrivilegedOperationEventsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegedOperationEvent body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedOperationEvent body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/PrivilegedRoleAssignmentRequestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/PrivilegedRoleAssignmentRequestItemRequestBuilder.cs index 0b745048a87..9f806807002 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/PrivilegedRoleAssignmentRequestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/PrivilegedRoleAssignmentRequestItemRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/RoleInfoRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/RoleInfoRequestBuilder.cs index ae8f7b3bbe2..732369fbbd3 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/RoleInfoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/RoleInfoRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/SelfActivate/SelfActivatePostRequestBody.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/SelfActivate/SelfActivatePostRequestBody.cs index 4be8e46737e..30cdf737bc8 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/SelfActivate/SelfActivatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/SelfActivate/SelfActivatePostRequestBody.cs @@ -100,7 +100,7 @@ public SelfActivatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PrivilegedRoleAssignmentRequests.Item.RoleInfo.SelfActivate.SelfActivatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedRoleAssignmentRequests.Item.RoleInfo.SelfActivate.SelfActivatePostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("duration", Duration); writer.WriteStringValue("reason", Reason); writer.WriteStringValue("ticketNumber", TicketNumber); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/SelfActivate/SelfActivateRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/SelfActivate/SelfActivateRequestBuilder.cs index f7815e3233e..9b158c58e5c 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/SelfActivate/SelfActivateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/SelfActivate/SelfActivateRequestBuilder.cs @@ -51,7 +51,7 @@ public SelfActivateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.PrivilegedRoleAssignmentRequests.Item.RoleInfo.SelfActivate.SelfActivatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PrivilegedRoleAssignmentRequests.Item.RoleInfo.SelfActivate.SelfActivatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/Settings/SettingsRequestBuilder.cs index 8c753bf0cb6..7cc87d56e31 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/Settings/SettingsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/Summary/SummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/Summary/SummaryRequestBuilder.cs index 4b6135a80a4..17289beec7f 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/Summary/SummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/Item/RoleInfo/Summary/SummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/My/MyGetResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/My/MyGetResponse.cs index e05e186c915..d2f17800b7b 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/My/MyGetResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/My/MyGetResponse.cs @@ -36,7 +36,7 @@ public partial class MyGetResponse : global::Microsoft.Graph.Beta.Models.BaseCol /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PrivilegedRoleAssignmentRequests.My.MyGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedRoleAssignmentRequests.My.MyGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/My/MyResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/My/MyResponse.cs index 9706b207207..a1c5f73accc 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/My/MyResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/My/MyResponse.cs @@ -20,7 +20,7 @@ public partial class MyResponse : global::Microsoft.Graph.Beta.PrivilegedRoleAss /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PrivilegedRoleAssignmentRequests.My.MyResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedRoleAssignmentRequests.My.MyResponse(); } } diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/PrivilegedRoleAssignmentRequestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/PrivilegedRoleAssignmentRequestsRequestBuilder.cs index 4aa8a9dd31e..603a10ce106 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/PrivilegedRoleAssignmentRequestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignmentRequests/PrivilegedRoleAssignmentRequestsRequestBuilder.cs @@ -99,7 +99,7 @@ public PrivilegedRoleAssignmentRequestsRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignmentRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignmentRequest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/MakePermanent/MakePermanentPostRequestBody.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/MakePermanent/MakePermanentPostRequestBody.cs index d4d2521b778..7b56cca1f5d 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/MakePermanent/MakePermanentPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/MakePermanent/MakePermanentPostRequestBody.cs @@ -84,7 +84,7 @@ public MakePermanentPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PrivilegedRoleAssignments.Item.MakePermanent.MakePermanentPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedRoleAssignments.Item.MakePermanent.MakePermanentPostRequestBody(); } /// @@ -106,7 +106,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("reason", Reason); writer.WriteStringValue("ticketNumber", TicketNumber); writer.WriteStringValue("ticketSystem", TicketSystem); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/MakePermanent/MakePermanentRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/MakePermanent/MakePermanentRequestBuilder.cs index 52b46b38a71..2c835cf54e6 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/MakePermanent/MakePermanentRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/MakePermanent/MakePermanentRequestBuilder.cs @@ -51,7 +51,7 @@ public MakePermanentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.PrivilegedRoleAssignments.Item.MakePermanent.MakePermanentPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PrivilegedRoleAssignments.Item.MakePermanent.MakePermanentPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/PrivilegedRoleAssignmentItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/PrivilegedRoleAssignmentItemRequestBuilder.cs index 5458db41891..0d1d86d2198 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/PrivilegedRoleAssignmentItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/PrivilegedRoleAssignmentItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/RoleInfoRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/RoleInfoRequestBuilder.cs index 7ab4e225d54..e50f6e15ad3 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/RoleInfoRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/RoleInfoRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/SelfActivate/SelfActivatePostRequestBody.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/SelfActivate/SelfActivatePostRequestBody.cs index 14aa30e7ddf..92ac52a1c94 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/SelfActivate/SelfActivatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/SelfActivate/SelfActivatePostRequestBody.cs @@ -100,7 +100,7 @@ public SelfActivatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PrivilegedRoleAssignments.Item.RoleInfo.SelfActivate.SelfActivatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedRoleAssignments.Item.RoleInfo.SelfActivate.SelfActivatePostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("duration", Duration); writer.WriteStringValue("reason", Reason); writer.WriteStringValue("ticketNumber", TicketNumber); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/SelfActivate/SelfActivateRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/SelfActivate/SelfActivateRequestBuilder.cs index 4a9d2dfef69..2db5c590ec9 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/SelfActivate/SelfActivateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/SelfActivate/SelfActivateRequestBuilder.cs @@ -51,7 +51,7 @@ public SelfActivateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.PrivilegedRoleAssignments.Item.RoleInfo.SelfActivate.SelfActivatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PrivilegedRoleAssignments.Item.RoleInfo.SelfActivate.SelfActivatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/Settings/SettingsRequestBuilder.cs index 656e9d9aa79..558ff9a1531 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/Settings/SettingsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/Summary/SummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/Summary/SummaryRequestBuilder.cs index cfa0b1671ab..c36c34719ac 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/Summary/SummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/Item/RoleInfo/Summary/SummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/My/MyGetResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/My/MyGetResponse.cs index c8c7b330442..1cb7d378624 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/My/MyGetResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/My/MyGetResponse.cs @@ -36,7 +36,7 @@ public partial class MyGetResponse : global::Microsoft.Graph.Beta.Models.BaseCol /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PrivilegedRoleAssignments.My.MyGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedRoleAssignments.My.MyGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/My/MyResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/My/MyResponse.cs index 4a10f3c906c..704367e6e94 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/My/MyResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/My/MyResponse.cs @@ -20,7 +20,7 @@ public partial class MyResponse : global::Microsoft.Graph.Beta.PrivilegedRoleAss /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PrivilegedRoleAssignments.My.MyResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedRoleAssignments.My.MyResponse(); } } diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/PrivilegedRoleAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/PrivilegedRoleAssignmentsRequestBuilder.cs index a4083206584..7eabea9b047 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/PrivilegedRoleAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoleAssignments/PrivilegedRoleAssignmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public PrivilegedRoleAssignmentsRequestBuilder(string rawUrl, IRequestAdapter re public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignment body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRoleAssignment body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/PrivilegedRoleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/PrivilegedRoleItemRequestBuilder.cs index 34537274f10..8886d7e1aae 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/PrivilegedRoleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/PrivilegedRoleItemRequestBuilder.cs @@ -126,7 +126,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -187,7 +187,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/SelfActivate/SelfActivatePostRequestBody.cs b/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/SelfActivate/SelfActivatePostRequestBody.cs index 7a53a084e60..691b3d1f18b 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/SelfActivate/SelfActivatePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/SelfActivate/SelfActivatePostRequestBody.cs @@ -100,7 +100,7 @@ public SelfActivatePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PrivilegedRoles.Item.SelfActivate.SelfActivatePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedRoles.Item.SelfActivate.SelfActivatePostRequestBody(); } /// @@ -123,7 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("duration", Duration); writer.WriteStringValue("reason", Reason); writer.WriteStringValue("ticketNumber", TicketNumber); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/SelfActivate/SelfActivateRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/SelfActivate/SelfActivateRequestBuilder.cs index 42b5fa12e3c..eb783ae9b19 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/SelfActivate/SelfActivateRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/SelfActivate/SelfActivateRequestBuilder.cs @@ -51,7 +51,7 @@ public SelfActivateRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) public async Task PostAsync(global::Microsoft.Graph.Beta.PrivilegedRoles.Item.SelfActivate.SelfActivatePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -74,7 +74,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PrivilegedRoles.Item.SelfActivate.SelfActivatePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/Settings/SettingsRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/Settings/SettingsRequestBuilder.cs index aaf51131466..1cfcc301013 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/Settings/SettingsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/Settings/SettingsRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSettings body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSettings body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/Summary/SummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/Summary/SummaryRequestBuilder.cs index 0d1b5a0baf3..d50c361765c 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/Summary/SummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoles/Item/Summary/SummaryRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRoleSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedRoles/PrivilegedRolesRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedRoles/PrivilegedRolesRequestBuilder.cs index cfac6e9c799..cb6876b0ebd 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedRoles/PrivilegedRolesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedRoles/PrivilegedRolesRequestBuilder.cs @@ -93,7 +93,7 @@ public PrivilegedRolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegedRole body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedRole body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CanSignUp/CanSignUpGetResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CanSignUp/CanSignUpGetResponse.cs index 58a2479144a..4fdff6507e5 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CanSignUp/CanSignUpGetResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CanSignUp/CanSignUpGetResponse.cs @@ -42,7 +42,7 @@ public CanSignUpGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PrivilegedSignupStatus.CanSignUp.CanSignUpGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedSignupStatus.CanSignUp.CanSignUpGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CanSignUp/CanSignUpResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CanSignUp/CanSignUpResponse.cs index 2fb5191d359..ff3274f5cc7 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CanSignUp/CanSignUpResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CanSignUp/CanSignUpResponse.cs @@ -20,7 +20,7 @@ public partial class CanSignUpResponse : global::Microsoft.Graph.Beta.Privileged /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PrivilegedSignupStatus.CanSignUp.CanSignUpResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedSignupStatus.CanSignUp.CanSignUpResponse(); } } diff --git a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupPostRequestBody.cs b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupPostRequestBody.cs index 8e58221f49d..7bb9d891318 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupPostRequestBody.cs @@ -53,7 +53,7 @@ public CompleteSetupPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PrivilegedSignupStatus.CompleteSetup.CompleteSetupPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedSignupStatus.CompleteSetup.CompleteSetupPostRequestBody(); } /// @@ -73,7 +73,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("tenantSetupInfo", TenantSetupInfo); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupPostResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupPostResponse.cs index b693b2415cb..d4fd85c26e0 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupPostResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupPostResponse.cs @@ -36,7 +36,7 @@ public partial class CompleteSetupPostResponse : global::Microsoft.Graph.Beta.Mo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PrivilegedSignupStatus.CompleteSetup.CompleteSetupPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedSignupStatus.CompleteSetup.CompleteSetupPostResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupRequestBuilder.cs index 684e44eb56c..1378112a43e 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupRequestBuilder.cs @@ -50,7 +50,7 @@ public CompleteSetupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsCompleteSetupPostResponseAsync(global::Microsoft.Graph.Beta.PrivilegedSignupStatus.CompleteSetup.CompleteSetupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public CompleteSetupRequestBuilder(string rawUrl, IRequestAdapter requestAdapter public async Task PostAsync(global::Microsoft.Graph.Beta.PrivilegedSignupStatus.CompleteSetup.CompleteSetupPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -99,7 +99,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.PrivilegedSignupStatus.CompleteSetup.CompleteSetupPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupResponse.cs index 9c3b2f67a55..43f8e9f2c71 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/CompleteSetup/CompleteSetupResponse.cs @@ -20,7 +20,7 @@ public partial class CompleteSetupResponse : global::Microsoft.Graph.Beta.Privil /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PrivilegedSignupStatus.CompleteSetup.CompleteSetupResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedSignupStatus.CompleteSetup.CompleteSetupResponse(); } } diff --git a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/IsSignedUp/IsSignedUpGetResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/IsSignedUp/IsSignedUpGetResponse.cs index c2b507b1f13..fb7ba18c765 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/IsSignedUp/IsSignedUpGetResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/IsSignedUp/IsSignedUpGetResponse.cs @@ -42,7 +42,7 @@ public IsSignedUpGetResponse() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.PrivilegedSignupStatus.IsSignedUp.IsSignedUpGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedSignupStatus.IsSignedUp.IsSignedUpGetResponse(); } /// @@ -62,7 +62,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("value", Value); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/IsSignedUp/IsSignedUpResponse.cs b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/IsSignedUp/IsSignedUpResponse.cs index 106600eb543..2e64dd6e504 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/IsSignedUp/IsSignedUpResponse.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/IsSignedUp/IsSignedUpResponse.cs @@ -20,7 +20,7 @@ public partial class IsSignedUpResponse : global::Microsoft.Graph.Beta.Privilege /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.PrivilegedSignupStatus.IsSignedUp.IsSignedUpResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.PrivilegedSignupStatus.IsSignedUp.IsSignedUpResponse(); } } diff --git a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/Item/PrivilegedSignupStatusItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/Item/PrivilegedSignupStatusItemRequestBuilder.cs index 62c714b295a..b5065fc04fc 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/Item/PrivilegedSignupStatusItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/Item/PrivilegedSignupStatusItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrivilegedSignupStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedSignupStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/PrivilegedSignupStatusRequestBuilder.cs b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/PrivilegedSignupStatusRequestBuilder.cs index 41ac7bb7d1c..7283b6f0c2b 100644 --- a/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/PrivilegedSignupStatusRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/PrivilegedSignupStatus/PrivilegedSignupStatusRequestBuilder.cs @@ -117,7 +117,7 @@ public PrivilegedSignupStatusRequestBuilder(string rawUrl, IRequestAdapter reque public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrivilegedSignupStatus body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrivilegedSignupStatus body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ProgramControlTypes/Item/ProgramControlTypeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/ProgramControlTypes/Item/ProgramControlTypeItemRequestBuilder.cs index 1d3caae9a26..29f69c7d121 100644 --- a/src/Microsoft.Graph/Generated/ProgramControlTypes/Item/ProgramControlTypeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ProgramControlTypes/Item/ProgramControlTypeItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ProgramControlType body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProgramControlType body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ProgramControlTypes/ProgramControlTypesRequestBuilder.cs b/src/Microsoft.Graph/Generated/ProgramControlTypes/ProgramControlTypesRequestBuilder.cs index 43d20b0b097..848311f95ec 100644 --- a/src/Microsoft.Graph/Generated/ProgramControlTypes/ProgramControlTypesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ProgramControlTypes/ProgramControlTypesRequestBuilder.cs @@ -94,7 +94,7 @@ public ProgramControlTypesRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ProgramControlType body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ProgramControlType body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ProgramControls/Item/Program/Controls/ControlsRequestBuilder.cs b/src/Microsoft.Graph/Generated/ProgramControls/Item/Program/Controls/ControlsRequestBuilder.cs index 4ec11023239..f3eb0125e43 100644 --- a/src/Microsoft.Graph/Generated/ProgramControls/Item/Program/Controls/ControlsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ProgramControls/Item/Program/Controls/ControlsRequestBuilder.cs @@ -93,7 +93,7 @@ public ControlsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ProgramControl body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ProgramControl body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ProgramControls/Item/Program/Controls/Item/ProgramControlItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/ProgramControls/Item/Program/Controls/Item/ProgramControlItemRequestBuilder.cs index 5efd4fd9c3a..0901271f10b 100644 --- a/src/Microsoft.Graph/Generated/ProgramControls/Item/Program/Controls/Item/ProgramControlItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ProgramControls/Item/Program/Controls/Item/ProgramControlItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ProgramControl body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProgramControl body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ProgramControls/Item/Program/ProgramRequestBuilder.cs b/src/Microsoft.Graph/Generated/ProgramControls/Item/Program/ProgramRequestBuilder.cs index 8a22426c660..b46d3368b6a 100644 --- a/src/Microsoft.Graph/Generated/ProgramControls/Item/Program/ProgramRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ProgramControls/Item/Program/ProgramRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Program body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Program body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ProgramControls/Item/ProgramControlItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/ProgramControls/Item/ProgramControlItemRequestBuilder.cs index 1f43acdc1ac..be3de7f9bdb 100644 --- a/src/Microsoft.Graph/Generated/ProgramControls/Item/ProgramControlItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ProgramControls/Item/ProgramControlItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ProgramControl body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProgramControl body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/ProgramControls/ProgramControlsRequestBuilder.cs b/src/Microsoft.Graph/Generated/ProgramControls/ProgramControlsRequestBuilder.cs index 00c4633fea6..10d31a8a190 100644 --- a/src/Microsoft.Graph/Generated/ProgramControls/ProgramControlsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ProgramControls/ProgramControlsRequestBuilder.cs @@ -95,7 +95,7 @@ public ProgramControlsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ProgramControl body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ProgramControl body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Programs/Item/Controls/ControlsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Programs/Item/Controls/ControlsRequestBuilder.cs index 15aa1f84116..c9b17dc39ff 100644 --- a/src/Microsoft.Graph/Generated/Programs/Item/Controls/ControlsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Programs/Item/Controls/ControlsRequestBuilder.cs @@ -94,7 +94,7 @@ public ControlsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ProgramControl body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ProgramControl body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Programs/Item/Controls/Item/Program/ProgramRequestBuilder.cs b/src/Microsoft.Graph/Generated/Programs/Item/Controls/Item/Program/ProgramRequestBuilder.cs index 97474238cb7..3f1a92cd610 100644 --- a/src/Microsoft.Graph/Generated/Programs/Item/Controls/Item/Program/ProgramRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Programs/Item/Controls/Item/Program/ProgramRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Program body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Program body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Programs/Item/Controls/Item/ProgramControlItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Programs/Item/Controls/Item/ProgramControlItemRequestBuilder.cs index bd318f503dd..73b5aa85fcf 100644 --- a/src/Microsoft.Graph/Generated/Programs/Item/Controls/Item/ProgramControlItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Programs/Item/Controls/Item/ProgramControlItemRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ProgramControl body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ProgramControl body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Programs/Item/ProgramItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Programs/Item/ProgramItemRequestBuilder.cs index fab4f1c8718..049b5e98987 100644 --- a/src/Microsoft.Graph/Generated/Programs/Item/ProgramItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Programs/Item/ProgramItemRequestBuilder.cs @@ -104,7 +104,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Program body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -165,7 +165,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Program body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Programs/ProgramsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Programs/ProgramsRequestBuilder.cs index 92ace0f6e3b..6c04883fd6d 100644 --- a/src/Microsoft.Graph/Generated/Programs/ProgramsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Programs/ProgramsRequestBuilder.cs @@ -95,7 +95,7 @@ public ProgramsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Program body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -137,7 +137,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Program body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/AppCredentialSignInActivities/AppCredentialSignInActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AppCredentialSignInActivities/AppCredentialSignInActivitiesRequestBuilder.cs index a9e782da884..de71b19ada7 100644 --- a/src/Microsoft.Graph/Generated/Reports/AppCredentialSignInActivities/AppCredentialSignInActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/AppCredentialSignInActivities/AppCredentialSignInActivitiesRequestBuilder.cs @@ -94,7 +94,7 @@ public AppCredentialSignInActivitiesRequestBuilder(string rawUrl, IRequestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AppCredentialSignInActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AppCredentialSignInActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/AppCredentialSignInActivities/Item/AppCredentialSignInActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AppCredentialSignInActivities/Item/AppCredentialSignInActivityItemRequestBuilder.cs index 6f9d73fcc15..6c589a57559 100644 --- a/src/Microsoft.Graph/Generated/Reports/AppCredentialSignInActivities/Item/AppCredentialSignInActivityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/AppCredentialSignInActivities/Item/AppCredentialSignInActivityItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AppCredentialSignInActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppCredentialSignInActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/ApplicationSignInDetailedSummary/ApplicationSignInDetailedSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/ApplicationSignInDetailedSummary/ApplicationSignInDetailedSummaryRequestBuilder.cs index c3f311ab46c..090ccc7d519 100644 --- a/src/Microsoft.Graph/Generated/Reports/ApplicationSignInDetailedSummary/ApplicationSignInDetailedSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/ApplicationSignInDetailedSummary/ApplicationSignInDetailedSummaryRequestBuilder.cs @@ -94,7 +94,7 @@ public ApplicationSignInDetailedSummaryRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ApplicationSignInDetailedSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ApplicationSignInDetailedSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/ApplicationSignInDetailedSummary/Item/ApplicationSignInDetailedSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/ApplicationSignInDetailedSummary/Item/ApplicationSignInDetailedSummaryItemRequestBuilder.cs index 7eac8d5a915..46487f47897 100644 --- a/src/Microsoft.Graph/Generated/Reports/ApplicationSignInDetailedSummary/Item/ApplicationSignInDetailedSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/ApplicationSignInDetailedSummary/Item/ApplicationSignInDetailedSummaryItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ApplicationSignInDetailedSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ApplicationSignInDetailedSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/AuthenticationMethodsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/AuthenticationMethodsRequestBuilder.cs index bd0d563bef9..c58d7c69d8c 100644 --- a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/AuthenticationMethodsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/AuthenticationMethodsRequestBuilder.cs @@ -136,7 +136,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AuthenticationMethodsRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -197,7 +197,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AuthenticationMethodsRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserEventsSummary/Item/UserEventsSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserEventsSummary/Item/UserEventsSummaryItemRequestBuilder.cs index 0889a576788..ca5103e47fa 100644 --- a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserEventsSummary/Item/UserEventsSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserEventsSummary/Item/UserEventsSummaryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserEventsSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserEventsSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserEventsSummary/UserEventsSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserEventsSummary/UserEventsSummaryRequestBuilder.cs index 35a1e06681a..b891be66ec8 100644 --- a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserEventsSummary/UserEventsSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserEventsSummary/UserEventsSummaryRequestBuilder.cs @@ -94,7 +94,7 @@ public UserEventsSummaryRequestBuilder(string rawUrl, IRequestAdapter requestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserEventsSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserEventsSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserMfaSignInSummary/Item/UserMfaSignInSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserMfaSignInSummary/Item/UserMfaSignInSummaryItemRequestBuilder.cs index 46f00c69109..38d14290bec 100644 --- a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserMfaSignInSummary/Item/UserMfaSignInSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserMfaSignInSummary/Item/UserMfaSignInSummaryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserMfaSignInSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserMfaSignInSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserMfaSignInSummary/UserMfaSignInSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserMfaSignInSummary/UserMfaSignInSummaryRequestBuilder.cs index f78d9106371..43cf969932c 100644 --- a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserMfaSignInSummary/UserMfaSignInSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserMfaSignInSummary/UserMfaSignInSummaryRequestBuilder.cs @@ -94,7 +94,7 @@ public UserMfaSignInSummaryRequestBuilder(string rawUrl, IRequestAdapter request public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserMfaSignInSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserMfaSignInSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserPasswordResetsAndChangesSummary/Item/UserPasswordResetsAndChangesSummaryItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserPasswordResetsAndChangesSummary/Item/UserPasswordResetsAndChangesSummaryItemRequestBuilder.cs index 9d3846b1951..a4fb88ac80d 100644 --- a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserPasswordResetsAndChangesSummary/Item/UserPasswordResetsAndChangesSummaryItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserPasswordResetsAndChangesSummary/Item/UserPasswordResetsAndChangesSummaryItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserPasswordResetsAndChangesSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserPasswordResetsAndChangesSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserPasswordResetsAndChangesSummary/UserPasswordResetsAndChangesSummaryRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserPasswordResetsAndChangesSummary/UserPasswordResetsAndChangesSummaryRequestBuilder.cs index 4a91d2d76e3..2df066bc248 100644 --- a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserPasswordResetsAndChangesSummary/UserPasswordResetsAndChangesSummaryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserPasswordResetsAndChangesSummary/UserPasswordResetsAndChangesSummaryRequestBuilder.cs @@ -94,7 +94,7 @@ public UserPasswordResetsAndChangesSummaryRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserPasswordResetsAndChangesSummary body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserPasswordResetsAndChangesSummary body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationActivityWithPeriod/UserRegistrationActivityWithPeriodGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationActivityWithPeriod/UserRegistrationActivityWithPeriodGetResponse.cs index 635eede2806..b670655a442 100644 --- a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationActivityWithPeriod/UserRegistrationActivityWithPeriodGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationActivityWithPeriod/UserRegistrationActivityWithPeriodGetResponse.cs @@ -36,7 +36,7 @@ public partial class UserRegistrationActivityWithPeriodGetResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.AuthenticationMethods.UserRegistrationActivityWithPeriod.UserRegistrationActivityWithPeriodGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.AuthenticationMethods.UserRegistrationActivityWithPeriod.UserRegistrationActivityWithPeriodGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationActivityWithPeriod/UserRegistrationActivityWithPeriodResponse.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationActivityWithPeriod/UserRegistrationActivityWithPeriodResponse.cs index 3abf2abca9b..0d4f1e30a99 100644 --- a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationActivityWithPeriod/UserRegistrationActivityWithPeriodResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationActivityWithPeriod/UserRegistrationActivityWithPeriodResponse.cs @@ -20,7 +20,7 @@ public partial class UserRegistrationActivityWithPeriodResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.AuthenticationMethods.UserRegistrationActivityWithPeriod.UserRegistrationActivityWithPeriodResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.AuthenticationMethods.UserRegistrationActivityWithPeriod.UserRegistrationActivityWithPeriodResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/Item/UserRegistrationDetailsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/Item/UserRegistrationDetailsItemRequestBuilder.cs index 6be38261038..f78ec207024 100644 --- a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/Item/UserRegistrationDetailsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/Item/UserRegistrationDetailsItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserRegistrationDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserRegistrationDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/UserRegistrationDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/UserRegistrationDetailsRequestBuilder.cs index 05d9fb488a8..cf099a3e77c 100644 --- a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/UserRegistrationDetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserRegistrationDetails/UserRegistrationDetailsRequestBuilder.cs @@ -94,7 +94,7 @@ public UserRegistrationDetailsRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserRegistrationDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserRegistrationDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserSignInsByAuthMethodSummaryWithPeriod/UserSignInsByAuthMethodSummaryWithPeriodGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserSignInsByAuthMethodSummaryWithPeriod/UserSignInsByAuthMethodSummaryWithPeriodGetResponse.cs index 888c9c093d5..fbe967579f0 100644 --- a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserSignInsByAuthMethodSummaryWithPeriod/UserSignInsByAuthMethodSummaryWithPeriodGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserSignInsByAuthMethodSummaryWithPeriod/UserSignInsByAuthMethodSummaryWithPeriodGetResponse.cs @@ -36,7 +36,7 @@ public partial class UserSignInsByAuthMethodSummaryWithPeriodGetResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.AuthenticationMethods.UserSignInsByAuthMethodSummaryWithPeriod.UserSignInsByAuthMethodSummaryWithPeriodGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.AuthenticationMethods.UserSignInsByAuthMethodSummaryWithPeriod.UserSignInsByAuthMethodSummaryWithPeriodGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserSignInsByAuthMethodSummaryWithPeriod/UserSignInsByAuthMethodSummaryWithPeriodResponse.cs b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserSignInsByAuthMethodSummaryWithPeriod/UserSignInsByAuthMethodSummaryWithPeriodResponse.cs index cd4ad12f6d5..4577d97199e 100644 --- a/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserSignInsByAuthMethodSummaryWithPeriod/UserSignInsByAuthMethodSummaryWithPeriodResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/AuthenticationMethods/UserSignInsByAuthMethodSummaryWithPeriod/UserSignInsByAuthMethodSummaryWithPeriodResponse.cs @@ -20,7 +20,7 @@ public partial class UserSignInsByAuthMethodSummaryWithPeriodResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.AuthenticationMethods.UserSignInsByAuthMethodSummaryWithPeriod.UserSignInsByAuthMethodSummaryWithPeriodResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.AuthenticationMethods.UserSignInsByAuthMethodSummaryWithPeriod.UserSignInsByAuthMethodSummaryWithPeriodResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/CredentialUserRegistrationDetails/CredentialUserRegistrationDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/CredentialUserRegistrationDetails/CredentialUserRegistrationDetailsRequestBuilder.cs index f745a57e510..dc009af4ac6 100644 --- a/src/Microsoft.Graph/Generated/Reports/CredentialUserRegistrationDetails/CredentialUserRegistrationDetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/CredentialUserRegistrationDetails/CredentialUserRegistrationDetailsRequestBuilder.cs @@ -98,7 +98,7 @@ public CredentialUserRegistrationDetailsRequestBuilder(string rawUrl, IRequestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.CredentialUserRegistrationDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.CredentialUserRegistrationDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/CredentialUserRegistrationDetails/Item/CredentialUserRegistrationDetailsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/CredentialUserRegistrationDetails/Item/CredentialUserRegistrationDetailsItemRequestBuilder.cs index ee3a2adf252..2d44d812df7 100644 --- a/src/Microsoft.Graph/Generated/Reports/CredentialUserRegistrationDetails/Item/CredentialUserRegistrationDetailsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/CredentialUserRegistrationDetails/Item/CredentialUserRegistrationDetailsItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.CredentialUserRegistrationDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.CredentialUserRegistrationDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsage/DailyPrintUsageRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsage/DailyPrintUsageRequestBuilder.cs index 35158910c70..6eba0a9ea38 100644 --- a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsage/DailyPrintUsageRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsage/DailyPrintUsageRequestBuilder.cs @@ -93,7 +93,7 @@ public DailyPrintUsageRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintUsage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsage/Item/PrintUsageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsage/Item/PrintUsageItemRequestBuilder.cs index 51f0ea63811..38302516238 100644 --- a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsage/Item/PrintUsageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsage/Item/PrintUsageItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintUsage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByPrinter/DailyPrintUsageByPrinterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByPrinter/DailyPrintUsageByPrinterRequestBuilder.cs index 90cc43ad0b7..0a6011579ca 100644 --- a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByPrinter/DailyPrintUsageByPrinterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByPrinter/DailyPrintUsageByPrinterRequestBuilder.cs @@ -94,7 +94,7 @@ public DailyPrintUsageByPrinterRequestBuilder(string rawUrl, IRequestAdapter req public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs index acc69174bdf..ac9fb036ddc 100644 --- a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByUser/DailyPrintUsageByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByUser/DailyPrintUsageByUserRequestBuilder.cs index c2ac0b1c4a6..f5b3ff22629 100644 --- a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByUser/DailyPrintUsageByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByUser/DailyPrintUsageByUserRequestBuilder.cs @@ -94,7 +94,7 @@ public DailyPrintUsageByUserRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByUser/Item/PrintUsageByUserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByUser/Item/PrintUsageByUserItemRequestBuilder.cs index 73b3aab1483..d6065ae5b3e 100644 --- a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByUser/Item/PrintUsageByUserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageByUser/Item/PrintUsageByUserItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByPrinter/DailyPrintUsageSummariesByPrinterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByPrinter/DailyPrintUsageSummariesByPrinterRequestBuilder.cs index 72d5af68698..2181ac47627 100644 --- a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByPrinter/DailyPrintUsageSummariesByPrinterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByPrinter/DailyPrintUsageSummariesByPrinterRequestBuilder.cs @@ -97,7 +97,7 @@ public DailyPrintUsageSummariesByPrinterRequestBuilder(string rawUrl, IRequestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs index 16a0b9e9881..e8c65f93ed6 100644 --- a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByUser/DailyPrintUsageSummariesByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByUser/DailyPrintUsageSummariesByUserRequestBuilder.cs index dd119bb9fe5..31778a62a95 100644 --- a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByUser/DailyPrintUsageSummariesByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByUser/DailyPrintUsageSummariesByUserRequestBuilder.cs @@ -97,7 +97,7 @@ public DailyPrintUsageSummariesByUserRequestBuilder(string rawUrl, IRequestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByUser/Item/PrintUsageByUserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByUser/Item/PrintUsageByUserItemRequestBuilder.cs index 0cde1569f99..f581d6b30a8 100644 --- a/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByUser/Item/PrintUsageByUserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/DailyPrintUsageSummariesByUser/Item/PrintUsageByUserItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersGetResponse.cs index 71fa64b5466..8931e7f6f90 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAttackSimulationRepeatOffendersGetResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetAttackSimulationRepeatOffenders.GetAttackSimulationRepeatOffendersGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetAttackSimulationRepeatOffenders.GetAttackSimulationRepeatOffendersGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersResponse.cs index bf020153ebc..6ff9e8ec729 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersResponse.cs @@ -20,7 +20,7 @@ public partial class GetAttackSimulationRepeatOffendersResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetAttackSimulationRepeatOffenders.GetAttackSimulationRepeatOffendersResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetAttackSimulationRepeatOffenders.GetAttackSimulationRepeatOffendersResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageGetResponse.cs index 831727e3aa3..d5ce3d2e872 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAttackSimulationSimulationUserCoverageGetResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetAttackSimulationSimulationUserCoverage.GetAttackSimulationSimulationUserCoverageGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetAttackSimulationSimulationUserCoverage.GetAttackSimulationSimulationUserCoverageGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageResponse.cs index e5fe1205720..f0e0b665ebd 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageResponse.cs @@ -20,7 +20,7 @@ public partial class GetAttackSimulationSimulationUserCoverageResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetAttackSimulationSimulationUserCoverage.GetAttackSimulationSimulationUserCoverageResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetAttackSimulationSimulationUserCoverage.GetAttackSimulationSimulationUserCoverageResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageGetResponse.cs index fc037a73d23..aa06f371362 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAttackSimulationTrainingUserCoverageGetResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetAttackSimulationTrainingUserCoverage.GetAttackSimulationTrainingUserCoverageGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetAttackSimulationTrainingUserCoverage.GetAttackSimulationTrainingUserCoverageGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageResponse.cs index 25c5542fe7e..aa221a3b361 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageResponse.cs @@ -20,7 +20,7 @@ public partial class GetAttackSimulationTrainingUserCoverageResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetAttackSimulationTrainingUserCoverage.GetAttackSimulationTrainingUserCoverageResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetAttackSimulationTrainingUserCoverage.GetAttackSimulationTrainingUserCoverageResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetAzureADApplicationSignInSummaryWithPeriod/GetAzureADApplicationSignInSummaryWithPeriodGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetAzureADApplicationSignInSummaryWithPeriod/GetAzureADApplicationSignInSummaryWithPeriodGetResponse.cs index 0e54efe0fef..8b4e7489269 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetAzureADApplicationSignInSummaryWithPeriod/GetAzureADApplicationSignInSummaryWithPeriodGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetAzureADApplicationSignInSummaryWithPeriod/GetAzureADApplicationSignInSummaryWithPeriodGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAzureADApplicationSignInSummaryWithPeriodGetResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetAzureADApplicationSignInSummaryWithPeriod.GetAzureADApplicationSignInSummaryWithPeriodGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetAzureADApplicationSignInSummaryWithPeriod.GetAzureADApplicationSignInSummaryWithPeriodGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetAzureADApplicationSignInSummaryWithPeriod/GetAzureADApplicationSignInSummaryWithPeriodResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetAzureADApplicationSignInSummaryWithPeriod/GetAzureADApplicationSignInSummaryWithPeriodResponse.cs index d69bf710fa0..85873215012 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetAzureADApplicationSignInSummaryWithPeriod/GetAzureADApplicationSignInSummaryWithPeriodResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetAzureADApplicationSignInSummaryWithPeriod/GetAzureADApplicationSignInSummaryWithPeriodResponse.cs @@ -20,7 +20,7 @@ public partial class GetAzureADApplicationSignInSummaryWithPeriodResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetAzureADApplicationSignInSummaryWithPeriod.GetAzureADApplicationSignInSummaryWithPeriodResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetAzureADApplicationSignInSummaryWithPeriod.GetAzureADApplicationSignInSummaryWithPeriodResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetCredentialUsageSummaryWithPeriod/GetCredentialUsageSummaryWithPeriodGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetCredentialUsageSummaryWithPeriod/GetCredentialUsageSummaryWithPeriodGetResponse.cs index 9ca43e8eb0a..d5759c25f48 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetCredentialUsageSummaryWithPeriod/GetCredentialUsageSummaryWithPeriodGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetCredentialUsageSummaryWithPeriod/GetCredentialUsageSummaryWithPeriodGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetCredentialUsageSummaryWithPeriodGetResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetCredentialUsageSummaryWithPeriod.GetCredentialUsageSummaryWithPeriodGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetCredentialUsageSummaryWithPeriod.GetCredentialUsageSummaryWithPeriodGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetCredentialUsageSummaryWithPeriod/GetCredentialUsageSummaryWithPeriodResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetCredentialUsageSummaryWithPeriod/GetCredentialUsageSummaryWithPeriodResponse.cs index 6ff5a07fa44..97f128b1af9 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetCredentialUsageSummaryWithPeriod/GetCredentialUsageSummaryWithPeriodResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetCredentialUsageSummaryWithPeriod/GetCredentialUsageSummaryWithPeriodResponse.cs @@ -20,7 +20,7 @@ public partial class GetCredentialUsageSummaryWithPeriodResponse : global::Micro /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetCredentialUsageSummaryWithPeriod.GetCredentialUsageSummaryWithPeriodResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetCredentialUsageSummaryWithPeriod.GetCredentialUsageSummaryWithPeriodResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetCredentialUserRegistrationCount/GetCredentialUserRegistrationCountGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetCredentialUserRegistrationCount/GetCredentialUserRegistrationCountGetResponse.cs index dfc07435ca2..3368b80f2f8 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetCredentialUserRegistrationCount/GetCredentialUserRegistrationCountGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetCredentialUserRegistrationCount/GetCredentialUserRegistrationCountGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetCredentialUserRegistrationCountGetResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetCredentialUserRegistrationCount.GetCredentialUserRegistrationCountGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetCredentialUserRegistrationCount.GetCredentialUserRegistrationCountGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetCredentialUserRegistrationCount/GetCredentialUserRegistrationCountResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetCredentialUserRegistrationCount/GetCredentialUserRegistrationCountResponse.cs index fe0d1d03d83..4fc6108b7d9 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetCredentialUserRegistrationCount/GetCredentialUserRegistrationCountResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetCredentialUserRegistrationCount/GetCredentialUserRegistrationCountResponse.cs @@ -20,7 +20,7 @@ public partial class GetCredentialUserRegistrationCountResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetCredentialUserRegistrationCount.GetCredentialUserRegistrationCountResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetCredentialUserRegistrationCount.GetCredentialUserRegistrationCountResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse.cs index 0bc9b98b84d..e825cad418e 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEn /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime.GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime.GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse.cs index 5fda7eff2dc..bcee51fd6b7 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime/GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEn /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime.GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime.GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserCountsWithPeriod/GetOffice365ActiveUserCountsWithPeriodGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserCountsWithPeriod/GetOffice365ActiveUserCountsWithPeriodGetResponse.cs index 3ae23b2b987..47c4b9fb4ff 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserCountsWithPeriod/GetOffice365ActiveUserCountsWithPeriodGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserCountsWithPeriod/GetOffice365ActiveUserCountsWithPeriodGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetOffice365ActiveUserCountsWithPeriodGetResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365ActiveUserCountsWithPeriod.GetOffice365ActiveUserCountsWithPeriodGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365ActiveUserCountsWithPeriod.GetOffice365ActiveUserCountsWithPeriodGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserCountsWithPeriod/GetOffice365ActiveUserCountsWithPeriodResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserCountsWithPeriod/GetOffice365ActiveUserCountsWithPeriodResponse.cs index ca14f8c8aa2..e97fd47b27c 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserCountsWithPeriod/GetOffice365ActiveUserCountsWithPeriodResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserCountsWithPeriod/GetOffice365ActiveUserCountsWithPeriodResponse.cs @@ -20,7 +20,7 @@ public partial class GetOffice365ActiveUserCountsWithPeriodResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365ActiveUserCountsWithPeriod.GetOffice365ActiveUserCountsWithPeriodResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365ActiveUserCountsWithPeriod.GetOffice365ActiveUserCountsWithPeriodResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithDate/GetOffice365ActiveUserDetailWithDateGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithDate/GetOffice365ActiveUserDetailWithDateGetResponse.cs index eb29d90fffc..f4af3c7708f 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithDate/GetOffice365ActiveUserDetailWithDateGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithDate/GetOffice365ActiveUserDetailWithDateGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetOffice365ActiveUserDetailWithDateGetResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365ActiveUserDetailWithDate.GetOffice365ActiveUserDetailWithDateGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365ActiveUserDetailWithDate.GetOffice365ActiveUserDetailWithDateGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithDate/GetOffice365ActiveUserDetailWithDateResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithDate/GetOffice365ActiveUserDetailWithDateResponse.cs index d82021d98e0..4efcb65d0f0 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithDate/GetOffice365ActiveUserDetailWithDateResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithDate/GetOffice365ActiveUserDetailWithDateResponse.cs @@ -20,7 +20,7 @@ public partial class GetOffice365ActiveUserDetailWithDateResponse : global::Micr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365ActiveUserDetailWithDate.GetOffice365ActiveUserDetailWithDateResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365ActiveUserDetailWithDate.GetOffice365ActiveUserDetailWithDateResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithPeriod/GetOffice365ActiveUserDetailWithPeriodGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithPeriod/GetOffice365ActiveUserDetailWithPeriodGetResponse.cs index 86b9a9e4449..8865261b28c 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithPeriod/GetOffice365ActiveUserDetailWithPeriodGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithPeriod/GetOffice365ActiveUserDetailWithPeriodGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetOffice365ActiveUserDetailWithPeriodGetResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365ActiveUserDetailWithPeriod.GetOffice365ActiveUserDetailWithPeriodGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365ActiveUserDetailWithPeriod.GetOffice365ActiveUserDetailWithPeriodGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithPeriod/GetOffice365ActiveUserDetailWithPeriodResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithPeriod/GetOffice365ActiveUserDetailWithPeriodResponse.cs index 79479b8dcd0..c1a537e5988 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithPeriod/GetOffice365ActiveUserDetailWithPeriodResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365ActiveUserDetailWithPeriod/GetOffice365ActiveUserDetailWithPeriodResponse.cs @@ -20,7 +20,7 @@ public partial class GetOffice365ActiveUserDetailWithPeriodResponse : global::Mi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365ActiveUserDetailWithPeriod.GetOffice365ActiveUserDetailWithPeriodResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365ActiveUserDetailWithPeriod.GetOffice365ActiveUserDetailWithPeriodResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityCountsWithPeriod/GetOffice365GroupsActivityCountsWithPeriodGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityCountsWithPeriod/GetOffice365GroupsActivityCountsWithPeriodGetResponse.cs index 62e3ab40e55..22d18c139f6 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityCountsWithPeriod/GetOffice365GroupsActivityCountsWithPeriodGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityCountsWithPeriod/GetOffice365GroupsActivityCountsWithPeriodGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetOffice365GroupsActivityCountsWithPeriodGetResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityCountsWithPeriod.GetOffice365GroupsActivityCountsWithPeriodGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityCountsWithPeriod.GetOffice365GroupsActivityCountsWithPeriodGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityCountsWithPeriod/GetOffice365GroupsActivityCountsWithPeriodResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityCountsWithPeriod/GetOffice365GroupsActivityCountsWithPeriodResponse.cs index b76f7f05a78..96c3ce5570a 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityCountsWithPeriod/GetOffice365GroupsActivityCountsWithPeriodResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityCountsWithPeriod/GetOffice365GroupsActivityCountsWithPeriodResponse.cs @@ -20,7 +20,7 @@ public partial class GetOffice365GroupsActivityCountsWithPeriodResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityCountsWithPeriod.GetOffice365GroupsActivityCountsWithPeriodResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityCountsWithPeriod.GetOffice365GroupsActivityCountsWithPeriodResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithDate/GetOffice365GroupsActivityDetailWithDateGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithDate/GetOffice365GroupsActivityDetailWithDateGetResponse.cs index 811f4bdf1d3..fa7c66d8da3 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithDate/GetOffice365GroupsActivityDetailWithDateGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithDate/GetOffice365GroupsActivityDetailWithDateGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetOffice365GroupsActivityDetailWithDateGetResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityDetailWithDate.GetOffice365GroupsActivityDetailWithDateGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityDetailWithDate.GetOffice365GroupsActivityDetailWithDateGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithDate/GetOffice365GroupsActivityDetailWithDateResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithDate/GetOffice365GroupsActivityDetailWithDateResponse.cs index 55595dac572..92c85cd2500 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithDate/GetOffice365GroupsActivityDetailWithDateResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithDate/GetOffice365GroupsActivityDetailWithDateResponse.cs @@ -20,7 +20,7 @@ public partial class GetOffice365GroupsActivityDetailWithDateResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityDetailWithDate.GetOffice365GroupsActivityDetailWithDateResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityDetailWithDate.GetOffice365GroupsActivityDetailWithDateResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithPeriod/GetOffice365GroupsActivityDetailWithPeriodGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithPeriod/GetOffice365GroupsActivityDetailWithPeriodGetResponse.cs index 0093cdcba70..9c3052386e5 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithPeriod/GetOffice365GroupsActivityDetailWithPeriodGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithPeriod/GetOffice365GroupsActivityDetailWithPeriodGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetOffice365GroupsActivityDetailWithPeriodGetResponse : glo /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityDetailWithPeriod.GetOffice365GroupsActivityDetailWithPeriodGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityDetailWithPeriod.GetOffice365GroupsActivityDetailWithPeriodGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithPeriod/GetOffice365GroupsActivityDetailWithPeriodResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithPeriod/GetOffice365GroupsActivityDetailWithPeriodResponse.cs index 238c7e69b34..866b5b4282f 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithPeriod/GetOffice365GroupsActivityDetailWithPeriodResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityDetailWithPeriod/GetOffice365GroupsActivityDetailWithPeriodResponse.cs @@ -20,7 +20,7 @@ public partial class GetOffice365GroupsActivityDetailWithPeriodResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityDetailWithPeriod.GetOffice365GroupsActivityDetailWithPeriodResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityDetailWithPeriod.GetOffice365GroupsActivityDetailWithPeriodResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityFileCountsWithPeriod/GetOffice365GroupsActivityFileCountsWithPeriodGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityFileCountsWithPeriod/GetOffice365GroupsActivityFileCountsWithPeriodGetResponse.cs index 958c9dde517..ac570a7127b 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityFileCountsWithPeriod/GetOffice365GroupsActivityFileCountsWithPeriodGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityFileCountsWithPeriod/GetOffice365GroupsActivityFileCountsWithPeriodGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetOffice365GroupsActivityFileCountsWithPeriodGetResponse : /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityFileCountsWithPeriod.GetOffice365GroupsActivityFileCountsWithPeriodGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityFileCountsWithPeriod.GetOffice365GroupsActivityFileCountsWithPeriodGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityFileCountsWithPeriod/GetOffice365GroupsActivityFileCountsWithPeriodResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityFileCountsWithPeriod/GetOffice365GroupsActivityFileCountsWithPeriodResponse.cs index 1902dc2f2c2..665fd049d57 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityFileCountsWithPeriod/GetOffice365GroupsActivityFileCountsWithPeriodResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityFileCountsWithPeriod/GetOffice365GroupsActivityFileCountsWithPeriodResponse.cs @@ -20,7 +20,7 @@ public partial class GetOffice365GroupsActivityFileCountsWithPeriodResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityFileCountsWithPeriod.GetOffice365GroupsActivityFileCountsWithPeriodResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityFileCountsWithPeriod.GetOffice365GroupsActivityFileCountsWithPeriodResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityGroupCountsWithPeriod/GetOffice365GroupsActivityGroupCountsWithPeriodGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityGroupCountsWithPeriod/GetOffice365GroupsActivityGroupCountsWithPeriodGetResponse.cs index 3ba5c793966..258dc27e143 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityGroupCountsWithPeriod/GetOffice365GroupsActivityGroupCountsWithPeriodGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityGroupCountsWithPeriod/GetOffice365GroupsActivityGroupCountsWithPeriodGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetOffice365GroupsActivityGroupCountsWithPeriodGetResponse /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityGroupCountsWithPeriod.GetOffice365GroupsActivityGroupCountsWithPeriodGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityGroupCountsWithPeriod.GetOffice365GroupsActivityGroupCountsWithPeriodGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityGroupCountsWithPeriod/GetOffice365GroupsActivityGroupCountsWithPeriodResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityGroupCountsWithPeriod/GetOffice365GroupsActivityGroupCountsWithPeriodResponse.cs index 4a63849442c..bd0ad4f636a 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityGroupCountsWithPeriod/GetOffice365GroupsActivityGroupCountsWithPeriodResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityGroupCountsWithPeriod/GetOffice365GroupsActivityGroupCountsWithPeriodResponse.cs @@ -20,7 +20,7 @@ public partial class GetOffice365GroupsActivityGroupCountsWithPeriodResponse : g /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityGroupCountsWithPeriod.GetOffice365GroupsActivityGroupCountsWithPeriodResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityGroupCountsWithPeriod.GetOffice365GroupsActivityGroupCountsWithPeriodResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityStorageWithPeriod/GetOffice365GroupsActivityStorageWithPeriodGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityStorageWithPeriod/GetOffice365GroupsActivityStorageWithPeriodGetResponse.cs index cdf4e496953..5d9b7a9b85c 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityStorageWithPeriod/GetOffice365GroupsActivityStorageWithPeriodGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityStorageWithPeriod/GetOffice365GroupsActivityStorageWithPeriodGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetOffice365GroupsActivityStorageWithPeriodGetResponse : gl /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityStorageWithPeriod.GetOffice365GroupsActivityStorageWithPeriodGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityStorageWithPeriod.GetOffice365GroupsActivityStorageWithPeriodGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityStorageWithPeriod/GetOffice365GroupsActivityStorageWithPeriodResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityStorageWithPeriod/GetOffice365GroupsActivityStorageWithPeriodResponse.cs index 522c5ff7f25..d8b54b6365c 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityStorageWithPeriod/GetOffice365GroupsActivityStorageWithPeriodResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365GroupsActivityStorageWithPeriod/GetOffice365GroupsActivityStorageWithPeriodResponse.cs @@ -20,7 +20,7 @@ public partial class GetOffice365GroupsActivityStorageWithPeriodResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityStorageWithPeriod.GetOffice365GroupsActivityStorageWithPeriodResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityStorageWithPeriod.GetOffice365GroupsActivityStorageWithPeriodResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365ServicesUserCountsWithPeriod/GetOffice365ServicesUserCountsWithPeriodGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365ServicesUserCountsWithPeriod/GetOffice365ServicesUserCountsWithPeriodGetResponse.cs index 82733f1ba6a..13ff06b61b8 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365ServicesUserCountsWithPeriod/GetOffice365ServicesUserCountsWithPeriodGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365ServicesUserCountsWithPeriod/GetOffice365ServicesUserCountsWithPeriodGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetOffice365ServicesUserCountsWithPeriodGetResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365ServicesUserCountsWithPeriod.GetOffice365ServicesUserCountsWithPeriodGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365ServicesUserCountsWithPeriod.GetOffice365ServicesUserCountsWithPeriodGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetOffice365ServicesUserCountsWithPeriod/GetOffice365ServicesUserCountsWithPeriodResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetOffice365ServicesUserCountsWithPeriod/GetOffice365ServicesUserCountsWithPeriodResponse.cs index eb8f093a9c2..84aa3f907e5 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetOffice365ServicesUserCountsWithPeriod/GetOffice365ServicesUserCountsWithPeriodResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetOffice365ServicesUserCountsWithPeriod/GetOffice365ServicesUserCountsWithPeriodResponse.cs @@ -20,7 +20,7 @@ public partial class GetOffice365ServicesUserCountsWithPeriodResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetOffice365ServicesUserCountsWithPeriod.GetOffice365ServicesUserCountsWithPeriodResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365ServicesUserCountsWithPeriod.GetOffice365ServicesUserCountsWithPeriodResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse.cs index 909827a3831..798f8ea8479 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime.GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime.GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse.cs index 31da3f029b1..92040118a12 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime/GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime.GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime.GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetRelyingPartyDetailedSummaryWithPeriod/GetRelyingPartyDetailedSummaryWithPeriodGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetRelyingPartyDetailedSummaryWithPeriod/GetRelyingPartyDetailedSummaryWithPeriodGetResponse.cs index 51d552ff9ec..c03c53d8e0c 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetRelyingPartyDetailedSummaryWithPeriod/GetRelyingPartyDetailedSummaryWithPeriodGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetRelyingPartyDetailedSummaryWithPeriod/GetRelyingPartyDetailedSummaryWithPeriodGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetRelyingPartyDetailedSummaryWithPeriodGetResponse : globa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetRelyingPartyDetailedSummaryWithPeriod.GetRelyingPartyDetailedSummaryWithPeriodGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetRelyingPartyDetailedSummaryWithPeriod.GetRelyingPartyDetailedSummaryWithPeriodGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetRelyingPartyDetailedSummaryWithPeriod/GetRelyingPartyDetailedSummaryWithPeriodResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetRelyingPartyDetailedSummaryWithPeriod/GetRelyingPartyDetailedSummaryWithPeriodResponse.cs index fdab41c7ff0..57f813d26a9 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetRelyingPartyDetailedSummaryWithPeriod/GetRelyingPartyDetailedSummaryWithPeriodResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetRelyingPartyDetailedSummaryWithPeriod/GetRelyingPartyDetailedSummaryWithPeriodResponse.cs @@ -20,7 +20,7 @@ public partial class GetRelyingPartyDetailedSummaryWithPeriodResponse : global:: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetRelyingPartyDetailedSummaryWithPeriod.GetRelyingPartyDetailedSummaryWithPeriodResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetRelyingPartyDetailedSummaryWithPeriod.GetRelyingPartyDetailedSummaryWithPeriodResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs index c4b137bcd9c..47fda4a0f02 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndD /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime.GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime.GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse.cs b/src/Microsoft.Graph/Generated/Reports/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse.cs index e5bdb6237c3..b751ecb8276 100644 --- a/src/Microsoft.Graph/Generated/Reports/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime/GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse.cs @@ -20,7 +20,7 @@ public partial class GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndD /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime.GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime.GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/AlertConfigurations/AlertConfigurationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/AlertConfigurations/AlertConfigurationsRequestBuilder.cs index 1cf6bf2eb0d..cb420f3e1e7 100644 --- a/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/AlertConfigurations/AlertConfigurationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/AlertConfigurations/AlertConfigurationsRequestBuilder.cs @@ -94,7 +94,7 @@ public AlertConfigurationsRequestBuilder(string rawUrl, IRequestAdapter requestA public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HealthMonitoring.AlertConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HealthMonitoring.AlertConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/AlertConfigurations/Item/AlertConfigurationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/AlertConfigurations/Item/AlertConfigurationItemRequestBuilder.cs index 86a6a3ae4e7..4de9410136c 100644 --- a/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/AlertConfigurations/Item/AlertConfigurationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/AlertConfigurations/Item/AlertConfigurationItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HealthMonitoring.AlertConfiguration body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HealthMonitoring.AlertConfiguration body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/Alerts/AlertsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/Alerts/AlertsRequestBuilder.cs index 01393a11970..ab0508a1d0f 100644 --- a/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/Alerts/AlertsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/Alerts/AlertsRequestBuilder.cs @@ -94,7 +94,7 @@ public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas public async Task PostAsync(global::Microsoft.Graph.Beta.Models.HealthMonitoring.Alert body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.HealthMonitoring.Alert body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/Alerts/Item/AlertItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/Alerts/Item/AlertItemRequestBuilder.cs index 2482f921a13..77c4e7d7851 100644 --- a/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/Alerts/Item/AlertItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/Alerts/Item/AlertItemRequestBuilder.cs @@ -98,7 +98,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HealthMonitoring.Alert body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -159,7 +159,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HealthMonitoring.Alert body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/HealthMonitoringRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/HealthMonitoringRequestBuilder.cs index 287d8fe90d1..fac8bca7eaf 100644 --- a/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/HealthMonitoringRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/HealthMonitoring/HealthMonitoringRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.HealthMonitoring.HealthMonitoringRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.HealthMonitoring.HealthMonitoringRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs index f97a9fd9f06..951ff8db216 100644 --- a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByPrinter/MonthlyPrintUsageByPrinterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByPrinter/MonthlyPrintUsageByPrinterRequestBuilder.cs index 0730c2c14be..3c011e3bd10 100644 --- a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByPrinter/MonthlyPrintUsageByPrinterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByPrinter/MonthlyPrintUsageByPrinterRequestBuilder.cs @@ -94,7 +94,7 @@ public MonthlyPrintUsageByPrinterRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByUser/Item/PrintUsageByUserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByUser/Item/PrintUsageByUserItemRequestBuilder.cs index 087955f2fc5..2e527a9016e 100644 --- a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByUser/Item/PrintUsageByUserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByUser/Item/PrintUsageByUserItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByUser/MonthlyPrintUsageByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByUser/MonthlyPrintUsageByUserRequestBuilder.cs index a3159e1c3cd..d28d228b69e 100644 --- a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByUser/MonthlyPrintUsageByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageByUser/MonthlyPrintUsageByUserRequestBuilder.cs @@ -94,7 +94,7 @@ public MonthlyPrintUsageByUserRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs index 3ac9144e603..7aa03c77164 100644 --- a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByPrinter/Item/PrintUsageByPrinterItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByPrinter/MonthlyPrintUsageSummariesByPrinterRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByPrinter/MonthlyPrintUsageSummariesByPrinterRequestBuilder.cs index e61355f342b..50f35ef7f68 100644 --- a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByPrinter/MonthlyPrintUsageSummariesByPrinterRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByPrinter/MonthlyPrintUsageSummariesByPrinterRequestBuilder.cs @@ -97,7 +97,7 @@ public MonthlyPrintUsageSummariesByPrinterRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByPrinter body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByUser/Item/PrintUsageByUserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByUser/Item/PrintUsageByUserItemRequestBuilder.cs index fb4450d107b..5caf60ec26e 100644 --- a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByUser/Item/PrintUsageByUserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByUser/Item/PrintUsageByUserItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByUser/MonthlyPrintUsageSummariesByUserRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByUser/MonthlyPrintUsageSummariesByUserRequestBuilder.cs index e2b2bd084e0..9f9369ba2da 100644 --- a/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByUser/MonthlyPrintUsageSummariesByUserRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/MonthlyPrintUsageSummariesByUser/MonthlyPrintUsageSummariesByUserRequestBuilder.cs @@ -97,7 +97,7 @@ public MonthlyPrintUsageSummariesByUserRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.PrintUsageByUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/BillingRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/BillingRequestBuilder.cs index 77714a37aa2..b731d225e92 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/BillingRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/BillingRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Partners.Billing.Billing body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -181,7 +181,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Partners.Billing.Billing body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Manifests/Item/ManifestItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Manifests/Item/ManifestItemRequestBuilder.cs index 1f7e9b7e184..849ef3ac665 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Manifests/Item/ManifestItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Manifests/Item/ManifestItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Partners.Billing.Manifest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Partners.Billing.Manifest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Manifests/ManifestsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Manifests/ManifestsRequestBuilder.cs index f48d2ce0501..1b81d87022a 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Manifests/ManifestsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Manifests/ManifestsRequestBuilder.cs @@ -93,7 +93,7 @@ public ManifestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Partners.Billing.Manifest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Partners.Billing.Manifest body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Operations/Item/OperationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Operations/Item/OperationItemRequestBuilder.cs index 6c6b71bba4d..70bcf762950 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Operations/Item/OperationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Operations/Item/OperationItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Partners.Billing.Operation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Partners.Billing.Operation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Operations/OperationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Operations/OperationsRequestBuilder.cs index d3398dd6d39..4644705b7b5 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Operations/OperationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Operations/OperationsRequestBuilder.cs @@ -93,7 +93,7 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.Partners.Billing.Operation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.Partners.Billing.Operation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Billed/BilledRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Billed/BilledRequestBuilder.cs index 0d6682e956b..0778d329a06 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Billed/BilledRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Billed/BilledRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Partners.Billing.BilledReconciliation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Partners.Billing.BilledReconciliation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Billed/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Billed/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs index 0f56677b37f..007eb348210 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Billed/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Billed/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs @@ -59,7 +59,7 @@ public ExportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Reports.Partners.Billing.Reconciliation.Billed.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.Partners.Billing.Reconciliation.Billed.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("attributeSet", AttributeSet); writer.WriteStringValue("invoiceId", InvoiceId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Billed/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Billed/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs index ad8bf884cd2..51034a16c13 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Billed/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Billed/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs @@ -52,7 +52,7 @@ public MicrosoftGraphPartnersBillingExportRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.Reports.Partners.Billing.Reconciliation.Billed.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Reports.Partners.Billing.Reconciliation.Billed.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/ReconciliationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/ReconciliationRequestBuilder.cs index 35727362181..119694bb2c6 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/ReconciliationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/ReconciliationRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Partners.Billing.BillingReconciliation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Partners.Billing.BillingReconciliation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Unbilled/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Unbilled/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs index 9d13d2f23e0..d955b87daf6 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Unbilled/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Unbilled/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs @@ -65,7 +65,7 @@ public ExportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Reports.Partners.Billing.Reconciliation.Unbilled.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.Partners.Billing.Reconciliation.Unbilled.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("attributeSet", AttributeSet); writer.WriteEnumValue("billingPeriod", BillingPeriod); writer.WriteStringValue("currencyCode", CurrencyCode); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Unbilled/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Unbilled/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs index fd7be3a7962..0a835f5c2c2 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Unbilled/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Unbilled/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs @@ -52,7 +52,7 @@ public MicrosoftGraphPartnersBillingExportRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.Reports.Partners.Billing.Reconciliation.Unbilled.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Reports.Partners.Billing.Reconciliation.Unbilled.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Unbilled/UnbilledRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Unbilled/UnbilledRequestBuilder.cs index 41ab47aa915..b6ed4889fce 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Unbilled/UnbilledRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Reconciliation/Unbilled/UnbilledRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Partners.Billing.UnbilledReconciliation body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Partners.Billing.UnbilledReconciliation body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Billed/BilledRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Billed/BilledRequestBuilder.cs index 96331f56b80..956cfabb8a7 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Billed/BilledRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Billed/BilledRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Partners.Billing.BilledUsage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Partners.Billing.BilledUsage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Billed/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Billed/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs index e1afba2bfea..640d65b8e12 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Billed/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Billed/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs @@ -59,7 +59,7 @@ public ExportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Reports.Partners.Billing.Usage.Billed.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.Partners.Billing.Usage.Billed.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody(); } /// @@ -80,7 +80,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("attributeSet", AttributeSet); writer.WriteStringValue("invoiceId", InvoiceId); writer.WriteAdditionalData(AdditionalData); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Billed/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Billed/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs index b7a571553a3..909c099c39e 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Billed/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Billed/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs @@ -52,7 +52,7 @@ public MicrosoftGraphPartnersBillingExportRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.Reports.Partners.Billing.Usage.Billed.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Reports.Partners.Billing.Usage.Billed.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Unbilled/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Unbilled/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs index 4c359d931e6..afbf1041248 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Unbilled/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Unbilled/MicrosoftGraphPartnersBillingExport/ExportPostRequestBody.cs @@ -65,7 +65,7 @@ public ExportPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.Reports.Partners.Billing.Usage.Unbilled.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.Partners.Billing.Usage.Unbilled.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody(); } /// @@ -87,7 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("attributeSet", AttributeSet); writer.WriteEnumValue("billingPeriod", BillingPeriod); writer.WriteStringValue("currencyCode", CurrencyCode); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Unbilled/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Unbilled/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs index 4ec73f49619..a3208951c69 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Unbilled/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Unbilled/MicrosoftGraphPartnersBillingExport/MicrosoftGraphPartnersBillingExportRequestBuilder.cs @@ -52,7 +52,7 @@ public MicrosoftGraphPartnersBillingExportRequestBuilder(string rawUrl, IRequest public async Task PostAsync(global::Microsoft.Graph.Beta.Reports.Partners.Billing.Usage.Unbilled.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -75,7 +75,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Reports.Partners.Billing.Usage.Unbilled.MicrosoftGraphPartnersBillingExport.ExportPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Unbilled/UnbilledRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Unbilled/UnbilledRequestBuilder.cs index d7f97ee1e6d..345ff19ab3e 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Unbilled/UnbilledRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/Unbilled/UnbilledRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Partners.Billing.UnbilledUsage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Partners.Billing.UnbilledUsage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/UsageRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/UsageRequestBuilder.cs index 836171ebc68..21f973ac467 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/UsageRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/Billing/Usage/UsageRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Partners.Billing.AzureUsage body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Partners.Billing.AzureUsage body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Partners/PartnersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Partners/PartnersRequestBuilder.cs index f158086494f..d1d46c50b46 100644 --- a/src/Microsoft.Graph/Generated/Reports/Partners/PartnersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Partners/PartnersRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Partners.Partners body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Partners.Partners body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/ReportsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/ReportsRequestBuilder.cs index 652c3a37e81..e6cf3a16805 100644 --- a/src/Microsoft.Graph/Generated/Reports/ReportsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/ReportsRequestBuilder.cs @@ -454,7 +454,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetEmailActivityUserDetailWithDate.GetEmailActivityUserDetailWithDateRequestBuilder GetEmailActivityUserDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetEmailActivityUserDetailWithDate.GetEmailActivityUserDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -494,7 +494,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetEmailAppUsageUserDetailWithDate.GetEmailAppUsageUserDetailWithDateRequestBuilder GetEmailAppUsageUserDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetEmailAppUsageUserDetailWithDate.GetEmailAppUsageUserDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -544,7 +544,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetFormsUserActivityUserDetailWithDate.GetFormsUserActivityUserDetailWithDateRequestBuilder GetFormsUserActivityUserDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetFormsUserActivityUserDetailWithDate.GetFormsUserActivityUserDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -566,9 +566,9 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.Reports.GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime.GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeRequestBuilder GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, string groupId, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); if(string.IsNullOrEmpty(groupId)) throw new ArgumentNullException(nameof(groupId)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.Reports.GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTime.GetGroupArchivedPrintJobsWithGroupIdWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, groupId, startDateTime); } /// @@ -598,7 +598,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetM365AppUserDetailWithDate.GetM365AppUserDetailWithDateRequestBuilder GetM365AppUserDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetM365AppUserDetailWithDate.GetM365AppUserDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -698,7 +698,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetOffice365ActiveUserDetailWithDate.GetOffice365ActiveUserDetailWithDateRequestBuilder GetOffice365ActiveUserDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365ActiveUserDetailWithDate.GetOffice365ActiveUserDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -728,7 +728,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityDetailWithDate.GetOffice365GroupsActivityDetailWithDateRequestBuilder GetOffice365GroupsActivityDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetOffice365GroupsActivityDetailWithDate.GetOffice365GroupsActivityDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -808,7 +808,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetOneDriveActivityUserDetailWithDate.GetOneDriveActivityUserDetailWithDateRequestBuilder GetOneDriveActivityUserDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetOneDriveActivityUserDetailWithDate.GetOneDriveActivityUserDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -838,7 +838,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetOneDriveUsageAccountDetailWithDate.GetOneDriveUsageAccountDetailWithDateRequestBuilder GetOneDriveUsageAccountDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetOneDriveUsageAccountDetailWithDate.GetOneDriveUsageAccountDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -880,9 +880,9 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: startDateTime={startDateTime} public global::Microsoft.Graph.Beta.Reports.GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime.GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeRequestBuilder GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, string printerId, DateTimeOffset? startDateTime) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); if(string.IsNullOrEmpty(printerId)) throw new ArgumentNullException(nameof(printerId)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); return new global::Microsoft.Graph.Beta.Reports.GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTime.GetPrinterArchivedPrintJobsWithPrinterIdWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, printerId, startDateTime); } /// @@ -932,7 +932,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetSharePointActivityUserDetailWithDate.GetSharePointActivityUserDetailWithDateRequestBuilder GetSharePointActivityUserDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetSharePointActivityUserDetailWithDate.GetSharePointActivityUserDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -952,7 +952,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetSharePointSiteUsageDetailWithDate.GetSharePointSiteUsageDetailWithDateRequestBuilder GetSharePointSiteUsageDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetSharePointSiteUsageDetailWithDate.GetSharePointSiteUsageDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -1032,7 +1032,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetSkypeForBusinessActivityUserDetailWithDate.GetSkypeForBusinessActivityUserDetailWithDateRequestBuilder GetSkypeForBusinessActivityUserDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetSkypeForBusinessActivityUserDetailWithDate.GetSkypeForBusinessActivityUserDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -1072,7 +1072,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetSkypeForBusinessDeviceUsageUserDetailWithDate.GetSkypeForBusinessDeviceUsageUserDetailWithDateRequestBuilder GetSkypeForBusinessDeviceUsageUserDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetSkypeForBusinessDeviceUsageUserDetailWithDate.GetSkypeForBusinessDeviceUsageUserDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -1222,7 +1222,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetTeamsDeviceUsageUserDetailWithDate.GetTeamsDeviceUsageUserDetailWithDateRequestBuilder GetTeamsDeviceUsageUserDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetTeamsDeviceUsageUserDetailWithDate.GetTeamsDeviceUsageUserDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -1252,7 +1252,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetTeamsTeamActivityDetailWithDate.GetTeamsTeamActivityDetailWithDateRequestBuilder GetTeamsTeamActivityDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetTeamsTeamActivityDetailWithDate.GetTeamsTeamActivityDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -1362,7 +1362,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetTeamsUserActivityUserDetailWithDate.GetTeamsUserActivityUserDetailWithDateRequestBuilder GetTeamsUserActivityUserDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetTeamsUserActivityUserDetailWithDate.GetTeamsUserActivityUserDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -1384,8 +1384,8 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: userId='{userId}' public global::Microsoft.Graph.Beta.Reports.GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime.GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeRequestBuilder GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime(DateTimeOffset? endDateTime, DateTimeOffset? startDateTime, string userId) { - _ = endDateTime ?? throw new ArgumentNullException(nameof(endDateTime)); - _ = startDateTime ?? throw new ArgumentNullException(nameof(startDateTime)); + if(ReferenceEquals(endDateTime, null)) throw new ArgumentNullException(nameof(endDateTime)); + if(ReferenceEquals(startDateTime, null)) throw new ArgumentNullException(nameof(startDateTime)); if(string.IsNullOrEmpty(userId)) throw new ArgumentNullException(nameof(userId)); return new global::Microsoft.Graph.Beta.Reports.GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTime.GetUserArchivedPrintJobsWithUserIdWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime, userId); } @@ -1416,7 +1416,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetYammerActivityUserDetailWithDate.GetYammerActivityUserDetailWithDateRequestBuilder GetYammerActivityUserDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetYammerActivityUserDetailWithDate.GetYammerActivityUserDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -1456,7 +1456,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetYammerDeviceUsageUserDetailWithDate.GetYammerDeviceUsageUserDetailWithDateRequestBuilder GetYammerDeviceUsageUserDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetYammerDeviceUsageUserDetailWithDate.GetYammerDeviceUsageUserDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -1486,7 +1486,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Usage: date={date} public global::Microsoft.Graph.Beta.Reports.GetYammerGroupsActivityDetailWithDate.GetYammerGroupsActivityDetailWithDateRequestBuilder GetYammerGroupsActivityDetailWithDate(Date? date) { - _ = date ?? throw new ArgumentNullException(nameof(date)); + if(ReferenceEquals(date, null)) throw new ArgumentNullException(nameof(date)); return new global::Microsoft.Graph.Beta.Reports.GetYammerGroupsActivityDetailWithDate.GetYammerGroupsActivityDetailWithDateRequestBuilder(PathParameters, RequestAdapter, date); } /// @@ -1520,9 +1520,9 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public global::Microsoft.Graph.Beta.Reports.ManagedDeviceEnrollmentAbandonmentDetailsWithSkipWithTopWithFilterWithSkipToken.ManagedDeviceEnrollmentAbandonmentDetailsWithSkipWithTopWithFilterWithSkipTokenRequestBuilder ManagedDeviceEnrollmentAbandonmentDetailsWithSkipWithTopWithFilterWithSkipToken(string filter, int? skip, string skipToken, int? top) { if(string.IsNullOrEmpty(filter)) throw new ArgumentNullException(nameof(filter)); - _ = skip ?? throw new ArgumentNullException(nameof(skip)); + if(ReferenceEquals(skip, null)) throw new ArgumentNullException(nameof(skip)); if(string.IsNullOrEmpty(skipToken)) throw new ArgumentNullException(nameof(skipToken)); - _ = top ?? throw new ArgumentNullException(nameof(top)); + if(ReferenceEquals(top, null)) throw new ArgumentNullException(nameof(top)); return new global::Microsoft.Graph.Beta.Reports.ManagedDeviceEnrollmentAbandonmentDetailsWithSkipWithTopWithFilterWithSkipToken.ManagedDeviceEnrollmentAbandonmentDetailsWithSkipWithTopWithFilterWithSkipTokenRequestBuilder(PathParameters, RequestAdapter, filter, skip, skipToken, top); } /// @@ -1536,9 +1536,9 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public global::Microsoft.Graph.Beta.Reports.ManagedDeviceEnrollmentAbandonmentSummaryWithSkipWithTopWithFilterWithSkipToken.ManagedDeviceEnrollmentAbandonmentSummaryWithSkipWithTopWithFilterWithSkipTokenRequestBuilder ManagedDeviceEnrollmentAbandonmentSummaryWithSkipWithTopWithFilterWithSkipToken(string filter, int? skip, string skipToken, int? top) { if(string.IsNullOrEmpty(filter)) throw new ArgumentNullException(nameof(filter)); - _ = skip ?? throw new ArgumentNullException(nameof(skip)); + if(ReferenceEquals(skip, null)) throw new ArgumentNullException(nameof(skip)); if(string.IsNullOrEmpty(skipToken)) throw new ArgumentNullException(nameof(skipToken)); - _ = top ?? throw new ArgumentNullException(nameof(top)); + if(ReferenceEquals(top, null)) throw new ArgumentNullException(nameof(top)); return new global::Microsoft.Graph.Beta.Reports.ManagedDeviceEnrollmentAbandonmentSummaryWithSkipWithTopWithFilterWithSkipToken.ManagedDeviceEnrollmentAbandonmentSummaryWithSkipWithTopWithFilterWithSkipTokenRequestBuilder(PathParameters, RequestAdapter, filter, skip, skipToken, top); } /// @@ -1552,9 +1552,9 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public global::Microsoft.Graph.Beta.Reports.ManagedDeviceEnrollmentFailureDetailsWithSkipWithTopWithFilterWithSkipToken.ManagedDeviceEnrollmentFailureDetailsWithSkipWithTopWithFilterWithSkipTokenRequestBuilder ManagedDeviceEnrollmentFailureDetailsWithSkipWithTopWithFilterWithSkipToken(string filter, int? skip, string skipToken, int? top) { if(string.IsNullOrEmpty(filter)) throw new ArgumentNullException(nameof(filter)); - _ = skip ?? throw new ArgumentNullException(nameof(skip)); + if(ReferenceEquals(skip, null)) throw new ArgumentNullException(nameof(skip)); if(string.IsNullOrEmpty(skipToken)) throw new ArgumentNullException(nameof(skipToken)); - _ = top ?? throw new ArgumentNullException(nameof(top)); + if(ReferenceEquals(top, null)) throw new ArgumentNullException(nameof(top)); return new global::Microsoft.Graph.Beta.Reports.ManagedDeviceEnrollmentFailureDetailsWithSkipWithTopWithFilterWithSkipToken.ManagedDeviceEnrollmentFailureDetailsWithSkipWithTopWithFilterWithSkipTokenRequestBuilder(PathParameters, RequestAdapter, filter, skip, skipToken, top); } /// @@ -1584,7 +1584,7 @@ public ReportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PatchAsync(global::Microsoft.Graph.Beta.Models.ReportRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -1626,7 +1626,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ReportRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersGetResponse.cs index ba6364deabb..bb49cc5bfdf 100644 --- a/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAttackSimulationRepeatOffendersGetResponse : global::Mic /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.Security.GetAttackSimulationRepeatOffenders.GetAttackSimulationRepeatOffendersGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.Security.GetAttackSimulationRepeatOffenders.GetAttackSimulationRepeatOffendersGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersResponse.cs b/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersResponse.cs index 698f4150e1d..e8ee56638e8 100644 --- a/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationRepeatOffenders/GetAttackSimulationRepeatOffendersResponse.cs @@ -20,7 +20,7 @@ public partial class GetAttackSimulationRepeatOffendersResponse : global::Micros /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.Security.GetAttackSimulationRepeatOffenders.GetAttackSimulationRepeatOffendersResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.Security.GetAttackSimulationRepeatOffenders.GetAttackSimulationRepeatOffendersResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageGetResponse.cs index a5839fecf3b..d4cf51c1a34 100644 --- a/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAttackSimulationSimulationUserCoverageGetResponse : glob /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.Security.GetAttackSimulationSimulationUserCoverage.GetAttackSimulationSimulationUserCoverageGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.Security.GetAttackSimulationSimulationUserCoverage.GetAttackSimulationSimulationUserCoverageGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageResponse.cs b/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageResponse.cs index f05f97dc971..5039ed1510b 100644 --- a/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationSimulationUserCoverage/GetAttackSimulationSimulationUserCoverageResponse.cs @@ -20,7 +20,7 @@ public partial class GetAttackSimulationSimulationUserCoverageResponse : global: /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.Security.GetAttackSimulationSimulationUserCoverage.GetAttackSimulationSimulationUserCoverageResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.Security.GetAttackSimulationSimulationUserCoverage.GetAttackSimulationSimulationUserCoverageResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageGetResponse.cs index 06dd2ec01ee..c012fd88f72 100644 --- a/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAttackSimulationTrainingUserCoverageGetResponse : global /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.Security.GetAttackSimulationTrainingUserCoverage.GetAttackSimulationTrainingUserCoverageGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.Security.GetAttackSimulationTrainingUserCoverage.GetAttackSimulationTrainingUserCoverageGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageResponse.cs b/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageResponse.cs index f16564f7046..027fad915f6 100644 --- a/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/Security/GetAttackSimulationTrainingUserCoverage/GetAttackSimulationTrainingUserCoverageResponse.cs @@ -20,7 +20,7 @@ public partial class GetAttackSimulationTrainingUserCoverageResponse : global::M /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.Security.GetAttackSimulationTrainingUserCoverage.GetAttackSimulationTrainingUserCoverageResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.Security.GetAttackSimulationTrainingUserCoverage.GetAttackSimulationTrainingUserCoverageResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/Security/SecurityRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Security/SecurityRequestBuilder.cs index c8b5cecff1e..6068aa66ed5 100644 --- a/src/Microsoft.Graph/Generated/Reports/Security/SecurityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Security/SecurityRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.SecurityReportsRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -175,7 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.SecurityReportsRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 304c07f2347..9478d5317bf 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveI /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index 4a45cc78885..2eb89b4a1a2 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveI /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 535bacd970e..98831fcc067 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActiveUserMetricsForEmailByModernAuthenticationWithInclu /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index 5a24c3f2caa..a6a1723a6bc 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetActiveUserMetricsForEmailByModernAuthenticationWithInclu /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index cd270d87077..4526a4ca79f 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index 5f62eac960e..608f14b60f4 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index b641efc0144..e15efcde62d 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStart /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index c611944368d..61f303684dd 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStart /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 760f7f469ee..2864ee2eb53 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIn /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index fc37ded8279..4069d208297 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIn /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 6b1d16076ce..f0377cb6c12 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiv /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index b86a2a005d7..9f01f7686d8 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiv /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index ba191869342..cee9ce2b213 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveI /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index e10b8b3ab36..159105c8db4 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveI /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index e5f5a78fdb2..f0eac2e0540 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIn /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index 81958acfbf2..4456eeaa5e9 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIn /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 0ed5242b8b0..e4b19cc3c2c 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalSt /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index 19a26f93458..598d5220c68 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalSt /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index a6579b3bc62..987fbc86c72 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index 44e98fef6ac..4d11578c090 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index d05c993ec8d..8a4ef6914e9 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDat /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index 8dfeddc9f2b..fb4974f5387 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDat /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 6477c986baa..b3d111daed1 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclu /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index a3692063e41..754137a0073 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclu /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 2163cc15266..61c32ed6e87 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartD /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index 688a08f822c..d771a2b4138 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartD /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 396fc2b7966..58d68a9c3dd 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalS /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index a7c0fbfee19..caed13929fa 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalS /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 6c406cc6c68..998b9406fdc 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetConnectivityMetricsForExchangeWithInclusiveIntervalStart /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index 9a656d8a1f6..ce99df894ea 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetConnectivityMetricsForExchangeWithInclusiveIntervalStart /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index c29185222c5..d5e79a96b3f 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetMessageVolumeMetricsForEmailDeliveryWithInclusiveInterva /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index cbdc6eda61d..768c7da9bd4 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetMessageVolumeMetricsForEmailDeliveryWithInclusiveInterva /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 431bbb80a10..c5916630696 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalSta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index aa5fc832dcf..6eb2a70a177 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalSta /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 49f5790d7e1..24d830b97e3 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetMetricsForConditionalAccessBlockedSignInWithInclusiveInt /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index d3e1162d20d..7272617fc80 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetMetricsForConditionalAccessBlockedSignInWithInclusiveInt /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 04ee3621ac3..e9bf808ae50 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetMetricsForConditionalAccessCompliantDevicesSignInSuccess /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index 60f7d97c667..b33867352cc 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetMetricsForConditionalAccessCompliantDevicesSignInSuccess /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index b69e9e19bfe..88266038f15 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetMetricsForConditionalAccessManagedDevicesSignInSuccessWi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index e6f37b0708d..d2e763e37b2 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetMetricsForConditionalAccessManagedDevicesSignInSuccessWi /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 87ab00d2589..a32fc293c46 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDate /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index adeed5248b1..8d163e1eaa0 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDate /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index c4385b0abb6..20ba5d0aa71 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDate /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index a55c9f6c89d..07176303095 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDate /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 990edd0ec9f..ba9b5f2645b 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDat /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index 0ecdb6a237e..1bc1a2f8953 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDat /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 4efe312d35c..c15528fda86 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index 37b0a43a03a..9b623ad9fcb 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDa /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs index 323f2192ead..22a64319c72 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse.cs @@ -36,7 +36,7 @@ public partial class GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveInterva /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs index 03677195a69..ab0bd61c309 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes/GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse.cs @@ -20,7 +20,7 @@ public partial class GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveInterva /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesResponse(); } } diff --git a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/ServiceActivityRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/ServiceActivityRequestBuilder.cs index 2691fdcdc0c..5cdae94d96c 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServiceActivity/ServiceActivityRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServiceActivity/ServiceActivityRequestBuilder.cs @@ -89,8 +89,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForDesktopMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -101,8 +101,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForEmailByModernAuthenticationWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -113,8 +113,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForExcelWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -125,8 +125,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForiOSOrAndroidMailByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -137,8 +137,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOneNoteWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -149,8 +149,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookMacByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -161,8 +161,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookMobileByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -173,8 +173,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookWebByAppOpeningWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -185,8 +185,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForOutlookWebByReadEmailWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -197,8 +197,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForPowerPointWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -209,8 +209,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForVisioWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -221,8 +221,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetActiveUserMetricsForWordWebWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -256,8 +256,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetAudioStreamQoEMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -268,8 +268,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetAudioStreamsOverUdpMetricsForTeamsWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -280,8 +280,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetConnectivityMetricsForExchangeWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -292,8 +292,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMessageVolumeMetricsForEmailDeliveryWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -304,8 +304,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMessageVolumeMetricsForTeamsChatWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -316,8 +316,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessBlockedSignInWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -328,8 +328,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessCompliantDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -340,8 +340,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForConditionalAccessManagedDevicesSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -352,8 +352,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForMfaSignInFailureWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -364,8 +364,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForMfaSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -376,8 +376,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetMetricsForSamlSignInSuccessWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -388,8 +388,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetUsageMetricsForTeamsByLaunchWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -400,8 +400,8 @@ public async Task DeleteAsync(ActionUsage: inclusiveIntervalStartDateTime={inclusiveIntervalStartDateTime} public global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes(DateTimeOffset? exclusiveIntervalEndDateTime, DateTimeOffset? inclusiveIntervalStartDateTime) { - _ = exclusiveIntervalEndDateTime ?? throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); - _ = inclusiveIntervalStartDateTime ?? throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); + if(ReferenceEquals(exclusiveIntervalEndDateTime, null)) throw new ArgumentNullException(nameof(exclusiveIntervalEndDateTime)); + if(ReferenceEquals(inclusiveIntervalStartDateTime, null)) throw new ArgumentNullException(nameof(inclusiveIntervalStartDateTime)); return new global::Microsoft.Graph.Beta.Reports.ServiceActivity.GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutes.GetUsageMetricsForTeamsByMeetingsJoinedWithInclusiveIntervalStartDateTimeWithExclusiveIntervalEndDateTimeWithAggregationIntervalInMinutesRequestBuilder(PathParameters, RequestAdapter, exclusiveIntervalEndDateTime, inclusiveIntervalStartDateTime); } /// @@ -421,7 +421,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServiceActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -482,7 +482,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/ServicePrincipalSignInActivities/Item/ServicePrincipalSignInActivityItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/ServicePrincipalSignInActivities/Item/ServicePrincipalSignInActivityItemRequestBuilder.cs index d2d305ef009..8bc54d3a7a8 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServicePrincipalSignInActivities/Item/ServicePrincipalSignInActivityItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServicePrincipalSignInActivities/Item/ServicePrincipalSignInActivityItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServicePrincipalSignInActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServicePrincipalSignInActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/ServicePrincipalSignInActivities/ServicePrincipalSignInActivitiesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/ServicePrincipalSignInActivities/ServicePrincipalSignInActivitiesRequestBuilder.cs index 8d721879352..3e12ff22ce5 100644 --- a/src/Microsoft.Graph/Generated/Reports/ServicePrincipalSignInActivities/ServicePrincipalSignInActivitiesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/ServicePrincipalSignInActivities/ServicePrincipalSignInActivitiesRequestBuilder.cs @@ -94,7 +94,7 @@ public ServicePrincipalSignInActivitiesRequestBuilder(string rawUrl, IRequestAda public async Task PostAsync(global::Microsoft.Graph.Beta.Models.ServicePrincipalSignInActivity body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.ServicePrincipalSignInActivity body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Sla/AzureADAuthentication/AzureADAuthenticationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Sla/AzureADAuthentication/AzureADAuthenticationRequestBuilder.cs index 29fcaf9918e..d41015b1390 100644 --- a/src/Microsoft.Graph/Generated/Reports/Sla/AzureADAuthentication/AzureADAuthenticationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Sla/AzureADAuthentication/AzureADAuthenticationRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AzureADAuthentication body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AzureADAuthentication body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/Sla/SlaRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/Sla/SlaRequestBuilder.cs index 5ca44740a13..17b99c556ad 100644 --- a/src/Microsoft.Graph/Generated/Reports/Sla/SlaRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/Sla/SlaRequestBuilder.cs @@ -102,7 +102,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.ServiceLevelAgreementRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.ServiceLevelAgreementRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/UserCredentialUsageDetails/Item/UserCredentialUsageDetailsItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/UserCredentialUsageDetails/Item/UserCredentialUsageDetailsItemRequestBuilder.cs index c4e5c7fda14..316424fa3f7 100644 --- a/src/Microsoft.Graph/Generated/Reports/UserCredentialUsageDetails/Item/UserCredentialUsageDetailsItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/UserCredentialUsageDetails/Item/UserCredentialUsageDetailsItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserCredentialUsageDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserCredentialUsageDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/UserCredentialUsageDetails/UserCredentialUsageDetailsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/UserCredentialUsageDetails/UserCredentialUsageDetailsRequestBuilder.cs index 23e43a9c7fc..3e91b6c877e 100644 --- a/src/Microsoft.Graph/Generated/Reports/UserCredentialUsageDetails/UserCredentialUsageDetailsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/UserCredentialUsageDetails/UserCredentialUsageDetailsRequestBuilder.cs @@ -98,7 +98,7 @@ public UserCredentialUsageDetailsRequestBuilder(string rawUrl, IRequestAdapter r public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UserCredentialUsageDetails body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UserCredentialUsageDetails body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/UserInsights/Daily/DailyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/UserInsights/Daily/DailyRequestBuilder.cs index 8af8807e806..e94ecf4b1b2 100644 --- a/src/Microsoft.Graph/Generated/Reports/UserInsights/Daily/DailyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/UserInsights/Daily/DailyRequestBuilder.cs @@ -150,7 +150,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.DailyUserInsightMetricsRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -211,7 +211,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.DailyUserInsightMetricsRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/UserInsights/Daily/MfaTelecomFraud/Item/MfaTelecomFraudMetricItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/UserInsights/Daily/MfaTelecomFraud/Item/MfaTelecomFraudMetricItemRequestBuilder.cs index 2ade33a74fe..3c3940b97ed 100644 --- a/src/Microsoft.Graph/Generated/Reports/UserInsights/Daily/MfaTelecomFraud/Item/MfaTelecomFraudMetricItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/UserInsights/Daily/MfaTelecomFraud/Item/MfaTelecomFraudMetricItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MfaTelecomFraudMetric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MfaTelecomFraudMetric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/UserInsights/Daily/MfaTelecomFraud/MfaTelecomFraudRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/UserInsights/Daily/MfaTelecomFraud/MfaTelecomFraudRequestBuilder.cs index f41a94470b8..0f82cd19eca 100644 --- a/src/Microsoft.Graph/Generated/Reports/UserInsights/Daily/MfaTelecomFraud/MfaTelecomFraudRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/UserInsights/Daily/MfaTelecomFraud/MfaTelecomFraudRequestBuilder.cs @@ -93,7 +93,7 @@ public MfaTelecomFraudRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MfaTelecomFraudMetric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MfaTelecomFraudMetric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/UserInsights/Monthly/MfaRegisteredUsers/Item/MfaUserCountMetricItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/UserInsights/Monthly/MfaRegisteredUsers/Item/MfaUserCountMetricItemRequestBuilder.cs index 41f060be178..41ac1742d9b 100644 --- a/src/Microsoft.Graph/Generated/Reports/UserInsights/Monthly/MfaRegisteredUsers/Item/MfaUserCountMetricItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/UserInsights/Monthly/MfaRegisteredUsers/Item/MfaUserCountMetricItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MfaUserCountMetric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MfaUserCountMetric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/UserInsights/Monthly/MfaRegisteredUsers/MfaRegisteredUsersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/UserInsights/Monthly/MfaRegisteredUsers/MfaRegisteredUsersRequestBuilder.cs index 7309c656ec3..9d66bdc4fb2 100644 --- a/src/Microsoft.Graph/Generated/Reports/UserInsights/Monthly/MfaRegisteredUsers/MfaRegisteredUsersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/UserInsights/Monthly/MfaRegisteredUsers/MfaRegisteredUsersRequestBuilder.cs @@ -93,7 +93,7 @@ public MfaRegisteredUsersRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.MfaUserCountMetric body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -135,7 +135,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.MfaUserCountMetric body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/UserInsights/Monthly/MonthlyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/UserInsights/Monthly/MonthlyRequestBuilder.cs index d2acc76752a..8264066f6cc 100644 --- a/src/Microsoft.Graph/Generated/Reports/UserInsights/Monthly/MonthlyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/UserInsights/Monthly/MonthlyRequestBuilder.cs @@ -150,7 +150,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.MonthlyUserInsightMetricsRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -211,7 +211,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.MonthlyUserInsightMetricsRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/Reports/UserInsights/UserInsightsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Reports/UserInsights/UserInsightsRequestBuilder.cs index 84177029bb6..b29281f3520 100644 --- a/src/Microsoft.Graph/Generated/Reports/UserInsights/UserInsightsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Reports/UserInsights/UserInsightsRequestBuilder.cs @@ -108,7 +108,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UserInsightsRoot body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -169,7 +169,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UserInsightsRoot body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RiskDetections/Item/RiskDetectionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RiskDetections/Item/RiskDetectionItemRequestBuilder.cs index 992cc99cdf5..ee01daaf419 100644 --- a/src/Microsoft.Graph/Generated/RiskDetections/Item/RiskDetectionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RiskDetections/Item/RiskDetectionItemRequestBuilder.cs @@ -96,7 +96,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RiskDetection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -157,7 +157,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RiskDetection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RiskDetections/RiskDetectionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RiskDetections/RiskDetectionsRequestBuilder.cs index fabc7134354..e14192c2d71 100644 --- a/src/Microsoft.Graph/Generated/RiskDetections/RiskDetectionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RiskDetections/RiskDetectionsRequestBuilder.cs @@ -48,8 +48,8 @@ public RiskDetectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte { } /// - /// Retrieve the properties of a riskDetection object. - /// Find more info here + /// Retrieve the properties of a collection of riskDetection objects. + /// Find more info here /// /// A /// Cancellation token to use when cancelling requests @@ -88,7 +88,7 @@ public RiskDetectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RiskDetection body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -97,7 +97,7 @@ public RiskDetectionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte return await RequestAdapter.SendAsync(requestInfo, global::Microsoft.Graph.Beta.Models.RiskDetection.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the properties of a riskDetection object. + /// Retrieve the properties of a collection of riskDetection objects. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -130,7 +130,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RiskDetection body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); @@ -147,7 +147,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. return new global::Microsoft.Graph.Beta.RiskDetections.RiskDetectionsRequestBuilder(rawUrl, RequestAdapter); } /// - /// Retrieve the properties of a riskDetection object. + /// Retrieve the properties of a collection of riskDetection objects. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")] public partial class RiskDetectionsRequestBuilderGetQueryParameters diff --git a/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs b/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs index e0b87d17fd7..352634d1b56 100644 --- a/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmCompromised/ConfirmCompromisedPostRequestBody.cs @@ -52,7 +52,7 @@ public ConfirmCompromisedPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.RiskyUsers.ConfirmCompromised.ConfirmCompromisedPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RiskyUsers.ConfirmCompromised.ConfirmCompromisedPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("userIds", UserIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs b/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs index d9c9f29ce88..8429dc8ed3e 100644 --- a/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmCompromised/ConfirmCompromisedRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.RiskyUsers.ConfirmCompr public async Task PostAsync(global::Microsoft.Graph.Beta.RiskyUsers.ConfirmCompromised.ConfirmCompromisedPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.RiskyUsers.ConfirmCompromised.ConfirmCompromisedPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmSafe/ConfirmSafePostRequestBody.cs b/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmSafe/ConfirmSafePostRequestBody.cs index ddeb939ff9d..88c6a75684d 100644 --- a/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmSafe/ConfirmSafePostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmSafe/ConfirmSafePostRequestBody.cs @@ -52,7 +52,7 @@ public ConfirmSafePostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.RiskyUsers.ConfirmSafe.ConfirmSafePostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RiskyUsers.ConfirmSafe.ConfirmSafePostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("userIds", UserIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmSafe/ConfirmSafeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmSafe/ConfirmSafeRequestBuilder.cs index c39a7ab242b..a9f1aa4fc7e 100644 --- a/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmSafe/ConfirmSafeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RiskyUsers/ConfirmSafe/ConfirmSafeRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.RiskyUsers.ConfirmSafe. public async Task PostAsync(global::Microsoft.Graph.Beta.RiskyUsers.ConfirmSafe.ConfirmSafePostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.RiskyUsers.ConfirmSafe.ConfirmSafePostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RiskyUsers/Dismiss/DismissPostRequestBody.cs b/src/Microsoft.Graph/Generated/RiskyUsers/Dismiss/DismissPostRequestBody.cs index 90a739e9d9a..56d00797f22 100644 --- a/src/Microsoft.Graph/Generated/RiskyUsers/Dismiss/DismissPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/RiskyUsers/Dismiss/DismissPostRequestBody.cs @@ -52,7 +52,7 @@ public DismissPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.RiskyUsers.Dismiss.DismissPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RiskyUsers.Dismiss.DismissPostRequestBody(); } /// @@ -72,7 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("userIds", UserIds); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/Microsoft.Graph/Generated/RiskyUsers/Dismiss/DismissRequestBuilder.cs b/src/Microsoft.Graph/Generated/RiskyUsers/Dismiss/DismissRequestBuilder.cs index 8356f712b36..4b1830974ff 100644 --- a/src/Microsoft.Graph/Generated/RiskyUsers/Dismiss/DismissRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RiskyUsers/Dismiss/DismissRequestBuilder.cs @@ -50,7 +50,7 @@ public async Task PostAsync(global::Microsoft.Graph.Beta.RiskyUsers.Dismiss.Dism public async Task PostAsync(global::Microsoft.Graph.Beta.RiskyUsers.Dismiss.DismissPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -73,7 +73,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.RiskyUsers.Dismiss.DismissPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RiskyUsers/Item/History/HistoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/RiskyUsers/Item/History/HistoryRequestBuilder.cs index 3e38434f515..6a25cdf67fb 100644 --- a/src/Microsoft.Graph/Generated/RiskyUsers/Item/History/HistoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RiskyUsers/Item/History/HistoryRequestBuilder.cs @@ -94,7 +94,7 @@ public HistoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RiskyUserHistoryItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -136,7 +136,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RiskyUserHistoryItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RiskyUsers/Item/History/Item/RiskyUserHistoryItemItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RiskyUsers/Item/History/Item/RiskyUserHistoryItemItemRequestBuilder.cs index 4b016cc35d3..3aa11aeed71 100644 --- a/src/Microsoft.Graph/Generated/RiskyUsers/Item/History/Item/RiskyUserHistoryItemItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RiskyUsers/Item/History/Item/RiskyUserHistoryItemItemRequestBuilder.cs @@ -97,7 +97,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RiskyUserHistoryItem body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -158,7 +158,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RiskyUserHistoryItem body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RiskyUsers/Item/RiskyUserItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RiskyUsers/Item/RiskyUserItemRequestBuilder.cs index b39ba5a6efc..c34b3976715 100644 --- a/src/Microsoft.Graph/Generated/RiskyUsers/Item/RiskyUserItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RiskyUsers/Item/RiskyUserItemRequestBuilder.cs @@ -103,7 +103,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RiskyUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -164,7 +164,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RiskyUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RiskyUsers/RiskyUsersRequestBuilder.cs b/src/Microsoft.Graph/Generated/RiskyUsers/RiskyUsersRequestBuilder.cs index 540403a2f47..bae037dd32b 100644 --- a/src/Microsoft.Graph/Generated/RiskyUsers/RiskyUsersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RiskyUsers/RiskyUsersRequestBuilder.cs @@ -112,7 +112,7 @@ public RiskyUsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.RiskyUser body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -154,7 +154,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.RiskyUser body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/CloudPCRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/CloudPCRequestBuilder.cs index 9960f919930..54f50f95d5c 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/CloudPCRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/CloudPCRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RbacApplicationMultiple body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -184,7 +184,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RbacApplicationMultiple body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs index d090ac7eb69..082eaa5e9c7 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs @@ -74,7 +74,7 @@ public ImportResourceActionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.RoleManagement.CloudPC.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.CloudPC.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("format", Format); writer.WriteBoolValue("overwriteResourceNamespace", OverwriteResourceNamespace); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs index a4194866c8f..ab7251042b2 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs @@ -52,7 +52,7 @@ public ImportResourceActionsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.RoleManagement.CloudPC.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.RoleManagement.CloudPC.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs index 281d1003ffd..04caf44d745 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs index 2fcf2f1fa08..93aa26e8a17 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs index f0dc7d9d6e3..ec0a3faff73 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs @@ -97,7 +97,7 @@ public ResourceActionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs index 602e65a88ce..5061839c2d7 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs index eeda5381088..d3b86bf26c8 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs @@ -97,7 +97,7 @@ public ResourceNamespacesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/Item/AppScopes/AppScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/Item/AppScopes/AppScopesRequestBuilder.cs index 2bea1a3d24e..4706e3651b4 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/Item/AppScopes/AppScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/Item/AppScopes/AppScopesRequestBuilder.cs @@ -97,7 +97,7 @@ public AppScopesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AppScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AppScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/Item/AppScopes/Item/AppScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/Item/AppScopes/Item/AppScopeItemRequestBuilder.cs index a3a7281c13b..68ecac86421 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/Item/AppScopes/Item/AppScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/Item/AppScopes/Item/AppScopeItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AppScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/Item/UnifiedRoleAssignmentMultipleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/Item/UnifiedRoleAssignmentMultipleItemRequestBuilder.cs index 43a6c780835..ecd89051023 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/Item/UnifiedRoleAssignmentMultipleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/Item/UnifiedRoleAssignmentMultipleItemRequestBuilder.cs @@ -130,7 +130,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultiple body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -194,7 +194,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultiple body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/RoleAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/RoleAssignmentsRequestBuilder.cs index 1c0a657b20d..049bd401002 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/RoleAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleAssignments/RoleAssignmentsRequestBuilder.cs @@ -98,7 +98,7 @@ public RoleAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultiple body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultiple body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs index a908d89d7b5..7f4dd5ffee0 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectory /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.RoleManagement.CloudPC.RoleDefinitions.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.CloudPC.RoleDefinitions.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs index 623cf8e7209..936429da319 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs @@ -20,7 +20,7 @@ public partial class AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectory /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.RoleManagement.CloudPC.RoleDefinitions.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.CloudPC.RoleDefinitions.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/InheritsPermissionsFromRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/InheritsPermissionsFromRequestBuilder.cs index 7ba7f04db5b..0bb2f5cb32b 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/InheritsPermissionsFromRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/InheritsPermissionsFromRequestBuilder.cs @@ -97,7 +97,7 @@ public InheritsPermissionsFromRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs index 6f484623f2c..a577b7bdfd0 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectory /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.RoleManagement.CloudPC.RoleDefinitions.Item.InheritsPermissionsFrom.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.CloudPC.RoleDefinitions.Item.InheritsPermissionsFrom.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs index 20c51f9a313..37b8a2ba694 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs @@ -20,7 +20,7 @@ public partial class AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectory /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.RoleManagement.CloudPC.RoleDefinitions.Item.InheritsPermissionsFrom.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.CloudPC.RoleDefinitions.Item.InheritsPermissionsFrom.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/Item/UnifiedRoleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/Item/UnifiedRoleDefinitionItemRequestBuilder.cs index 46aec246e91..7c7fd0a5077 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/Item/UnifiedRoleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/InheritsPermissionsFrom/Item/UnifiedRoleDefinitionItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/UnifiedRoleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/UnifiedRoleDefinitionItemRequestBuilder.cs index b7858105ea9..79948b46519 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/UnifiedRoleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/Item/UnifiedRoleDefinitionItemRequestBuilder.cs @@ -116,7 +116,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -180,7 +180,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/RoleDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/RoleDefinitionsRequestBuilder.cs index 50df8ef9384..c924ae5e308 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/RoleDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/CloudPC/RoleDefinitions/RoleDefinitionsRequestBuilder.cs @@ -99,7 +99,7 @@ public RoleDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/DefenderRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/DefenderRequestBuilder.cs index 4f6b4635c6b..c81746a7c6d 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/DefenderRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/DefenderRequestBuilder.cs @@ -127,7 +127,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacApplicationMultiple body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -191,7 +191,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacApplicationMultiple body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs index 51e85b43dbb..42203240a58 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs @@ -74,7 +74,7 @@ public ImportResourceActionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.RoleManagement.Defender.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.Defender.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("format", Format); writer.WriteBoolValue("overwriteResourceNamespace", OverwriteResourceNamespace); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs index 9d31fbe655b..ff4913df688 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs @@ -52,7 +52,7 @@ public ImportResourceActionsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.RoleManagement.Defender.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.RoleManagement.Defender.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs index d24c4649bbd..5970f6bad42 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs index ee3a5db34b2..d359a7f9656 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs index e80e277514f..610eab1441f 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs @@ -97,7 +97,7 @@ public ResourceActionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs index 76de2d79167..cd15970f192 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs index f632ab7c2dc..e580937d55c 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs @@ -97,7 +97,7 @@ public ResourceNamespacesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/Item/AppScopes/AppScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/Item/AppScopes/AppScopesRequestBuilder.cs index 0f75dea9331..0c9795a65de 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/Item/AppScopes/AppScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/Item/AppScopes/AppScopesRequestBuilder.cs @@ -97,7 +97,7 @@ public AppScopesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AppScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AppScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/Item/AppScopes/Item/AppScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/Item/AppScopes/Item/AppScopeItemRequestBuilder.cs index 3ee92be04b5..2be648bdef0 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/Item/AppScopes/Item/AppScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/Item/AppScopes/Item/AppScopeItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AppScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/Item/UnifiedRoleAssignmentMultipleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/Item/UnifiedRoleAssignmentMultipleItemRequestBuilder.cs index d441ed3d8c2..37e141058a2 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/Item/UnifiedRoleAssignmentMultipleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/Item/UnifiedRoleAssignmentMultipleItemRequestBuilder.cs @@ -129,7 +129,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultiple body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -193,7 +193,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultiple body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/RoleAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/RoleAssignmentsRequestBuilder.cs index ee10ecaec8b..97f827ecb1a 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/RoleAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleAssignments/RoleAssignmentsRequestBuilder.cs @@ -98,7 +98,7 @@ public RoleAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultiple body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultiple body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs index 4ad213f71cb..49cfcaa1be4 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectory /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.RoleManagement.Defender.RoleDefinitions.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.Defender.RoleDefinitions.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs index 8d723992fcf..a9515d5f4d7 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs @@ -20,7 +20,7 @@ public partial class AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectory /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.RoleManagement.Defender.RoleDefinitions.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.Defender.RoleDefinitions.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/InheritsPermissionsFromRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/InheritsPermissionsFromRequestBuilder.cs index 52211dfc08e..7ad66f3efb1 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/InheritsPermissionsFromRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/InheritsPermissionsFromRequestBuilder.cs @@ -97,7 +97,7 @@ public InheritsPermissionsFromRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs index 16ce24290d6..3229f0d67cd 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectory /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.RoleManagement.Defender.RoleDefinitions.Item.InheritsPermissionsFrom.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.Defender.RoleDefinitions.Item.InheritsPermissionsFrom.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs index e1f67caa725..71a194a9624 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs @@ -20,7 +20,7 @@ public partial class AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectory /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.RoleManagement.Defender.RoleDefinitions.Item.InheritsPermissionsFrom.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.Defender.RoleDefinitions.Item.InheritsPermissionsFrom.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/Item/UnifiedRoleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/Item/UnifiedRoleDefinitionItemRequestBuilder.cs index f966f2970be..ad6066959a5 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/Item/UnifiedRoleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/InheritsPermissionsFrom/Item/UnifiedRoleDefinitionItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/UnifiedRoleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/UnifiedRoleDefinitionItemRequestBuilder.cs index 5a9e9915aeb..1855b4ce8b8 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/UnifiedRoleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/Item/UnifiedRoleDefinitionItemRequestBuilder.cs @@ -115,7 +115,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -179,7 +179,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/RoleDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/RoleDefinitionsRequestBuilder.cs index 0b3b8bf86c2..890f1c08ccc 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/RoleDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/Defender/RoleDefinitions/RoleDefinitionsRequestBuilder.cs @@ -99,7 +99,7 @@ public RoleDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/DeviceManagementRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/DeviceManagementRequestBuilder.cs index 5ad062fc0b1..ce42acc4425 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/DeviceManagementRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/DeviceManagementRequestBuilder.cs @@ -120,7 +120,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RbacApplicationMultiple body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -184,7 +184,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RbacApplicationMultiple body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs index 9d42df6f71e..0e0390879ac 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs @@ -74,7 +74,7 @@ public ImportResourceActionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.RoleManagement.DeviceManagement.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.DeviceManagement.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("format", Format); writer.WriteBoolValue("overwriteResourceNamespace", OverwriteResourceNamespace); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs index 41fa1899d01..2a453f81eda 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs @@ -52,7 +52,7 @@ public ImportResourceActionsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.RoleManagement.DeviceManagement.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.RoleManagement.DeviceManagement.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs index c321c26f8ff..479706d5c56 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs index 5c2d709a876..1e8041c6cd9 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs index a3fb73f2bfe..823754fd5d3 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs @@ -97,7 +97,7 @@ public ResourceActionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs index e7f8894298a..57e2599ad3e 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs index 7146c4dba60..a4d998afa87 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs @@ -97,7 +97,7 @@ public ResourceNamespacesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/Item/AppScopes/AppScopesRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/Item/AppScopes/AppScopesRequestBuilder.cs index dbfa7b0b29e..9d957175d6d 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/Item/AppScopes/AppScopesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/Item/AppScopes/AppScopesRequestBuilder.cs @@ -97,7 +97,7 @@ public AppScopesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : public async Task PostAsync(global::Microsoft.Graph.Beta.Models.AppScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.AppScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/Item/AppScopes/Item/AppScopeItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/Item/AppScopes/Item/AppScopeItemRequestBuilder.cs index 91bbe493b61..d0640804b9e 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/Item/AppScopes/Item/AppScopeItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/Item/AppScopes/Item/AppScopeItemRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.AppScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.AppScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/Item/UnifiedRoleAssignmentMultipleItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/Item/UnifiedRoleAssignmentMultipleItemRequestBuilder.cs index b246f744ac0..1344a83064e 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/Item/UnifiedRoleAssignmentMultipleItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/Item/UnifiedRoleAssignmentMultipleItemRequestBuilder.cs @@ -130,7 +130,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultiple body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -194,7 +194,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultiple body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/RoleAssignmentsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/RoleAssignmentsRequestBuilder.cs index 275352dcca1..ac1944cde23 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/RoleAssignmentsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleAssignments/RoleAssignmentsRequestBuilder.cs @@ -99,7 +99,7 @@ public RoleAssignmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultiple body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -143,7 +143,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleAssignmentMultiple body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs index bee905564c9..5bec827c887 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectory /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.RoleManagement.DeviceManagement.RoleDefinitions.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.DeviceManagement.RoleDefinitions.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs index 3e5862177fe..0d47635cf68 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs @@ -20,7 +20,7 @@ public partial class AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectory /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.RoleManagement.DeviceManagement.RoleDefinitions.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.DeviceManagement.RoleDefinitions.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/InheritsPermissionsFromRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/InheritsPermissionsFromRequestBuilder.cs index 96e01d63d60..919659926d1 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/InheritsPermissionsFromRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/InheritsPermissionsFromRequestBuilder.cs @@ -97,7 +97,7 @@ public InheritsPermissionsFromRequestBuilder(string rawUrl, IRequestAdapter requ public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs index 2873c18f3db..b115c36a184 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse.cs @@ -36,7 +36,7 @@ public partial class AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectory /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.RoleManagement.DeviceManagement.RoleDefinitions.Item.InheritsPermissionsFrom.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.DeviceManagement.RoleDefinitions.Item.InheritsPermissionsFrom.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs index 52ba874922f..d7f4f9adc4f 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/Item/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId/AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse.cs @@ -20,7 +20,7 @@ public partial class AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectory /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.RoleManagement.DeviceManagement.RoleDefinitions.Item.InheritsPermissionsFrom.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.DeviceManagement.RoleDefinitions.Item.InheritsPermissionsFrom.Item.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeId.AssignedPrincipalsWithTransitivedirectoryScopeTypeDirectoryScopeTypeDirectoryScopeIdDirectoryScopeIdResponse(); } } diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/Item/UnifiedRoleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/Item/UnifiedRoleDefinitionItemRequestBuilder.cs index 78cf0945a8b..7fba439482e 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/Item/UnifiedRoleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/InheritsPermissionsFrom/Item/UnifiedRoleDefinitionItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/UnifiedRoleDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/UnifiedRoleDefinitionItemRequestBuilder.cs index c09378cfd77..766681b45d9 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/UnifiedRoleDefinitionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/Item/UnifiedRoleDefinitionItemRequestBuilder.cs @@ -113,7 +113,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -177,7 +177,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/RoleDefinitionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/RoleDefinitionsRequestBuilder.cs index b963a3c5602..351b963022e 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/RoleDefinitionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DeviceManagement/RoleDefinitions/RoleDefinitionsRequestBuilder.cs @@ -97,7 +97,7 @@ public RoleDefinitionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -141,7 +141,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRoleDefinition body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/DirectoryRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/DirectoryRequestBuilder.cs index 0c7a2f833e4..cdc43e4b058 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/DirectoryRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/DirectoryRequestBuilder.cs @@ -190,7 +190,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.RbacApplication body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -254,7 +254,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.RbacApplication body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs index 17cb0619065..9f77211b88e 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsPostRequestBody.cs @@ -74,7 +74,7 @@ public ImportResourceActionsPostRequestBody() /// The parse node to use to read the discriminator value and create the object public static global::Microsoft.Graph.Beta.RoleManagement.DirectoryNamespace.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.DirectoryNamespace.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody(); } /// @@ -96,7 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public virtual void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("format", Format); writer.WriteBoolValue("overwriteResourceNamespace", OverwriteResourceNamespace); writer.WriteStringValue("value", Value); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs index ef096684d88..1521d531bf4 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ImportResourceActions/ImportResourceActionsRequestBuilder.cs @@ -52,7 +52,7 @@ public ImportResourceActionsRequestBuilder(string rawUrl, IRequestAdapter reques public async Task PostAsync(global::Microsoft.Graph.Beta.RoleManagement.DirectoryNamespace.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -76,7 +76,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.RoleManagement.DirectoryNamespace.ResourceNamespaces.Item.ImportResourceActions.ImportResourceActionsPostRequestBody body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs index 193acce89d3..4b7975359b4 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ResourceActions/Item/ResourceScope/ResourceScopeRequestBuilder.cs @@ -99,7 +99,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceScope body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -163,7 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceScope body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs index e732c1546a1..769fb472f98 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ResourceActions/Item/UnifiedRbacResourceActionItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -178,7 +178,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs index ed95d033a1d..b9aad58da15 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/ResourceActions/ResourceActionsRequestBuilder.cs @@ -98,7 +98,7 @@ public ResourceActionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapt public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceAction body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs index a85bf879372..f6532d4e575 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/Item/UnifiedRbacResourceNamespaceItemRequestBuilder.cs @@ -114,7 +114,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -178,7 +178,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs index dbb527527ef..1dd21ea617e 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/ResourceNamespaces/ResourceNamespacesRequestBuilder.cs @@ -98,7 +98,7 @@ public ResourceNamespacesRequestBuilder(string rawUrl, IRequestAdapter requestAd public async Task PostAsync(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -142,7 +142,7 @@ public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta. public RequestInformation ToPostRequestInformation(global::Microsoft.Graph.Beta.Models.UnifiedRbacResourceNamespace body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs index 824741cef42..df6db63f174 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnGetResponse.cs @@ -36,7 +36,7 @@ public partial class FilterByCurrentUserWithOnGetResponse : global::Microsoft.Gr /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.RoleManagement.DirectoryNamespace.RoleAssignmentApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.DirectoryNamespace.RoleAssignmentApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnGetResponse(); } /// @@ -56,7 +56,7 @@ public override IDictionary> GetFieldDeserializers() /// Serialization writer to use to serialize this model public override void Serialize(ISerializationWriter writer) { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); + if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); writer.WriteCollectionOfObjectValues("value", Value); } diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs index ae469973060..3cd384bce95 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentApprovals/FilterByCurrentUserWithOn/FilterByCurrentUserWithOnResponse.cs @@ -20,7 +20,7 @@ public partial class FilterByCurrentUserWithOnResponse : global::Microsoft.Graph /// The parse node to use to read the discriminator value and create the object public static new global::Microsoft.Graph.Beta.RoleManagement.DirectoryNamespace.RoleAssignmentApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse CreateFromDiscriminatorValue(IParseNode parseNode) { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode)); return new global::Microsoft.Graph.Beta.RoleManagement.DirectoryNamespace.RoleAssignmentApprovals.FilterByCurrentUserWithOn.FilterByCurrentUserWithOnResponse(); } } diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentApprovals/Item/ApprovalItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentApprovals/Item/ApprovalItemRequestBuilder.cs index b0ff5e181e7..37bf1e421c7 100644 --- a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentApprovals/Item/ApprovalItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentApprovals/Item/ApprovalItemRequestBuilder.cs @@ -106,7 +106,7 @@ public async Task DeleteAsync(Action PatchAsync(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> { @@ -170,7 +170,7 @@ public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta public RequestInformation ToPatchRequestInformation(global::Microsoft.Graph.Beta.Models.Approval body, Action> requestConfiguration = default) { #endif - _ = body ?? throw new ArgumentNullException(nameof(body)); + if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/json"); diff --git a/src/Microsoft.Graph/Generated/RoleManagement/DirectoryNamespace/RoleAssignmentApprovals/Item/Steps/Item/ApprovalStepItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/RoleMan{"code":"internal","msg":"git-diff-tree: context deadline exceeded","meta":{"cause":"*fmt.wrapError"}}